/* ==========================================================================
   itsmeilinli.com — design system
   Layout: Swiss two-column grid. A narrow label column on the left names each
   section; a wide content column carries it. Generous vertical rhythm.
   ========================================================================== */

:root {
  /* Color */
  --ivory: #f6f2e9;        /* page */
  --ivory-deep: #efe9dc;   /* quiet fills */
  --ink: #23221f;          /* charcoal text */
  --ink-soft: #5f5a51;     /* secondary text */
  --rule: #ddd5c5;         /* hairlines */
  --accent: #2c4a63;       /* deep ink blue, used sparingly */
  --tbd: #9a6a1f;          /* placeholder marker */

  /* Secondary palette: muted, used in small doses */
  --sage: #5f7a5c;
  --ochre: #a87a2a;
  --chili: #a5493a;
  --tint-blue: #e3e8ea;
  --tint-sage: #e4e9dd;
  --tint-ochre: #f0e5cb;

  /* Type */
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --t-xs: 0.78rem;
  --t-sm: 0.9rem;
  --t-base: 1.0625rem;
  --t-md: 1.2rem;
  --t-lg: clamp(1.3rem, 1.9vw, 1.5rem);
  --t-xl: clamp(1.9rem, 3.4vw, 2.6rem);

  /* Space */
  --gutter: clamp(20px, 5vw, 56px);
  --section: clamp(48px, 7vw, 80px);
  --maxw: 1080px;
  --measure: 36rem;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ivory: #1b1a17;
    --ivory-deep: #23221e;
    --ink: #ede7da;
    --ink-soft: #a59e90;
    --rule: #37342e;
    --accent: #9fbcd4;
    --tbd: #d9a85a;
    --sage: #9db597;
    --ochre: #d4a95a;
    --chili: #d98a76;
    --tint-blue: #1f2629;
    --tint-sage: #20261f;
    --tint-ochre: #2a2418;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ivory: #1b1a17;
  --ivory-deep: #23221e;
  --ink: #ede7da;
  --ink-soft: #a59e90;
  --rule: #37342e;
  --accent: #9fbcd4;
  --tbd: #d9a85a;
  --sage: #9db597;
  --ochre: #d4a95a;
  --chili: #d98a76;
  --tint-blue: #1f2629;
  --tint-sage: #20261f;
  --tint-ochre: #2a2418;
}

/* Base ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 0.22em; text-decoration-thickness: 1px; transition: color .2s var(--ease), text-decoration-color .2s var(--ease); }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: var(--gutter); top: 12px; background: var(--ink); color: var(--ivory); padding: 8px 14px; z-index: 10; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* Placeholder marker: anything still waiting on real content */
.tbd {
  color: var(--tbd);
  border-bottom: 1px dashed currentColor;
  font-style: normal;
}
.tbd::before {
  content: "TO ADD";
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em;
  border: 1px solid currentColor; border-radius: 3px;
  padding: 1px 4px; margin-right: 6px; vertical-align: 0.2em;
}
.tbd[data-label]::before { content: attr(data-label); }

/* Header ----------------------------------------------------------------- */
.site-header { padding-block: 28px; }
.site-header .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.wordmark { font-family: var(--serif); font-size: 1.35rem; letter-spacing: -0.01em; text-decoration: none; }
.wordmark:hover { color: var(--ink); }
.nav { display: flex; gap: 4px 28px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; font-size: var(--t-sm); }
.nav a { text-decoration: none; color: var(--ink-soft); position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -3px; height: 1px; background: currentColor; transition: right .3s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { right: 0; }
.nav a[aria-current="page"] { color: var(--ink); }

/* Shared section grid ---------------------------------------------------- */
.band { padding-block: var(--section) 0; }
.grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 24px 48px; }
.label {
  font-family: var(--mono); font-size: var(--t-xs); font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft);
  padding-top: 0.55em;
}
.section-title { font-size: var(--t-lg); line-height: 1.2; letter-spacing: -0.01em; max-width: 22ch; }
.more { font-size: var(--t-sm); color: var(--ink-soft); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.more span { transition: transform .25s var(--ease); }
.more:hover span { transform: translateX(4px); }

/* Hero ------------------------------------------------------------------- */
.hero { padding-block: clamp(40px, 7vw, 80px) 0; }
.hero-kicker { font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); padding-top: 0.7em; display: grid; gap: 4px; align-content: start; }
.hero h1 { font-size: var(--t-xl); line-height: 1.15; letter-spacing: -0.015em; max-width: 24ch; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-body { display: grid; gap: 14px; margin-top: 22px; max-width: var(--measure); }
.hero-body p { color: var(--ink-soft); }
.hero-body .philosophy { font-family: var(--serif); font-style: italic; font-size: var(--t-md); color: var(--ink); }

/* Experience rows -------------------------------------------------------- */
.roles { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.role { border-bottom: 1px solid var(--rule); }
.role a {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) auto; gap: 8px 32px;
  padding-block: 22px; text-decoration: none; align-items: baseline;
}
.role a:hover { color: inherit; }
.role-org { font-family: var(--serif); font-size: var(--t-md); line-height: 1.25; }
.role-title { display: block; font-family: var(--sans); font-size: var(--t-sm); color: var(--ink-soft); margin-top: 4px; }
.role-summary { color: var(--ink-soft); font-size: 0.98rem; }
.role-result { display: block; margin-top: 8px; font-family: var(--mono); font-size: var(--t-xs); color: var(--accent); letter-spacing: 0.02em; }
.role-dates { font-family: var(--mono); font-size: var(--t-xs); color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.role-org, .role-summary { transition: transform .35s var(--ease); }
.role a:hover .role-org { transform: translateX(6px); color: var(--accent); }

/* Products & writing empty states --------------------------------------- */
.empty { border-top: 1px solid var(--rule); padding-top: 28px; display: grid; gap: 22px; max-width: 44rem; }
.empty p { color: var(--ink-soft); }
.stages { display: flex; flex-wrap: wrap; gap: 10px 0; list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); }
.stages li { display: flex; align-items: center; }
.stages li + li::before { content: ""; width: 40px; height: 1px; background: var(--rule); margin-inline: 12px; }
.stage-dot { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--ink-soft); margin-right: 8px; }
.stage-dot.half { background: linear-gradient(90deg, var(--ink-soft) 50%, transparent 50%); }
.stage-dot.full { background: var(--ink-soft); }

/* Footer ----------------------------------------------------------------- */
.site-footer { margin-top: var(--section); border-top: 1px solid var(--rule); padding-block: 40px 56px; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: baseline; gap: 16px 32px; flex-wrap: wrap; }
.site-footer .sign { font-family: var(--serif); font-size: var(--t-md); }
.links { display: flex; flex-wrap: wrap; gap: 8px 28px; list-style: none; margin: 0; padding: 0; font-size: var(--t-sm); }
.links a { color: var(--ink-soft); }
.colophon { width: 100%; font-family: var(--mono); font-size: var(--t-xs); color: var(--ink-soft); }

/* Motion ----------------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hero-kicker, .hero h1, .hero-body { animation: rise .8s var(--ease) both; }
.hero h1 { animation-delay: .06s; }
.hero-body { animation-delay: .14s; }

/* Portrait --------------------------------------------------------------- */
.hero-side { display: grid; gap: 24px; align-content: start; }
.portrait {
  margin: 0; width: 100%; max-width: 190px; aspect-ratio: 4 / 5;
  background: var(--tint-sage); border-radius: 3px; overflow: hidden;
  display: grid; place-items: center; position: relative;
}
.portrait img, .portrait .avatar { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-wall { fill: var(--tint-sage); }
.av-window { fill: var(--ivory); }
.av-frame { fill: none; stroke: var(--tint-sage); stroke-width: 3; }
.av-frame-line { fill: none; stroke: var(--sage); stroke-opacity: .35; stroke-width: 1.5; }
.portrait-initials { font-family: var(--serif); font-size: 3rem; color: var(--sage); letter-spacing: -0.02em; }
.portrait .tbd { position: absolute; left: 10px; bottom: 10px; font-size: 0.7rem; }

/* Outside-work vignettes ------------------------------------------------- */
.vignettes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 36rem; }
.vignette { display: grid; gap: 10px; justify-items: start; }
.vignette-art { width: 100%; aspect-ratio: 1; border-radius: 3px; display: grid; place-items: center; transition: transform .4s var(--ease); }
.vignette-art svg { width: 54%; height: auto; overflow: visible; }
.vignette:hover .vignette-art { transform: translateY(-3px); }
.vignette span { font-family: var(--serif); font-size: 1.05rem; }
.v-cat { background: var(--tint-sage); color: var(--sage); }
.v-pot { background: var(--tint-ochre); color: var(--ochre); }
.v-golf { background: var(--tint-blue); color: var(--accent); }
.art-line { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.art-ink { fill: var(--ink); }
.art-soft { fill: var(--ivory); }
.art-chili { fill: var(--chili); }
.art-fill { fill: currentColor; }

/* Section label marker --------------------------------------------------- */
.label::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--dot, var(--accent)); margin-right: 10px; vertical-align: 0.15em; }

/* Compact list rows (products, writing, education) ---------------------- */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.rows > li { border-bottom: 1px solid var(--rule); }
.row {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) auto; gap: 6px 32px;
  padding-block: 18px; text-decoration: none; align-items: baseline;
}
a.row:hover { color: inherit; }
a.row:hover .row-name { transform: translateX(6px); color: var(--accent); }
.row-name { font-family: var(--serif); font-size: 1.1rem; line-height: 1.3; transition: transform .35s var(--ease), color .2s var(--ease); }
.row-text { color: var(--ink-soft); font-size: 0.96rem; overflow-wrap: anywhere; }
.row-meta { font-family: var(--mono); font-size: var(--t-xs); color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 8px; }
.row-meta .arrow { transition: transform .25s var(--ease); }
a.row:hover .row-meta .arrow { transform: translateX(4px); }

.sub { font-family: var(--mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); margin: 0 0 10px; font-weight: 400; }
.sub-gap { margin-top: 36px; }
.interest-line { font-size: 1rem; color: var(--ink); max-width: var(--measure); }
.interest-line + .tbd { display: inline-block; margin-top: 10px; font-size: var(--t-sm); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Responsive ------------------------------------------------------------- */
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .hero-kicker { display: flex; gap: 4px 16px; flex-wrap: wrap; }
  .hero-side { grid-template-columns: 96px 1fr; align-items: end; gap: 18px; }
  .hero-side .hero-kicker { order: 2; display: grid; }
  .portrait-initials { font-size: 1.8rem; }
  .portrait .tbd { display: none; }
  .role a, .row { grid-template-columns: 1fr; gap: 4px; }
  .role-dates, .row-meta { order: -1; }
}
