:root {
  --bg: #efe7dc;
  --bg-glow: radial-gradient(circle at top left, rgba(255,255,255,0.85), transparent 34%), radial-gradient(circle at top right, rgba(255,255,255,0.45), transparent 28%);
  --surface: rgba(255, 253, 249, 0.72);
  --surface-strong: rgba(255, 251, 245, 0.92);
  --surface-alt: rgba(248, 242, 234, 0.82);
  --ink: #1f1914;
  --muted: #5f574f;
  --line: rgba(120, 89, 60, 0.16);
  --line-strong: rgba(120, 89, 60, 0.24);
  --accent: #8a5a34;
  --accent-dark: #613c21;
  --shadow: 0 18px 55px rgba(44, 31, 20, 0.10);
  --shadow-soft: 0 10px 30px rgba(44, 31, 20, 0.07);
  --shine: linear-gradient(135deg, rgba(255,255,255,0.40) 0%, rgba(255,255,255,0.08) 45%, transparent 65%);
}

/* ---- Ken Burns slow zoom ---- */
@keyframes kenburns {
  0%   { transform: scale(1.00) translateY(0); }
  100% { transform: scale(1.10) translateY(-3%); }
}

@keyframes kenburns-reverse {
  0%   { transform: scale(1.06) translateY(-3%); }
  100% { transform: scale(1.00) translateY(0); }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background:
    var(--bg-glow),
    linear-gradient(180deg, #f6f1ea 0%, #efe7dc 52%, #ebe2d5 100%);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.container { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.narrow { width: min(760px, calc(100% - 2rem)); margin: 0 auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  background: rgba(247, 240, 232, 0.62);
  border-bottom: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 2px 20px rgba(44,31,20,0.06);
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}
.brand {
  text-decoration: none;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
nav { display: flex; gap: 1rem; flex-wrap: wrap; }
nav a { text-decoration: none; color: var(--muted); font-weight: 600; }
.hero { padding: 5rem 0 3rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 2rem;
  align-items: center;
}
.eyebrow {
  margin: 0 0 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent);
}
h1, h2, h3 { line-height: 1.08; margin-top: 0; }
h1 {
  font-size: clamp(2.7rem, 6vw, 5.2rem);
  margin-bottom: 1rem;
  letter-spacing: -0.04em;
}
h2 { font-size: clamp(1.8rem, 3.8vw, 3rem); margin-bottom: 1rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.lead {
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 58ch;
}
.hero-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}
.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}
.button.primary {
  background: linear-gradient(180deg, rgba(138, 90, 52, 0.98), rgba(97, 60, 33, 0.98));
  color: white;
}
.button.primary:hover {
  background: linear-gradient(180deg, rgba(155,105,58,1), rgba(120,76,42,1));
  box-shadow: 0 8px 28px rgba(138,90,52,0.25);
}
.button.secondary {
  background: rgba(255, 255, 255, 0.42);
  border-color: rgba(255,255,255,0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.button.secondary:hover {
  background: rgba(255, 255, 255, 0.55);
}
.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}
.hero-points span {
  background: rgba(255,255,255,0.38);
  border: 1px solid rgba(255,255,255,0.48);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 999px;
  padding: 0.5rem 0.8rem;
  font-size: 0.92rem;
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.52);
}

/* ---- Glass card base + shiny gradient ---- */
.hero-image-card,
.card,
.project,
.project-text,
.about-note,
.contact-box {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.52);
  border-radius: 28px;
  box-shadow:
    0 22px 60px rgba(44, 31, 20, 0.10),
    0 8px 24px rgba(120, 89, 60, 0.07),
    inset 0 1px 0 rgba(255,255,255,0.50);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  position: relative;
  overflow: hidden;
}

/* Shiny top-to-bottom gradient overlay */
.hero-image-card::after,
.card::after,
.project::after,
.about-note::after,
.contact-box::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: var(--shine);
}

/* Hero image card: clip image for Ken Burns */
.hero-image-card { overflow: hidden; }
.hero-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 440px;
  animation: kenburns 24s ease-in-out infinite alternate;
}

/* Project images: Ken Burns with varied delays */
.project img { animation: kenburns 20s ease-in-out infinite alternate; }
.project:nth-child(2) img { animation-delay: -4s; animation-name: kenburns-reverse; }
.project:nth-child(3) img { animation-delay: -8s; }
.project:nth-child(4) img { animation-delay: -12s; animation-name: kenburns-reverse; }
.project-mini img { animation-delay: -6s; }
.project-mini:nth-child(2) img { animation-delay: -10s; animation-name: kenburns-reverse; }
.project-mini:nth-child(3) img { animation-delay: -14s; }

/* Projects need relative + overflow hidden for Ken Burns clip */
.project {
  overflow: hidden;
  position: relative;
}
.project img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.project-feature img {
  aspect-ratio: 4 / 4.2;
}
.project-feature {
  grid-row: span 2;
}
.project-copy {
  padding: 1rem 1rem 1.2rem;
  position: relative;
  z-index: 1;
}

.section { padding: 2rem 0 4rem; }
.section-heading { margin-bottom: 1.5rem; }
.section-note { color: var(--muted); max-width: 64ch; }
.intro p, .card p, .project p, .project-text p, .about-grid p, .contact-box p { color: var(--muted); }
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.card {
  padding: 1.25rem;
  position: relative;
}
.project-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.project-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.project-gallery-row {
  margin-top: 1rem;
}
.project-mini img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.project-text {
  padding: 1.1rem 1.15rem;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 1rem;
  align-items: start;
}
.about-note {
  padding: 1.25rem;
  background: var(--surface-alt);
  position: relative;
}
.about-note ul {
  margin: 0;
  padding-left: 1.15rem;
}
.contact-box {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  padding: 2rem;
  position: relative;
}
.contact-details a {
  text-decoration: none;
  color: var(--accent-dark);
  font-weight: 700;
}
@media (max-width: 960px) {
  .hero-grid,
  .cards,
  .project-grid,
  .project-list,
  .about-grid,
  .contact-box {
    grid-template-columns: 1fr;
  }
  .hero { padding-top: 3rem; }
  .project-feature { grid-row: auto; }
  .hero-image-card img { min-height: 280px; }
}

/* Minimal additions only */
@media (max-width: 880px) {
  .site-header { padding: 0.75rem 1rem; }
  .nav { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  nav { flex-wrap: wrap; gap: 0.5rem 0.75rem; }
}

nav a.active { color: var(--accent-dark); font-weight: 700; }

/* Scroll-triggered reveal — reading-as-you-go feel */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Word-by-word typing reveal */
.type-reveal {
  display: inline;
  word-spacing: normal;
}
.type-reveal .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5em);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
  white-space: pre;
}
.type-reveal.visible .word {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children slightly for smooth sequence */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.0s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.45s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > *, .type-reveal .word {
    transition: none !important; opacity: 1 !important; transform: none !important;
  }
}

