/* ─── Tokens (exact Figma values) ─── */
:root {
  --bg:     #fffdf9;
  --golden: #776541;
  --dark:   #383838;
  --black:  #000000;
  --white:  #ffffff;
  --border: rgba(0, 0, 0, 0.10);

  --f-grotesk: 'Schibsted Grotesk', sans-serif;
  --f-inter:   'Inter', sans-serif;
  --f-geist:   'Geist', sans-serif;
  --f-jakarta: 'DM Sans', sans-serif;

  --px: 62px; /* horizontal page padding, matches Figma's ~59–65 px canvas margins */
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--golden);
  font-family: var(--f-grotesk);
  min-height: 100vh;
  cursor: none;
}
a, button { cursor: none; }

/* ─── Custom cursor ─── */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  background: var(--golden);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
  z-index: 9999;
  opacity: 0;
}
.cursor.visible { opacity: 1; }
.cursor.hover {
  width: 32px;
  height: 32px;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
::selection { background: var(--golden); color: var(--white); }

/* ══════════════════════════════════════════════
   HERO
══════════════════════════════════════════════ */
.hero {
  padding: 16px var(--px) 0;
  min-height: 709px;
}

/* Top bar: wordmark left, nav right */
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 100px;
}

/* Wordmark — Schibsted Grotesk Light, capped at 24px */
.wordmark {
  font-family: var(--f-grotesk);
  font-weight: 300;
  font-size: 24px;
  line-height: 1.5;
  letter-spacing: -0.24px;
  color: var(--golden);
  white-space: nowrap;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 16px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span { display: block; height: 1px; background: var(--golden); }

/* Hide overlay wordmark on desktop */
.nav-overlay-name { display: none; }

/* Nav — stacked, right-aligned, SemiBold 24px underlined */
.nav-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}
.nav-links a {
  font-family: var(--f-grotesk);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.48px;
  color: var(--golden);
  text-decoration: none !important;
  transition: opacity 0.15s;
}
.nav-links a:hover { opacity: 0.65; }

/* Portrait + bio row — centered as a pair with a tighter gap */
.hero-body {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 80px;
  animation: fadeUp 1s ease forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.portrait-wrap { flex-shrink: 0; }
.portrait-img {
  width: 354px;
  height: 440px;
  object-fit: cover;
  object-position: center 50%;
  display: block;
}

.bio-wrap {
  flex-shrink: 0;
  width: 380px;
  padding-top: 81px;
}
.bio-lead,
.bio-body {
  font-family: var(--f-jakarta);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--golden);
}
.bio-lead { margin-bottom: 1.1em; }

/* ══════════════════════════════════════════════
   SHARED WORK SECTION WRAPPER
══════════════════════════════════════════════ */
.work-section {
  padding: 0 var(--px) 0;
  margin-top: 120px;
}

/* Header row: label left, category right */
.section-label {
  font-family: var(--f-grotesk);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.5;
  letter-spacing: -0.48px;
  color: var(--golden);
  margin: 0 80px 28px;
}
.section-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 80px 12px;
}
.section-category {
  font-family: var(--f-geist);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: -0.075px;
  color: var(--golden);
}

/* ── Scroll fade-in ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Research & Writings card ── */
.article-card {
  margin: 0 80px;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow:
    0px 4px 8px rgba(0,0,0,0.02),
    0px 6px 12px rgba(0,0,0,0.03);
  overflow: hidden;
}
.card-img-wrap {
  width: 100%;
  height: 301px;
  overflow: hidden;
  background: #2a3a28;
}
.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-body {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 24px;
}
.card-text { display: flex; flex-direction: column; }
.card-title {
  font-family: var(--f-inter);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.45;
  letter-spacing: -0.48px;
  color: var(--black);
}
.card-date {
  font-family: var(--f-inter);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.45;
  color: var(--black);
}
.card-link {
  font-family: var(--f-inter);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.45;
  letter-spacing: -0.09px;
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity 0.15s;
  display: inline-block;
}
.card-link:hover { opacity: 0.55; }

/* ── FREVO card ── */
/* Card: 1060×459px. Left text col = 352px. Two 331px photos with 31px gap.
   Photos inset: 16px top, 15px bottom, 15px right (Figma Rectangle 6/7 offsets). */
.frevo-card {
  margin: 0 80px;
  display: flex;
  align-items: stretch;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow:
    0px 4px 8px rgba(0,0,0,0.02),
    0px 6px 12px rgba(0,0,0,0.03);
  overflow: hidden;
  height: 500px;
}
.frevo-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 32px;
}
.frevo-title {
  font-family: var(--f-grotesk);
  font-weight: 700;
  font-style: italic;
  font-size: 32px;
  line-height: 1.3;
  letter-spacing: -0.32px;
  color: var(--dark);
  text-align: center;
}
.frevo-text .card-link {
  font-weight: 400;
  color: var(--dark);
}
.frevo-photos {
  flex: 2;
  display: flex;
  gap: 20px;
  align-items: stretch;
  padding: 20px;
}
.frevo-photo {
  flex: 1;
  overflow: hidden;
  background: #1a1a1a;
}
.frevo-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* ══════════════════════════════════════════════
   CONTACT
══════════════════════════════════════════════ */
.contact-section {
  padding: 0 var(--px);
  margin-top: 164px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.contact-text {
  font-family: var(--f-grotesk);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.5;
  letter-spacing: -0.24px;
  color: var(--golden);
  text-align: center;
}
.contact-bold { font-weight: 700; }
.contact-text a { color: var(--golden); }
.contact-text a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.site-footer {
  margin: 136px 110px 0;
  padding: 24px 0 32px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-copy {
  font-family: var(--f-geist);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: -0.075px;
  color: var(--golden);
}
.footer-linkedin {
  font-family: var(--f-geist);
  font-weight: 400;
  font-size: 15px;
  color: var(--golden);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.15s;
}
.footer-linkedin:hover { opacity: 0.65; }

/* ══════════════════════════════════════════════
   DESKTOP TYPOGRAPHY SCALE
══════════════════════════════════════════════ */
@media (min-width: 1280px) {
  .bio-lead,
  .bio-body,
  .section-category,
  .footer-copy,
  .footer-linkedin,
  .contact-text {
    font-size: 16px;
  }
  /* Widen bio column proportionally for 16px text */
  .bio-wrap { width: 475px; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 1100px) {
  :root { --px: 40px; }
  .hero-body { gap: 48px; }
  .bio-wrap { width: 340px; }
}

@media (max-width: 900px) {
  :root { --px: 32px; }

  .wordmark { font-size: 20px; }
  .nav-links a { font-size: 18px; }

  /* Stack portrait + bio */
  .hero { min-height: unset; }
  .hero-top { margin-bottom: 56px; }
  .hero-body { flex-direction: column; gap: 32px; align-items: center; }
  .portrait-img { width: 100%; height: auto; max-width: 280px; }
  .bio-wrap { margin-left: 0; padding-top: 0; width: 100%; max-width: 100%; align-self: stretch; padding-left: 14px; padding-right: 14px; text-align: justify; }

  /* Collapse 80px hardcoded margins to match page padding */
  .section-label { margin-left: 0; margin-right: 0; }
  .section-meta  { margin-left: 0; margin-right: 0; }
  .article-card  { margin-left: 0; margin-right: 0; }
  .frevo-card    { margin-left: 0; margin-right: 0; }

  /* FREVO card stack */
  .frevo-card { flex-direction: column; height: auto; }
  .frevo-text { flex: none; padding: 40px 32px; }
  .frevo-photos { padding: 0 0 16px; gap: 12px; }

  .contact-text { font-size: 20px; }
  .site-footer { margin-left: 32px; margin-right: 32px; }
}

@media (max-width: 600px) {
  :root { --px: 20px; }

  body, a, button { cursor: auto; }
  .cursor { display: none; }

  .hero { padding-top: 28px; }
  .hero-top { margin-bottom: 40px; }
  .wordmark { font-size: 18px; }

  /* Hamburger */
  .nav-toggle { display: flex; position: relative; z-index: 1002; }

  /* Full-screen overlay */
  .nav-links {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav-links a { font-size: 24px; }

  /* Wordmark inside overlay */
  .nav-overlay-name {
    font-family: var(--f-grotesk);
    font-weight: 300;
    font-size: 18px;
    letter-spacing: -0.24px;
    color: var(--golden);
    position: absolute;
    top: 28px;
    left: 20px;
  }

  /* Remove hardcoded 80px margins */
  .section-label { margin-left: 0; margin-right: 0; }
  .section-meta  { margin-left: 0; margin-right: 0; }
  .article-card  { margin-left: 0; margin-right: 0; }
  .frevo-card    { margin-left: 0; margin-right: 0; height: auto; }

  .work-section { margin-top: 64px; }
  .frevo-photos { flex-direction: column; }
  .frevo-photo { min-height: 200px; }

  .contact-section { margin-top: 80px; }
  .contact-text { font-size: 16px; }

  .card-title { font-size: 18px; }
  .card-date  { font-size: 16px; }
  .card-link  { font-size: 15px; margin-top: 12px; }

  .site-footer { margin-left: 20px; margin-right: 20px; margin-top: 64px; }
}
