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

:root {
  --bg-dark: #0a0a0f;
  --bg-card: rgba(255,255,255,0.04);
  --text-primary: #f0ede6;
  --text-secondary: rgba(240,237,230,0.6);
  --text-tertiary: rgba(240,237,230,0.4);
  --accent: #c9a96e;
  --accent-glow: rgba(201,169,110,0.3);
  --border: rgba(255,255,255,0.06);
  --border-strong: rgba(255,255,255,0.12);
  --content-max: 760px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s, opacity 0.2s;
}
a:hover { opacity: 0.8; }

em { font-style: italic; color: var(--accent); }

/* ─── FILM GRAIN ─── */
.grain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* ─── BUST PORTRAIT ─── */
.bust {
  position: relative;
  pointer-events: none;
}
.bust img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.bust .layer-base { z-index: 1; filter: blur(1.5px) saturate(0.85) brightness(0.7); }
.bust .layer-eye  { z-index: 2; will-change: transform; filter: blur(1.5px); }
.bust .layer-mask { z-index: 3; filter: blur(1.5px) saturate(0.85) brightness(0.7); }
.bust .bust-vignette {
  position: absolute; inset: 0; z-index: 4;
  background: radial-gradient(ellipse at center, transparent 25%, var(--bg-dark) 75%);
}

/* ─── HERO ─── */
.hero {
  position: relative;
  height: 80vh;
  min-height: 520px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

.hero .painting-container {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}

.hero .bust { width: 580px; height: 580px; }

.hero-content {
  position: relative; z-index: 10;
  text-align: center;
  max-width: 800px; padding: 0 2rem;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 0.6rem;
  text-shadow: 0 0 80px rgba(10,10,15,0.8);
}
.hero-tagline {
  font-size: 1rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-shadow: 0 0 40px var(--bg-dark);
}

.scroll-hint {
  position: absolute; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%); z-index: 10;
  display: flex; flex-direction: column; align-items: center;
  gap: 0.5rem; color: var(--text-secondary);
  font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase;
  animation: float 3s ease-in-out infinite;
}
.scroll-hint .line {
  width: 1px; height: 30px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ─── COMPACT HEADER (sub-pages) ─── */
.compact-header {
  position: relative; z-index: 10;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 3rem 2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}
.compact-header .brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--accent);
}

/* ─── NAV ─── */
.nav {
  display: flex;
  gap: 1.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav a {
  color: var(--text-secondary);
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text-primary);
}
.nav a[aria-current="page"] {
  color: var(--accent);
}

/* Hero overlays its own nav at top */
.hero-nav {
  position: absolute; top: 0; left: 0; right: 0;
  z-index: 20;
  padding: 2rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hero-nav .brand {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--accent);
}

/* ─── CONTENT ─── */
.content {
  position: relative; z-index: 10;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.section { margin-bottom: 4rem; }
.section:last-child { margin-bottom: 0; }

.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  line-height: 1.25;
}

h2.page-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0.5rem 0 0.5rem;
}

.page-tagline {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-style: italic;
}

p { margin-bottom: 1rem; color: var(--text-primary); }
p.muted { color: var(--text-secondary); }

ul.plain { list-style: none; }

/* ─── LINKS ROW ─── */
.links-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  font-size: 0.9rem;
}
.links-row a {
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
}
.links-row a:hover { border-bottom-color: var(--accent); color: var(--accent); }

/* ─── POST LIST ─── */
.post-list { list-style: none; }
.post-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.post-list li:last-child { border-bottom: none; }
.post-list a {
  display: block;
  color: var(--text-primary);
}
.post-list a:hover .post-title { color: var(--accent); }

.post-row {
  display: flex; gap: 1.25rem; align-items: baseline; flex-wrap: wrap;
}
.post-date {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  min-width: 6.5rem;
}
.post-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  transition: color 0.2s;
}
.post-excerpt {
  color: var(--text-secondary);
  margin: 0.5rem 0 0 7.75rem;
  font-size: 0.9rem;
}

.see-all {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid transparent;
}
.see-all:hover { border-bottom-color: var(--accent); }

/* ─── PROJECTS ─── */
.projects { list-style: none; }
.project {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}
.project:last-child { border-bottom: none; }

.project-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}
.project h3 {
  font-size: 1.4rem;
}
.project-year {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
}
.tags {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-bottom: 0.6rem;
}
.tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 2px;
}
.project p { color: var(--text-secondary); }
.project-links {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.project-links a { color: var(--accent); margin-right: 1rem; }

.project-media {
  margin: 1rem 0 0;
  padding: 0;
}
.project-media video {
  width: 100%;
  display: block;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #000;
}
.project-media figcaption {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
  font-style: italic;
}

/* ─── POST PAGE ─── */
.post-article {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  position: relative; z-index: 10;
}
.post-article header { margin-bottom: 2.5rem; }
.post-article h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0.5rem 0 0.5rem;
}
.post-article .post-meta {
  color: var(--text-secondary);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.post-article h2 {
  font-size: 1.6rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}
.post-article p { font-size: 1rem; line-height: 1.8; }
.post-article ul {
  margin: 0 0 1.25rem 1.5rem;
  color: var(--text-primary);
}
.post-article li { margin-bottom: 0.4rem; }
.post-article .back {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ─── FOOTER ─── */
footer {
  position: relative; z-index: 10;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  border-top: 1px solid var(--border);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .hero { height: 70vh; min-height: 420px; }
  .hero .bust { width: 360px; height: 360px; }
  .hero-nav { padding: 1.25rem 1.5rem; }
  .content, .post-article { padding: 3rem 1.25rem 4rem; }
  .compact-header { padding: 2rem 1.25rem 1.25rem; }
  .post-row { flex-direction: column; gap: 0.2rem; }
  .post-excerpt { margin-left: 0; }
  .nav { gap: 1rem; font-size: 0.72rem; }
}
