/* ============================================
   TOKENS — pulled from Figma variables via the design connection
   ============================================ */
:root {
  /* color / background */
  --color-background-page: #ebebeb;
  --color-background-surface: #f4f3f1;
  --color-background-surface-sunken: #dad8d5;

  /* color / text */
  --color-text-primary: #1f1f1f;
  --color-text-muted: #4e4b47;
  --color-text-on-accent: #f4f3f1;
  --color-text-disabled: #9a9791; /* confirmed via tab component's Disabled state */

  /* color / border */
  --color-border-strong: #bfbcb8;
  --color-border-default: #dad8d5;
  --color-border-subtle: #dad8d5;

  /* color / accent */
  --color-accent-primary: #7a2710;   /* oxblood */
  --color-accent-primary-hover: #682411; /* Figma semantics: color/accent/primary-hover */
  --color-accent-secondary: #da633e; /* tangerine */
  --color-accent-tertiary: #c2e000;  /* chartreuse — decorative only, not text-safe on light */

  /* color / link */
  --color-link-hover: #572111; /* confirmed via tab component's Hover state */

  /* typography / font family */
  --font-serif: 'Fraunces', serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;

  /* typography / size scale (Figma tokens) */
  --font-size-14: 14px;
  --font-size-16: 16px;
  --font-size-20: 20px;
  --font-size-31: 31px;
  --font-size-39: 39px;
  --font-size-61: 61px;

  /* typography / line-height scale */
  --line-height-21: 21px;
  --line-height-24: 24px;
  --line-height-30: 30px;
  --line-height-47: 47px;
  --line-height-59: 59px;
  --line-height-92: 92px;

  /* typography / tracking */
  --tracking-body-large: 0.0225em; /* +2.25% */

  /* dimension / spacing scale (Figma tokens) */
  --space-6: 6px;
  --space-8: 8px;
  --space-12: 12px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-52: 52px;
  --space-112: 112px;
  --space-128: 128px;
  --space-140: 140px;
  --space-192: 192px;
  --space-256: 256px;
  --space-320: 320px;
}

/* ============================================
   RESET
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--color-text-primary);
  background: var(--color-background-page);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; padding: 0; }

/* ============================================
   ACCESSIBILITY — skip link + focus states
   ============================================ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-accent-primary);
  color: var(--color-text-on-accent);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  border-radius: 0 0 8px 0;
  font-family: var(--font-sans);
  font-weight: 500;
}
.skip-link:focus {
  left: 0;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 3px;
  border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   NAVIGATION
   ============================================ */
header {
  background: var(--color-background-surface);
  border-bottom: 1px solid var(--color-border-strong);
}
header nav {
  max-width: 1440px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-48);
}
.logo {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--font-size-20);
  line-height: var(--line-height-30);
  text-decoration: none;
  color: var(--color-text-primary);
  font-variation-settings: 'SOFT' 0, 'WONK' 1;
  transition: color 0.15s ease;
}
.logo .dot { color: var(--color-accent-secondary); transition: color 0.15s ease; }
.logo:hover { color: var(--color-accent-primary-hover); }
.logo:hover .dot { color: var(--color-accent-tertiary); } /* confirmed: period turns chartreuse on hover, not just darker oxblood */

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-32);
}
.nav-links a {
  font-family: var(--font-sans);
  font-size: var(--font-size-16);
  line-height: var(--line-height-24);
  text-decoration: none;
  transition: color 0.15s ease, font-weight 0.15s ease;
}
/* About / Work: available pages — Jakarta Light, muted; hover -> Regular weight + link/hover color */
.nav-links a.tab-available {
  font-weight: 300;
  color: var(--color-text-muted);
}
.nav-links a.tab-available:hover {
  font-weight: 400;
  color: var(--color-link-hover);
}
/* Current page — Figma "Selected" tab state: Jakarta Regular 400, text-primary (darkest) */
.nav-links a.tab-current {
  font-weight: 400;
  color: var(--color-text-primary);
}
.nav-links a.tab-current:hover {
  color: var(--color-link-hover);
}
/* Services / Fun: not yet built — Jakarta Regular, disabled color. No hover per protocol (disabled state = not interactive). */
.nav-links a.tab-disabled {
  font-weight: 400;
  color: var(--color-text-disabled);
  pointer-events: none;
  cursor: default;
}

.btn-resume {
  background: var(--color-accent-primary);
  color: var(--color-text-on-accent) !important;
  padding: var(--space-8) var(--space-16, 16px);
  border-radius: 6px;
  font-weight: 400;
  transition: background 0.15s ease;
}
.btn-resume:hover { background: var(--color-accent-primary-hover); }

/* ============================================
   HERO
   ============================================ */
.hero {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-32);
  text-align: left;
  padding: var(--space-320) var(--space-140) var(--space-192);
}
@media (max-width: 900px) {
  .hero { padding: clamp(3rem, 15vw, var(--space-320)) clamp(1.5rem, 8vw, var(--space-140)) clamp(2rem, 10vw, var(--space-192)); }
}
.hero-headline {
  font-family: var(--font-serif);
  font-weight: 500; /* confirmed via H1-Medium style token; "Bold" in the data is the font FILE name, weight token resolves to medium/500 */
  font-size: clamp(2rem, 6vw, var(--font-size-61));
  line-height: 1.508; /* literal: 92/61 */
  letter-spacing: 0; /* no tracking specified for H1 styles */
  color: var(--color-text-primary);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0 clamp(0.5rem, 2vw, var(--space-32));
  font-variation-settings: 'SOFT' 0, 'WONK' 1;
}
.hero-headline .word { white-space: nowrap; }
.period { display: inline-block; }
.p-chartreuse { color: var(--color-accent-tertiary); }
.p-oxblood { color: var(--color-accent-primary); }
.p-tangerine { color: var(--color-accent-secondary); }

.hero-sub {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--font-size-20);
  line-height: var(--line-height-30);
  letter-spacing: var(--tracking-body-large);
  color: var(--color-text-primary);
  max-width: 600px; /* literal: 599.628px */
}

/* ============================================
   WORK / CASE STUDIES
   ============================================ */
.work {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--space-128) clamp(1.5rem, 10vw, var(--space-140)) var(--space-256);
  display: flex;
  flex-direction: column;
  gap: 40px; /* literal: gap between "Projects" heading and card list */
}
.work h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--font-size-39);
  line-height: var(--line-height-59);
  color: var(--color-text-primary);
  font-variation-settings: 'SOFT' 0, 'WONK' 1;
}

.case-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-128);
}
.case-card {
  background: var(--color-background-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--space-32);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  /* NOTE: Figma specifies a FIXED 1160x560px card with no mobile/responsive spec provided.
     Implemented as fluid-with-cap (max-width) so the site doesn't break on smaller viewports. */
  max-width: 1160px;
  margin: 0 auto;
}
.case-card:has(.case-card-link:hover) {
  border-color: var(--color-accent-primary);
  box-shadow: 2px 10px 32px -4px rgba(51,50,48,0.14);
}
.case-card-link:hover .case-text h3 {
  color: var(--color-accent-primary-hover);
}
.case-card-link {
  display: flex;
  gap: var(--space-24);
  align-items: stretch;
  padding: var(--space-24);
  text-decoration: none;
  color: inherit;
}
.case-media {
  flex: 1 1 66%; /* proportional equivalent of literal 768/1160 */
  background: var(--color-background-surface-sunken);
  border: 1px solid var(--color-border-default);
  border-radius: var(--space-12);
  min-height: 400px; /* scaled down from literal 512px for fluid-width responsiveness */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  color: var(--color-text-muted);
  overflow: hidden;
}
.case-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-icon { color: var(--color-text-muted); opacity: 0.6; }
.ph-label {
  font-family: var(--font-sans);
  font-size: var(--font-size-16);
  color: var(--color-text-muted);
  opacity: 0.8;
}

.case-text {
  flex: 1 1 34%;
  min-width: 320px;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-24);
  padding: var(--space-6) 0;
}
.case-content { display: flex; flex-direction: column; gap: var(--space-12); }
.case-text h3 {
  font-family: var(--font-serif);
  font-weight: 400; /* confirmed: all three cards uniformly Fraunces Regular */
  font-size: var(--font-size-31);
  line-height: var(--line-height-47);
  color: var(--color-text-primary);
  font-variation-settings: 'SOFT' 0, 'WONK' 1;
  transition: color 0.2s ease;
}
.case-desc {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--font-size-16);
  line-height: var(--line-height-24);
  color: var(--color-text-muted);
}
/* Tags: literal spec has NO border/pill/chip treatment — plain colored text,
   separated by pale bullet characters that are themselves just muted text.
   Implemented via ::after rather than literal separator DOM nodes — identical visual result. */
.tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}
.tag {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: var(--font-size-14);
  line-height: var(--line-height-21);
  color: var(--color-accent-secondary);
  padding: 2px;
}
.tags li.tag:not(:last-child)::after {
  content: "•";
  color: var(--color-border-subtle);
  padding: 0 2px 0 6px;
  font-weight: 300;
}
.case-avatar {
  align-self: flex-end;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent-secondary), var(--color-accent-primary));
}

@media (max-width: 900px) {
  .case-card-link { flex-direction: column; }
  .case-media { min-height: 260px; }
}

/* ============================================
   ABOUT PAGE
   ============================================ */
.about-hero {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between; /* literal: no fixed gap, columns pushed to opposite ends */
  padding: var(--space-128);
}
.about-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-48);
  max-width: 640px;
}
.about-heading {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, var(--font-size-61));
  line-height: 1.508; /* literal: 92/61 */
  color: var(--color-text-primary);
  font-variation-settings: 'SOFT' 0, 'WONK' 1;
}
.bio {
  display: flex;
  flex-direction: column;
  gap: 40px; /* literal: gap between paragraph groups */
}
.bio-group {
  display: flex;
  flex-direction: column;
  gap: 18px; /* literal: gap within a paragraph group */
}
.bio p {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 18px;
  line-height: 27px;
  letter-spacing: var(--tracking-body-large);
  color: var(--color-text-primary);
}

.about-photo-wrap { flex-shrink: 0; }
.about-photo {
  width: 527px;
  height: 527px;
  border-radius: 50%;
  position: relative;
}
@media (max-width: 900px) {
  .about-photo { width: clamp(200px, 55vw, 400px); height: clamp(200px, 55vw, 400px); }
}
.about-photo-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1px solid var(--color-accent-tertiary); /* chartreuse — confirmed, simple stroke not gradient */
  box-sizing: border-box;
}

@media (max-width: 820px) {
  .about-hero { flex-direction: column-reverse; padding: var(--space-48) 1.5rem; gap: 2.5rem; }
  .about-photo-wrap { align-self: center; }
}


footer {
  background: var(--color-background-surface);
  border-top: 1px solid var(--color-border-strong);
  display: flex;
  flex-direction: column;
  gap: 52px; /* literal: gap between "collaborate" block and bottom row */
}
.footer-cta {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-32);
  padding: var(--space-48) var(--space-48) 0;
  text-align: center;
}
.footer-heading {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2rem, 6vw, var(--font-size-61));
  line-height: 1.508; /* literal: 92/61 */
  color: var(--color-text-primary);
}
.btn-primary {
  background: var(--color-accent-primary);
  color: var(--color-text-on-accent);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--font-size-16);
  line-height: var(--line-height-24);
  text-decoration: none;
  padding: 16px 24px; /* literal: py-16 px-24 */
  border-radius: 9999px;
  display: inline-block;
  transition: background 0.15s ease;
}
.btn-primary:hover { background: var(--color-accent-primary-hover); }

.footer-bottom {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0 var(--space-48) var(--space-24);
}
.copyright {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 14px;
  line-height: 21px;
  color: var(--color-text-muted);
}
.social-links {
  display: flex;
  gap: 0;
  align-items: center;
}
.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--color-text-muted);
}
.social-links a:hover { color: var(--color-accent-primary-hover); }

/* ============================================
   RESPONSIVE — small screens
   ============================================ */
@media (max-width: 640px) {
  nav { padding: 0 1.25rem; }
  .nav-links { gap: 1rem; }
  .nav-links a:not(.btn-resume) { display: none; }
  .hero-headline { flex-direction: column; gap: 0.1em; }
  .work { padding-left: 1.25rem; padding-right: 1.25rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
