/*
  Visual system: warm paper background, dark ink text, muted accent.
  The palette avoids trendy neon/purple while staying crisp and readable.
*/
:root {
  --paper: #050505;
  --paper-2: #0a0a0a;
  --ink: #f5f3ee;
  --ink-muted: #a7a39c;
  --accent: #d1a77a;
  --accent-2: #7aa389;
  --border: #1b1b1b;
  --card: #0f0f0f;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  --radius: 16px;
}

/* Base layout and typography rules. */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 15% 10%, #0e0e0e 0%, transparent 45%),
    radial-gradient(circle at 85% 0%, #111 0%, transparent 45%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

h1,
h2,
h3,
h4 {
  font-family: "Iropke Batang", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 12px;
  color: var(--ink-muted);
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

/* Navigation styles stay understated yet bold. */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(6px);
  z-index: 10;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.brand {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.06em;
}

.nav-links {
  display: flex;
  gap: 18px;
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 13px;
  letter-spacing: 0.05em;
}

.auth-area {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.auth-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-status {
  font-size: 12px;
  color: #b9b9b9;
}

.auth-btn {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
  cursor: pointer;
}

.auth-btn:hover {
  background: var(--accent-2);
  color: #050505;
}

.auth-hint {
  font-size: 11px;
  color: #b9b9b9;
}

.nav-link {
  padding: 6px 8px;
  border-radius: 999px;
  transition: background 0.3s ease, color 0.3s ease;
}

.nav-link:hover {
  background: var(--accent-2);
  color: #050505;
}

/* Hero layout with a subtle split grid. */
.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  padding: 64px 0 80px;
}

.hero-title {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
}

.accent {
  color: var(--accent);
}

.eyebrow {
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 11px;
  color: var(--accent-2);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  padding: 12px 20px;
  border-radius: 999px;
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  border: 1px solid var(--ink);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.button.primary {
  background: var(--ink);
  color: #050505;
  border-color: transparent;
}

.button.ghost {
  background: transparent;
  color: var(--ink);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hero-cards {
  display: grid;
  gap: 16px;
}

.home-links {
  margin-top: 18px;
}

.home-link-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.home-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
}

.home-link:hover {
  background: var(--accent-2);
  color: #050505;
}

.home-list {
  margin-top: 10px;
}

.home-ul {
  margin: 0;
  padding-left: 18px;
}

.home-li {
  margin: 10px 0;
}

.home-li-title {
  font-weight: 700;
}

.home-li-meta {
  margin-top: 4px;
  font-size: 13px;
  color: #b9b9b9;
}

.home-li-tags {
  margin-top: 8px;
}

.home-muted {
  color: #b9b9b9;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
}

/* Shared layout for content pages. */
.page {
  padding: 56px 0 80px;
}

.page-title {
  font-size: clamp(28px, 4vw, 44px);
}

.page-desc {
  margin-top: 10px;
  color: #b9b9b9;
  max-width: 72ch;
  line-height: 1.7;
}

.section {
  margin-top: 32px;
}

.section h2 {
  font-size: 22px;
  margin-bottom: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #151515;
  font-size: 12px;
  margin-right: 8px;
}

/* Builder layout for left/center/right panels. */
.builder-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.3fr) minmax(280px, 1.4fr);
  gap: 20px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  min-height: 200px;
}

.panel h3 {
  margin-bottom: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.field label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  background: #0a0a0a;
  color: var(--ink);
}

.list-item {
  border-bottom: 1px dashed var(--border);
  padding: 12px 0;
}

.list-item:last-child {
  border-bottom: none;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 12px;
  background: #151515;
  font-size: 11px;
  margin-right: 6px;
}

.preview {
  background: #0b0b0b;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  width: 100%;
}

/* Print template layout mirrors the provided PDF sample. */
.print-sheet {
  font-size: 13px;
  line-height: 1.6;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.print-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  /* 상단 헤더 구분선을 제거해 PDF에서 과한 강조를 줄입니다. */
  border-bottom: none;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.print-identity h2 {
  margin-bottom: 4px;
  font-size: 26px;
}

.print-contact {
  font-size: 12px;
  text-align: right;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* 자동 요약 영역을 완전히 숨겨 레이아웃에서 제외합니다. */
#printSummary {
  display: none;
}

.print-section {
  margin-bottom: 18px;
}

.print-section h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  border-bottom: 1px solid rgba(245, 243, 238, 0.12);
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.print-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  margin-bottom: 6px;
}

.print-item {
  margin-bottom: 12px;
}

.print-item-section {
  margin-top: 8px;
}

.print-item-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.print-item-title {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.print-item-meta {
  color: var(--ink-muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.print-footer {
  margin-top: 24px;
  font-size: 12px;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.print-company-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 6px;
}


.print-muted {
  color: var(--ink-muted);
  font-size: 12px;
}

/* Resume company grouping helpers. */
.company-group {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.company-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 6px;
}

.company-item {
  margin-bottom: 10px;
}

.company-item-title {
  font-weight: 600;
}

.company-item-meta,
.company-item-tech {
  font-size: 12px;
  color: var(--ink-muted);
}

.preview h2 {
  margin-top: 20px;
}

.preview .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-muted);
}

/* Blog list and post layout. */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.post-meta {
  font-size: 12px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Footer stays simple to keep attention on content. */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 18px 0 32px;
  font-size: 12px;
  color: var(--ink-muted);
}

/* Motion: gentle rise with staggered delays. */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.8s ease forwards;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .builder-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .button {
    transition: none;
  }
}

/* Print styles: hide controls and keep preview clean for PDF export. */
@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  body {
    background: #fff;
    color: #000;
    margin: 0;
  }

  .site-header,
  .site-footer,
  .builder-controls,
  .builder-grid .panel,
  .print-hide {
    display: none !important;
  }

  .preview {
    border: none;
    box-shadow: none;
    color: #000;
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .print-section h3 {
    color: #000;
    border-bottom: 1px solid #bdbdbd;
  }

  .print-contact {
    color: #000;
  }
}
.company-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  background: #151515;
  border: 1px solid var(--border);
  font-size: 11px;
  letter-spacing: 0.05em;
}

/* Company logo image keeps the badge size and alignment consistent in print. */
.company-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}
