/* =========================================================
   hyunju-song.com — base styles
   Palette referenced from Ramp: warm off-white canvas + white cards,
   hairline borders (no shadows, no dark section blocks), one chartreuse accent.
   Font: Poppins (300/400/500/600)
   ========================================================= */

:root {
  --cream: #F4F2F0;   /* page canvas — Ramp "Bone" warm off-white. */
  --navy: #1A1919;    /* dark surfaces / inverted blocks (Ramp "Obsidian"). */
  --accent: #E4F222;  /* highlighter chartreuse — the only chromatic accent. */
  --white: #FFFFFF;

  --ink: #0C0A08;     /* text — warm near-black (Ramp "Ink"). */
  --paper: var(--cream);
  --muted: #565452;   /* secondary text — darkened from Ramp Ash (#6D6C6B) for ~5:1 contrast / less eye strain. */
  --hair: #E5E7EB;    /* hairline borders (Ramp "Hairline"). */

  --fs-base: 17px;
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 72px);

  --radius: 10px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* soft "underline shadow" under outlined buttons & cards */
  --edge-shadow: 0 3px 5px -1px rgba(12, 10, 8, .32);
  --edge-shadow-lg: 0 7px 12px -2px rgba(12, 10, 8, .30);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Poppins", system-ui, sans-serif;
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 600; }

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

/* Signature accent — used sparingly */
.hl {
  background: linear-gradient(transparent 62%, var(--accent) 62%);
  padding: 0 .04em;
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--hair);
}
.nav__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 1.15rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav__brand {
  font-weight: 600;
  letter-spacing: .04em;
  font-size: 1.02rem;
}
.nav__links {
  display: flex;
  gap: clamp(1rem, 2.4vw, 2.3rem);
  align-items: center;
}
.nav__links a {
  position: relative;
  font-size: .95rem;
  padding: .15rem 0;
  transition: opacity .2s var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav__links a.is-current::after { transform: scaleX(1); background: var(--navy); }
.nav__links a:hover::after { transform: scaleX(1); background: var(--accent); height: 3px; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: 0; cursor: pointer;
  padding: 6px;
}
.nav__toggle span {
  width: 24px; height: 2px;
  background: var(--navy);
  display: block;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  padding: clamp(3.5rem, 10vw, 8rem) 0 clamp(3rem, 7vw, 5.5rem);
}
.hero__lead {
  font-size: clamp(1.9rem, 4.6vw, 3.25rem);
  line-height: 1.28;
  font-weight: 300;
  letter-spacing: -.01em;
  max-width: 22ch;
  margin: 0 0 1.8rem;
}
.hero__lead strong { font-weight: 500; }
.hero__sub {
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  line-height: 1.5;
  font-weight: 400;
  max-width: 46ch;
  margin: 0;
}
.hero__sub strong { font-weight: 500; }

/* =========================================================
   SECTIONS
   ========================================================= */
.section {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}
.section--bordered {
  border-top: 1px solid var(--hair);
}
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1.8rem, 3.5vw, 2.8rem);
}
.section__title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -.01em;
  margin: 0;
}
.section__note {
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* =========================================================
   WORK TILES — white cards on the canvas (Ramp elevation = border, no shadow)
   ========================================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.8rem, 4vw, 2.8rem);
}
.tile {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--edge-shadow);
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.tile:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: var(--edge-shadow-lg); }
.tile__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--hair);
  background: #ececec;
}
.tile__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .55s var(--ease);
}
.tile:hover .tile__media img { transform: scale(1.035); }

.tile__body {
  padding: clamp(1.1rem, 2vw, 1.5rem) clamp(1.1rem, 2vw, 1.5rem) clamp(1.3rem, 2.2vw, 1.6rem);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.tile__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 .4rem;
}
.tile__title {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 500;
  margin: 0;
}
.tile__tags {
  font-size: .82rem;
  color: var(--muted);
  white-space: nowrap;
  margin: 0;
}
.tile__desc {
  font-size: .98rem;
  font-weight: 400;
  color: color-mix(in srgb, var(--navy) 80%, transparent);
  margin: 0 0 .9rem;
  max-width: 44ch;
}
.tile__cta {
  align-self: flex-start;
  font-size: .92rem;
  font-weight: 500;
  padding-bottom: 2px;
  background: linear-gradient(transparent 72%, var(--accent) 72%);
}

/* =========================================================
   PAGE KICKER (small label above a page lead)
   ========================================================= */
.kicker {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.4rem;
}

/* =========================================================
   ABOUT
   ========================================================= */
.about {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.about__photo {
  aspect-ratio: 1 / 0.85;
  border-radius: var(--radius);
  overflow: hidden;
  background: #ececec;
}
.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 68%;
  transform: scale(1.32);
  transform-origin: center center;
}
.about__text p {
  font-size: clamp(1.05rem, 1.5vw, 1.18rem);
  font-weight: 400;
  line-height: 1.7;
  max-width: 52ch;
  margin: 0 0 1.3rem;
}
.about__text p:last-child { margin-bottom: 0; }

/* =========================================================
   SELECTED WORKS
   ========================================================= */
.selected {
  display: grid;
  grid-template-columns: 1.5fr auto;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.selected__desc {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  font-weight: 400;
  max-width: 54ch;
  margin: 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--accent);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.2;
  padding: .85rem 1.6rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: var(--edge-shadow);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s var(--ease);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--edge-shadow-lg);
  filter: brightness(.96);
}

/* =========================================================
   CASE STUDY
   ========================================================= */
.backlink {
  display: inline-block;
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 1.6rem;
  transition: color .2s var(--ease);
}
.backlink:hover { color: var(--navy); }

.case-head .kicker { margin-bottom: 1rem; }
.case-title {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -.015em;
  line-height: 1.1;
  margin: 0 0 .7rem;
}
.case-meta {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 400;
  color: var(--muted);
  margin: 0;
}

.lead-figure {
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.lead-figure img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--hair);
  background: #ececec;
}
.lead-figure video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--hair);
  background: #000;
}

/* Inline forward CTA (video pages, etc.) */
.cta-link {
  display: inline-block;
  font-size: 1rem;
  font-weight: 500;
  padding-bottom: 2px;
  border-bottom: 2px solid var(--accent);
  transition: color .2s var(--ease);
}
.cta-link:hover { color: var(--muted); }

/* Prototype list: category filter tabs */
.tabs {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--hair);
}
.tabs a {
  position: relative;
  padding: .15rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
}
.tabs a.is-current { color: var(--ink); }
.tabs a.is-current::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--ink);
}
.tile__media video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* Stat band */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(2.2rem, 4vw, 3rem) 0;
  border-block: 1px solid var(--hair);
}
.stat__num {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1;
}
.stat__num .arrow { color: var(--muted); font-weight: 400; }
.stat__num .plus {
  background: linear-gradient(transparent 60%, var(--accent) 60%);
}
.stat__label {
  font-size: .92rem;
  font-weight: 400;
  color: var(--muted);
  margin: .7rem 0 0;
  max-width: 24ch;
}

/* Body sections */
.case-section { margin-bottom: clamp(2.6rem, 6vw, 4.5rem); }
.case-section:last-of-type { margin-bottom: 0; }
.case-section h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.95rem);
  font-weight: 500;
  letter-spacing: -.01em;
  margin: 0 0 1.1rem;
}
.case-text { max-width: 68ch; }
.case-text p {
  font-size: clamp(1.02rem, 1.4vw, 1.14rem);
  font-weight: 400;
  line-height: 1.72;
  margin: 0 0 1.1rem;
}
.case-text p:last-child { margin-bottom: 0; }

.case-list {
  list-style: none;
  padding: 0;
  margin: .3rem 0 0;
  max-width: 68ch;
}
.case-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: .8rem;
  font-weight: 400;
  font-size: clamp(1.02rem, 1.4vw, 1.14rem);
  line-height: 1.6;
}
.case-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .62em;
  width: 10px; height: 2px;
  background: var(--navy);
}
.case-list li strong { font-weight: 500; }

.deflist { margin: .3rem 0 0; max-width: 68ch; }
.deflist__item { margin-bottom: 1.3rem; }
.deflist__item:last-child { margin-bottom: 0; }
.deflist__item h3 {
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 .25rem;
}
.deflist__item p {
  font-weight: 400;
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  line-height: 1.65;
  margin: 0;
  color: color-mix(in srgb, var(--navy) 86%, transparent);
}

/* Figures */
.figure { margin: clamp(2.2rem, 5vw, 3.6rem) 0; }
.figure img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--hair);
  background: #ececec;
}
.figure video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--hair);
  background: #000;
}
.figure figcaption {
  margin-top: .9rem;
  font-size: .95rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--muted);
}
.figure--portrait { max-width: 440px; }

/* =========================================================
   AI-NATIVE LOG — editions index
   ========================================================= */
.lead-text {
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  font-weight: 400;
  line-height: 1.6;
  max-width: 54ch;
  margin: 0 0 clamp(1.5rem, 3vw, 2.2rem);
}
.log-list {
  border-top: 1px solid var(--hair);
  margin-top: 1rem;
  max-width: 820px;
}
.log-list__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--hair);
}
.log-list__row h3 {
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  font-weight: 500;
  margin: 0;
}
.log-list__date {
  color: var(--muted);
  font-size: .9rem;
  white-space: nowrap;
}
.dateline {
  font-size: .9rem;
  letter-spacing: .04em;
  color: var(--muted);
  margin: 1.2rem 0 0;
}

/* =========================================================
   SELECTED WORKS — password gate
   ========================================================= */
.gate { max-width: 460px; margin: clamp(1rem, 4vw, 2.5rem) 0 clamp(3rem, 7vw, 5rem); }
.gate__note {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 400;
  line-height: 1.6;
  color: color-mix(in srgb, var(--ink) 85%, transparent);
  margin: 0 0 1.6rem;
}
.gate__form { display: flex; flex-wrap: wrap; gap: .7rem; max-width: 420px; }
.gate__input {
  flex: 1;
  min-width: 180px;
  font: inherit;
  font-size: 1rem;
  padding: .9rem 1.1rem;
  border: 1px solid var(--hair);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
}
.gate__input:focus { outline: none; border-color: var(--ink); }
.gate__error {
  width: 100%;
  margin: .2rem 0 0;
  font-size: .9rem;
  color: #c0392b;
}
.works-grid__sub {
  font-size: .82rem;
  color: var(--muted);
  white-space: nowrap;
  margin: 0;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--navy); /* Obsidian — the one inverted block, closing the page (Ramp pattern). */
  color: var(--white);
  padding: clamp(4rem, 8vw, 6.5rem) 0 clamp(2rem, 4vw, 3rem);
}
.footer__line {
  font-size: clamp(1.5rem, 3.2vw, 2.3rem);
  font-weight: 300;
  line-height: 1.4;
  max-width: 24ch;
  margin: 0 0 clamp(2.5rem, 6vw, 4.5rem);
}
.footer__line a {
  color: var(--white);
  font-weight: 500;
  background: linear-gradient(transparent 84%, var(--accent) 84%);
  padding: 0 .04em;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.footer__line a:hover { background: var(--accent); color: var(--ink); }
.footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid color-mix(in srgb, var(--white) 18%, transparent);
}
.footer__brand { font-weight: 600; letter-spacing: .04em; }
.footer__meta { color: color-mix(in srgb, var(--white) 62%, transparent); font-size: .94rem; font-weight: 400; }
.footer__top {
  font-size: .9rem;
  font-weight: 500;
  padding-bottom: 2px;
  border-bottom: 2px solid var(--accent);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 820px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--white);
    padding: 0 var(--gutter);
    max-height: 0;
    overflow: hidden;
    border-bottom: 0 solid var(--hair);
    transition: max-height .3s var(--ease);
  }
  .nav__links.is-open {
    max-height: 340px;
    padding: .5rem var(--gutter) 1rem;
    border-bottom-width: 1px;
  }
  .nav__links a { width: 100%; padding: .7rem 0; font-size: 1rem; }
  .nav__links a::after { display: none; }

  .grid { grid-template-columns: 1fr; }
  .selected { grid-template-columns: 1fr; align-items: start; }

  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 360px; }

  .stats { grid-template-columns: 1fr; gap: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto; }
}

/* =========================================================
   AI-NATIVE LOG — edition article
   ========================================================= */
.ed-body { max-width: 72ch; }
.ed-body > .figure { max-width: none; }

.ed-h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -.01em;
  margin: clamp(2.4rem, 5vw, 3.4rem) 0 1rem;
}
.ed-body > .ed-h2:first-child { margin-top: 0; }
.ed-h3 {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  font-weight: 500;
  letter-spacing: -.005em;
  margin: 1.9rem 0 .6rem;
}
.ed-p {
  font-size: clamp(1.02rem, 1.4vw, 1.14rem);
  font-weight: 400;
  line-height: 1.72;
  margin: 0 0 1.1rem;
}
.ed-p strong { font-weight: 500; }

/* image placeholder — real screenshots added in a later pass */
.figure--placeholder .figph {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  border: 1px dashed var(--hair);
  background:
    repeating-linear-gradient(45deg,
      color-mix(in srgb, var(--hair) 40%, transparent) 0 10px,
      transparent 10px 20px),
    var(--white);
}

/* prev / next */
.ed-nav {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  margin-top: clamp(2.6rem, 6vw, 4rem);
  padding-top: 1.6rem;
  border-top: 1px solid var(--hair);
}
.ed-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: .98rem;
  line-height: 1.4;
  max-width: 46%;
}
.ed-nav__next { text-align: right; margin-left: auto; }
.ed-nav a:hover { color: var(--muted); }

/* editions list rows as links */
a.log-list__row {
  text-decoration: none;
  color: var(--ink);
  transition: color .15s ease;
}
a.log-list__row:hover h3 { color: var(--muted); }
a.log-list__row h3::after {
  content: " \2192";
  color: var(--muted);
  opacity: 0;
  transition: opacity .15s ease;
}
a.log-list__row:hover h3::after { opacity: 1; }

/* side-by-side comparison figures (two "View fullsize" in a row) */
.ed-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: clamp(2.2rem, 5vw, 3.6rem) 0;
  align-items: start;
}
.ed-pair .figure { margin: 0; }
.ed-pair .figure:last-child figcaption { grid-column: 1 / -1; }
@media (max-width: 620px) { .ed-pair { grid-template-columns: 1fr; } }

/* live-dashboard CTA in edition hero */
.case-cta { margin: 1.6rem 0 0; }
.case-cta .btn { display: inline-flex; align-items: center; gap: .4rem; }

/* =========================================================
   Shared password gate overlay (gate.js)
   ========================================================= */
html.is-gated { overflow: hidden; }
html.is-gated body > *:not(#hjs-gate) { visibility: hidden !important; }
#hjs-gate {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  visibility: visible;
}
.hjs-gate__card { width: 100%; max-width: 460px; margin: 0; }
.hjs-gate__title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 500; letter-spacing: -.01em;
  margin: .5rem 0 1rem;
}


/* Hide page eyebrow/kicker labels (per HJ request) */
.kicker { display: none; }

/* Case pager: previous / next links at the bottom of Selected Works pages */
.case-pager { display: flex; justify-content: space-between; gap: 1.5rem; margin-top: clamp(2.5rem, 6vw, 4rem); padding-top: 1.5rem; border-top: 1px solid var(--hair); }
.case-pager a { display: flex; flex-direction: column; gap: .35rem; max-width: 48%; font-size: 1.05rem; line-height: 1.35; }
.case-pager a span { font-size: .8rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.case-pager a.is-next { margin-left: auto; text-align: right; }
.case-pager a:hover { text-decoration: underline; }
