/* ─── CSS VARIABLES & RESET ─── */
:root {
    --bg: #0C0C0C;
    --surface: #161616;
    --surface-hover: #1A1A1A;
    --border: #2A2A2A;
    --text: #ebeae8;
    --muted: #b3aea7;
    --accent: #E85D50;
    --accent-dim: rgba(232, 93, 80, 0.15);

    --font-display: 'Instrument Serif', serif;
    --font-sans: 'Google Sans Flex', sans-serif;

    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ─── TEXTURE / GRAIN ─── */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ─── TYPOGRAPHY ─── */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.1;
}

.display-xl {
    font-size: clamp(4rem, 12vw, 10rem);
    letter-spacing: -0.02em;
    margin-bottom: 0.5em;
}

.display-lg {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 0.5em;
}

.display-md {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

p {
    font-size: 1.125rem;
    color: var(--text);
    max-width: 60ch;
}

.lead {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    color: var(--text);
    line-height: 1.5;
}

a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.text-accent {
    color: var(--accent);
}

.text-italic {
    font-style: italic;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent) 0%, #FFB085 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: var(--font-display);
    font-weight: 400;
    font-style: italic;
    font-size: 1.25em;
    display: inline-block;
    margin-top: 0.5rem;
}

/* ─── LAYOUT ─── */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5vw;
}

section {
    padding: 10rem 0;
    position: relative;
}

.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
}

/* ─── NAVIGATION ─── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 5vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    mix-blend-mode: difference;
}

.nav-brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ─── HERO ─── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 5rem;
}

.hero-role {
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    color: var(--accent);
    margin-bottom: 2rem;
    display: block;
}

.hero-desc {
    grid-column: 7 / -1;
    margin-top: 3rem;
}

/* ─── CASE STUDY (TRUTH TAILS) ─── */
.case-study {
    border-top: 1px solid var(--border);
    padding-top: 5rem;
}

.case-header {
    margin-bottom: 5rem;
}

.case-meta {
    grid-column: 1 / 4;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.meta-item h4 {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.meta-item p {
    color: var(--text);
    font-size: 1rem;
}

.case-title {
    grid-column: 5 / -1;
}

.case-hero-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2);
    transition: filter 0.8s ease;
    margin-bottom: 5rem;
}

.case-hero-img:hover {
    filter: grayscale(0%) contrast(1);
}

.content-block {
    margin-bottom: 8rem;
}

.content-block .col-left {
    grid-column: 1 / 5;
}

.content-block .col-left h3 {
    position: sticky;
    top: 120px;
}

.content-block .col-right {
    color: var(--text);
    grid-column: 6 / -1;
}

.content-block .col-right p {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

/* Lists */
.editorial-list {
    list-style: none;
    margin-top: 2rem;
}

.editorial-list li {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 2rem;
    align-items: baseline;
}

.editorial-list .label {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--accent);
}

/* ─── PROCESS LOOP ANIMATION ELEMENTS ─── */
.process-loop {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--text);
    margin: 1rem 0;
    overflow: hidden;
    /* For smooth entrance */
    background: var(--surface);
    padding: 1.5rem 2rem;
    border-radius: 4rem;
    border: 1px solid var(--border);
}

.process-word {
    display: inline-block;
    color: var(--text);
}

.process-word .letter {
    display: inline-block;
}

.process-arrow {
    display: inline-block;
    color: var(--accent);
    opacity: 0;
    /* Hidden initially for animation */
}

/* ─── ABOUT / CV ─── */
.cv-section {
    border-top: 1px solid var(--border);
    padding-top: 5rem;
}

.cv-grid {
    margin-bottom: 4rem;
}

.cv-grid>h3 {
    grid-column: 1 / 4;
    font-size: 2rem;
    color: var(--muted);
}

.cv-items {
    grid-column: 5 / -1;
}

.cv-item {
    margin-bottom: 3rem;
}

.cv-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.cv-title {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--text);
}

.cv-org {
    font-family: var(--font-sans);
    font-weight: 500;
}

.cv-date {
    font-size: 0.875rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 2rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ─── FOOTER ─── */
footer {
    padding: 10rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

footer p {
    margin: 0 auto;
}

.footer-cta {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 2rem;
}

.footer-cta a {
    display: inline-block;
    position: relative;
}

.footer-cta a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.4s var(--ease-out);
}

.footer-cta a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* ─── ANIMATIONS ─── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

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

/* Responsive */
@media (max-width: 992px) {
    .grid {
        display: flex;
        flex-direction: column;
    }

    .hero-desc {
        margin-top: 2rem;
    }

    .case-meta {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 2rem;
        margin-bottom: 2rem;
    }

    .content-block .col-left h3 {
        position: relative;
        top: 0;
        margin-bottom: 1.5rem;
    }

    .editorial-list li {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .cv-item-header {
        flex-direction: column;
        gap: 0.5rem;
    }
}