/* index.html page styles - extracted from index.html inline <style>.
   Design tokens, @font-face and base reset live in css/root.css (loaded first). */

/* ============================================================
   TYPOGRAPHY
============================================================ */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: var(--sp-1);
}

.eyebrow::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-bottom: 0.2rem;
    background: var(--red-mid);
    flex-shrink: 0;
}

/* ============================================================
   LAYOUT
============================================================ */
.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 var(--sp-4);
}

section {
    padding: var(--sp-12) 0;
}

.section-head {
    margin-bottom: var(--sp-6);
}

/* ============================================================
   NAV
============================================================ */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem var(--sp-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--t-base);

    /* Props that are changed dynamically with the scroll detector script */
    background: rgb(255, 255, 255, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0);
}

#main-nav.scrolled {
    background: rgb(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.07);
}

.nav-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--teal-dark);
    letter-spacing: 0.01em;

}

.nav-logo img {
    margin: -0.5rem var(--sp-1) -0.5rem 0;
    height: 2.05rem;
    display: inline;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink-soft);
    transition: color var(--t-fast);
}

.nav-links a:hover {
    color: var(--teal-dark);
}

.nav-cta {
    background: var(--teal-dark) !important;
    color: white !important;
    padding: 0.45rem 1.1rem;
    border-radius: var(--r-pill);
    transition: background var(--t-fast) !important;
}

.nav-cta:hover {
    background: var(--teal-light) !important;
}

@media (max-width: 600px) {
    #main-nav .nav-links li:not(:last-child) {
        display: none;
    }
}

/* ============================================================
   HERO
============================================================ */
#hero {
    min-height: calc(100svh + 50px);
    padding-top: 72px;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--surface);
    z-index: 1; /* creates stacking context, paints hero overflow above wave divider */
}

/* Hero content stacks above blobs */
#hero .container {
    position: relative;
    z-index: 2;
}

.blob-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.blob-overflow-wrap {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0; /* above blob-wrap(-1), below content(2), overflows hero freely */
}

/* Decorative blobs */
.blob {
    position: absolute;
    border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%;
    pointer-events: none;
    animation: blobMorph 10s ease-in-out infinite;
}

/* Twin backing layer — matches the section's own background */
.blob-bg {
    background: var(--blob-bg) !important;
    opacity: 1 !important;
}

/* ---- Hero blobs (--blob-bg: var(--surface) by default) ---- */
.blob-a {
    width: 520px;
    height: 520px;
    top: -80px;
    right: -80px;
    background: radial-gradient(circle at 40% 40%,
    var(--red-dark),
    var(--teal-dark) 54%,
    transparent 72%);
    opacity: 0.12;
    animation-duration: 10s;
}

.blob-b {
    width: 380px;
    height: 380px;
    bottom: 0;
    left: -60px;
    background: radial-gradient(circle,
    var(--teal-light),
    var(--red-mid) 65%,
    transparent 80%);
    opacity: 0.1;
    animation-duration: 14s;
    animation-direction: reverse;
}

.blob-c {
    width: 160px;
    height: 160px;
    top: 60px;
    left: -20px;
    background: radial-gradient(circle at 50% 50%,
    var(--teal-dark),
    var(--teal-light) 40%,
    transparent 75%);
    opacity: 0.33;
    animation-duration: 7s;
    animation-delay: -3s;
}

.blob-d {
    width: 200px;
    height: 200px;
    bottom: -80px;
    right: 15%;
    background: radial-gradient(circle at 45% 55%,
    var(--red-mid),
    var(--teal-dark) 65%,
    transparent 85%);
    opacity: 0.13;
    animation-duration: 19s;
    animation-delay: -11s;
    animation-direction: reverse;
}

/* ---- About section blob (overflows into wave below) ---- */
.blob-e {
    width: 260px;
    height: 260px;
    bottom: -80px;
    left: 50px;
    background: radial-gradient(circle at 50% 45%,
    var(--teal-light),
    var(--red-dark) 55%,
    transparent 80%);
    opacity: 0.09;
    animation-duration: 16s;
    animation-delay: -7s;
    animation-direction: reverse;
}

/* ---- Contact section blob (below intro text, overflows into footer) ---- */
.blob-f {
    width: 200px;
    height: 200px;
    bottom: -50px;
    right: 10%;
    background: radial-gradient(circle at 50% 50%,
    var(--teal-light),
    var(--teal-dark) 60%,
    transparent 85%);
    opacity: 0.35;
    animation-duration: 13s;
    animation-delay: -6s;
}

/* ---- Mobile: shrink & reposition all blobs ---- */
@media (max-width: 720px) {
    .blob-a {
        width: 280px;
        height: 280px;
        top: -20px;
        right: -50px;
    }

    .blob-b {
        width: 240px;
        height: 240px;
        bottom: 0;
        left: -40px;
    }

    .blob-c {
        width: 150px;
        height: 100px;
        top: 60px;
        left: -20px;
    }

    .blob-d {
        width: 130px;
        height: 130px;
        bottom: -65px;
        right: 8%;
    }

    .blob-e {
        width: 150px;
        height: 150px;
        bottom: -75px;
        left: -30px;
    }

    .blob-f {
        width: 140px;
        height: 140px;
        bottom: -15px;
        right: 5%;
    }
}

@keyframes blobMorph {
    0%, 100% {
        border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%;
    }
    33% {
        border-radius: 50% 50% 40% 60% / 60% 40% 60% 40%;
    }
    66% {
        border-radius: 40% 60% 55% 45% / 45% 55% 45% 55%;
    }
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--sp-8);
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Allow the text column to stay bounded — long typewriter words
   will overflow visually (over the photo) instead of pushing the layout */
.hero-text {
    min-width: 0;
    overflow: visible;
    position: relative; /* ensures z-index stacking above blob-wrap */
}

/* Hero text animate-in */
.hero-inner > * {
    animation: fadeSlideUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-inner > *:nth-child(2) {
    animation-delay: 0.12s;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-prefix {
    display: block;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    color: var(--ink-muted);
    line-height: 1;
    margin-bottom: 0.2em;
}

/*
  The typewriter anchor is an in-flow placeholder that reserves exactly
  one line of h1 height. The actual typewriter line is position:absolute
  so no matter how long the word gets, it never contributes to the h1
  layout width — it floats over whatever is to its right.
*/
.typewriter-anchor {
    position: relative;
    height: 1.15em;
    display: block;
}

.hero-typewriter-line {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: flex-start;
    gap: 4px;
    white-space: nowrap;
    line-height: 1.1;
}

.hero-word {
    color: var(--teal-dark);
    display: inline-block;
    min-height: 1.15em;
    vertical-align: top;
}

.cursor-blink {
    display: inline-block;
    width: 6px;
    height: 0.82em;
    background: var(--red-mid);
    border-radius: 3px;
    vertical-align: top;
    margin-top: 0.12em; /* fine-tune optical alignment against cap-height */
    animation: cursorBlink 0.75s step-end infinite;
}

@keyframes cursorBlink {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 0;
    }
}

.hero-sub {
    margin-top: var(--sp-3);
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--ink-soft);
    max-width: 460px;
    line-height: 1.6;
}

.hero-sub strong {
    color: var(--ink);
    font-weight: 700;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin-top: var(--sp-4);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.6rem;
    border-radius: var(--r-pill);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.925rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--t-base);
    white-space: nowrap;
}

.btn-primary {
    background: var(--teal-dark);
    color: white;
    border-color: var(--teal-dark);
}

.btn-primary:hover {
    background: var(--teal-light);
    border-color: var(--teal-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-ghost {
    background: transparent;
    color: var(--teal-dark);
    border-color: var(--teal-dark);
}

.btn-ghost:hover {
    background: var(--teal-dark);
    color: white;
    transform: translateY(-2px);
}

/* Photo */
.hero-photo-wrap {
    position: relative;
    flex-shrink: 0;
}

.hero-photo {
    width: 230px;
    height: 230px;
}

@media (max-width: 720px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-photo {
        width: 170px;
        height: 170px;
        margin: 0 auto;
        order: -1;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-sub {
        margin-left: auto;
        margin-right: auto;
    }

    /* Absolute-positioned line: center it by anchoring to 50% and pulling back */
    .hero-typewriter-line {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ============================================================
   WHAT I DO
============================================================ */
#what-i-do {
    background: var(--white);
}

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

/* Card base */
.wcard {
    background: var(--surface);
    border: 1.5px solid var(--border-soft);
    border-radius: var(--r-lg);
    padding: var(--sp-4);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}

.wcard::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    border-radius: 0 2px 2px 0;
    background: var(--teal-dark);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform var(--t-base);
}

.wcard:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--border);
}

.wcard:hover::after {
    transform: scaleY(1);
}

.wcard-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: var(--r-md);
    margin-bottom: var(--sp-2);
    display: block;
    align-self: flex-start; /* prevent flex column from stretching to full width */
    flex-shrink: 0;
}

.wcard-noe .wcard-img {
    width: 56px;
    height: 56px;
}

/* Emoji icon for cards without an image (activist) */
.wcard-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: var(--sp-2);
    display: block;
}

.wcard h3 {
    margin-bottom: 0.5rem;
}

.wcard p {
    font-size: 0.95rem;
    color: var(--ink-soft);
    line-height: 1.65;
}

.wcard-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: var(--sp-2);
    color: var(--teal-dark);
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(7, 125, 142, 0.35);
    transition: gap var(--t-fast), text-decoration-color var(--t-fast);
}

.wcard-link:hover {
    gap: 0.55rem;
    text-decoration-color: var(--teal-dark);
}

.wcard-link::after {
    content: " \2197";
}

/* Grid placement */
.wcard-noe {
    grid-column: span 7;
    background: linear-gradient(145deg, var(--teal-dark) 0%, #056070 100%);
    color: white;
    border-color: var(--teal-dark);
}

.wcard-noe::after {
    display: none;
}

.wcard-noe:hover {
    box-shadow: 0 8px 32px rgba(7, 125, 142, 0.3);
    border-color: var(--teal-light);
}

.wcard-noe h3 {
    color: white;
}

.wcard-noe p {
    color: rgba(255, 255, 255, 0.78);
}

.wcard-noe .wcard-link {
    color: white;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(255, 255, 255, 0.45);
}

.wcard-noe .wcard-link:hover {
    color: white;
    text-decoration-color: white;
    gap: 0.55rem;
}

.wcard-noe-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin-top: var(--sp-2);
}

.wcard-badge {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    margin: var(--sp-1) -0.2rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--r-pill);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.wcard-freelance {
    grid-column: span 5;
    background: var(--teal-ghost-light);
}

.wcard-dj {
    grid-column: span 5;
    background: var(--teal-ghost-light);
}

.wcard-dj::after {
    background: var(--teal-dark);
}

.wcard-dj:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-md);
}

.wcard-djlib {
    grid-column: span 4;
    background: var(--teal-ghost-light);
}

.wcard-djlib::after {
    background: var(--teal-dark);
}

.wcard-djlib:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-md);
}

.wcard-activist {
    grid-column: span 3;
}

@media (max-width: 900px) {
    .wcard-noe, .wcard-freelance,
    .wcard-dj, .wcard-djlib, .wcard-activist {
        grid-column: span 12;
    }
}

@media (min-width: 600px) and (max-width: 900px) {
    .wcard-noe {
        grid-column: span 12;
    }

    .wcard-freelance {
        grid-column: span 6;
    }

    .wcard-dj {
        grid-column: span 6;
    }

    .wcard-djlib {
        grid-column: span 6;
    }

    .wcard-activist {
        grid-column: span 6;
    }
}


.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
    align-items: start;
}

.facts-separator {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--teal-dark);
    padding-bottom: 0.4rem;
    border-bottom: 1.5px solid var(--teal-light);
    margin-top: var(--sp-1);
    opacity: 0.8;
}

.facts-separator:first-child {
    margin-top: 0;
}

.about-languages {
    margin-top: var(--sp-3) !important;
    font-size: 0.88rem !important;
    color: var(--ink-muted) !important;
}

.about-languages strong {
    color: var(--ink-soft);
}

.about-body p {
    color: var(--ink-soft);
    margin-bottom: var(--sp-3);
    font-size: 1.05rem;
}

.about-body p:first-of-type {
    font-size: 1.15rem;
    color: var(--ink);
    font-weight: 400;
}

.about-facts {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.fact:hover {
    border-color: var(--teal-light);
    box-shadow: var(--shadow-sm);
}

.fact-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 2px;
}

/* .fact and .fact-body declarations are common with .read-card and .read-body */
.fact-body {
    flex: 1;
}

.fact-body .date {
    opacity: 0.7;
}

.fact-body .date::after {
    content: " · ";
}

@media (max-width: 720px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   TECH STACK
============================================================ */
#tech {
    background: var(--white);
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: var(--sp-3);
}

.stack-group-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: var(--sp-2);
    padding-bottom: var(--sp-1);
    border-bottom: 1px solid var(--border-soft);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: var(--r-pill);
    font-size: 0.82rem;
    font-weight: 600;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--ink-soft);
    transition: all var(--t-fast);
}

.chip:hover {
    border-color: var(--teal-dark);
    color: var(--teal-dark);
    background: var(--teal-ghost);
}

.chip-star {
    background: var(--teal-dark);
    color: white;
    border-color: var(--teal-dark);
}

.chip-star:hover {
    background: var(--teal-light);
    border-color: var(--teal-light);
    color: white;
}

/* Sections that follow a wave — reduced top padding, wave provides visual entry */
#about {
    background: var(--surface);
    padding-top: var(--sp-6);
    position: relative;
    z-index: 1;
    isolation: isolate;
}

#tech {
    background: var(--white);
    padding-top: var(--sp-6);
}

#reads {
    background: var(--surface);
    padding-top: var(--sp-6);
}

.reads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--sp-2);
}

.fact, .read-card {
    display: flex;
    gap: var(--sp-2);
    align-items: flex-start;
    background: var(--white);
    border: 1.5px solid var(--border-soft);
    border-radius: var(--r-md);
    padding: var(--sp-3);
    transition: all var(--t-base);
    color: inherit;
}

.read-card:hover {
    border-color: var(--teal-light);
    box-shadow: var(--shadow-sm);
    transform: translateY(-3px);
}

.read-emoji {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.fact-body h4, .read-body h4 {
    font-size: 1rem;
    font-family: var(--font-display);
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--ink);
    line-height: 1.3;
}

.fact-body p, .read-body p {
    font-size: 0.9rem;
    color: var(--ink-muted);
    line-height: 1.45;
}

/* ============================================================
   CONTACT — dark section
============================================================ */
#contact {
    background: var(--red-dark);
    color: white;
    padding: var(--sp-6) 0 var(--sp-12);
    position: relative;
    z-index: 1;
    isolation: isolate;
    --blob-bg: var(--red-dark);
}

#contact .eyebrow {
    color: rgba(255, 255, 255, 0.6);
}

#contact .eyebrow::before {
    background: var(--teal-light);
}

#contact h2 {
    color: white;
}

.contact-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
    align-items: start;
}

.btn-cv-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: var(--sp-3);
}

.btn-cv {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.3rem;
    border-radius: var(--r-pill);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 700;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    background: transparent;
    color: white;
    cursor: pointer;
    transition: all var(--t-base);
}

.btn-cv:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.7);
}

.contact-intro p {
    margin-top: var(--sp-3);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    line-height: 1.65;
}

.contact-links-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
    margin-top: var(--sp-4);
}

.clink {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 0.8rem var(--sp-2);
    border-radius: var(--r-md);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
    transition: all var(--t-base);
}

.clink:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateX(5px);
}

.clink-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.clink-text strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
}

.clink-text span {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 720px) {
    .contact-inner {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   FOOTER
============================================================ */
footer {
    background: #3c0008;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: var(--sp-3) var(--sp-4);
    text-align: center;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.92rem;
}

/* ============================================================
   SCROLL REVEAL
============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* Stagger children */
.stagger .reveal:nth-child(1) {
    transition-delay: 0ms;
}

.stagger .reveal:nth-child(2) {
    transition-delay: 80ms;
}

.stagger .reveal:nth-child(3) {
    transition-delay: 160ms;
}

.stagger .reveal:nth-child(4) {
    transition-delay: 240ms;
}

.stagger .reveal:nth-child(5) {
    transition-delay: 320ms;
}

.stagger .reveal:nth-child(6) {
    transition-delay: 400ms;
}

/* ============================================================
   DA PORT — ported from css/portfolio.css
   (wave-tops, wave-divider, grain, glass-card, reduced motion)
   ============================================================ */

/* ---- Wave tops: absolutely positioned INSIDE the next section,
   transparent background, only the SVG fill (the host section's
   color) paints. The curve itself becomes the covering front. ---- */
.wave-top {
    position: absolute;
    top: -92px; /* 94 - 2px of overlay to be sure that artefacts don't appear */
    left: 0;
    right: 0;
    height: 94px;
    line-height: 0;
    pointer-events: none;
    z-index: 3; /* above blob wraps, matches content tier */
    overflow: hidden;
}

.wave-top svg {
    display: block;
    width: 100%;
    margin-top: 30px;
    height: calc(100% - 30px);
    overflow: visible;
    filter: drop-shadow(0 -6px 14px rgba(81, 0, 11, 0.18))
            drop-shadow(0 -2px 3px rgba(81, 0, 11, 0.14));
    clip-path: inset(-40px 0 0 0);
}

#what-i-do .wave-top svg {
    color: var(--white);
}

#about .wave-top svg {
    color: var(--surface);
}

#tech .wave-top svg {
    color: var(--white);
}

#reads .wave-top svg {
    color: var(--surface);
}

/* Last divider (reads → dark contact) stays a plain .wave-divider. */
.wave-divider {
    display: block;
    width: 100%;
    line-height: 0;
    margin: 0;
    padding: 0;
    background: var(--surface);
    overflow: visible;
}

.wave-divider svg {
    display: block;
    width: 100%;
    height: 80px;
    /* 1px overlap into the next dark section kills the sub-pixel AA
       hairline at the svg/contact boundary (same fill either side). */
    margin-bottom: -1px;
    overflow: visible;
    filter: drop-shadow(0 -6px 14px rgba(81, 0, 11, 0.18))
            drop-shadow(0 -2px 3px rgba(81, 0, 11, 0.14));
    clip-path: inset(-40px 0 0 0);
}

.wave-to-red svg {
    color: var(--red-dark);
}

/* Wave-top host sections need a stacking tier above the hero
   (same pattern as portfolio.css #noe/#skliif/#contact). */
#what-i-do,
#tech,
#reads {
    position: relative;
    z-index: 1;
    isolation: isolate;
}

/* Breathing room before wave-tops: .wave-top rides 94px UP into the
   previous section's padding-bottom, leaving only ~32px visible
   (96px sp-12 − 64px crest). The closing padding on the section
   ABOVE each wave-top restores the gap; the final wave-divider
   (reads → contact) is in flow and already breathes. Same recipe
   as portfolio.css .section-closing (desktop) — the sections that
   FEED a wave-top are what-i-do, about, tech. */
#what-i-do,
#about,
#tech {
    padding-bottom: calc(var(--sp-20) + var(--sp-4));
}

@media (max-width: 720px) {
    #what-i-do,
    #about,
    #tech {
        padding-bottom: calc(var(--sp-12) + var(--sp-2));
    }
}

/* ---- Grain overlay (portfolio.css:1282-1291) ---- */
#grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 40;
    /* 0.07: 0.05 was imperceptible in screenshot QA (user ceiling) */
    opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* ---- Glass card on wcard-noe (portfolio.css:415-457) ---- */
.glass-card {
    backdrop-filter: blur(3.5px);
    -webkit-backdrop-filter: blur(3.5px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
            var(--shadow-md), 0 -10px 26px rgba(var(--teal-light-root), 0.10),
            var(--shadow-md), 0 -10px 26px rgba(0, 0, 0, 0.07),
            inset 0 1px 0 rgba(255, 255, 255, 0.25),
            inset 0 -1px 0 rgba(255, 255, 255, 0.05),
            inset 0 0 14px 7px rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.8),
            transparent
    );
}

.glass-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.8),
            transparent,
            rgba(255, 255, 255, 0.3)
    );
}

/* ---- Global reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
    }
}
