/* ============================================
   TOKENS
   ============================================ */
:root {
  --bg:          #0C0C0C;
  --card-bg:     #1A1A1A;
  --ink:         #FFFFFF;
  --ink-dim:     #6E6E6E;
  --ink-muted:   #444444;
  --border:      #242424;
  --card-footer: #1C1C1C;

  /* Accent palette */
  --blue:       #4B7BF5;
  --blue-dim:   rgba(75,123,245,0.12);
  --teal:       #2DD4BF;
  --teal-dim:   rgba(45,212,191,0.12);
  --amber:      #F59E0B;
  --amber-dim:  rgba(245,158,11,0.12);
  --purple:     #A78BFA;
  --purple-dim: rgba(167,139,250,0.12);
  --rose:       #FB7185;
  --rose-dim:   rgba(251,113,133,0.12);

  --font: 'Figtree', system-ui, -apple-system, sans-serif;

  --nav-h:  60px;
  --max-w:  1320px;
  --pad-x:  clamp(20px, 4vw, 64px);
  --radius: 14px;
  --gap:    12px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--delay, 0s);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad-x);
  transition: background 0.4s;
}

.nav.scrolled {
  background: rgba(12, 12, 12, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav__logo {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  opacity: 0.9;
  transition: opacity 0.2s;
}
.nav__logo:hover { opacity: 0.5; }

.nav__links {
  display: flex;
  gap: 32px;
}

.nav__links a {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--ink);
  opacity: 0.7;
  transition: opacity 0.2s;
}
.nav__links a:hover { opacity: 1; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s, opacity 0.3s;
}
.nav__burger.open span:first-child { transform: translateY(6.5px) rotate(45deg); }
.nav__burger.open span:last-child  { transform: translateY(-6.5px) rotate(-45deg); }

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.mobile-menu.open { opacity: 1; pointer-events: all; }

.mobile-menu__link {
  font-size: clamp(2.2rem, 8vw, 3.5rem);
  font-weight: 700;
  color: var(--ink);
  transition: opacity 0.2s;
}
.mobile-menu__link:hover { opacity: 0.4; }

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) var(--pad-x) clamp(80px, 10vw, 140px);
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero__headline {
  font-size: clamp(2.4rem, 5.8vw, 5.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  max-width: 22ch;
}

.hero__bright {
  color: #FFFFFF;
}

.hero__dim {
  color: #4A4A4A;
}

/* ============================================
   WORK SECTION
   ============================================ */
.work {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x) clamp(80px, 10vw, 140px);
}

.work__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.work__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.work__sep {
  color: var(--ink-dim);
  font-size: 0.85rem;
}

.work__dates {
  font-size: 0.85rem;
  color: var(--ink-dim);
}

/* Grid: left col ~47%, right col ~53% */
.work__grid {
  display: grid;
  grid-template-columns: 47fr 53fr;
  grid-template-rows: auto auto;
  gap: var(--gap);
}

/* Card 1: top-left, normal height */
.work__grid .card:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

/* Card 2: right column, spans both rows (tall) */
.work__grid .card:nth-child(2) {
  grid-column: 2;
  grid-row: 1 / 3;
}

/* Card 3: bottom-left */
.work__grid .card:nth-child(3) {
  grid-column: 1;
  grid-row: 2;
}

/* ============================================
   CARD
   ============================================ */
.card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
  position: relative;
}

.card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card__img-wrap {
  flex: 1;
  overflow: hidden;
  min-height: 260px;
}

/* Normal cards: fixed aspect */
.work__grid .card:nth-child(1) .card__img-wrap,
.work__grid .card:nth-child(3) .card__img-wrap {
  aspect-ratio: 4/3;
  flex: none;
}

/* Tall card (card 2): fills full height */
.work__grid .card:nth-child(2) .card__img-wrap {
  flex: 1;
  min-height: 0;
}

.card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.card:hover .card__img {
  transform: scale(1.04);
}

.card__footer {
  padding: 16px 18px;
  background: var(--card-footer);
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
}

.card__name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.card__cat {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--ink-dim);
}

/* Placeholder colors when no image */
.card:nth-child(1) .card__img-wrap { background: #1E2B20; }
.card:nth-child(2) .card__img-wrap { background: #1E2050; }
.card:nth-child(3) .card__img-wrap { background: #2A2A2E; }

/* ============================================
   ABOUT
   ============================================ */
.about {
  max-width: var(--max-w);
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

/* ── Label + content row (used for bio and experience) ── */
.about__row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(40px, 5vw, 80px);
  padding: clamp(40px, 5vw, 72px) var(--pad-x);
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.about__row-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-top: 4px;
}

.about__lead {
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 20px;
  max-width: 60ch;
}

.about__para {
  font-size: 0.88rem;
  color: var(--ink-dim);
  line-height: 1.85;
  margin-bottom: 14px;
  max-width: 60ch;
}

/* ── Full-width portrait ── */
.about__photo-wrap {
  width: 100%;
  overflow: hidden;
  max-height: 70vh;
}

.about__photo {
  width: 100%;
  height: 70vh;
  max-height: 600px;
  object-fit: cover;
  object-position: center top;
  background: var(--card-bg);
  display: block;
  filter: grayscale(15%);
}

/* ── Experience list ── */
.exp-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.exp-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.exp-item:first-child { border-top: 1px solid var(--border); }

.exp-item__left { display: flex; flex-direction: column; gap: 4px; }

.exp-company {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.exp-role {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--ink-dim);
}

.exp-date {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* Coloured left accent per role */
.exp-item { border-left: 2px solid transparent; padding-left: 16px; margin-left: -18px; }
.exp-item:nth-child(1) { border-left-color: var(--blue);   }
.exp-item:nth-child(2) { border-left-color: var(--teal);   }
.exp-item:nth-child(3) { border-left-color: var(--purple); }
.exp-item:nth-child(4) { border-left-color: var(--amber);  }

/* ============================================
   CONTACT
   ============================================ */
.contact {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(80px, 10vw, 140px) var(--pad-x);
  border-top: 1px solid var(--border);
  text-align: center;
}

.contact__label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 24px;
}

.contact__email {
  display: inline-block;
  font-size: clamp(1.8rem, 4.5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
  position: relative;
  transition: opacity 0.25s;
}

.contact__email::after {
  content: '';
  display: block;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
  margin-top: 6px;
}

.contact__email:hover { opacity: 0.5; }
.contact__email:hover::after { transform: scaleX(1); }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px var(--pad-x);
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.footer__left,
.footer__right {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.footer__right { margin-left: auto; }

.footer a {
  font-size: 0.78rem;
  color: var(--ink-muted);
  transition: color 0.2s;
  letter-spacing: 0.04em;
}
.footer a:hover { color: var(--ink); }

.footer__copy {
  width: 100%;
  font-size: 0.72rem;
  color: var(--ink-muted);
  margin-top: 4px;
}


/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .work__grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .work__grid .card:nth-child(1),
  .work__grid .card:nth-child(2),
  .work__grid .card:nth-child(3) {
    grid-column: 1;
    grid-row: auto;
  }

  .work__grid .card:nth-child(2) .card__img-wrap {
    flex: none;
    aspect-ratio: 4/3;
  }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }

  .about__row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .about__photo {
    height: 50vw;
    max-height: 400px;
  }
}

@media (max-width: 480px) {
  .hero__headline { font-size: 2rem; }
  .contact__email { font-size: 1.6rem; }
  .footer__right { margin-left: 0; }
}
