:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --text: #15171a;
  --muted: #68707a;
  --line: #dfe3e8;
  --accent: #2667ff;
  --accent-soft: #edf3ff;
  --max: 1120px;
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.72;
  letter-spacing: -0.015em;
}
a { color: inherit; text-decoration: none; }
.wrap { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}
.nav { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-weight: 800; font-size: 1.05rem; letter-spacing: -0.04em; }
nav { display: flex; align-items: center; gap: 24px; color: var(--muted); font-size: .92rem; }
nav a:hover { color: var(--text); }

.hero { padding: 108px 0 88px; }
.eyebrow, .kicker { color: var(--accent); font-weight: 700; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.hero h1 { margin: 14px 0 24px; font-size: clamp(3.2rem, 7.6vw, 6.8rem); line-height: .98; letter-spacing: -0.065em; }
.hero h1 span { color: var(--muted); font-weight: 600; }
.lead { max-width: 850px; margin: 0; font-size: clamp(1.05rem, 1.8vw, 1.28rem); color: #3e444c; }
.hero-actions { display: flex; gap: 10px; margin-top: 32px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 700; font-size: .92rem; }
.button.primary { background: var(--text); color: #fff; border-color: var(--text); }
.skill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 42px; }
.skill-row span, .tags span { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 6px 10px; font-size: .78rem; font-weight: 600; }

.section { padding: 78px 0; border-top: 1px solid var(--line); }
.section.compact { padding-bottom: 100px; }
.section-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: end; margin-bottom: 32px; }
.section-heading h2 { margin: 4px 0 0; font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -0.055em; line-height: 1.05; }
.section-heading > p { margin: 0; color: var(--muted); max-width: 560px; justify-self: end; }

.career-card, .project-card, .info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.career-card { padding: 32px; }
.career-top { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.career-top h3 { margin: 0 0 2px; font-size: 1.45rem; letter-spacing: -.035em; }
.career-top p { margin: 0; color: var(--muted); }
.period { font-size: .85rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 42px; padding-top: 26px; }
h4 { margin: 0 0 14px; font-size: .9rem; letter-spacing: .02em; }
ul { margin: 0; padding-left: 1.15rem; }
li + li { margin-top: 7px; }
.client-list { display: grid; gap: 13px; }
.client-list div { padding: 13px 14px; background: var(--surface-2); border-radius: 13px; }
.client-list strong, .client-list span { display: block; }
.client-list strong { font-size: .92rem; }
.client-list span { color: var(--muted); font-size: .82rem; margin-top: 3px; }

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.project-card { padding: 26px; min-height: 100%; display: flex; flex-direction: column; }
.project-card.featured { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: 0 14px 40px rgba(27, 65, 145, .08); }
.project-no { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .82rem; }
.project-card h3 { margin: 20px 0 10px; font-size: 1.28rem; letter-spacing: -.035em; }
.project-card p { margin: 0 0 16px; color: var(--muted); }
.project-card ul { margin-bottom: 22px; font-size: .9rem; }
.tags { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; }

.background-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 16px; }
.info-card { padding: 26px; }
.info-card h3 { margin: 0 0 22px; font-size: 1.08rem; }
.timeline-item + .timeline-item { margin-top: 24px; }
.timeline-item span, .cert-list span { color: var(--muted); font-size: .78rem; font-weight: 700; }
.timeline-item strong { display: block; margin-top: 3px; }
.timeline-item p { margin: 1px 0 0; color: var(--muted); font-size: .9rem; }
.cert-list { display: grid; }
.cert-list div { display: grid; grid-template-columns: 74px 130px 1fr; gap: 12px; align-items: baseline; padding: 11px 0; border-top: 1px solid var(--line); }
.cert-list div:first-child { border-top: 0; padding-top: 0; }
.cert-list small { color: var(--muted); }

.footer { border-top: 1px solid var(--line); padding: 34px 0 48px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; color: var(--muted); }
.footer strong { color: var(--text); }
.footer p { margin: 4px 0 0; font-size: .9rem; }
.footer a { font-weight: 700; color: var(--text); font-size: .9rem; }

@media (max-width: 820px) {
  .wrap { width: min(calc(100% - 28px), var(--max)); }
  nav a:not(:last-child) { display: none; }
  .hero { padding: 78px 0 60px; }
  .hero h1 { font-size: clamp(3rem, 14vw, 5rem); }
  .section { padding: 58px 0; }
  .section-heading, .two-col, .background-grid { grid-template-columns: 1fr; }
  .section-heading { gap: 14px; }
  .section-heading > p { justify-self: start; }
  .project-grid { grid-template-columns: 1fr; }
  .career-card { padding: 22px; }
  .career-top { flex-direction: column; gap: 7px; }
  .two-col { gap: 30px; }
  .cert-list div { grid-template-columns: 70px 1fr; gap: 8px; }
  .cert-list small { grid-column: 2; }
  .footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d10;
    --surface: #111419;
    --surface-2: #171b21;
    --text: #f1f4f8;
    --muted: #9aa3ad;
    --line: #282d35;
    --accent: #79a4ff;
    --accent-soft: #172644;
  }
  .lead { color: #c4cbd4; }
  .button.primary { color: #0b0d10; background: #f1f4f8; border-color: #f1f4f8; }
  .project-card.featured { box-shadow: 0 14px 40px rgba(0, 0, 0, .22); }
}

.nav-right { display: flex; align-items: center; gap: 18px; }
.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .75rem;
  font-weight: 800;
  line-height: 1;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active { background: var(--text); color: var(--surface); }
html[lang="ja"] body { font-family: Inter, "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: -0.01em; }
html[lang="ja"] .lead { line-height: 1.85; }

@media (max-width: 820px) {
  .nav { min-height: 64px; gap: 12px; }
  .nav-right { gap: 10px; }
  nav { gap: 12px; }
  .language-switcher { flex-shrink: 0; }
  .lang-btn { padding: 7px 9px; }
}

@media (max-width: 520px) {
  nav a { display: none !important; }
  .hero { padding-top: 64px; }
  .hero h1 { font-size: clamp(2.7rem, 15vw, 4.3rem); }
  .lead { font-size: 1rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .button { width: 100%; }
  .skill-row { margin-top: 30px; }
  .section-heading h2 { font-size: 2rem; }
  .career-card, .project-card, .info-card { border-radius: 16px; }
  .career-card, .project-card, .info-card { padding: 20px; }
}
