/* =========================================================
   Soumodip Mukherjee — SEO Specialist Portfolio
   Plain HTML5 / CSS / JS · Finox-inspired professional design
   ========================================================= */

/* ============ RESET & BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    cursor: none;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; cursor: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: none; }
ul, ol { list-style: none; }

/* Hide React root */
#root { display: none !important; }

/* ============ DESIGN TOKENS ============ */
:root {
    /* Cream / warm minimal palette (Finox-inspired) */
    --bg: #F2EFE9;
    --bg-soft: #ECE8E0;
    --bg-card: #FBFAF6;
    --ink: #1A1A1A;
    --ink-soft: #4B4845;
    --ink-muted: #8A8580;
    --line: rgba(26, 26, 26, 0.12);
    --line-soft: rgba(26, 26, 26, 0.06);
    --accent: #1A1A1A;
    --accent-warm: #C8A773;
    --highlight: #E8E1D4;

    --radius-sm: 10px;
    --radius: 18px;
    --radius-lg: 28px;
    --radius-xl: 40px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 12px 40px -12px rgba(0,0,0,0.18);

    --container: 1280px;
    --pad: clamp(20px, 4vw, 48px);

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    --font-serif: 'Instrument Serif', 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ============ TYPOGRAPHY ============ */
.italic { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

h1, h2, h3, h4 { font-weight: 500; letter-spacing: -0.025em; line-height: 1.05; color: var(--ink); }
h1 { font-size: clamp(2.5rem, 7vw, 6rem); }
h2 { font-size: clamp(2rem, 4.6vw, 4rem); }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.6rem); font-weight: 500; letter-spacing: -0.015em; }
p { color: var(--ink-soft); }

.muted { color: var(--ink-muted); }

/* ============ LAYOUT HELPERS ============ */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding-left: var(--pad);
    padding-right: var(--pad);
}

.section-head { margin-bottom: clamp(40px, 6vw, 80px); }
.section-head--row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}
.section-tag {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ink-muted);
    margin-bottom: 18px;
    letter-spacing: 0.02em;
}
.section-title {
    font-size: clamp(2rem, 5vw, 4.25rem);
    max-width: 16ch;
}
.section-lead { max-width: 38ch; font-size: 1.0625rem; color: var(--ink-soft); }
.section-aside { max-width: 360px; }
.section-aside p { margin-bottom: 20px; }

/* ============ CUSTOM CURSOR ============ */
.cursor, .cursor-dot {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.12s var(--ease-out), width 0.25s var(--ease), height 0.25s var(--ease), background 0.25s var(--ease);
    will-change: transform;
}
.cursor {
    width: 32px; height: 32px;
    border: 1.5px solid var(--ink);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    border-color: #fff;
}
.cursor-dot {
    width: 5px; height: 5px;
    background: var(--ink);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.cursor.is-hover { width: 56px; height: 56px; background: rgba(255,255,255,0.1); }
@media (max-width: 900px) { .cursor, .cursor-dot { display: none; } body, a, button { cursor: auto; } }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: -0.005em;
    border-radius: 999px;
    transition: all 0.35s var(--ease);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}
.btn svg { transition: transform 0.35s var(--ease); }
.btn:hover svg { transform: translate(2px, -2px); }

.btn--primary {
    background: var(--ink);
    color: var(--bg);
    border: 1px solid var(--ink);
}
.btn--primary:hover { background: var(--ink-soft); border-color: var(--ink-soft); }

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}
.btn--ghost:hover { background: var(--bg-soft); border-color: var(--ink); }

.btn--outline {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--ink);
}
.btn--outline:hover { background: var(--ink); color: var(--bg); }

.btn--pill { padding: 11px 18px; font-size: 0.875rem; background: var(--ink); color: var(--bg); border: 1px solid var(--ink); }
.btn--pill:hover { background: var(--ink-soft); }

.btn--lg { padding: 18px 30px; font-size: 1rem; }

/* ============ NAVIGATION ============ */
.nav {
    position: fixed;
    top: 16px; left: 16px; right: 16px;
    z-index: 100;
    background: rgba(242, 239, 233, 0.78);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border: 1px solid var(--line);
    border-radius: 999px;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.nav.is-scrolled { box-shadow: var(--shadow-sm); }
.nav.is-hidden { transform: translateY(-130%); }

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 10px 14px 10px 22px;
    max-width: 1400px;
    margin: 0 auto;
}

.nav__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.01em;
}
.nav__brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    background: var(--ink);
    color: var(--bg);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.nav__menu {
    display: flex;
    gap: 6px;
}
.nav__link {
    position: relative;
    display: inline-block;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink-soft);
    border-radius: 999px;
    overflow: hidden;
    transition: color 0.3s var(--ease);
}
.nav__link span { position: relative; z-index: 1; display: block; transition: transform 0.4s var(--ease); }
.nav__link::before {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    transform: translateY(100%);
    transition: transform 0.4s var(--ease);
}
.nav__link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--highlight);
    border-radius: 999px;
    transform: scale(0.7);
    opacity: 0;
    transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
    z-index: 0;
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { transform: scale(1); opacity: 1; }
.nav__link.is-active { color: var(--ink); }
.nav__link.is-active::after { transform: scale(1); opacity: 1; background: var(--bg-soft); }

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border-radius: 50%;
    width: 40px; height: 40px;
    align-items: center;
    justify-content: center;
}
.nav__toggle span {
    width: 18px; height: 1.5px;
    background: var(--ink);
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav__toggle.is-open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.nav__mobile {
    display: none;
    flex-direction: column;
    padding: 8px 22px 22px;
    gap: 4px;
    border-top: 1px solid var(--line);
    margin-top: 8px;
}
.nav__mobile-link {
    padding: 14px 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.6rem;
    color: var(--ink);
    border-bottom: 1px solid var(--line-soft);
}
.nav__mobile-link:last-child { border-bottom: none; }

@media (max-width: 900px) {
    .nav__menu, .nav .btn--pill { display: none; }
    .nav__toggle { display: flex; }
    .nav.is-open { border-radius: 28px; }
    .nav.is-open .nav__mobile { display: flex; }
}

/* ============ HERO ============ */
.hero {
    position: relative;
    min-height: 100vh;
    padding: 120px var(--pad) 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background: var(--bg);
}

.hero__grain {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
    opacity: 0.18;
    pointer-events: none;
    mix-blend-mode: multiply;
}

.hero__topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    color: var(--ink-muted);
    max-width: var(--container);
    margin: 0 auto;
    width: 100%;
    padding-top: 24px;
}
.hero__topbar-item { display: flex; align-items: center; gap: 8px; }
.dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

.hero__inner {
    max-width: var(--container);
    margin: 0 auto;
    width: 100%;
    padding: 80px 0 60px;
}

.hero__eyebrow {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 1rem;
    color: var(--ink-muted);
    margin-bottom: 32px;
    font-weight: 500;
}
.hero__eyebrow .line { width: 48px; height: 1px; background: var(--ink-muted); }

.hero__title {
    font-size: clamp(3rem, 9.5vw, 9rem);
    line-height: 0.94;
    letter-spacing: -0.04em;
    font-weight: 500;
    margin-bottom: 64px;
}
.hero__title .word { display: block; overflow: hidden; }
.hero__title .italic { color: var(--ink-soft); }
.hero__title-sub {
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    color: var(--ink-soft);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-top: 28px;
    max-width: 26ch;
}

.hero__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    margin-bottom: 48px;
    max-width: 760px;
}
.hero__meta-block { padding-top: 18px; border-top: 1px solid var(--line); }
.hero__meta-label {
    font-size: 0.75rem;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
    display: block;
}
.hero__meta-value { font-size: 1rem; color: var(--ink); line-height: 1.5; }

.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__scroll {
    position: absolute;
    bottom: 32px; left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--ink-muted);
    padding: 12px 22px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,0.4);
    backdrop-filter: blur(8px);
    transition: all 0.3s var(--ease);
    z-index: 5;
}
.hero__scroll:hover { border-color: var(--ink); color: var(--ink); }
.hero__scroll-arrow { animation: bob 1.8s ease-in-out infinite; display: inline-block; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ============ MARQUEE ============ */
.marquee {
    overflow: hidden;
    padding: 28px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--bg-soft);
}
.marquee__track {
    display: flex;
    gap: 48px;
    align-items: center;
    white-space: nowrap;
    animation: marquee 28s linear infinite;
}
.marquee__track span:not(.marquee__dot) {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.8rem, 4.5vw, 4rem);
    color: var(--ink);
    font-weight: 400;
    letter-spacing: -0.02em;
}
.marquee__dot {
    color: var(--ink-muted);
    font-size: 0.75rem;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============ ABOUT ============ */
.about { padding: clamp(80px, 12vw, 160px) 0; }
.about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: start;
}
.about__copy p { font-size: 1.0625rem; margin-bottom: 20px; color: var(--ink-soft); }
.about__pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 32px; }
.pill {
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.8125rem;
    color: var(--ink-soft);
    background: var(--bg-card);
    transition: all 0.3s var(--ease);
}
.pill:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-2px); }

.about__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat {
    padding: 28px 24px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.stat:hover { transform: translateY(-4px); border-color: var(--ink); }
.stat__value {
    font-family: var(--font-serif);
    font-size: clamp(2.4rem, 4.5vw, 3.8rem);
    line-height: 1;
    color: var(--ink);
    margin-bottom: 8px;
    font-weight: 400;
    letter-spacing: -0.02em;
}
.stat__label { font-size: 0.875rem; color: var(--ink-soft); line-height: 1.5; }
.stat__label--lg { font-size: 1rem; }
.stat--accent { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.stat--accent .stat__label { color: rgba(242, 239, 233, 0.75); }
.stat--accent .stat__icon { color: var(--bg); margin-bottom: 16px; }

@media (max-width: 900px) {
    .about__grid { grid-template-columns: 1fr; }
    .about__stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .about__stats { grid-template-columns: 1fr; }
}

/* ============ SERVICES ============ */
.services { padding: clamp(80px, 12vw, 160px) 0; background: var(--bg-soft); }
.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.service {
    padding: clamp(28px, 3.5vw, 44px);
    background: var(--bg);
    transition: background 0.4s var(--ease);
    position: relative;
    min-height: 320px;
    display: flex;
    flex-direction: column;
}
.service:hover { background: var(--bg-card); }
.service__num {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.5rem;
    color: var(--ink-muted);
    margin-bottom: 32px;
}
.service__title { font-size: 1.5rem; margin-bottom: 16px; }
.service__copy { font-size: 0.95rem; line-height: 1.6; color: var(--ink-soft); flex: 1; }
.service__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--ink);
    margin-top: 24px;
    opacity: 0.6;
    transition: opacity 0.3s var(--ease);
}
.service__more em { font-style: normal; transition: transform 0.3s var(--ease); display: inline-block; }
.service:hover .service__more { opacity: 1; }
.service:hover .service__more em { transform: translate(3px, -3px); }

@media (max-width: 900px) { .services__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .services__grid { grid-template-columns: 1fr; } }

/* ============ EXPERIENCE / TIMELINE ============ */
.experience { padding: clamp(80px, 12vw, 160px) 0; }
.timeline {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--line);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.job {
    background: var(--bg);
    display: grid;
    grid-template-columns: 220px 1fr 60px;
    gap: clamp(20px, 3vw, 40px);
    padding: clamp(28px, 3.5vw, 40px) clamp(20px, 3vw, 36px);
    transition: background 0.4s var(--ease);
    align-items: center;
}
.job:hover { background: var(--bg-soft); }
.job__meta { display: flex; flex-direction: column; gap: 6px; }
.job__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--ink);
    color: var(--bg);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    width: max-content;
}
.job__badge--muted { background: transparent; color: var(--ink-muted); border: 1px solid var(--line); }
.job__period { font-size: 0.8125rem; color: var(--ink-muted); }
.job__company {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.0625rem;
    color: var(--ink-soft);
    margin-bottom: 6px;
}
.job__title { font-size: clamp(1.3rem, 2.2vw, 2rem); margin-bottom: 12px; }
.job__desc { font-size: 0.9375rem; line-height: 1.6; margin-bottom: 16px; max-width: 60ch; }
.job__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.job__tags li {
    font-size: 0.75rem;
    padding: 5px 10px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-soft);
}
.job__arrow {
    color: var(--ink-muted);
    transition: transform 0.4s var(--ease), color 0.4s var(--ease);
    justify-self: end;
}
.job:hover .job__arrow { transform: translate(4px, -4px); color: var(--ink); }

@media (max-width: 900px) {
    .job {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: clamp(24px, 5vw, 32px) clamp(18px, 5vw, 26px);
    }
    .job__arrow { display: none; }
    .job__title { font-size: 1.35rem; }
    .job__desc { font-size: 0.9375rem; }
}

/* ============ WORK / PROJECTS ============ */
.work { padding: clamp(80px, 12vw, 160px) 0; background: var(--ink); color: var(--bg); }
.work .section-tag, .work p { color: rgba(242, 239, 233, 0.65); }
.work .section-title { color: var(--bg); }
.work__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.project {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.5s var(--ease), border-color 0.5s var(--ease);
}
.project:hover { transform: translateY(-6px); border-color: rgba(255,255,255,0.2); }
.project__image {
    position: relative;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: #2a2a2a;
}
.project__image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease);
    filter: grayscale(0.2);
}
.project:hover .project__image img { transform: scale(1.06); filter: grayscale(0); }
.project__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 22px;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.45) 100%);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
}
.project:hover .project__overlay { opacity: 1; }
.project__cta {
    padding: 10px 18px;
    background: var(--bg);
    color: var(--ink);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
}
.project__cta em { font-style: normal; }
.project__info { padding: 26px 28px 30px; }
.project__category { font-size: 0.8125rem; color: rgba(242, 239, 233, 0.6); margin-bottom: 10px; display: block; letter-spacing: 0.02em; }
.project__title { font-size: 1.4rem; color: var(--bg); margin-bottom: 8px; }
.project__result { font-family: var(--font-serif); font-style: italic; font-size: 1.0625rem; color: rgba(242, 239, 233, 0.85); }

@media (max-width: 720px) { .work__grid { grid-template-columns: 1fr; } }

/* ============ TESTIMONIALS ============ */
.testimonials { padding: clamp(80px, 12vw, 160px) 0; }
.testimonials__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.testimonial:hover { transform: translateY(-4px); border-color: var(--ink); }
.testimonial blockquote {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    line-height: 1.4;
    color: var(--ink);
    margin-bottom: 28px;
    letter-spacing: -0.01em;
    font-style: normal;
}
.testimonial figcaption { display: flex; align-items: center; gap: 14px; }
.testimonial__avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.testimonial__name { font-weight: 500; font-size: 0.95rem; color: var(--ink); }
.testimonial__role { font-size: 0.8125rem; color: var(--ink-muted); }

@media (max-width: 900px) { .testimonials__grid { grid-template-columns: 1fr; } }

/* ============ CTA ============ */
.cta { padding: 0 var(--pad) clamp(80px, 10vw, 140px); }
.cta__card {
    max-width: var(--container);
    margin: 0 auto;
    padding: clamp(50px, 7vw, 100px) clamp(30px, 6vw, 80px);
    background: var(--bg-soft);
    border-radius: var(--radius-xl);
    border: 1px solid var(--line);
    text-align: center;
}
.cta__title {
    font-size: clamp(2rem, 5vw, 4rem);
    max-width: 22ch;
    margin: 18px auto 24px;
    line-height: 1.05;
}
.cta__lead { font-size: 1.0625rem; max-width: 48ch; margin: 0 auto 48px; }
.cta__form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    max-width: 640px;
    margin: 0 auto;
    text-align: left;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    font-weight: 500;
}
.field input, .field textarea {
    font: inherit;
    width: 100%;
    padding: 16px 18px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    border-radius: 14px;
    transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
    resize: vertical;
    font-family: var(--font-sans);
}
.field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--ink);
    background: var(--bg-card);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-muted); }
.cta__form .btn { grid-column: 1 / -1; justify-self: center; margin-top: 12px; }

.cta__direct { margin-top: 36px; font-size: 0.9375rem; color: var(--ink-soft); display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.cta__direct a { color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 1px; transition: opacity 0.3s var(--ease); }
.cta__direct a:hover { opacity: 0.65; }

@media (max-width: 560px) { .cta__form { grid-template-columns: 1fr; } }

/* ============ FOOTER ============ */
.footer { padding: clamp(60px, 8vw, 100px) 0 32px; border-top: 1px solid var(--line); background: var(--bg); }
.footer__hero {
    text-align: center;
    font-size: clamp(2.5rem, 9vw, 10rem);
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: var(--ink);
    margin-bottom: clamp(60px, 9vw, 120px);
    font-weight: 500;
}
.footer__hero span { display: block; }
.footer__hero em { display: block; color: var(--ink-soft); }

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--line);
}
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__brand { font-size: 1.25rem; font-weight: 500; margin-bottom: 4px; }
.footer__tag { font-size: 0.875rem; color: var(--ink-muted); }
.footer__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    margin-bottom: 6px;
}
.footer__col a {
    font-size: 0.95rem;
    color: var(--ink-soft);
    transition: color 0.3s var(--ease), transform 0.3s var(--ease);
    width: max-content;
}
.footer__col a:hover { color: var(--ink); transform: translateX(2px); }

.footer__bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 28px;
    font-size: 0.8125rem;
    color: var(--ink-muted);
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }

/* ============ TOAST ============ */
.toast {
    position: fixed;
    bottom: 80px; right: 24px;
    padding: 16px 22px;
    background: var(--ink);
    color: var(--bg);
    border-radius: 14px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 280px;
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
    z-index: 200;
    pointer-events: none;
}
.toast.is-visible { transform: translateY(0); opacity: 1; }
.toast strong { font-size: 0.95rem; font-weight: 600; }
.toast span { font-size: 0.85rem; opacity: 0.75; }
.toast.is-error { background: #B0271F; }
.toast.is-error strong, .toast.is-error span { color: #FFF; }

.btn[disabled] { opacity: 0.6; pointer-events: none; }

/* ============ REVEAL ANIMATIONS ============ */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
    transition-delay: var(--reveal-delay, 0s);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* Stagger reveal children inside hero */
.hero__title .word { opacity: 0; transform: translateY(60%); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.hero__title .word.is-visible { opacity: 1; transform: translateY(0); }
.hero__title .word:nth-child(1).is-visible { transition-delay: 0.1s; }
.hero__title .word:nth-child(2).is-visible { transition-delay: 0.22s; }
.hero__title .word:nth-child(3).is-visible { transition-delay: 0.42s; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
    [data-reveal] { opacity: 1; transform: none; }
}



/* ============ CLIENTS / TRUSTED BY ============ */
.clients {
    padding: clamp(60px, 8vw, 100px) 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}
.clients__head { text-align: center; margin-bottom: clamp(40px, 6vw, 64px); }
.clients__title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    max-width: 22ch;
    margin: 14px auto 0;
    color: var(--ink);
    font-weight: 500;
    letter-spacing: -0.02em;
}
.clients__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}
.client-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 24px 18px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    transition: background 0.4s var(--ease);
    color: var(--ink-soft);
}
.client-logo:hover { background: var(--bg-soft); color: var(--ink); }
.client-logo__mark {
    font-size: clamp(1.1rem, 1.6vw, 1.5rem);
    letter-spacing: -0.01em;
    line-height: 1;
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
    user-select: none;
}
.client-logo__mark--serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: clamp(1.4rem, 2vw, 1.9rem); }
.client-logo__mark--bold { font-weight: 700; letter-spacing: -0.04em; }
.client-logo__mark--bold sup { font-weight: 400; font-size: 0.7em; margin-left: 1px; color: var(--ink-muted); }
.client-logo__mark--mono { font-family: 'Inter', monospace; font-weight: 500; letter-spacing: -0.005em; font-size: clamp(1rem, 1.4vw, 1.25rem); }
.client-logo__mark--mono .dot-accent { color: var(--accent-warm); }
.client-logo__mark--wide { font-weight: 600; letter-spacing: 0.06em; font-size: clamp(0.95rem, 1.3vw, 1.2rem); }
.client-logo__mark em { font-style: normal; color: var(--ink-muted); margin-left: 2px; }

.clients__note {
    margin-top: 36px;
    text-align: center;
    font-size: 0.9375rem;
    color: var(--ink-muted);
}

@media (max-width: 900px) { .clients__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .clients__grid { grid-template-columns: repeat(2, 1fr); } .client-logo { min-height: 100px; } }

/* ============ SECTION CTA ============ */
.section-cta { display: flex; justify-content: center; margin-top: clamp(40px, 5vw, 64px); }
.work .section-cta { color: var(--bg); }
.btn--outline-light {
    background: transparent;
    color: var(--bg);
    border: 1px solid rgba(255,255,255,0.35);
}
.btn--outline-light:hover { background: var(--bg); color: var(--ink); border-color: var(--bg); }

/* Make project cards anchorable */
a.project { text-decoration: none; display: block; }

/* ============ SUB-PAGE: page-hero ============ */
.page-hero {
    padding: 160px var(--pad) clamp(60px, 8vw, 100px);
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    position: relative;
}
.page-hero__inner { max-width: var(--container); margin: 0 auto; }
.page-hero__crumb {
    font-size: 0.8125rem;
    color: var(--ink-muted);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.page-hero__crumb a { color: var(--ink-muted); border-bottom: 1px solid transparent; transition: color 0.3s var(--ease), border-color 0.3s var(--ease); }
.page-hero__crumb a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.page-hero__title {
    font-size: clamp(2.8rem, 7vw, 6rem);
    line-height: 0.96;
    max-width: 16ch;
    letter-spacing: -0.035em;
    font-weight: 500;
    margin-bottom: 28px;
}
.page-hero__lead {
    font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
    max-width: 56ch;
    color: var(--ink-soft);
    line-height: 1.55;
}

/* ============ SUB-PAGE: prose block (about) ============ */
.prose-block { padding: clamp(60px, 9vw, 120px) 0; }
.prose-block__grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: clamp(40px, 5vw, 80px);
}
.prose-block__label {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    position: sticky;
    top: 110px;
    height: max-content;
}
.prose-block__body { max-width: 60ch; font-size: 1.0625rem; color: var(--ink-soft); }
.prose-block__body h3 { font-size: 1.5rem; margin: 32px 0 12px; color: var(--ink); font-weight: 500; }
.prose-block__body h3:first-child { margin-top: 0; }
.prose-block__body p { margin-bottom: 18px; line-height: 1.65; }
.prose-block__body ul { padding-left: 0; margin-bottom: 20px; }
.prose-block__body li { padding: 10px 0; border-bottom: 1px solid var(--line-soft); padding-left: 24px; position: relative; }
.prose-block__body li::before { content: '→'; position: absolute; left: 0; color: var(--ink-muted); }
.prose-block + .prose-block { border-top: 1px solid var(--line); }

@media (max-width: 760px) {
    .prose-block__grid { grid-template-columns: 1fr; gap: 24px; }
    .prose-block__label { position: static; }
}

/* ============ SUB-PAGE: services detail ============ */
.services-detail { padding: clamp(60px, 9vw, 120px) 0; background: var(--bg-soft); }
.service-card {
    display: grid;
    grid-template-columns: 80px 1fr 220px;
    gap: clamp(20px, 3vw, 48px);
    padding: 44px 0;
    border-bottom: 1px solid var(--line);
    align-items: start;
}
.service-card:first-child { border-top: 1px solid var(--line); }
.service-card__num {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 2rem;
    color: var(--ink-muted);
    font-weight: 400;
}
.service-card__title { font-size: clamp(1.4rem, 2.4vw, 2rem); margin-bottom: 12px; }
.service-card__copy { font-size: 1rem; color: var(--ink-soft); line-height: 1.65; margin-bottom: 18px; max-width: 60ch; }
.service-card__list { display: flex; flex-wrap: wrap; gap: 6px; }
.service-card__list li { padding: 6px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; font-size: 0.8125rem; color: var(--ink-soft); }
.service-card__deliverable {
    padding: 18px 20px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.service-card__deliverable-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); margin-bottom: 6px; display: block; }
.service-card__deliverable-text { font-size: 0.95rem; color: var(--ink); }

@media (max-width: 900px) {
    .service-card { grid-template-columns: 60px 1fr; }
    .service-card__deliverable { grid-column: 1 / -1; }
}

/* ============ SUB-PAGE: case study detail ============ */
.cases-detail { padding: clamp(60px, 9vw, 120px) 0; background: var(--ink); color: var(--bg); }
.cases-detail .section-tag, .cases-detail p { color: rgba(242, 239, 233, 0.65); }

.case-study {
    padding: clamp(40px, 6vw, 80px) 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    scroll-margin-top: 100px;
}
.case-study:last-child { border-bottom: none; }
.case-study__grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(30px, 5vw, 64px);
    align-items: center;
}
.case-study__image {
    aspect-ratio: 4/3;
    border-radius: var(--radius);
    overflow: hidden;
    background: #2a2a2a;
}
.case-study__image img { width: 100%; height: 100%; object-fit: cover; }
.case-study__category {
    display: inline-block;
    font-size: 0.8125rem;
    color: rgba(242, 239, 233, 0.55);
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}
.case-study__title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); color: var(--bg); margin-bottom: 20px; }
.case-study__summary { font-size: 1.0625rem; color: rgba(242, 239, 233, 0.75); line-height: 1.6; margin-bottom: 28px; max-width: 56ch; }
.case-study__metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
.case-study__metric {
    padding: 16px 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
}
.case-study__metric-value {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--bg);
    font-weight: 400;
    letter-spacing: -0.02em;
}
.case-study__metric-label { font-size: 0.75rem; color: rgba(242, 239, 233, 0.55); margin-top: 4px; }
.case-study__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.case-study__tags li { padding: 5px 10px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 999px; font-size: 0.75rem; color: rgba(242, 239, 233, 0.85); }

.case-study:nth-child(even) .case-study__grid { direction: rtl; }
.case-study:nth-child(even) .case-study__grid > * { direction: ltr; }

@media (max-width: 760px) {
    .case-study__grid, .case-study:nth-child(even) .case-study__grid { grid-template-columns: 1fr; direction: ltr; }
    .case-study__metrics { grid-template-columns: 1fr 1fr; }
}


/* ============================================================
   RESPONSIVE CLEANUP — small-screen polish
   ============================================================ */

/* Tablet down — stack section heads, tighten heros */
@media (max-width: 900px) {
    .section-head--row { flex-direction: column; align-items: flex-start; gap: 24px; }
    .section-aside { max-width: 100%; }
    .section-aside p { margin-bottom: 16px; }

    /* Hero: stack meta blocks earlier */
    .hero__meta { grid-template-columns: 1fr; gap: 20px; }

    /* Page hero title pulls tighter */
    .page-hero { padding-top: 130px; }

    /* Footer hero text size */
    .footer__hero { font-size: clamp(2.2rem, 9vw, 6rem); }
    .footer__hero em { display: inline; }

    /* Marquee text size */
    .marquee__track span:not(.marquee__dot) { font-size: clamp(1.4rem, 5vw, 2.4rem); }
}

/* Phone — fine-tune density */
@media (max-width: 600px) {
    :root { --pad: clamp(18px, 5vw, 28px); }

    /* Nav: hide the brand wordmark — keep just the SM mark */
    .nav__brand-text { display: none; }
    .nav__inner { padding: 8px 12px 8px 14px; gap: 12px; }
    .nav { top: 12px; left: 12px; right: 12px; }

    /* Hero spacing */
    .hero { padding-top: 100px; padding-bottom: 80px; }
    .hero__inner { padding: 48px 0 40px; }
    .hero__topbar { font-size: 0.75rem; }
    .hero__title { margin-bottom: 40px; }
    .hero__title-sub { font-size: 1.25rem; line-height: 1.25; max-width: 100%; }
    .hero__meta { margin-bottom: 32px; }
    .hero__actions .btn { padding: 12px 18px; font-size: 0.875rem; }
    .hero__scroll { bottom: 18px; padding: 10px 16px; font-size: 0.8125rem; }

    /* Section padding */
    .about, .services, .experience, .work, .testimonials, .clients,
    .services-detail, .cases-detail, .prose-block {
        padding-top: clamp(60px, 12vw, 100px);
        padding-bottom: clamp(60px, 12vw, 100px);
    }
    .clients { padding: clamp(48px, 9vw, 72px) 0; }

    /* About stats stack */
    .about__stats { grid-template-columns: 1fr; gap: 12px; }
    .stat { min-height: 160px; padding: 22px 20px; }
    .stat__value { font-size: 2.4rem; }

    /* Testimonials */
    .testimonial { padding: 24px; }
    .testimonial blockquote { font-size: 1.125rem; margin-bottom: 22px; }

    /* CTA card */
    .cta__card { padding: 44px 22px; border-radius: 28px; }
    .cta__title { font-size: clamp(1.6rem, 7vw, 2.6rem); }
    .cta__lead { font-size: 0.95rem; margin-bottom: 32px; }
    .cta__direct { font-size: 0.875rem; }

    /* Footer */
    .footer__brand { font-size: 1.125rem; }
    .footer__bottom { font-size: 0.75rem; }

    /* Service detail cards */
    .service-card { grid-template-columns: 1fr; gap: 16px; padding: 32px 0; }
    .service-card__num { font-size: 1.5rem; margin-bottom: 0; }
    .service-card__deliverable { grid-column: 1; }

    /* Case study */
    .case-study { padding: 32px 0; }
    .case-study__metrics { grid-template-columns: 1fr; gap: 10px; }
    .case-study__metric { padding: 14px 16px; }
    .case-study__metric-value { font-size: 1.4rem; }
    .case-study__title { font-size: 1.6rem; }
    .case-study__summary { font-size: 0.9375rem; }

    /* Job tags wrap better */
    .job__tags li { font-size: 0.7rem; padding: 4px 9px; }

    /* Page hero */
    .page-hero { padding-top: 110px; padding-bottom: 60px; }
    .page-hero__title { font-size: clamp(2.2rem, 9vw, 3.6rem); }
    .page-hero__lead { font-size: 0.9375rem; }

    /* Toast (don't cover full width) */
    .toast { left: 16px; right: 16px; bottom: 70px; min-width: 0; }

    /* Buttons */
    .btn { padding: 12px 18px; font-size: 0.9rem; }
    .btn--lg { padding: 14px 22px; font-size: 0.95rem; }
}

/* Very small phones */
@media (max-width: 380px) {
    :root { --pad: 16px; }
    .hero__title { font-size: 2.6rem; }
    .hero__title-sub { font-size: 1.125rem; }
    .nav__inner .btn--pill { display: none; }
    .clients__grid { grid-template-columns: 1fr; }
    .client-logo { min-height: 88px; }
}


/* ============================================================
   DARK MODE — prefers-color-scheme: dark
   System-preference driven. Inverts the cream palette to a
   warm-dark one, while keeping the high-contrast "feature"
   sections (work, case-studies) as a deeper dark contrast block.
   ============================================================ */

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #100E0B;
        --bg-soft: #1A1813;
        --bg-card: #1E1B16;
        --ink: #F2EFE9;
        --ink-soft: #C8C3B8;
        --ink-muted: #7E776B;
        --line: rgba(242, 239, 233, 0.12);
        --line-soft: rgba(242, 239, 233, 0.06);
        --accent: #F2EFE9;
        --accent-warm: #D4B788;
        --highlight: #28241D;

        --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
        --shadow: 0 18px 50px -12px rgba(0,0,0,0.6);
    }

    /* Hero grain — invert blend mode so it works on dark */
    .hero__grain {
        mix-blend-mode: screen;
        opacity: 0.06;
    }

    /* Custom cursor — keep difference blend; the dark background
       makes the cursor invert naturally */
    .cursor { border-color: var(--ink); }

    /* Nav — slightly more opaque so it lifts off the dark page */
    .nav {
        background: rgba(16, 14, 11, 0.82);
        backdrop-filter: blur(18px) saturate(1.5);
        -webkit-backdrop-filter: blur(18px) saturate(1.5);
    }

    /* Form inputs — subtle inner glow on focus rather than colour shift */
    .field input, .field textarea { background: var(--bg-soft); }
    .field input:focus, .field textarea:focus {
        background: var(--bg-card);
        border-color: var(--ink);
    }

    /* Form inputs in red-validation: bump red brightness */
    .field input[style*="c0392b"], .field textarea[style*="c0392b"] { border-color: #E36C5F !important; }

    /* Project image — slight brightness boost on dark */
    .project__image img { filter: brightness(0.92) grayscale(0.15); }
    .project:hover .project__image img { filter: brightness(1.02) grayscale(0); }

    /* ====================================================
       "Feature dark block" sections: .work + .cases-detail
       In light mode these are dark (var(--ink) bg).
       In dark mode we'd lose contrast — so go DEEPER black
       and keep all the rgba(255,255,255,...) overlays usable.
       ==================================================== */
    .work, .cases-detail {
        background: #060503;
        color: #F2EFE9;
        border-top: 1px solid rgba(242, 239, 233, 0.08);
        border-bottom: 1px solid rgba(242, 239, 233, 0.08);
    }

    /* Re-pin the white-coloured children since var(--bg) is now dark */
    .work .section-title,
    .project__title,
    .case-study__title,
    .case-study__metric-value {
        color: #F2EFE9;
    }
    .project__cta {
        background: #F2EFE9;
        color: #100E0B;
    }
    .btn--outline-light {
        color: #F2EFE9;
        border-color: rgba(242, 239, 233, 0.35);
    }
    .btn--outline-light:hover {
        background: #F2EFE9;
        color: #100E0B;
        border-color: #F2EFE9;
    }

    /* Stat accent — keep it as the cream contrast tile */
    .stat--accent {
        background: #F2EFE9;
        color: #100E0B;
        border-color: #F2EFE9;
    }
    .stat--accent .stat__label { color: rgba(16, 14, 11, 0.72); }
    .stat--accent .stat__icon { color: #100E0B; }

    /* Footer hero — keep prominent on dark */
    .footer__hero em { color: var(--ink-soft); }

    /* Marquee borders softer on dark */
    .marquee { background: var(--bg-soft); }

    /* Page-hero grain doesn't exist, but the page hero needs no special case */

    /* Service detail card list pills — slightly brighter */
    .service-card__list li { background: var(--bg-card); }

    /* Reduce noise of grid lines on the services grid (homepage) */
    .services__grid { background: var(--line); }
}
