/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:          #f5f0e8;
  --surface:     #ede7d9;
  --nav-bg:      #24273a;
  --nav-text:    #eed49f;
  --text:        #2a2d3e;
  --text-muted:  #6b6f85;
  --accent:      #eed49f;
  --accent2:     #8bd5ca;
  --highlight:   #ed8796;
  --border:      #d8d0c0;

  --font-body:   'Inter', sans-serif;
  --font-head:   'Playfair Display', serif;

  --max-width:   1000px;
  --nav-height:  56px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 1rem;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

/* ── Nav ───────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.nav-name {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--nav-text);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.nav-links a:hover { opacity: 1; }

/* ── Page wrapper ──────────────────────────────────────────── */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 2rem;
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3.5rem;
  align-items: center;
  padding: 5rem 2rem 4rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  background: var(--surface);
}

.hero-photo-placeholder {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--surface);
  border: 4px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.hero-text h1 {
  font-family: var(--font-head);
  font-size: 2.6rem;
  line-height: 1.2;
  margin-bottom: 0.4rem;
}

.hero-text .tagline {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
}

.hero-text p {
  font-size: 1rem;
  max-width: 560px;
}

/* ── Divider ───────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ── Visualization section ─────────────────────────────────── */
.viz-section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.viz-section h2 {
  font-family: var(--font-head);
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.viz-section .viz-subtitle {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

.viz-container {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2.5rem;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: auto;
}

.btn-primary {
  display: inline-block;
  background: var(--nav-bg);
  color: var(--accent);
  padding: 0.75rem 2rem;
  border-radius: 4px;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
}

.btn-primary:hover {
  background: var(--accent);
  color: var(--nav-bg);
}

/* ── Scrubber ──────────────────────────────────────────────── */
.scrubber-wrap {
  margin-bottom: 1.5rem;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.scrubber-track {
  position: relative;
  display: flex;
  flex: 1;
  height: 40px;
  border-radius: 6px;
  overflow: visible;
  cursor: pointer;
}

.scrubber-play-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--nav-bg);
  background: transparent;
  color: var(--nav-bg);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  padding-left: 2px;
}

.scrubber-play-btn:hover {
  background: var(--nav-bg);
  color: var(--accent);
}

.scrubber-segment {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--nav-bg);
  opacity: 0.7;
  transition: opacity 0.2s;
}

.scrubber-segment:nth-child(odd)  { background: var(--nav-bg); color: var(--accent); }
.scrubber-segment:nth-child(even) { background: var(--accent); color: var(--nav-bg); }
.scrubber-segment:first-child { border-radius: 6px 0 0 6px; }
.scrubber-segment:last-child  { border-radius: 0 6px 6px 0; }
.scrubber-segment.active { opacity: 1; font-weight: 600; filter: brightness(1.15); }

.scrubber-handle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: var(--nav-bg);
  border: 2px solid var(--bg);
  border-radius: 50%;
  pointer-events: none;
  transition: left 0.1s linear;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

/* ── Generic content page ──────────────────────────────────── */
.page-header {
  padding: 4rem 2rem 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.page-header h1 {
  font-family: var(--font-head);
  font-size: 2.4rem;
}

.page-header p {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ── Projects grid ─────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.project-card:hover { border-color: var(--accent2); }

.project-card h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.project-card p { color: var(--text-muted); font-size: 0.95rem; }

.project-tag {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent2);
  border: 1px solid var(--accent2);
  border-radius: 3px;
  padding: 0.15rem 0.5rem;
}

/* ── Gallery grid ──────────────────────────────────────────── */
.gallery-grid {
  columns: 3;
  column-gap: 1.25rem;
}

.gallery-grid img {
  width: 100%;
  margin-bottom: 1.25rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ── Footer ────────────────────────────────────────────────── */
footer {
  background: var(--nav-bg);
  color: var(--nav-text);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  opacity: 0.9;
  margin-top: 6rem;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 680px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-photo,
  .hero-photo-placeholder {
    margin: 0 auto;
  }

  .gallery-grid { columns: 2; }

  .nav-links { gap: 1rem; }
}
