:root {
    --bg: #090a0f;
    --ink: #f4f6ff;
    --muted: #9aa2b3;
    --grid: rgba(255, 255, 255, 0.08);
    --line: rgba(255, 255, 255, 0.18);
    --chip: #12151f;
    --violet: #d61f50;
    --accent: #ff3b6b;
}

* {
    box-sizing: border-box;
}

/* Custom Cursor */
* {
    cursor: none !important;
}

.cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    background: #ff0033;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100000;
    opacity: 0;
    will-change: transform, opacity;
}

.cursor-outline {
    position: fixed;
    width: 28px;
    height: 28px;
    border: 1px solid #fff;
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: difference;
    z-index: 99999;
    opacity: 0;
    will-change: transform, opacity;
}

@media (max-width: 1024px) {
    * {
        cursor: auto !important;
    }

    .cursor-dot,
    .cursor-outline {
        display: none !important;
    }
}

html,
body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    position: relative;
}

body {
    margin: 0;
    font-family: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background-color: var(--bg);
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 40px 40px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    user-select: none;
    /* Prevent text selection */
    -webkit-user-select: none;
}

.scene {
    position: relative;
    min-height: 100svh;
    width: 100%;
    padding: 10vh 2rem 100px; /* Top padding for hero start position */
    isolation: isolate;
    perspective: 1000px;
}

/* Elements remaining absolute */
.meta,
.collab,
.hero-copy,
.tag,
.scroll-hint {
    position: absolute;
    margin: 0;
    will-change: transform, opacity;
}

/* Sections switching to relative flow */
.hero,
.section {
    position: relative;
    left: 0;
    margin: 0 auto 100px; /* Uniform gap */
    width: 100%;
    max-width: 1440px;
    padding: 0 5%; /* Harmonized padding for side alignment */
    will-change: transform, opacity;
}

.meta {
    left: 2rem;
    top: 2rem;
}

.meta p {
    margin: 0;
    font-size: clamp(.72rem, .72vw, .82rem);
    line-height: 1.4;
    color: var(--muted);
    letter-spacing: -.01em;
}

.collab {
    right: 2rem;
    top: 2rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #12151f;
    color: var(--ink);
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.collab::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #2ecc71;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.2);
}

.hero {
    /* Positioned via flow now */
    padding: 5vh 0;
}

.hero-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5rem;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 2.4rem;
    box-shadow: none;
}

.hero-main::before {
    content: none;
    position: absolute;
    inset: 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.hero-main::after {
    content: none;
    position: absolute;
    width: 210px;
    height: 210px;
    right: -70px;
    bottom: -90px;
    background: radial-gradient(circle, rgba(214, 31, 80, 0.28) 0%, transparent 70%);
    filter: blur(16px);
    pointer-events: none;
}

.name {
    margin: 0;
    font-size: clamp(3.5rem, 9vw, 10rem);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    color: #f4f6ff;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.42);
}

.name .line {
    display: block;
}

/* ── Hero Text Column ── */
.hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}


/* Aurora Name Effect — full-width block, aurora clipped inside */
.aurora-name {
    position: relative;
    overflow: hidden;
    background: transparent;
    color: var(--ink);
    display: inline-block;
    /* full width */
    white-space: nowrap;
    /* RIAZUL I. on one line */
    padding: 0.04em 0.1em;
    line-height: 0.95;
    border-radius: 0;
}

/* Description below name */
.hero-desc {
    margin: 0;
    font-size: clamp(1.05rem, 1.5vw, 1.5rem);
    line-height: 1.6;
    color: #b8becd;
    font-weight: 400;
    max-width: 50ch;
    letter-spacing: -0.01em;
}

.hero .aurora-pill-text {
    background-image:
        radial-gradient(circle at 10% 20%, #ff7aa2 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, #ff3b6b 0%, transparent 45%),
        radial-gradient(circle at 40% 85%, #9b1bff 0%, transparent 42%),
        linear-gradient(110deg, #f6f8ff 0%, #ff7aa2 26%, #ff3b6b 52%, #9b1bff 78%, #f6f8ff 100%);
    background-size: 170% 170%, 170% 170%, 170% 170%, 170% 170%;
    background-position: 18% 42%, 82% 28%, 40% 86%, 50% 50%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: text-aurora-shift 2.2s linear infinite;
}

.aurora {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    mix-blend-mode: lighten;
    /* KEY: enlightens dark (black) letters with aurora color, invisible on light bg */
    pointer-events: none;
}

.aurora__item {
    overflow: hidden;
    position: absolute;
    width: 60vw;
    height: 60vw;
    background-color: #00c2ff;
    border-radius: 37% 29% 27% 27% / 28% 25% 41% 37%;
    filter: blur(1.5rem);
    mix-blend-mode: normal;
    opacity: 0.92;
}

.aurora__item:nth-of-type(1) {
    top: -50%;
    animation: aurora-border 6s ease-in-out infinite, aurora-1 12s ease-in-out infinite alternate;
}

.aurora__item:nth-of-type(2) {
    background-color: #ffc640;
    right: 0;
    top: 0;
    animation: aurora-border 6s ease-in-out infinite, aurora-2 12s ease-in-out infinite alternate;
}

.aurora__item:nth-of-type(3) {
    background-color: #33ff8c;
    left: 0;
    bottom: 0;
    animation: aurora-border 6s ease-in-out infinite, aurora-3 8s ease-in-out infinite alternate;
}

.aurora__item:nth-of-type(4) {
    background-color: #e54cff;
    right: 0;
    bottom: -50%;
    animation: aurora-border 6s ease-in-out infinite, aurora-4 24s ease-in-out infinite alternate;
}

@keyframes aurora-1 {
    0% {
        top: 0;
        right: 0;
    }

    50% {
        top: 100%;
        right: 75%;
    }

    75% {
        top: 100%;
        right: 25%;
    }

    100% {
        top: 0;
        right: 0;
    }
}

@keyframes aurora-2 {
    0% {
        top: -50%;
        left: 0%;
    }

    60% {
        top: 100%;
        left: 75%;
    }

    85% {
        top: 100%;
        left: 25%;
    }

    100% {
        top: -50%;
        left: 0%;
    }
}

@keyframes aurora-3 {
    0% {
        bottom: 0;
        left: 0;
    }

    40% {
        bottom: 100%;
        left: 75%;
    }

    65% {
        bottom: 40%;
        left: 50%;
    }

    100% {
        bottom: 0;
        left: 0;
    }
}

@keyframes aurora-4 {
    0% {
        bottom: -50%;
        right: 0;
    }

    50% {
        bottom: 0%;
        right: 40%;
    }

    90% {
        bottom: 50%;
        right: 25%;
    }

    100% {
        bottom: -50%;
        right: 0;
    }
}

@keyframes aurora-border {
    0% {
        border-radius: 37% 29% 27% 27% / 28% 25% 41% 37%;
    }

    25% {
        border-radius: 47% 29% 39% 49% / 61% 19% 66% 26%;
    }

    50% {
        border-radius: 57% 23% 47% 72% / 63% 17% 66% 33%;
    }

    75% {
        border-radius: 28% 49% 29% 100% / 93% 20% 64% 25%;
    }

    100% {
        border-radius: 37% 29% 27% 27% / 28% 25% 41% 37%;
    }
}

.hero-image-wrapper {
    position: relative;
    width: 320px;
    height: 420px;
    flex-shrink: 0;
    perspective: 2000px;
    isolation: isolate;
    transform-style: preserve-3d;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

.hero-image-mask {
    width: 100%;
    height: 100%;
    overflow: hidden;
    clip-path: none;
    border-radius: 14px;
    background: #090a0e;
    border: 1px solid rgba(214, 31, 80, 0.55);
    position: relative;
    z-index: 2;
    transform: rotateY(-6deg) rotateX(3deg) translateZ(0) rotate(-0.8deg);
    transition: box-shadow 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(214, 31, 80, 0.22) inset;
}

.hero-image-mask::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.58) 100%);
    opacity: 1;
    pointer-events: none;
    z-index: 3;
}

.hero-image-mask::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 78% 12%, rgba(214, 31, 80, 0.42) 0%, rgba(214, 31, 80, 0.14) 24%, transparent 52%);
    pointer-events: none;
    z-index: 2;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.24) brightness(0.78);
    transition: filter 0.8s cubic-bezier(0.23, 1, 0.32, 1), transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Tilt handled by JS */

.hero-image-border {
    position: absolute;
    inset: -8px;
    border: 1px solid rgba(214, 31, 80, 0.9);
    border-radius: 16px;
    clip-path: none;
    pointer-events: none;
    z-index: 1;
    box-shadow: 0 0 24px rgba(214, 31, 80, 0.3);
}

.hero-image-wrapper::before {
    content: "RIAZUL — CREATIVE SYSTEM";
    position: absolute;
    bottom: 16px;
    left: 16px;
    font-size: 10px;
    font-family: monospace;
    color: #eef1ff;
    letter-spacing: 0.08em;
    font-weight: 700;
    z-index: 3;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(15, 27, 71, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
}

.hero-image-wrapper::after {
    content: "";
    position: absolute;
    inset: auto -20px -24px auto;
    width: 180px;
    height: 120px;
    background: radial-gradient(circle, rgba(214, 31, 80, 0.34) 0%, rgba(214, 31, 80, 0.16) 45%, transparent 75%);
    filter: blur(18px);
    z-index: 0;
}

@keyframes hero-card-float {

    0%,
    100% {
        transform: translateY(0) rotateZ(0);
    }

    50% {
        transform: translateY(-8px) rotateZ(-0.8deg);
    }
}

@keyframes hero-sheen {
    0% {
        transform: translateX(-20%) rotate(8deg);
        opacity: 0;
    }

    20% {
        opacity: 0.8;
    }

    55% {
        transform: translateX(42%) rotate(8deg);
        opacity: 0.4;
    }

    100% {
        transform: translateX(65%) rotate(8deg);
        opacity: 0;
    }
}

.title {
    margin: 1.12rem 0 0;
    font-size: clamp(1.08rem, 1.22vw, 1.35rem);
    line-height: 1.45;
    color: #8f95a8;
}

#type-text {
    min-height: 1.5em;
}

#type-text::after {
    content: "";
    display: inline-block;
    width: 1px;
    height: 1.05em;
    margin-left: 0.2rem;
    background: currentColor;
    vertical-align: -0.1em;
    animation: typing-caret-blink 0.85s steps(1, end) infinite;
}

@keyframes typing-caret-blink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

.hero-copy {
    left: 58.5%;
    top: 13.4vh;
    width: min(33ch, 30vw);
}

.hero-copy p {
    margin: 0;
    font-size: clamp(1.12rem, 2.22vw, 2.1rem);
    line-height: 1.28;
    letter-spacing: -.025em;
    color: #3f4553;
}

.tag {
    left: 71%;
    top: 35.5vh;
    border: 0;
    border-radius: 999px;
    background: var(--violet);
    color: #efeeff;
    font-size: clamp(.72rem, .76vw, .84rem);
    font-weight: 600;
    padding: .2rem .7rem .26rem;
    box-shadow: 0 6px 15px rgba(110, 99, 237, .28);
}

.aurora-pill {
    position: relative;
    overflow: hidden;
    display: inline-block;
    isolation: isolate;
}

.aurora-pill-text {
    position: relative;
    z-index: 2;
    display: inline-block;
    background-image:
        radial-gradient(circle at 15% 25%, #2a4cdc 0%, transparent 42%),
        radial-gradient(circle at 85% 30%, #5b1ba0 0%, transparent 45%),
        radial-gradient(circle at 40% 85%, #0f3460 0%, transparent 45%),
        linear-gradient(110deg, #0f1b47 0%, #2a4cdc 28%, #5b1ba0 52%, #0f3460 78%, #0f1b47 100%);
    background-size: 180% 180%, 180% 180%, 180% 180%, 220% 220%;
    background-position: 0% 50%, 100% 40%, 50% 100%, 0% 50%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: text-aurora-shift 9s ease-in-out infinite;
}

.aurora-pill .btn-aurora {
    display: none;
}

@keyframes text-aurora-shift {
    0% {
        background-position: 0% 50%, 100% 40%, 50% 100%, 0% 50%;
    }

    50% {
        background-position: 100% 55%, 0% 45%, 60% 0%, 100% 50%;
    }

    100% {
        background-position: 0% 50%, 100% 40%, 50% 100%, 0% 50%;
    }
}

.btn-aurora {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    mix-blend-mode: screen;
    /* screen on dark bg = lighter aurora */
    overflow: hidden;
}

.btn-aurora__item {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 37% 29% 27% 27% / 28% 25% 41% 37%;
    filter: blur(20px);
    opacity: 0.55;
    mix-blend-mode: normal;
}

.btn-aurora__item:nth-of-type(1) {
    background-color: #2a4cdc;
    top: -60%;
    left: -20%;
    animation: aurora-border 6s ease-in-out infinite, aurora-btn-1 8s ease-in-out infinite alternate;
}

.btn-aurora__item:nth-of-type(2) {
    background-color: #5b1ba0;
    right: -20%;
    top: -40%;
    animation: aurora-border 6s ease-in-out infinite, aurora-btn-2 10s ease-in-out infinite alternate;
}

.btn-aurora__item:nth-of-type(3) {
    background-color: #0f3460;
    left: 20%;
    bottom: -60%;
    animation: aurora-border 6s ease-in-out infinite, aurora-btn-3 7s ease-in-out infinite alternate;
}

@keyframes aurora-btn-1 {
    0% {
        top: -60%;
        left: -20%;
    }

    50% {
        top: 20%;
        left: 60%;
    }

    100% {
        top: -60%;
        left: -20%;
    }
}

@keyframes aurora-btn-2 {
    0% {
        right: -20%;
        top: -40%;
    }

    50% {
        right: 50%;
        top: 30%;
    }

    100% {
        right: -20%;
        top: -40%;
    }
}

@keyframes aurora-btn-3 {
    0% {
        left: 20%;
        bottom: -60%;
    }

    50% {
        left: 70%;
        bottom: 20%;
    }

    100% {
        left: 20%;
        bottom: -60%;
    }
}

.scroll-hint {
    left: 50%;
    top: calc(77.4vh + 4.2rem);
    transform: translateX(-50%);
    color: #6d7380;
    font-size: clamp(.82rem, .85vw, .95rem);
}

/* Sections now follow document flow */
.about, .specs, .skills, .work, .contact {
    margin-bottom: 100px; /* Uniform 100px gap */
}

.contact {
    margin-bottom: 0;
    padding-top: 4rem;
    padding-bottom: 80px;
    text-align: left;
}

.section-index {
    margin: 0 0 1rem;
    color: #717785;
    font-size: clamp(.68rem, .71vw, .78rem);
    letter-spacing: .08em;
    text-transform: uppercase;
}

.section h2 {
    margin: 0;
    font-size: clamp(2.2rem, 5.1vw, 5rem);
    font-weight: 400;
    line-height: .95;
    letter-spacing: -.05em;
}

.section>p:not(.section-index) {
    margin: 1.3rem 0 0;
    max-width: 100%;
    font-size: clamp(1.01rem, 1.15vw, 1.28rem);
    line-height: 1.62;
    letter-spacing: -.01em;
    color: #b8becd;
}

.skills-grid {
    position: relative;
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.skill-block {
    width: 100%;
    position: relative;
    border: 1px dashed var(--line);
    border-radius: 0;
    padding: 2.2rem;
    background: #12151f;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centered */
    text-align: center;
    /* Centered */
    justify-content: flex-start;
    transition:
        border-color 0.4s ease,
        transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.4s ease;
    transform-style: preserve-3d;
}

.skill-icon-container {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
}

.skill-icon {
    width: 100%;
    height: 100%;
}

.skill-block:hover {
    border-color: var(--violet);
    box-shadow: 0 20px 40px rgba(142, 68, 173, 0.1);
    z-index: 100 !important;
}

.skill-block:hover .handle {
    background: var(--violet) !important;
    border-color: var(--violet) !important;
}

.skill-block:hover .skill-icon-container {
    color: var(--violet);
}

.skill-block h3 {
    margin: 0;
    font-size: clamp(1.1rem, 1.3vw, 1.4rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: none;
    /* Match image case */
}

.skill-block p {
    margin: 1rem 0 0;
    font-size: clamp(0.9rem, 1vw, 1.05rem);
    line-height: 1.5;
    color: var(--muted);
}

.work-table {
    position: relative;
    margin-top: 3rem;
    border-top: 1px solid var(--line);
}

.work-row {
    position: relative;
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 240px 180px 1fr 100px;
    gap: 2.2rem;
    align-items: baseline;
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-thumb-wrap {
    width: 100%;
    height: 140px;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: #12151f;
    align-self: center;
}

.work-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.work-row:hover .work-thumb {
    transform: scale(1.04);
}

.work-row:hover {
    background-color: rgba(255, 255, 255, 0.035);
}

.work-kind {
    margin: 0;
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.work-row h3 {
    margin: 0;
    font-size: clamp(1.6rem, 3.5vw, 3.2rem);
    line-height: 1;
    letter-spacing: -0.04em;
    font-weight: 700;
}

.work-desc {
    margin: 0.8rem 0 0;
    font-size: clamp(0.95rem, 1.1vw, 1.15rem);
    line-height: 1.5;
    color: var(--muted);
    max-width: 55ch;
}

.work-row a {
    justify-self: end;
    display: inline-block;
    text-decoration: none;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1.5px solid var(--ink);
    padding-bottom: 2px;
}

.work-meta {
    margin-top: 0.6rem;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Contact Upgrades */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
    align-items: flex-start;
    justify-items: start;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    width: 100%;
}

.contact-info p {
    margin: 0;
    max-width: 35ch;
    font-size: clamp(1.1rem, 1.3vw, 1.5rem);
    color: var(--muted);
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }
}


/* Blueprint Styles Handles */
.skill-block .handle {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: white;
    border: 1px solid var(--line);
    z-index: 2;
    transition: all 0.3s ease;
}

.skill-block::before,
.skill-block::after,
.skill-block .handle-tl,
.skill-block .handle-tr,
.skill-block .handle-bl,
.skill-block .handle-br {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: white;
    border: 1px solid var(--line);
    z-index: 2;
}

.skill-block .handle-tl {
    top: -3px;
    left: -3px;
}

.skill-block .handle-tr {
    top: -3px;
    right: -3px;
}

.skill-block .handle-bl {
    bottom: -3px;
    left: -3px;
}

.skill-block .handle-br {
    bottom: -3px;
    right: -3px;
}

[data-reveal] {
    opacity: 0;
}

/* Creative Enhancements */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3%3Ffilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
}

.menu-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    background: #12151f;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-toggle .line {
    width: 20px;
    height: 1.5px;
    background: var(--ink);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-toggle.is-active .line:first-child {
    transform: translateY(4px) rotate(45deg);
}

.menu-toggle.is-active .line:last-child {
    transform: translateY(-4px) rotate(-45deg);
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: #090a0f;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-overlay.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.menu-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
    position: relative;
    z-index: 10002;
}

.menu-link {
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 800;
    text-decoration: none;
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: -0.04em;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px);
}

.menu-overlay.is-active .menu-link {
    opacity: 1;
    transform: translateY(0);
}

.menu-overlay.is-active .menu-link:nth-child(1) {
    transition-delay: 0.1s;
}

.menu-overlay.is-active .menu-link:nth-child(2) {
    transition-delay: 0.2s;
}

.menu-overlay.is-active .menu-link:nth-child(3) {
    transition-delay: 0.3s;
}

.menu-overlay.is-active .menu-link:nth-child(4) {
    transition-delay: 0.4s;
}

.menu-link::before {
    content: attr(data-index);
    position: absolute;
    left: -2.5rem;
    top: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--muted);
}

.menu-link:hover {
    transform: translateX(20px);
    color: var(--violet);
}

.grid-toggle {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    background: #12151f;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--muted);
    transition: all 0.3s ease;
}

.grid-toggle.is-active {
    background: var(--ink);
    color: white;
}

body.hide-grid {
    background-image: none !important;
}

.magnetic {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}


@media (max-width: 1024px) {
    .scene {
        height: auto;
        min-height: 100vh;
        padding: 2.5rem 1.5rem 4rem;
        display: flex;
        flex-direction: column;
        gap: 5rem;
    }

    /* Robustly unset absolute positioning for mobile flow */
    .meta,
    .hero,
    .hero-copy,
    .scroll-hint,
    .section,
    .tag,
    .skill-block {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: 100% !important;
        transform: none !important;
        margin: 0 !important;
        opacity: 1 !important;
    }

    /* ── Hero Mobile Fix ── */
    .hero {
        margin-top: 0.5rem !important;
        order: 1;
    }

    .hero-main {
        flex-direction: column;
        /* stack text then image */
        align-items: flex-start;
        gap: 2.5rem;
        padding: 1.35rem;
        border-radius: 20px;
    }

    .hero-text {
        width: 100% !important;
        gap: 1.2rem;
    }

    .hero-image-wrapper {
        display: block;
        width: min(56vw, 220px);
        height: auto;
        aspect-ratio: 4 / 5;
        margin: 0 auto;
        perspective: none;
        order: -1;
        animation: none;
        overflow: hidden;
        /* Prevent border/content bleeding */
    }

    .hero-image-mask {
        transform: none;
        clip-path: none;
        border-radius: 12px;
        border: 1px solid rgba(214, 31, 80, 0.55);
        box-shadow:
            0 18px 36px rgba(0, 0, 0, 0.44),
            0 0 0 1px rgba(214, 31, 80, 0.2) inset;
    }

    .hero-image-mask::before {
        inset: 0;
        border-radius: inherit;
        opacity: 1;
    }

    .hero-image-mask::after {
        display: block;
    }

    .hero-image-wrapper::before,
    .hero-image-wrapper::after {
        display: none;
    }

    .hero-image-border {
        inset: -2px;
        /* Pull it slightly in for mobile to avoid edge clipping */
        border-radius: 14px;
    }

    .name,
    .hero-desc,
    .title {
        text-align: left;
    }

    .aurora-name {
        white-space: normal;
        /* allow wrapping on small screens */
    }

    .name {
        font-size: clamp(3rem, 18vw, 6rem);
    }

    .hero-desc {
        font-size: clamp(1rem, 4.5vw, 1.3rem);
        max-width: 100%;
    }

    .hero-copy {
        order: 2;
        margin-top: 1.5rem !important;
    }

    .hero-copy p {
        font-size: clamp(1.2rem, 5vw, 1.8rem);
        line-height: 1.3;
        color: var(--ink);
    }

    .scroll-hint {
        order: 4;
        margin: 1.5rem auto 0 !important;
        text-align: center;
    }

    /* Section Handling */
    .about {
        order: 5;
    }

    .specs {
        order: 6;
    }

    .skills {
        order: 7;
    }

    .work {
        order: 8;
    }

    .contact {
        order: 9;
    }

    .skills-grid {
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 2rem;
        margin-top: 2rem;
    }

    .skill-block {
        border: 1px dashed var(--line);
        padding: 2rem;
        background: #12151f;
    }

    .work-table {
        margin-top: 2rem;
    }

    .work-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem 0;
    }

    .work-thumb-wrap {
        height: 190px;
        max-width: 420px;
    }

    .work-row h3 {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

    .work-row a {
        justify-self: start;
        margin-top: 1rem;
    }
}

@media (max-width: 768px) {
    body {
        cursor: auto !important;
        background-size: 20px 20px;
        /* Denser grid for mobile */
    }

    .meta {
        font-size: 0.8rem;
    }
}

/* Back to Top */
.back-to-top {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    width: 48px;
    height: 48px;
    background: #d61f50;
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 999;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #ff3b6b;
    transform: translateY(-5px);
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 40, 0.55);
    /* darker backdrop so white modal pops */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 10000;
    padding: 1.5rem;
}

.modal.is-active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background:
        radial-gradient(circle at 12% 10%, rgba(214, 31, 80, 0.22), transparent 36%),
        radial-gradient(circle at 90% 18%, rgba(214, 31, 80, 0.12), transparent 32%),
        #11141d;
    backdrop-filter: none;
    width: 100%;
    max-width: 540px;
    padding: 2.4rem;
    position: relative;
    transform: translateY(40px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 32px;
    /* Soft glow around the modal edges */
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.14),
        0 0 40px 8px rgba(214, 31, 80, 0.12),
        0 60px 120px rgba(0, 0, 0, 0.55);
}

.modal-content::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 24px;
    border: 1px dashed rgba(110, 99, 237, 0.28);
    pointer-events: none;
}

.modal.is-active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--muted);
    line-height: 1;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--ink);
}

.modal-header h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    background: linear-gradient(120deg, #f4f6ff, #ff6b90 48%, #d61f50 78%, #f4f6ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.modal-header p {
    margin: 0.5rem 0 2.5rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.contact-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: grid;
    gap: 0.55rem;
}

.form-group label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    font-family: inherit;
    font-size: 1rem;
    background: rgba(14, 18, 27, 0.92);
    color: var(--ink);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--violet);
    box-shadow: 0 0 0 4px rgba(110, 99, 237, 0.14);
    transform: translateY(-1px);
    background: #121722;
}

/* Validation Styles */
.error-text {
    color: #ff3b6b;
    font-size: 0.72rem;
    font-weight: 500;
    margin-top: 0.35rem;
    display: none;
    /* Hidden by default */
    animation: fadeInError 0.3s ease forwards;
}

input.error-input,
textarea.error-input {
    border-color: #ff3b6b !important;
    box-shadow: 0 0 0 4px rgba(255, 59, 107, 0.1) !important;
}

@keyframes fadeInError {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.work-meta,
.work-desc,
.contact-info p,
.meta p,
.section-index,
.work-kind {
    color: var(--muted);
}

.work-row a,
.email-link,
.menu-link {
    color: var(--ink);
}

.work-row a {
    border-bottom-color: var(--ink);
}

.submit-btn {
    margin-top: 1rem;
    padding: 0.95rem 1.5rem;
    background: linear-gradient(130deg, #6f0e2f 0%, #d61f50 55%, #ff3b6b 100%);
    color: white;
    border: 1px solid rgba(214, 31, 80, 0.45);
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.45) 48%, transparent 75%);
    transform: translateX(-130%);
    transition: transform 0.7s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(214, 31, 80, 0.34);
}

.submit-btn:hover::before {
    transform: translateX(130%);
}

.submit-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

@media (max-width: 768px) {
    .modal {
        align-items: flex-end;
        padding: 0.75rem;
    }

    .modal-content {
        max-width: 100%;
        border-radius: 20px;
        padding: 1.2rem 1rem 1rem;
        transform: translateY(28px) scale(0.98);
    }

    .modal-content::before {
        inset: 8px;
        border-radius: 14px;
    }

    .modal-close {
        top: 0.6rem;
        right: 0.6rem;
        font-size: 1.7rem;
        padding: 0.35rem;
    }

    .modal-header h2 {
        font-size: 1.35rem;
        line-height: 1.2;
        padding-right: 2rem;
    }

    .modal-header p {
        margin: 0.35rem 0 1.2rem;
        font-size: 0.88rem;
    }

    .contact-form {
        gap: 1rem;
    }

    .form-group {
        gap: 0.42rem;
    }

    .form-group label {
        font-size: 0.72rem;
        letter-spacing: 0.06em;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px;
        padding: 0.8rem 0.85rem;
        border-radius: 12px;
    }

    .form-group textarea {
        min-height: 110px;
        resize: vertical;
    }

    .submit-btn {
        width: 100%;
        margin-top: 0.45rem;
        padding: 0.9rem 1rem;
    }
}

/* Spacing consistency verified */

/* Scramble Effect Styling */
.scramble-char {
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Monaco, 'Courier New', monospace;
    color: var(--accent);
    opacity: 0.8;
}

[data-scramble] {
    will-change: contents;
}

/* Aurora Ripple Effect */
.aurora-ripple {
    position: fixed;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle,
            rgba(255, 59, 107, 0.6) 0%,
            rgba(155, 27, 255, 0.4) 40%,
            rgba(42, 76, 220, 0.2) 70%,
            transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    filter: blur(25px);
    mix-blend-mode: screen;
    animation: aurora-ripple-out 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes aurora-ripple-out {
    0% {
        transform: translate(-50%, -50%) scale(0.2);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

/* Contact Link CTA & Arrow Refinement - PRO Version */
.email-link {
    display: inline-flex !important;
    align-items: center;
    gap: 1.2rem;
    padding: 1.2rem 2.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    /* Brighter background */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* More visible border */
    text-decoration: none;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    /* Persistent Pulsing Effect */
    animation: cta-pulse 3s infinite alternate;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.email-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.email-link:hover::before {
    transform: translateX(100%);
}

.email-link:hover {
    border-color: var(--accent);
    transform: translateY(-4px) scale(1.04);
    background: rgba(255, 255, 255, 0.18);
    box-shadow:
        0 20px 45px rgba(255, 59, 107, 0.3),
        0 0 25px rgba(255, 59, 107, 0.2);
}

.email-link .aurora-pill-text {
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 1.25rem;
    color: #ffffff;
    /* Solid white for max visibility */
    -webkit-text-fill-color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 59, 107, 0.5);
    animation: none;
    /* Disable shift if it makes it too hard to read */
}

.email-link .cta-arrow {
    width: 22px;
    height: 22px;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    color: var(--accent);
    filter: drop-shadow(0 0 5px rgba(255, 59, 107, 0.4));
}

.email-link:hover .cta-arrow {
    transform: translate(6px, -6px) scale(1.1);
}

@keyframes cta-pulse {
    0% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(255, 59, 107, 0);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 25px 5px rgba(255, 59, 107, 0.2);
        transform: scale(1.02);
    }

    100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(255, 59, 107, 0);
        transform: scale(1);
    }
}

/* Form Success State - Refined */
.form-success-state {
    display: none;
    /* Controlled by JS */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem;
    min-height: 300px;
    animation: fadeIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 59, 107, 0.1);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 2rem;
    box-shadow: 0 0 30px rgba(255, 59, 107, 0.2);
    animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.success-icon svg {
    width: 40px;
    height: 40px;
}

.form-success-state h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 1rem;
    color: #fff;
    letter-spacing: -0.02em;
}

.form-success-state p {
    color: var(--muted);
    font-size: 1.1rem;
    max-width: 35ch;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.form-success-state .submit-btn {
    width: auto;
    min-width: 200px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Specializations List Update */
.specs {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    width: 100%;
    margin-top: 3.5rem; /* Harmonized internal gap */
}

.spec-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
    padding: 2rem;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.spec-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    transform: scaleX(0);
    transition: transform 0.6s ease;
}

.spec-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    transform: translateY(-5px);
}

.spec-item:hover::before {
    transform: scaleX(1);
}

.spec-item h4 {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.spec-item p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.6;
}

.work-table {
    margin-top: 3.5rem; /* Harmonized internal gap */
}

/* Advanced Work Animations */
.work-row {
    position: relative;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.work-row:hover {
    z-index: 10;
}