/* =========================================================
   Design tokens
   Carried over from the original single-page design, with
   --accent-1-text added as a darkened variant for AA text
   contrast (the bright accent-1 fails 4.5:1 on the cream bg
   when used for links/eyebrow text).
   ========================================================= */
:root {
  --bg: #FAF6F0;
  --bg-alt: #F3EAE0;
  --surface: #FFFFFF;
  --text-primary: #221C15;
  --text-secondary: #6B6156;
  --text-muted: #9A8F81;
  --border: #E8DDCF;
  --accent-1: #FF6B4A;
  --accent-1-text: #B8431F; /* AA-safe on --bg for links/eyebrows */
  --accent-2: #FFB84C;
  --accent-grad: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --accent-text: #4A1B0C;
  --btn-primary-bg: #B8431F; /* solid, not gradient — 5.44:1 with white text */
  --btn-primary-text: #FFFFFF;
  --shadow: 0 1px 2px rgba(34,28,21,0.04), 0 8px 24px rgba(34,28,21,0.06);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --max: 1180px;
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--accent-1) 55%, transparent);
}
html[data-theme="dark"] {
  --bg: #16130E;
  --bg-alt: #1E1911;
  --surface: #221C15;
  --text-primary: #F6EFE4;
  --text-secondary: #BBAF9E;
  --text-muted: #857A6A;
  --border: #342B1F;
  --accent-1: #FF7A57;
  --accent-1-text: #FF9770; /* bright accent already AA-safe on dark bg */
  --accent-2: #FFC266;
  --accent-text: #2A0F06;
  --btn-primary-bg: #FF7A57; /* solid, not gradient — 6.99:1 with dark text */
  --btn-primary-text: #2A0F06;
  --shadow: 0 1px 2px rgba(0,0,0,0.2), 0 12px 32px rgba(0,0,0,0.35);
}

/* =========================================================
   Reset & base
   ========================================================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}
h1, h2, h3, .display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.section { padding: 120px 0; }
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-1-text);
  margin-bottom: 18px;
  display: inline-block;
}
.muted { color: var(--text-secondary); }

/* Focus visibility — applied to every interactive element */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  background: var(--text-primary);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  z-index: 1000;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 12px;
}

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* =========================================================
   Nav
   ========================================================= */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px) saturate(160%);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav-inner { padding: 18px 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { font-family: 'Fraunces', serif; font-size: 19px; font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--text-secondary); transition: color 0.2s; position: relative; }
.nav-links a:hover { color: var(--text-primary); }
.nav-links a[aria-current="page"] { color: var(--text-primary); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent-grad); border-radius: 2px;
}
.nav-right { display: flex; align-items: center; gap: 20px; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); cursor: pointer; padding: 0; align-items: center;
}
.nav-toggle-bar { width: 20px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.theme-toggle {
  width: 44px; height: 26px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--bg-alt); position: relative; cursor: pointer; padding: 0; flex-shrink: 0;
}
.theme-toggle .knob {
  position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-grad); transition: transform 0.3s ease;
}
html[data-theme="dark"] .theme-toggle .knob { transform: translateX(18px); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 100px;
  font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-primary); }
.btn-ghost:hover { border-color: var(--accent-1); }
.btn-sm { padding: 9px 18px; font-size: 13px; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(320px, 82vw);
    background: var(--surface); border-left: 1px solid var(--border);
    flex-direction: column; align-items: flex-start; justify-content: flex-start;
    padding: 96px 32px 32px; gap: 28px;
    transform: translateX(100%); transition: transform 0.3s ease;
    z-index: 99;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 17px; }
  .nav-right .btn-sm span.label { display: none; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero { position: relative; padding: 100px 0 90px; overflow: hidden; }
.hero-glow {
  position: absolute; top: -220px; right: -160px; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent-1), transparent 70%);
  opacity: 0.35; filter: blur(40px); animation: drift 14s ease-in-out infinite alternate; pointer-events: none;
}
.hero-glow-2 {
  position: absolute; bottom: -260px; left: -160px; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle at 60% 40%, var(--accent-2), transparent 70%);
  opacity: 0.28; filter: blur(50px); animation: drift 16s ease-in-out infinite alternate-reverse; pointer-events: none;
}
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(-30px, 40px) scale(1.08); } }
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.hero h1 { font-size: clamp(42px, 6vw, 68px); }
.hero .accent-word { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin-top: 24px; font-size: 19px; color: var(--text-secondary); max-width: 600px; }
.hero-actions { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }

/* =========================================================
   Stats
   ========================================================= */

/* =========================================================
   Point of view + pull-quote
   ========================================================= */
.pov { padding: 96px 0; }
.pov-inner { max-width: 720px; }
.pov p { font-size: 21px; font-family: 'Fraunces', Georgia, serif; font-weight: 400; line-height: 1.5; color: var(--text-primary); }

.pull-quote { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.pull-quote-inner { max-width: 760px; margin: 0 auto; text-align: center; padding: 80px 32px; }
.pull-quote .quote-mark { font-family: 'Fraunces', serif; font-size: 56px; color: var(--accent-1); line-height: 1; display: block; margin-bottom: 8px; }
.pull-quote p.quote { font-family: 'Fraunces', Georgia, serif; font-size: 26px; font-weight: 400; line-height: 1.4; color: var(--text-primary); }
.pull-quote .attribution { margin-top: 24px; font-size: 14px; color: var(--text-muted); }
.pull-quote .attribution strong { color: var(--text-secondary); }

/* =========================================================
   Section heading
   ========================================================= */
.section-head { max-width: 620px; margin-bottom: 64px; }
.section-head h2 { font-size: clamp(30px, 4vw, 42px); }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 64px; }
.section-head-row .section-head { margin-bottom: 0; }

/* =========================================================
   Featured work teaser (Home)
   ========================================================= */
.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.featured-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 32px; display: flex; flex-direction: column; gap: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.featured-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.featured-card .cs-tag { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent-1-text); }
.featured-card h3 { font-size: 21px; margin-top: 4px; }
.featured-card .client { font-size: 13px; color: var(--text-muted); }
.featured-card p.summary { font-size: 14px; color: var(--text-secondary); flex-grow: 1; }
.featured-card .stat-chip { font-family: 'Fraunces', serif; font-size: 22px; color: var(--text-primary); }
.featured-card .stat-chip span { display: block; font-family: 'Inter', sans-serif; font-size: 12px; color: var(--text-muted); font-weight: 400; margin-top: 2px; }
.featured-card .link-out { font-size: 13px; font-weight: 600; color: var(--accent-1-text); margin-top: 4px; }
.featured-card .link-out:hover { text-decoration: underline; }

.cta-band { text-align: center; padding: 96px 0; }
.cta-band-inner { max-width: 620px; margin: 0 auto; }
.cta-band h2 { font-size: clamp(28px, 4vw, 40px); }
.cta-band p { margin-top: 16px; font-size: 17px; color: var(--text-secondary); }
.cta-band .actions { margin-top: 32px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* =========================================================
   Page intro (About / Selected Work / Skills & AI / CV / Contact)
   ========================================================= */
.page-intro { padding: 80px 0 0; }
.page-intro h1 { font-size: clamp(34px, 5vw, 50px); }
.page-intro .hero-sub { margin-top: 20px; }

/* =========================================================
   About
   ========================================================= */
.about { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 72px; align-items: start; }
.about-photo {
  aspect-ratio: 3/4; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border); position: relative;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-copy p { font-size: 17px; color: var(--text-secondary); margin-bottom: 20px; }
.about-copy p strong { color: var(--text-primary); font-weight: 600; }
.about-copy p:last-child { margin-bottom: 0; }

/* =========================================================
   Approach
   ========================================================= */
.approach-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.approach-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 32px; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.approach-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.approach-num { font-family: 'Fraunces', serif; font-size: 15px; color: var(--accent-1-text); margin-bottom: 14px; }
.approach-card h3 { font-size: 20px; margin-bottom: 10px; }
.approach-card p { font-size: 14px; color: var(--text-secondary); }

/* =========================================================
   Testimonials
   ========================================================= */
.testimonial-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.testimonial-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; }
.testimonial-card .quote-mark { font-family: 'Fraunces', serif; font-size: 48px; color: var(--accent-1); line-height: 1; margin-bottom: 6px; display: block; }
.testimonial-card p.quote { font-size: 16px; color: var(--text-secondary); line-height: 1.7; }
.testimonial-author { margin-top: 24px; display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-grad); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; color: var(--accent-text); flex-shrink: 0; }
.testimonial-author strong { display: block; font-size: 14px; }
.testimonial-author span { font-size: 13px; color: var(--text-muted); }

/* =========================================================
   Clients
   ========================================================= */
.clients-row { display: flex; flex-wrap: wrap; gap: 12px; }
.client-chip { font-size: 13px; color: var(--text-muted); padding: 8px 14px; border: 1px solid var(--border); border-radius: 100px; }

/* =========================================================
   Case studies (Selected Work)
   ========================================================= */
.case-study { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 64px 0; border-top: 1px solid var(--border); }
.case-study:first-child { border-top: none; padding-top: 0; }
.case-study:nth-child(even) .cs-visual { order: 2; }
.cs-visual { display: flex; flex-direction: column; }
.cs-carousel-frame {
  border-radius: var(--radius-lg); background: var(--bg-alt); border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.cs-carousel-frame img { width: 100%; height: auto; display: block; } /* natural aspect ratio — no cropping */
.cs-tag { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent-1-text); }
.cs-title { font-size: 30px; margin-top: 10px; }
.cs-client { color: var(--text-muted); font-size: 14px; margin-top: 4px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cs-visit-link { color: var(--accent-1-text); font-size: 13px; font-weight: 600; }
.cs-visit-link:hover { text-decoration: underline; }
.cs-caveat { font-size: 12px; font-style: italic; color: var(--text-muted); margin-top: 8px; }
.cs-block { margin-top: 22px; }
.cs-block h4 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin-bottom: 6px; }
.cs-block p { font-size: 15px; color: var(--text-secondary); }
.cs-impact { display: flex; gap: 28px; margin-top: 26px; flex-wrap: wrap; }
.cs-impact div strong { display: block; font-family: 'Fraunces', serif; font-size: 24px; font-weight: 500; }
.cs-impact div span { font-size: 12px; color: var(--text-muted); }

/* =========================================================
   Skills & AI
   ========================================================= */
.skills-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.skill-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 32px; }
.skill-group h3 { font-size: 18px; margin-bottom: 18px; }
.pill-row { display: flex; gap: 10px; flex-wrap: wrap; }
.pill { padding: 8px 16px; border-radius: 100px; border: 1px solid var(--border); font-size: 13px; color: var(--text-secondary); background: var(--bg-alt); }

.prose { max-width: 720px; }
.prose p { font-size: 17px; color: var(--text-secondary); margin-bottom: 20px; }
.prose p:last-child { margin-bottom: 0; }

.feature-callout { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; max-width: 780px; }
.feature-callout .cs-tag { display: block; margin-bottom: 14px; }
.feature-callout h3 { font-size: 26px; margin-bottom: 4px; }

/* =========================================================
   Beyond delivery (About, personal section)
   ========================================================= */
.personal-card { display: flex; gap: 32px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; }
.personal-photo {
  width: 160px; height: 160px; border-radius: var(--radius-md); flex-shrink: 0; overflow: hidden;
  background: var(--bg-alt); border: 1px solid var(--border); position: relative;
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.personal-photo img { width: 100%; height: 100%; object-fit: cover; }
.personal-photo .placeholder-label { font-size: 12px; color: var(--text-muted); padding: 12px; }
.personal-copy p { font-size: 16px; color: var(--text-secondary); }
.personal-copy p:last-child { margin-bottom: 0; }

/* =========================================================
   Contact
   ========================================================= */
.contact-block { max-width: 640px; }
.contact-block .actions { display: flex; gap: 14px; flex-wrap: wrap; }
.contact-block .note { margin-top: 28px; font-size: 15px; color: var(--text-secondary); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 32px 0; }
.footer-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--text-muted); }
.footer-bar nav { display: flex; gap: 20px; }
.footer-bar a:hover { color: var(--text-primary); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .featured-grid { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; gap: 40px; }
  .about-photo { aspect-ratio: 16/9; }
  .approach-grid { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .case-study { grid-template-columns: 1fr; gap: 32px; }
  .case-study:nth-child(even) .cs-visual { order: 0; }
  .skills-groups { grid-template-columns: 1fr; }
  .personal-card { flex-direction: column; text-align: center; }
  .personal-photo { width: 140px; height: 140px; }
}
@media (max-width: 560px) {
  .container { padding: 0 20px; }
  .section { padding: 80px 0; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .pull-quote p.quote { font-size: 21px; }
}
