/* =========================================================================
   Emily Yeh — portfolio
   Editorial, lots of whitespace. The content is the star.
   Fonts: Playfair Display (headings) / DM Sans (body) / JetBrains Mono (labels)
   ========================================================================= */

:root {
  --ink:        #201A18;   /* warm near-black text */
  --bg:         #FBF7F4;   /* warm off-white */
  --bg-alt:     #F5EEE9;   /* deeper off-white for alt sections */
  --muted:      #6E645E;   /* secondary text */
  --hairline:   #E7DFD8;   /* hairline borders */
  --accent:     #4E1109;   /* oxblood */
  --accent-ink: #FBF6F2;   /* warm cream on accent */
  --accent-hover: #3A0C06;       /* darker accent for hover/active */
  --accent-tint:        #EBD6D1; /* chip/tag border level */
  --accent-tint-subtle: #F5E9E6; /* chip/tag background */

  /* Surfaces */
  --surface:       #FFFCFA;     /* faintly warmed raised/white surface */
  --surface-black: #000000;     /* true black media field (video banner) */
  --surface-shot:  #0D0A09;     /* warm near-black screenshot backdrop */

  /* Secondary + on-dark text */
  --ink-2:       #4A423E;       /* warm eyebrow / strong label */
  --on-dark:     #FFFFFF;       /* text on dark surfaces */
  --on-dark-rgb: 255, 255, 255; /* on-dark text, for translucent captions */

  /* Warm neutral scale (placeholders, soft borders) */
  --warm-1: #F4EDE7;
  --warm-2: #EDE4DC;
  --warm-3: #D8CFC4;
  --warm-4: #A79E90;

  /* RGB helpers for translucency (derived from --bg / --ink) */
  --bg-rgb:  251, 247, 244;     /* --bg as RGB (nav blur) */
  --ink-rgb: 32, 26, 24;        /* --ink as RGB (soft shadow) */

  --font-head: "Playfair Display", Georgia, serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1080px;
  --maxw-prose: 720px;
  --pad-section: 96px;
  --nav-h: 64px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; margin: 0; }

/* visible, consistent focus state for keyboard users */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* placeholders the owner will swap in */
.is-placeholder { position: relative; }

/* ---------- layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.container--prose { max-width: var(--maxw-prose); }

.section { padding: var(--pad-section) 0; }
.section--alt { background: var(--bg-alt); }

/* offset anchors so sticky nav doesn't cover headings */
.hero, .section { scroll-margin-top: var(--nav-h); }

/* ========================= NAV ========================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(var(--bg-rgb), 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 19px;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.wordmark:hover { text-decoration: none; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  width: 40px;
  height: 40px;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ========================= HERO ========================= */
.hero { padding: 120px 0 88px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}
.hero-photo { display: flex; justify-content: flex-end; }
.avatar {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 5 / 6;
  object-fit: cover;
  object-position: 50% 32%;
  border-radius: 20px;
  border: 1px solid var(--hairline);
  background: var(--bg-alt);
}
.quip {
  font-family: var(--font-head);
  font-style: normal;
  font-weight: 600;
  font-size: clamp(19px, 2.6vw, 25px);
  line-height: 1.3;
  color: var(--accent);
  max-width: 600px;
  margin: 0 0 22px;
}
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 22px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 60px);
  letter-spacing: -0.01em;
  margin-bottom: 26px;
}
.lede {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 36px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }

/* Icon buttons (social + email) */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  color: var(--ink);
  background: transparent;
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.icon-btn:hover {
  transform: translateY(-1px);
  border-color: var(--ink);
  color: var(--accent);
  text-decoration: none;
}
.icon-btn svg { display: block; }

/* ========================= SECTION HEADINGS ========================= */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head--left { text-align: left; margin-left: 0; }
.kicker {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}
.section-head h2,
.section-head h1 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.01em; }
.section-sub { color: var(--muted); margin: 12px 0 0; font-size: 18px; }

/* ========================= SELECTED WORK ========================= */
.case-list { display: flex; flex-direction: column; gap: 28px; }
.case {
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 36px;
}
.case-head { margin-bottom: 26px; }
.case-head h3 { font-size: clamp(22px, 3vw, 28px); }
.case-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 0;
}
.case-collab {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  margin: 6px 0 0;
}
.case-hard {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
}
.case-hard p:last-child { margin: 0; }

/* Case-study banner (real graphic or designed stat band) */
.case-banner {
  display: block;
  width: 100%;
  aspect-ratio: 2.8;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  margin-bottom: 28px;
}
.case-banner--img { object-fit: cover; background: var(--surface); }
.case-banner--stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 24px;
  color: var(--on-dark);
  border-color: transparent;
}
.stat-big {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(30px, 5.5vw, 52px);
  line-height: 1;
  letter-spacing: -0.01em;
}
.stat-cap {
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.4vw, 13px);
  letter-spacing: 0.03em;
  color: rgba(var(--on-dark-rgb), 0.82);
  max-width: 92%;
}

/* Video banner (looping muted demo on a dark field) */
.case-banner--video {
  aspect-ratio: auto;
  background: var(--surface-black);
  border-color: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
}
.case-banner--video video {
  display: block;
  width: 100%;
  max-width: 540px;
  height: auto;
  border-radius: 8px;
}
.video-cap {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.4vw, 13px);
  letter-spacing: 0.03em;
  color: rgba(var(--on-dark-rgb), 0.72);
  text-align: center;
}
.case-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 40px;
}
.case-block p { margin: 0; }
.case-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 7px !important;
}
.metric {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.92em;
  color: var(--ink);
}

/* ========================= BUILT (project grid) ========================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--warm-3);
  box-shadow: 0 10px 28px rgba(var(--ink-rgb), 0.06);
}
.shot {
  aspect-ratio: 16 / 10;
  background:
    repeating-linear-gradient(45deg, var(--warm-2) 0 12px, var(--warm-1) 12px 24px);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
}
/* [EMILY] No screenshots yet, so the placeholder image area is hidden and cards read as
   clean text cards. When you add screenshots (drop an <img> into each .shot), delete this rule. */
.shot { display: none; }
.shot--filled { display: block; background: var(--surface-shot); }
.shot--filled img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot span {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--warm-4);
  letter-spacing: 0.04em;
}
.card-body { padding: 24px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.card-titlerow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.card-titlerow h3 { font-size: 23px; }
.pill {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--accent);
  background: var(--accent-tint-subtle);
  border: 1px solid var(--accent-tint);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}
.card-what { font-weight: 500; margin: 0 0 10px; }
.card-desc { color: var(--muted); margin: 0 0 18px; font-size: 16px; }
.card-tech {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin: auto 0 0;
}
.card-link {
  font-size: 14px;
  font-weight: 500;
  margin-top: 14px;
}
.grid-foot {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  margin: 40px 0 0;
}

/* ========================= EARLIER STRIP ========================= */
.strip { list-style: none; margin: 0; padding: 0; }
.strip li {
  padding: 22px 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
}
.strip li:last-child { border-bottom: 0; }
.strip-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-right: 12px;
}

/* ========================= CONTACT ========================= */
.contact { text-align: center; }
.contact-line {
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 600;
  line-height: 1.4;
  max-width: 640px;
  margin: 0 auto 28px;
}
.contact-links { display: flex; gap: 24px; justify-content: center; font-weight: 500; }

/* ========================= FOOTER ========================= */
.footer {
  border-top: 1px solid var(--hairline);
  padding: 28px 0;
  text-align: center;
}
.footer p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}

/* ========================= RESPONSIVE ========================= */
@media (max-width: 760px) {
  :root { --pad-section: 56px; }
  body { font-size: 16px; }

  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--hairline);
    padding: 8px 24px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; width: 100%; font-size: 16px; }

  .hero { padding: 72px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-photo { justify-content: flex-start; order: -1; }
  .avatar { max-width: 168px; }

  .case { padding: 26px 22px; }
  .case-grid { grid-template-columns: 1fr; gap: 22px; }

  .card-grid { grid-template-columns: 1fr; }

  .section-head { margin-bottom: 40px; }
}

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