/* ==========================================================================
   EVIE TAN — PORTFOLIO STYLESHEET
   Editorial / magazine direction: warm paper, ink, deep pine accent.

   WANT TO CHANGE THE LOOK? Edit the variables below — colors and fonts
   cascade through the whole site from here.
   ========================================================================== */

:root {
  /* ---- Colors (edit these to retheme) ---- */
  --paper: #FBFAF7;      /* page background */
  --ink: #191917;        /* main text */
  --accent: #2F4A3E;     /* deep pine — links, accents */
  --muted: #6E6A61;      /* secondary text */
  --line: #E4E1D8;       /* hairline rules */
  --tint: #EEF0EA;       /* soft sage panel background */

  /* ---- Type ---- */
  --serif: "Fraunces", Georgia, serif;
  --sans: "Archivo", Helvetica, Arial, sans-serif;

  /* ---- Layout ---- */
  --max: 1080px;
  --pad: clamp(20px, 5vw, 48px);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; height: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* ---- Typography helpers ---- */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; }

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.serif-italic { font-family: var(--serif); font-style: italic; }

/* ==========================================================================
   HEADER / NAV
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.nav-name {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--ink);
}
.nav-name:hover { text-decoration: none; }

.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; }
.nav-links a { font-size: 13px; color: var(--ink); letter-spacing: 0.02em; }

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--paper) !important;
  background: var(--ink);
  border: 1px solid var(--ink);
  padding: 9px 18px;
  cursor: pointer;
}
.btn:hover { background: var(--accent); border-color: var(--accent); text-decoration: none; }

.btn-outline {
  color: var(--ink) !important;
  background: transparent;
}
.btn-outline:hover { color: var(--paper) !important; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  padding: 8px 12px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--pad) 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 0; font-size: 15px; }
  .nav-links .btn { margin-top: 10px; }
}

/* ==========================================================================
   HERO (homepage masthead)
   ========================================================================== */
.hero {
  padding-top: clamp(56px, 10vw, 120px);
  padding-bottom: clamp(48px, 8vw, 96px);
  border-bottom: 1px solid var(--line);
}

.hero .eyebrow { margin-bottom: 22px; }

.hero-name {
  font-size: clamp(52px, 11vw, 128px);
  letter-spacing: -0.02em;
  margin-bottom: 26px;
}
.hero-name em { font-style: italic; color: var(--accent); }

.hero-sub {
  max-width: 560px;
  font-size: 17px;
  color: var(--muted);
}

.hero-issue {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-issue span { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section { padding-top: clamp(56px, 9vw, 100px); padding-bottom: clamp(56px, 9vw, 100px); border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }

.section-head { margin-bottom: 40px; }
.section-head h2 { font-size: clamp(30px, 5vw, 44px); margin-top: 8px; }
.section-head p { color: var(--muted); margin-top: 12px; max-width: 520px; }

/* ---- About ---- */
.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
}

.about-photo {
  background: var(--tint);
  padding: 16px;
}
.about-photo img { width: 100%; }
.about-photo figcaption {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
}

.about-text p { margin-bottom: 18px; max-width: 560px; }
.about-text p:last-child { margin-bottom: 0; }

@media (max-width: 780px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 320px; }
}

/* ---- Work cards ---- */
.work-label {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 44px 0 20px;
}
.work-label:first-of-type { margin-top: 0; }
.work-label .rule { flex: 1; height: 1px; background: var(--line); }

.card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  background: #fff;
  margin-bottom: 24px;
  transition: border-color 0.2s ease;
}
.card:hover { border-color: var(--accent); }

.card-media {
  background: var(--tint);
  min-height: 260px;
  overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.card-media.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  padding: 20px;
}

.card-body { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; }
.card-body .eyebrow { margin-bottom: 12px; }
.card-body h3 { font-size: clamp(22px, 3vw, 30px); margin-bottom: 12px; }
.card-body p { color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.card-link { margin-top: auto; font-size: 13px; font-weight: 500; letter-spacing: 0.04em; }

@media (max-width: 720px) {
  .card { grid-template-columns: 1fr; }
  .card-media { min-height: 200px; }
}

/* ---- Coursework / small cards ---- */
.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.mini-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: clamp(22px, 3vw, 32px);
}
.mini-card .eyebrow { margin-bottom: 10px; }
.mini-card h3 { font-size: 21px; margin-bottom: 10px; }
.mini-card p { font-size: 14px; color: var(--muted); }

/* ---- Video embed ---- */
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--tint);
  border: 1px solid var(--line);
  margin-top: 32px;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- Leadership list ---- */
.lead-list { list-style: none; }
.lead-list li {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.lead-list li:last-child { border-bottom: 0; }
.lead-list strong { font-family: var(--serif); font-weight: 500; font-size: 17px; }
.lead-list span { color: var(--muted); font-size: 15px; }

@media (max-width: 640px) {
  .lead-list li { grid-template-columns: 1fr; gap: 4px; }
}

/* ---- Contact / footer ---- */
.contact { text-align: left; }
.contact h2 { font-size: clamp(34px, 6vw, 56px); margin-bottom: 18px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

/* ==========================================================================
   CASE STUDY PAGES
   ========================================================================== */
.case-topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  font-size: 13px;
}

.case-masthead { padding-top: clamp(40px, 7vw, 80px); padding-bottom: 36px; }
.case-masthead .eyebrow { margin-bottom: 16px; }
.case-masthead h1 { font-size: clamp(34px, 6.5vw, 64px); max-width: 820px; }

.stat-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.stat {
  background: var(--tint);
  padding: 12px 18px;
}
.stat b { display: block; font-family: var(--serif); font-size: 20px; font-weight: 500; }
.stat span { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.case-hero-img { border: 1px solid var(--line); }
.case-hero-img img { width: 100%; }
.img-caption {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
}

.case-section { padding: clamp(36px, 6vw, 64px) 0; border-bottom: 1px solid var(--line); }
.case-section:last-of-type { border-bottom: 0; }
.case-section h2 { font-size: clamp(24px, 4vw, 34px); margin-bottom: 20px; }
.case-section p, .case-section li { max-width: 640px; color: #33322E; }
.case-section p { margin-bottom: 16px; }
.case-section ul, .case-section ol { padding-left: 22px; }
.case-section li { margin-bottom: 12px; }
.case-section li strong { font-weight: 600; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 8px;
}
.gallery figure { border: 1px solid var(--line); background: #fff; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery .placeholder {
  aspect-ratio: 4 / 3;
  background: var(--tint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  padding: 16px;
}
.gallery figcaption { padding: 10px 14px; font-size: 12px; color: var(--muted); }

/* Press release document treatment */
.document {
  background: #fff;
  border: 1px solid var(--line);
  padding: clamp(26px, 5vw, 56px);
  max-width: 760px;
}
.document h3 { font-size: clamp(20px, 3vw, 26px); margin-bottom: 6px; }
.document .doc-sub { font-family: var(--serif); font-style: italic; color: var(--muted); margin-bottom: 18px; }
.document .doc-meta {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.document p { font-size: 15px; margin-bottom: 14px; }
.document .doc-facts { margin: 18px 0; padding-left: 0; list-style: none; }
.document .doc-facts li { font-size: 15px; margin-bottom: 8px; }

.case-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  font-size: 13px;
  color: var(--muted);
}

/* ---- Scroll reveal (JS adds .revealed) ---- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}


/* ---- Revision: about photo without panel (transparent PNG) ---- */
.about-photo { background: none; padding: 0; }

/* ---- Footer links with icon ---- */
.footer-links { display: flex; align-items: center; gap: 20px; }
.footer-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 13px; }
.footer-links svg { width: 15px; height: 15px; fill: currentColor; display: block; }

/* ---- Embedded PDF viewer ---- */
.pdf-embed {
  width: 100%;
  height: 78vh;
  min-height: 480px;
  border: 1px solid var(--line);
  background: #fff;
}
.pdf-fallback { padding: 18px; font-size: 14px; color: var(--muted); }

/* ---- Clickable coursework cards ---- */
a.mini-card { display: block; color: inherit; transition: border-color 0.2s ease; }
a.mini-card:hover { text-decoration: none; border-color: var(--accent); }
a.mini-card .card-link { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 500; color: var(--accent); }


/* ---- Press release page images ---- */
.doc-pages { max-width: 760px; }
.doc-pages img {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  margin-bottom: 20px;
}

/* ---- Local video element ---- */
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #101010;
}
