/* ============================================
   JENNIFER LIN — Portfolio Stylesheet
   ============================================ */

:root {
  --bg: #f4f1ec;
  --bg-alt: #ebe6dd;
  --ink: #18170f;
  --ink-soft: #4a4738;
  --ink-muted: #8a8675;
  --accent: #c8421f;
  --rule: #d8d2c4;
  --max: 1280px;

  --font-display: "Fraunces", "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ============================================
   NAV
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 241, 236, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-style: italic;
}
.nav-logo span { font-style: normal; font-weight: 600; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--accent); }

/* ============================================
   HERO (homepage)
   ============================================ */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 120px 32px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: end;
}
.hero-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hero-meta span:first-child::before { content: "● "; color: var(--accent); }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(52px, 9vw, 124px);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.04em;
  grid-column: 1 / -1;
}
.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.hero-sub {
  max-width: 540px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-soft);
  grid-column: 1 / -1;
  margin-top: 8px;
}

/* Section labels */
.section-label {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--rule);
  padding-top: 24px;
  margin-bottom: 56px;
}
.section-label .num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.section-label .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ============================================
   WORK GRID
   ============================================ */
.work {
  max-width: var(--max);
  margin: 0 auto 120px;
  padding: 0 32px;
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: min-content;
  gap: 56px 24px;
}
.work-item {
  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: 4px;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.work-item:hover { transform: translateY(-4px); }
.work-thumb {
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}
.work-thumb-art {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(40px, 5vw, 72px);
  letter-spacing: -0.03em;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.work-item:hover .work-thumb-art { transform: scale(1.04); }
.work-info {
  padding: 20px 4px 4px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.work-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.work-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.work-arrow {
  display: inline-block;
  margin-left: 6px;
  transition: transform 0.3s;
}
.work-item:hover .work-arrow { transform: translateX(4px); }

/* Grid spans for asymmetric layout */
.span-7 { grid-column: span 7; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-4 { grid-column: span 4; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

/* Thumb color variants */
.tone-1 { background: #d4c8b3; color: #2c2820; }
.tone-2 { background: #2c2820; color: #f0e8d8; }
.tone-3 { background: #c8421f; color: #fef8ee; }
.tone-4 { background: #1a3a3a; color: #e8d5a4; }
.tone-5 { background: #e8d5a4; color: #1a3a3a; }
.tone-6 { background: #6b5b8a; color: #f0e8f8; }
.tone-7 { background: #f0e8d8; color: #2c2820; }
.tone-8 { background: #38342a; color: #c8421f; }
.tone-9 { background: #b8a890; color: #2c2820; }
.tone-10 { background: #e8e4dc; color: #18170f; border: 1px solid var(--rule); }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--rule);
  padding: 80px 32px 48px;
  margin-top: 80px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}
.footer-mark {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.footer-mark em { font-style: italic; color: var(--accent); }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 16px;
  font-weight: 500;
}
.footer-col a {
  display: block;
  font-size: 15px;
  margin-bottom: 8px;
  color: var(--ink-soft);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  max-width: var(--max);
  margin: 64px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ============================================
   CASE STUDY (project pages)
   ============================================ */
.case {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 32px 0;
}
.case-meta {
  display: flex;
  gap: 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.case-meta .dot { color: var(--accent); }
.case-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 10vw, 144px);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin-bottom: 32px;
}
.case-title em { font-style: italic; color: var(--accent); }
.case-tagline {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
  max-width: 800px;
  margin-bottom: 24px;
}
.case-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: opacity 0.2s;
}
.case-link:hover { opacity: 0.7; }

.case-hero {
  margin-top: 64px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(56px, 8vw, 120px);
  letter-spacing: -0.03em;
  position: relative;
  overflow: hidden;
}

.case-body {
  max-width: var(--max);
  margin: 96px auto 0;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 64px;
  align-items: start;
}
.case-body.full { display: block; }

.case-section { margin-bottom: 72px; }
.case-section:last-child { margin-bottom: 0; }

.case-section h2 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
  position: sticky;
  top: 100px;
  align-self: start;
}

.case-text {
  max-width: 720px;
}
.case-text h3 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.case-text p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.case-text ul {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}
.case-text ul li {
  position: relative;
  padding-left: 24px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.case-text ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}
.case-text strong { color: var(--ink); font-weight: 600; }

.case-callout {
  background: var(--bg-alt);
  padding: 40px;
  border-radius: 4px;
  margin: 32px 0;
}
.case-callout h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 500;
}
.case-callout p {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.4;
  color: var(--ink);
  font-weight: 300;
  letter-spacing: -0.01em;
}

.case-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  margin: 40px 0;
  padding: 32px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.case-metric .num {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
  display: block;
  margin-bottom: 6px;
}
.case-metric .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  line-height: 1.4;
}

.placeholder-art {
  margin: 48px 0;
  background: var(--bg-alt);
  border-radius: 4px;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  position: relative;
}
.placeholder-art::after {
  content: "";
  position: absolute;
  inset: 1px;
  border: 1px dashed var(--rule);
  border-radius: 4px;
  pointer-events: none;
}

.case-img {
  display: block;
  width: 100%;
  height: auto;
  margin: 48px 0;
  border-radius: 4px;
  background: var(--bg-alt);
}

/* Project navigation footer */
.case-nav {
  max-width: var(--max);
  margin: 120px auto 0;
  padding: 48px 32px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
}
.case-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: opacity 0.2s;
}
.case-nav-link:hover { opacity: 0.6; }
.case-nav-link.next { text-align: right; align-items: flex-end; }
.case-nav-link .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.case-nav-link .name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.02em;
}

/* ============================================
   RESUME
   ============================================ */
.resume-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 100px 32px 60px;
}
.resume-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 10vw, 144px);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}
.resume-title em { font-style: italic; color: var(--accent); }
.resume-intro {
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 300;
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 800px;
}

.resume-body {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px 80px;
}
.resume-section {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 64px;
  padding: 48px 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.resume-section h2 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
  position: sticky;
  top: 100px;
}

.job {
  margin-bottom: 48px;
}
.job:last-child { margin-bottom: 0; }
.job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.job-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.job-title .role {
  font-style: italic;
  color: var(--ink-soft);
  font-weight: 300;
}
.job-date {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}
.job ul {
  list-style: none;
  padding: 0;
  margin-top: 16px;
}
.job ul li {
  position: relative;
  padding-left: 20px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.job ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skill-pill {
  padding: 8px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: all 0.2s;
}
.skill-pill:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal {
  animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.reveal-1 { animation-delay: 0.1s; }
.reveal-2 { animation-delay: 0.2s; }
.reveal-3 { animation-delay: 0.3s; }
.reveal-4 { animation-delay: 0.4s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .hero { padding: 80px 24px 60px; grid-template-columns: 1fr; gap: 32px; }
  .work { padding: 0 24px; }
  .work-grid { grid-template-columns: 1fr; gap: 32px; }
  .span-7, .span-5, .span-6, .span-4, .span-8, .span-12 { grid-column: span 1; }
  .nav-inner { padding: 18px 24px; }
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 12px; }
  .footer { padding: 60px 24px 40px; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
  .case { padding: 60px 24px 0; }
  .case-body { grid-template-columns: 1fr; gap: 16px; padding: 0 24px; margin-top: 64px; }
  .case-section h2 { position: static; }
  .resume-header { padding: 60px 24px 40px; }
  .resume-body { padding: 0 24px 60px; }
  .resume-section { grid-template-columns: 1fr; gap: 16px; padding: 32px 0; }
  .resume-section h2 { position: static; }
  .case-nav { flex-direction: column; gap: 32px; padding: 32px 24px; }
  .case-nav-link, .case-nav-link.next { align-items: flex-start; text-align: left; }
}
