/* =================================================================
   Heejin Jung — main stylesheet
   1. Fonts   2. Tokens   3. Base   4. Layout   5. Components
   6. Sections   7. Motion   8. Responsive
   Brand colours and type live in the tokens block: change them there.
   ================================================================= */

/* ---------- 1. Fonts (self-hosted, SIL Open Font License) ---------- */
/* Gowun Batang: a serif drawn for Hangul with a matching Latin, so the
   name and the three languages share one voice. */
@font-face {
  font-family: 'Gowun Batang';
  src: url(/assets/fonts/gowun-batang-latin.woff2) format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215;
}
@font-face { font-family: 'Gowun Batang'; src: url(/assets/fonts/gowun-batang-hangul-1.woff2) format('woff2'); font-display: swap; unicode-range: U+AC00-B217; }
@font-face { font-family: 'Gowun Batang'; src: url(/assets/fonts/gowun-batang-hangul-2.woff2) format('woff2'); font-display: swap; unicode-range: U+B218-B9DB; }
@font-face { font-family: 'Gowun Batang'; src: url(/assets/fonts/gowun-batang-hangul-3.woff2) format('woff2'); font-display: swap; unicode-range: U+B9DC-C178; }
@font-face { font-family: 'Gowun Batang'; src: url(/assets/fonts/gowun-batang-hangul-4.woff2) format('woff2'); font-display: swap; unicode-range: U+C179-C79A; }
@font-face { font-family: 'Gowun Batang'; src: url(/assets/fonts/gowun-batang-hangul-5.woff2) format('woff2'); font-display: swap; unicode-range: U+C79B-CFE8; }
@font-face { font-family: 'Gowun Batang'; src: url(/assets/fonts/gowun-batang-hangul-6.woff2) format('woff2'); font-display: swap; unicode-range: U+CFE9-D7A3; }

@font-face {
  font-family: 'Instrument Sans';
  src: url(/assets/fonts/instrument-sans-latin.woff2) format('woff2');
  font-weight: 400 700; font-stretch: 75% 100%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215;
}
@font-face { font-family: 'Gowun Dodum'; src: url(/assets/fonts/gowun-dodum-hangul-1.woff2) format('woff2'); font-display: swap; unicode-range: U+AC00-B217; }
@font-face { font-family: 'Gowun Dodum'; src: url(/assets/fonts/gowun-dodum-hangul-2.woff2) format('woff2'); font-display: swap; unicode-range: U+B218-B9DB; }
@font-face { font-family: 'Gowun Dodum'; src: url(/assets/fonts/gowun-dodum-hangul-3.woff2) format('woff2'); font-display: swap; unicode-range: U+B9DC-C178; }
@font-face { font-family: 'Gowun Dodum'; src: url(/assets/fonts/gowun-dodum-hangul-4.woff2) format('woff2'); font-display: swap; unicode-range: U+C179-C79A; }
@font-face { font-family: 'Gowun Dodum'; src: url(/assets/fonts/gowun-dodum-hangul-5.woff2) format('woff2'); font-display: swap; unicode-range: U+C79B-CFE8; }
@font-face { font-family: 'Gowun Dodum'; src: url(/assets/fonts/gowun-dodum-hangul-6.woff2) format('woff2'); font-display: swap; unicode-range: U+CFE9-D7A3; }

/* ---------- 2. Tokens ---------- */
:root {
  /* Palette: cool porcelain neutrals + one celadon accent */
  --porcelain: #F3F4F1;   /* page */
  --mist: #E8EBE6;        /* tinted sections, empty image frames */
  --paper: #FAFBF9;       /* raised surfaces */
  --ink: #1D2327;         /* text, dark section */
  --slate: #4B5357;       /* secondary text */
  --rule: #CFD5D0;        /* lines */
  --celadon: #7A9E90;     /* decorative accent */
  --celadon-ink: #3D6457; /* accent for text/links (AA on porcelain) */
  --celadon-wash: #DDE7E1;

  --on-ink: #EEF1EE;
  --on-ink-soft: #AEB8B4;
  --celadon-light: #A9C9BC;

  --font-display: 'Gowun Batang', 'Noto Serif KR', 'AppleMyungjo', Georgia, 'Times New Roman', serif;
  --font-body: 'Instrument Sans', 'Gowun Dodum', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Type scale (≈ perfect fourth) */
  --fs-small: 0.875rem;
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --fs-h2: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  --fs-name: clamp(3.4rem, 1.4rem + 8.2vw, 8.75rem);
  --fs-tongue: clamp(3rem, 1rem + 8vw, 8.5rem);

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --section-y: clamp(5.5rem, 4rem + 7vw, 10rem);
  --max: 78rem;
  --header-h: 4.5rem;
  --radius: 3px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 1rem);
  background: var(--porcelain);
  color-scheme: light;
}
body {
  margin: 0;
  background: var(--porcelain);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
:lang(ko) { word-break: keep-all; line-height: 1.75; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--celadon-wash); color: var(--ink); }

:focus-visible { outline: 2px solid var(--celadon-ink); outline-offset: 3px; border-radius: 2px; }
.section--ink :focus-visible { outline-color: var(--celadon-light); }
main:focus { outline: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: 0.6rem 1rem; background: var(--ink); color: var(--porcelain);
  border-radius: var(--radius); text-decoration: none; transition: top 0.2s;
}
.skip-link:focus { top: calc(1rem + env(safe-area-inset-top, 0px)); }

/* Placeholder marker: remove the brackets and the style goes with it */
.ph {
  color: var(--celadon-ink);
  background: var(--celadon-wash);
  padding: 0.05em 0.35em;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  font-style: normal;
}
.section--ink .ph { color: var(--celadon-light); background: rgba(169, 201, 188, 0.12); }

/* ---------- 4. Layout ---------- */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--tint { background: var(--mist); }
.section--ink { background: var(--ink); color: var(--on-ink); }

/* Editorial split: heading column + content column */
.split { display: grid; gap: 2rem var(--gutter); grid-template-columns: repeat(12, minmax(0, 1fr)); }
.split__head { grid-column: 1 / span 4; }
.split__body { grid-column: 5 / -1; min-width: 0; }

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.section-intro { font-size: var(--fs-lead); color: var(--slate); max-width: 38em; line-height: 1.55; }
.section--ink .section-intro { color: var(--on-ink-soft); }
.minor-title { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h3); line-height: 1.3; }
.prose { max-width: 36em; }
.prose p + p { margin-top: 1.1em; }

/* ---------- 5. Components ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.75rem 1.5rem;
  border: 1px solid transparent; border-radius: var(--radius);
  font-size: 0.975rem; font-weight: 500; letter-spacing: 0.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn--primary { background: var(--ink); color: var(--porcelain); }
.btn--primary:hover { background: var(--celadon-ink); }
.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: var(--porcelain); }
.btn--light { background: var(--on-ink); color: var(--ink); }
.btn--light:hover { background: var(--celadon-light); }
.btn--small { min-height: 2.5rem; padding: 0.45rem 1.1rem; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.link-quiet {
  color: var(--ink); font-weight: 500; text-decoration: underline;
  text-decoration-color: var(--celadon); text-decoration-thickness: 1px;
  text-underline-offset: 0.35em; padding-block: 0.6rem;
  transition: text-decoration-color 0.2s, color 0.2s;
}
.link-quiet:hover { color: var(--celadon-ink); text-decoration-color: currentColor; }

/* Images and reserved image frames */
.media { width: 100%; object-fit: cover; object-position: 50% 20%; background: var(--mist); border-radius: var(--radius); }
.media--empty {
  display: grid; place-items: center; position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(122, 158, 144, 0.16), transparent 60%),
    var(--mist);
}
.section--tint .media--empty { background-color: var(--paper); }
.media__label {
  font-size: var(--fs-small); color: var(--celadon-ink);
  padding: 0.3rem 0.7rem; background: rgba(250, 251, 249, 0.7); border-radius: 2px;
}

/* Language switcher */
.lang ul { display: flex; align-items: center; gap: 0.55rem; }
.lang a {
  display: inline-block; padding: 0.35rem 0.1rem; font-size: 0.875rem;
  color: var(--slate); text-decoration: none; transition: color 0.2s;
}
.lang a:hover { color: var(--ink); }
.lang a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--celadon); text-underline-offset: 0.45em; }
.lang__sep { color: var(--rule); font-size: 0.8rem; user-select: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(243, 244, 241, 0);
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.site-header.is-scrolled, .site-header.is-open {
  background: rgba(243, 244, 241, 0.92);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  box-shadow: 0 1px 0 var(--rule);
}
/* backdrop-filter would trap the fixed menu inside the header, so drop it while open */
.site-header.is-open { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--porcelain); }
.site-header__inner { display: flex; align-items: center; gap: 2rem; min-height: var(--header-h); }
.brand {
  font-family: var(--font-display); font-size: 1.3rem; letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap; margin-right: auto;
}
.primary-nav ul { display: flex; gap: clamp(1rem, 2vw, 2rem); }
.primary-nav a {
  font-size: 0.95rem; text-decoration: none; color: var(--slate);
  padding-block: 0.5rem; background: linear-gradient(var(--celadon), var(--celadon)) left bottom / 0 1px no-repeat;
  transition: color 0.2s, background-size 0.3s var(--ease);
}
.primary-nav a:hover, .primary-nav a.is-active { color: var(--ink); background-size: 100% 1px; }
.site-header__end { display: flex; align-items: center; gap: 1.5rem; }
.menu-toggle {
  display: none; background: none; border: 0; padding: 0.6rem 0; cursor: pointer;
  font-size: 0.95rem; font-weight: 500; min-width: 3.5rem; text-align: right;
}

.mobile-menu {
  position: fixed; inset: 0; top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  background: var(--porcelain); overflow-y: auto; overscroll-behavior: contain;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu__inner { display: flex; flex-direction: column; justify-content: space-between; min-height: 100%; padding-block: 2rem calc(2rem + env(safe-area-inset-bottom, 0px)); gap: 3rem; }
.mobile-menu__links a {
  display: block; font-family: var(--font-display); font-size: clamp(2rem, 8vw, 2.75rem);
  line-height: 1.2; padding-block: 0.4rem; text-decoration: none;
}
.mobile-menu__links a.is-active { color: var(--celadon-ink); }

/* ---------- 6. Sections ---------- */
/* Hero */
.hero { padding-block: clamp(2rem, 5vw, 4.5rem) clamp(4rem, 7vw, 6rem); }
.hero__grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 3rem var(--gutter); align-items: end;
}
.hero__text { grid-column: 1 / span 7; padding-bottom: clamp(0rem, 2vw, 1.5rem); }
.hero__portrait { grid-column: 8 / -1; }
.hero__title { font-weight: 400; }
.hero__name {
  display: block; font-family: var(--font-display);
  font-size: var(--fs-name); line-height: 0.92; letter-spacing: -0.03em;
  margin-left: -0.04em;
}
.hero__name-alt {
  display: block; margin-top: clamp(1rem, 2vw, 1.6rem);
  font-family: var(--font-display); font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem);
  line-height: 1.2; color: var(--slate); letter-spacing: 0.02em;
}
.hero__name-alt + .hero__role { margin-top: 1rem; }
:lang(ko) .hero__name { letter-spacing: -0.01em; }
.hero__role {
  display: block; margin-top: clamp(1.25rem, 2.5vw, 2rem);
  font-family: var(--font-body); font-size: var(--fs-lead); font-weight: 500;
  letter-spacing: 0.01em; color: var(--ink);
}
.hero__lede { margin-top: 1rem; max-width: 30em; font-size: var(--fs-lead); line-height: 1.55; color: var(--slate); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: clamp(2rem, 4vw, 3rem); }
.hero__portrait .media--empty::before {
  content: 'HJ'; position: absolute; font-family: var(--font-display);
  font-size: clamp(6rem, 14vw, 12rem); letter-spacing: -0.04em; color: rgba(61, 100, 87, 0.09);
}
.hero__portrait .media__label { position: absolute; left: 1rem; bottom: 1rem; }

/* About */
.about__photo { margin-top: 2.5rem; max-width: 22rem; }
.about__bio { font-size: var(--fs-lead); line-height: 1.6; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem var(--gutter); margin-top: clamp(2.5rem, 5vw, 4rem); max-width: 44rem; }
.facts__item { border-top: 1px solid var(--rule); padding-top: 1rem; }
.facts dt { font-size: var(--fs-small); color: var(--slate); }
.facts dd { margin-top: 0.3rem; font-family: var(--font-display); font-size: var(--fs-h3); line-height: 1.35; }

/* Languages: the typographic set piece */
.section--languages { overflow: hidden; }
.tongues { margin-block: clamp(3rem, 6vw, 5.5rem); }
.tongue {
  position: relative; display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.5rem 2rem;
  padding-block: clamp(0.9rem, 2vw, 1.6rem);
}
.tongue:nth-child(2) { padding-left: clamp(0rem, 12vw, 12rem); }
.tongue:nth-child(3) { padding-left: clamp(0rem, 24vw, 24rem); }
.tongue::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--celadon); transform-origin: left; transform: scaleX(1);
}
.tongue:last-child::after { display: none; }
.tongue__word {
  font-family: var(--font-display); font-size: var(--fs-tongue);
  line-height: 1; letter-spacing: -0.03em;
}
:lang(ko) .tongue__word { letter-spacing: -0.01em; }
.tongue__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; text-align: right; font-size: var(--fs-small); color: var(--slate); }
.tongue__gloss { font-size: var(--fs-body); color: var(--ink); }
.directions .split__head { align-self: start; }
.directions__list { display: flex; flex-wrap: wrap; gap: 0.75rem 2.5rem; font-family: var(--font-display); font-size: var(--fs-h3); }
.directions__arrow { color: var(--celadon-ink); }

/* Language pairs */
.pairs { display: flex; flex-wrap: wrap; gap: 0.75rem 3rem; font-family: var(--font-display); font-size: var(--fs-h3); }
.pairs li { display: inline-flex; align-items: center; gap: 0.75rem; }
.pairs__sep { display: inline-block; width: 2.25rem; height: 1px; background: var(--celadon); }
.pairs__note { margin-top: 1rem; color: var(--slate); max-width: 36em; }

/* Services */
.services {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3rem var(--gutter); margin-top: clamp(3rem, 6vw, 5rem);
}
.service .icon { color: var(--celadon-ink); width: 1.75rem; height: 1.75rem; }
.service__title { margin-top: 1.25rem; font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h3); line-height: 1.3; }
.service__text { margin-top: 0.6rem; color: var(--slate); max-width: 26em; }

/* Portfolio */
.projects {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(3rem, 6vw, 5rem) var(--gutter); margin-top: clamp(3rem, 6vw, 5rem);
}
.project--feature { grid-column: 1 / -1; }
.project--feature article { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2rem var(--gutter); align-items: end; }
.project--feature .project__media { grid-column: 1 / span 8; }
.project--feature .project__body { grid-column: 9 / -1; }
.project__body { margin-top: 1.5rem; }
.project--feature .project__body { margin-top: 0; }
.project__title { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h3); line-height: 1.3; }
.project__meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin-top: 1rem; font-size: var(--fs-small); }
.project__meta dt { color: var(--slate); }
.project__meta dd { margin-top: 0.1rem; }
.project__text { margin-top: 1rem; color: var(--slate); max-width: 34em; }

/* Selected work: editorial list */
.works { margin-top: clamp(3rem, 6vw, 4.5rem); border-top: 1px solid var(--rule); }
.work { border-bottom: 1px solid var(--rule); }
.work__inner {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.75rem var(--gutter); padding-block: clamp(1.75rem, 3.5vw, 2.75rem);
}
.work__date { grid-column: 1 / span 2; font-size: var(--fs-small); color: var(--slate); padding-top: 0.35rem; font-variant-numeric: tabular-nums; }
.work__main { grid-column: 3 / span 6; }
.work__meta { grid-column: 9 / -1; display: grid; gap: 1rem; align-content: start; font-size: var(--fs-small); padding-top: 0.35rem; }
.work__meta dt { color: var(--slate); }
.work__meta dd { margin-top: 0.15rem; }
.work__title { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h3); line-height: 1.3; text-wrap: balance; }
.work__points, .timeline__points { margin-top: 0.75rem; display: grid; gap: 0.4rem; color: var(--slate); max-width: 38em; }
.work__points li, .timeline__points li { position: relative; padding-left: 1.1rem; }
.work__points li::before, .timeline__points li::before {
  content: ''; position: absolute; left: 0; top: 0.8em; width: 0.45rem; height: 1px; background: var(--celadon);
}
.work__media { margin-top: 1.5rem; }

/* Experience timeline (a real sequence: most recent first) */
.timeline { margin-top: clamp(2.5rem, 5vw, 3.5rem); border-left: 1px solid var(--celadon); }
.timeline__item {
  position: relative; display: grid; grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0.5rem var(--gutter); padding: 0 0 clamp(2rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: ''; position: absolute; left: -4px; top: 0.55em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--mist); border: 1px solid var(--celadon-ink);
}
.timeline__period { font-size: var(--fs-small); color: var(--slate); padding-top: 0.2rem; font-variant-numeric: tabular-nums; }
.timeline__role { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h3); line-height: 1.3; }
.timeline__org { margin-top: 0.2rem; }
.timeline__text { margin-top: 0.6rem; color: var(--slate); max-width: 34em; }

/* Credentials */
.credentials { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 2.5rem var(--gutter); }
.credentials__group { border-top: 1px solid var(--rule); padding-top: 1rem; }
.credentials ul { margin-top: 1rem; display: grid; gap: 1.1rem; }
.credentials li { display: flex; flex-direction: column; gap: 0.15rem; }
.credentials__detail { font-size: var(--fs-small); color: var(--slate); }

/* Testimonials */
.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem var(--gutter); margin-top: clamp(3rem, 6vw, 4.5rem); }
.quote blockquote {
  font-family: var(--font-display); font-size: clamp(1.4rem, 1.1rem + 1.1vw, 2rem);
  line-height: 1.4; letter-spacing: -0.005em; text-wrap: pretty;
}
.quote blockquote p::before { content: '“'; color: var(--celadon); margin-right: 0.05em; }
.quote blockquote p::after { content: '”'; color: var(--celadon); }
.quote blockquote p:has(> .ph:only-child)::before, .quote blockquote p:has(> .ph:only-child)::after { content: none; }
.quote figcaption { display: flex; flex-direction: column; margin-top: 1.5rem; font-size: var(--fs-small); }
.quote__role { color: var(--slate); }

/* Contact */
.section--ink .section-title { color: var(--on-ink); }
.section-title + .section-intro { margin-top: 1.25rem; }
.details { margin-top: clamp(2.5rem, 5vw, 3.5rem); display: grid; gap: 1.1rem; }
.details dt { font-size: var(--fs-small); color: var(--on-ink-soft); }
.details dd { margin-top: 0.1rem; }
.details a { text-decoration-color: var(--celadon-light); }
.details a:hover { color: var(--celadon-light); }

.form { max-width: 44rem; }
.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem var(--gutter); }
.field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 0.95rem; }
.field__optional, .field__hint { color: var(--on-ink-soft); font-size: var(--fs-small); }
.field input:not([type='checkbox']), .field textarea {
  width: 100%; min-height: 3rem; padding: 0.7rem 0.9rem;
  background: rgba(238, 241, 238, 0.06); border: 1px solid rgba(238, 241, 238, 0.22);
  border-radius: var(--radius); color: var(--on-ink); font-size: 1rem;
  transition: border-color 0.2s, background-color 0.2s;
}
.field textarea { resize: vertical; min-height: 9rem; line-height: 1.55; }
.field input:hover, .field textarea:hover { border-color: rgba(238, 241, 238, 0.4); }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--celadon-light); background: rgba(238, 241, 238, 0.1); box-shadow: 0 0 0 1px var(--celadon-light); }
.field [aria-invalid='true'] { border-color: #E5A89A !important; }
.field__error { color: #F0BBAE; font-size: var(--fs-small); }
.field--check { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 0.75rem; margin-top: 1.75rem; }
.field--check input { width: 1.15rem; height: 1.15rem; margin: 0.2rem 0 0; accent-color: var(--celadon-light); flex: none; }
.field--check label { flex: 1; }
.field--check .field__error { flex-basis: 100%; }
.field--check a { text-decoration-color: var(--celadon-light); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__footer { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }
.form__status { font-size: 0.95rem; color: var(--on-ink-soft); max-width: 32em; }
.form__status.is-success { color: var(--celadon-light); }
.form__status.is-error { color: #F0BBAE; }

/* Footer */
.site-footer { padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.site-footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 2.5rem var(--gutter); }
.site-footer__name { font-family: var(--font-display); font-size: 1.5rem; }
.site-footer__role { color: var(--slate); font-size: var(--fs-small); margin-top: 0.2rem; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; align-self: start; font-size: 0.95rem; }
.site-footer__links a, .site-footer__legal a { text-decoration: none; padding-block: 0.3rem; display: inline-block; }
.site-footer__links a:hover, .site-footer__legal a:hover { color: var(--celadon-ink); text-decoration: underline; }
.site-footer__legal {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem;
  padding-top: 1.5rem; border-top: 1px solid var(--rule); font-size: var(--fs-small); color: var(--slate);
}
.site-footer__legal ul { display: flex; gap: 1.5rem; }

/* Legal pages */
.legal__updated { margin-top: 1rem; font-size: var(--fs-small); color: var(--slate); }
.legal__intro { font-size: var(--fs-lead); line-height: 1.55; }
.legal__section { margin-top: 2.5rem; }
.legal__heading { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h3); line-height: 1.3; margin-bottom: 0.75rem; }
.legal__section p + p { margin-top: 0.9em; }
.legal__list { margin-top: 0.75rem; display: grid; gap: 0.4rem; }
.legal__list li { position: relative; padding-left: 1.1rem; }
.legal__list li::before { content: ''; position: absolute; left: 0; top: 0.8em; width: 0.45rem; height: 1px; background: var(--celadon); }
.legal a { text-decoration-color: var(--celadon); overflow-wrap: anywhere; }
.legal__back { margin-top: 3rem; }

/* ---------- 7. Motion ---------- */
/* One orchestrated moment on load: name, role, text, then the portrait. */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__name, .js .hero__role, .js .hero__lede, .js .hero__actions {
    animation: rise 0.9s var(--ease) both;
  }
  .js .hero__role { animation-delay: 0.12s; }
  .js .hero__lede { animation-delay: 0.22s; }
  .js .hero__actions { animation-delay: 0.32s; }
  .js .hero__portrait { animation: unveil 1.2s var(--ease) 0.15s both; }

  /* Languages: the lines between the three words draw in once. */
  .js .tongues[data-reveal] .tongue::after { transform: scaleX(0); transition: transform 1.1s var(--ease); }
  .js .tongues[data-reveal] .tongue:nth-child(2)::after { transition-delay: 0.15s; }
  .js .tongues.is-visible .tongue::after { transform: scaleX(1); }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes unveil { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- 8. Responsive ---------- */
@media (max-width: 1100px) {
  .primary-nav ul { gap: 1.1rem; }
  .site-header__inner { gap: 1.5rem; }
}
@media (max-width: 960px) {
  .primary-nav, .site-header__end > .btn { display: none; }
  .site-header__end { gap: 1.25rem; }
  .menu-toggle { display: inline-block; }
  .split__head, .split__body { grid-column: 1 / -1; }
  .split { row-gap: 1.25rem; }
  .hero__grid { align-items: start; }
  .hero__text { grid-column: 1 / -1; }
  .hero__portrait { grid-column: 3 / span 8; }
  .services { grid-template-columns: 1fr 1fr; }
  .project--feature article { display: block; }
  .work__date { grid-column: 1 / -1; padding-top: 0; }
  .work__main { grid-column: 1 / span 8; }
  .work__meta { grid-column: 9 / -1; }
  .project--feature .project__body { margin-top: 1.5rem; }
  .quotes { grid-template-columns: 1fr; }
  .about__photo { display: none; }
}
@media (max-width: 640px) {
  :root { --header-h: 4rem; }
  .hero { padding-top: 1.5rem; }
  .hero__name { font-size: min(23vw, 8.75rem); line-height: 0.9; }
  .brand { font-size: 1.15rem; }
  .site-header__inner { gap: 1rem; }
  .hero__portrait { grid-column: 1 / -1; }
  .hero__actions .btn { width: 100%; }
  .services, .projects, .credentials, .form__grid, .facts { grid-template-columns: 1fr; }
  .facts { gap: 1.5rem; }
  .tongue { padding-left: 0 !important; flex-direction: column; align-items: flex-start; }
  .tongue__meta { align-items: flex-start; text-align: left; }
  .timeline__item { grid-template-columns: 1fr; }
  .work__main, .work__meta { grid-column: 1 / -1; }
  .work__meta { grid-template-columns: 1fr 1fr; padding-top: 0.5rem; }
  .site-footer__inner { grid-template-columns: 1fr; }
  .form__footer .btn { width: 100%; }
}
@media (max-width: 374px) {
  .site-header__inner, .site-header__end { gap: 0.75rem; }
  .lang ul { gap: 0.4rem; }
  .brand { font-size: 1.05rem; }
  .menu-toggle { min-width: 0; }
}
.split__body > .timeline:first-child { margin-top: 0.6rem; }
