:root {
    --bg-primary: #111114;
    --bg-card: #1e1e24;
    --text-primary: #f0ece4;
    --text-secondary: #9a968e;
    --text-muted: #5e5b55;
    --accent: #c8a46e;
    --accent-dim: rgba(200,164,110,0.15);
    --accent-glow: rgba(200,164,110,0.06);
    --red: #c43b3b;
    --border: rgba(255,255,255,0.06);
    --radius: 16px;

    /* 8px modular scale */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-2xl: 64px;
    --space-3xl: 80px;
    --space-4xl: 96px;
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Noise overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    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)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
}

/* ─── Nav ─── */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: var(--space-md) var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    background: rgba(17,17,20,0.7);
    border-bottom: 1px solid var(--border);
}

.site-branding {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    letter-spacing: 0.02em;
}

.site-branding a {
    color: var(--text-primary);
    text-decoration: none;
}

.site-branding .first-name { color: var(--red); }

/* WP Admin bar fix */
body.admin-bar .site-header { top: 32px; }

/* ─── Hero ─── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--space-4xl) var(--space-xl) var(--space-3xl);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(196,59,59,0.03) 0%, transparent 70%);
    pointer-events: none;
}

.hero-label {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--space-lg);
    opacity: 0;
    animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3.5rem, 8vw, 8rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.02em;
    max-width: 900px;
    opacity: 0;
    animation: fadeUp 1s ease 0.4s forwards;
}

.hero h1 em {
    font-style: italic;
    color: var(--red);
}

.hero-line {
    width: 60px;
    height: 1px;
    background: var(--accent);
    margin: var(--space-lg) auto;
    opacity: 0;
    animation: scaleIn 0.8s ease 0.8s forwards;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 0.05em;
    opacity: 0;
    animation: fadeUp 0.8s ease 1s forwards;
}

.scroll-indicator {
    position: absolute;
    bottom: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    opacity: 0;
    animation: fadeUp 0.8s ease 1.3s forwards;
}

.scroll-indicator span {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease infinite;
}

/* ─── About / Content ─── */
.about {
    padding: var(--space-4xl) var(--space-xl);
    max-width: 1200px;
    margin: 0 auto;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.section-label::before {
    content: '';
    width: 40px;
    height: 1px;
    background: var(--accent);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

/* Content typography (from WP editor) */
.about-text p,
.entry-content p {
    font-family: 'Zilla Slab', serif;
    font-size: 1.5rem;
    line-height: 1.4;
    color: var(--text-secondary);
    font-weight: 300;
}

.about-text p + p,
.entry-content p + p {
    margin-top: var(--space-md);
}

.about-text a,
.entry-content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(200,164,110,0.3);
    transition: border-color 0.3s;
}

.about-text a:hover,
.entry-content a:hover {
    border-color: var(--accent);
}

.about-text p:first-child::first-line,
.entry-content p:first-child::first-line {
    color: var(--text-primary);
    font-weight: 400;
}

.about-photo {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    max-height: 600px;
}

.about-photo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-dim), transparent 60%);
    z-index: 1;
}

.about-photo img {
    width: 100%;
    height: auto;
    display: block;
}

/* ─── Portfolio ─── */
.portfolio {
    padding: var(--space-4xl) var(--space-xl);
    max-width: 1400px;
    margin: 0 auto;
}

.portfolio-header {
    margin-bottom: var(--space-2xl);
}

.portfolio-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Card accent colors via PHP classes */
.project-card--1 { --card-accent: #3a3228; }
.project-card--2 { --card-accent: #282f3a; }
.project-card--3 { --card-accent: #3a2e24; }
.project-card--4 { --card-accent: #243a30; }
.project-card--5 { --card-accent: #3a2426; }

.project-card--1 .project-carousel { background: #1f1d1a; }
.project-card--2 .project-carousel { background: #1a1c1f; }
.project-card--3 .project-carousel { background: #1d1a18; }
.project-card--4 .project-carousel { background: #181b1a; }
.project-card--5 .project-carousel { background: #1c1919; }

.project-card {
    position: relative;
    padding: var(--space-2xl) 0;
    margin-bottom: 0;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s cubic-bezier(0.25,0.1,0.25,1), transform 1s cubic-bezier(0.25,0.1,0.25,1);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    background: var(--card-accent);
    z-index: -1;
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-carousel {
    position: relative;
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    margin-bottom: var(--space-lg);
    border-radius: 0;
}

.carousel-images { position: relative; width: 100%; height: 100%; }

.carousel-images .slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.8s ease, transform 1.2s ease;
    cursor: pointer;
}

.carousel-images .slide.active {
    opacity: 1;
    transform: scale(1);
}

.carousel-images .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.carousel-lines {
    position: absolute;
    bottom: var(--space-sm);
    left: var(--space-md);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.carousel-line {
    width: 20px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255,255,255,0.2);
    border: none;
    cursor: pointer;
    transition: all 0.4s ease;
    padding: 0;
}

.carousel-line.active {
    background: var(--accent);
    box-shadow: 0 0 8px rgba(200,164,110,0.4);
}

.carousel-line:hover:not(.active) { background: rgba(255,255,255,0.4); }

.project-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    max-width: 1000px;
    align-items: start;
}

.project-tag {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.project-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 2.5vw, 2.4rem);
    font-weight: 400;
    line-height: 1.25;
}

.project-info-right { padding-top: 4px; }

.project-desc {
    color: var(--text-secondary);
    font-weight: 300;
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 100px;
    transition: all 0.4s ease;
    text-decoration: none;
}

.cta-btn:hover {
    background: var(--accent);
    color: var(--bg-primary);
    transform: translateX(4px);
}

.cta-btn svg { transition: transform 0.3s; }
.cta-btn:hover svg { transform: translateX(4px); }

/* ─── Footer ─── */
.site-footer {
    padding: var(--space-3xl) var(--space-xl);
    border-top: 1px solid var(--border);
    max-width: 1400px;
    margin: 0 auto;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
}

.footer-brand a {
    color: var(--text-primary);
    text-decoration: none;
}

.footer-brand .first-name { color: var(--red); }

.footer-links { display: flex; gap: var(--space-lg); }

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    transition: color 0.3s;
}

.footer-links a:hover { color: var(--accent); }

.footer-copy {
    text-align: center;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

/* ─── Animations ─── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(var(--space-md)); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scaleX(0); }
    to { opacity: 1; transform: scaleX(1); }
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s cubic-bezier(0.25,0.1,0.25,1), transform 1s cubic-bezier(0.25,0.1,0.25,1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .site-header { padding: var(--space-sm) var(--space-md); }
    .hero { padding: var(--space-4xl) var(--space-md) var(--space-2xl); }
    .about { padding: var(--space-3xl) var(--space-md); }
    .about-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
    .about-photo { max-width: 400px; margin: 0 auto; }
    .portfolio { padding: var(--space-3xl) var(--space-md); }
    .project-info { grid-template-columns: 1fr; gap: var(--space-md); }
    .site-footer { padding: var(--space-xl) var(--space-md); }
    .footer-inner { flex-direction: column; gap: var(--space-md); text-align: center; }
}

@media (max-width: 600px) {
    .hero h1 { font-size: 2.8rem; }
    .project-carousel { aspect-ratio: 4/3; }
    body.admin-bar .site-header { top: 46px; }
}
