@import url('https://fonts.googleapis.com/css2?family=Black+Ops+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

:root {
    --bg-deep: #0a1628;
    --bg-mid: #122e3a;
    --ink: #e8f4f7;
    --ink-soft: #cbe3eb;
    --ink-muted: #8aa3b0;
    --accent-gold: #d4a853;
    --accent-coral: #c97b7b;
    --accent-teal: #5fb4a2;
    --accent-lavender: #8a7ab8;
    --accent-amber: #c9955a;
    --border-wash: rgba(200,220,230,0.08);
}

/* ===== BASE ===== */
body {
    background: var(--bg-deep);
    background-image: url('Image/Background/steve8.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
    position: relative;
    z-index: 1;
    overflow: hidden;
    font-family: 'Caveat', cursive;
    color: var(--ink);
    cursor: crosshair;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 20%, rgba(212,168,83,0.16), transparent 24%),
        radial-gradient(circle at 80% 15%, rgba(95,180,162,0.14), transparent 22%),
        linear-gradient(135deg, rgba(10,22,40,0.12), rgba(10,22,40,0.4));
    z-index: 0;
}

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

/* ===== NOISE OVERLAY ===== */
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* ===== STAR FIELD ===== */
.stars {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 50px 160px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1.5px 1.5px at 90px 40px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1.5px 1.5px at 160px 120px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 200px 50px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1.5px 1.5px at 230px 180px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 280px 90px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 320px 140px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1.5px 1.5px at 350px 60px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 400px 110px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 450px 30px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1.5px 1.5px at 480px 170px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 520px 80px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 560px 150px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1.5px 1.5px at 600px 50px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 640px 120px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 680px 40px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1.5px 1.5px at 720px 160px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 760px 90px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 800px 130px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1.5px 1.5px at 840px 60px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 880px 140px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 920px 30px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1.5px 1.5px at 960px 170px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 1000px 80px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 1040px 150px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1.5px 1.5px at 1080px 50px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 1120px 120px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 1160px 40px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1.5px 1.5px at 1200px 160px, rgba(255,255,255,0.3), transparent);
    background-size: 1200px 200px;
    animation: twinkle 8s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* ===== FLOATING PARTICLES ===== */
#particles {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(212,168,83,0.15);
    pointer-events: none;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ===== ORBIT SYSTEM ===== */
.orbit-system {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    padding: 0 4vw;
}

.orbit-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(255,255,255,0.06);
    pointer-events: none;
}

.orbit-ring.r1 { width: min(34vmin, 34rem); height: min(34vmin, 34rem); }
.orbit-ring.r2 { width: min(50vmin, 50rem); height: min(50vmin, 50rem); border-style: dotted; }
.orbit-ring.r3 { width: min(68vmin, 68rem); height: min(68vmin, 68rem); }

/* ABOUT ME RING AROUND SUN */
.about-me-ring-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: rotateRing 30s linear infinite;
}

.about-me-ring {
    width: clamp(220px, 23vw, 440px);
    height: clamp(220px, 23vw, 440px);
    border-radius: 50%;
    border: 1.5px dashed rgba(212,168,83,0.35);
}

@keyframes rotateRing {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===== SUN ===== */
.sun-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 10;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%) translate(
        calc(var(--mouse-x, 0) * 1px),
        calc(var(--mouse-y, 0) * 1px)
    );
}

.sun-wrapper:hover {
    transform: translate(-50%, -50%) translate(
        calc(var(--mouse-x, 0) * 1px),
        calc(var(--mouse-y, 0) * 1px)
    ) scale(1.08);
}

.sun-glow {
    position: absolute;
    inset: -20%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212,168,83,0.2) 0%, transparent 70%);
    animation: sunPulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sunPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
}

/* Scaling pulled from doc 1: clamp(100px, 65vmin, 650px) */
 /* ===== SUN ===== */

.sun-art {
    width: clamp(170px, 20vw, 360px);
    height: clamp(170px, 20vw, 360px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sun-art img {
    width: 120%;
    height: 120%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sun-wrapper:hover .sun-art img {
    transform: scale(1.08);
}

.sun-label {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    font-family: 'Caveat', cursive;
    font-size: clamp(1.25rem, 1.6vw, 1.8rem);
    font-weight: 700;
    color: var(--accent-gold);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    text-align: center;
    pointer-events: none;
    text-shadow: 0 2px 10px rgba(0,0,0,0.9);
}

.sun-wrapper:hover .sun-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== PLANETS ===== */
.planet-wrapper {
    position: absolute;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translate(
        calc(var(--mouse-x, 0) * 1px),
        calc(var(--mouse-y, 0) * 1px)
    );
}

.planet-wrapper:hover {
    transform: translate(
        calc(var(--mouse-x, 0) * 1px),
        calc(var(--mouse-y, 0) * 1px)
    ) scale(1.15);
    z-index: 20;
}

.planet-art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.planet-art img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: filter 0.3s ease;
}

.planet-wrapper:hover .planet-art img {
    filter: drop-shadow(0 0 15px rgba(255,255,255,0.3));
}

.planet-label {
    position: absolute;
    top: calc(88% - 5px);
    left: 50%;
    transform: translateX(-50%) translateY(-5px);

    font-family: 'Caveat', cursive;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ink-soft);

    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    text-shadow: 0 2px 10px rgba(0,0,0,0.9);
}

.planet-wrapper:hover .planet-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.p-top-left { top: 12%; left: 23%; }
.p-top-right { top: 2%; right: 5%; }
.p-bottom-left { bottom: 10%; left: 8%; }
.p-bottom-right { bottom: 4%; right: 18%; }

/* Scaling pulled from doc 1 (top-left/top-right/bottom-left/bottom-right) */
.p-top-left .planet-art     { width: clamp(140px, 15vw, 260px); height: clamp(140px, 15vw, 260px); }
.p-top-right .planet-art    { width: clamp(160px, 16vw, 300px); height: clamp(160px, 16vw, 300px); }
.p-bottom-left .planet-art  { width: clamp(160px, 16vw, 300px); height: clamp(160px, 16vw, 300px); }
.p-bottom-right .planet-art { width: clamp(180px, 18vw, 330px); height: clamp(180px, 18vw, 330px); }

/* ===== SOCIAL CONSTELLATION / LOGO ===== */
.constellation-left {
    position: fixed;
    top: 5%;
    left: 3%;
    z-index: 5;

    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 22px;
}
.instagram {
    grid-column: 1;
    grid-row: 1;
}

.linkedin {
    grid-column: 1;
    grid-row: 2;
}

.tiktok {
    grid-column: 2;
    grid-row: 1;
}

/* Scaling pulled from doc 1: clamp(60px, 8vw, 125px) */
.star-node {
    width: clamp(70px, 6.2vw, 112px);
    height: clamp(70px, 6.2vw, 112px);
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
    position: relative;
    text-decoration: none;
}

.star-node:hover {
    transform: scale(1.25);
}

.star-node img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.75;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
    transition: opacity 0.3s, filter 0.3s;
}

.star-node:hover img {
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.4));
}

/* ===== SITE TITLE ===== */
.site-title {
    position: fixed;
    bottom: 28px;
    left: 32px;
    font-family: 'DM Serif Display', serif;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    color: rgba(255,255,255,0.18);
    letter-spacing: 0.35em;
    text-transform: uppercase;
    z-index: 3;
    pointer-events: none;
}

@media (min-width: 1600px) {
    .orbit-system {
        padding: 0 5vw;
    }

    .about-me-ring {
        width: clamp(260px, 25vw, 440px);
        height: clamp(260px, 25vw, 440px);
    }

    .sun-art {
        width: clamp(200px, 17vw, 380px);
        height: clamp(200px, 17vw, 380px);
    }

    .planet-wrapper:hover {
        transform: translate(calc(var(--mouse-x, 0) * 1px), calc(var(--mouse-y, 0) * 1px)) scale(1.12);
    }

    .modal-parchment {
        width: min(900px, 92vw);
    }
}

@media (max-height: 1080px) and (max-width: 1920px) {
    .orbit-system {
        padding: 0 3vw;
    }

    .about-me-ring {
        width: clamp(200px, 21vw, 380px);
        height: clamp(200px, 21vw, 380px);
    }

    .sun-art {
        width: clamp(150px, 17vw, 300px);
        height: clamp(150px, 17vw, 300px);
    }

    .p-top-left { top: 15%; left: 22%; }
    .p-top-right { top: 6%; right: 6%; }
    .p-bottom-left { bottom: 14%; left: 8%; }
    .p-bottom-right { bottom: 8%; right: 18%; }

    .p-top-left .planet-art     { width: clamp(120px, 13vw, 220px); height: clamp(120px, 13vw, 220px); }
    .p-top-right .planet-art    { width: clamp(140px, 14vw, 250px); height: clamp(140px, 14vw, 250px); }
    .p-bottom-left .planet-art  { width: clamp(140px, 14vw, 250px); height: clamp(140px, 14vw, 250px); }
    .p-bottom-right .planet-art { width: clamp(160px, 15vw, 280px); height: clamp(160px, 15vw, 280px); }

    .constellation-left {
        top: 4%;
        left: 2.5%;
        gap: 16px;
    }

    .star-node {
        width: clamp(60px, 5.5vw, 92px);
        height: clamp(60px, 5.5vw, 92px);
    }

    .site-title {
        bottom: 22px;
        left: 24px;
    }
}

/* ===== SCREEN TAKEOVER ===== */
#screen-takeover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: transparent;
    pointer-events: none;
    z-index: 9999;
    clip-path: circle(0% at 50% 50%);
    transition: clip-path 0.9s cubic-bezier(0.1, 0.8, 0.3, 1);
    box-shadow: inset 0 0 80px rgba(255,255,255,0.08);
}

#screen-takeover.active {
    clip-path: circle(150% at var(--click-x, 50%) var(--click-y, 50%));
}

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(6,14,24,0.82);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding: 20px;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

/* Modal frame - non-scrolling, holds decorations */
.modal-parchment {
    background:
        linear-gradient(140deg, rgba(19,31,41,0.98) 0%, rgba(8,19,29,0.98) 100%),
        linear-gradient(120deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 10px),
        radial-gradient(circle at 15% 15%, rgba(212,168,83,0.16), transparent 28%),
        radial-gradient(circle at 85% 20%, rgba(95,180,162,0.16), transparent 24%),
        linear-gradient(135deg, rgba(255,255,255,0.04), transparent 45%);
    background-size: auto, 10px 10px, auto, auto, auto;
    border: 1px solid rgba(226,201,139,0.24);
    border-radius: 20px;
    width: min(760px, 92vw);
    max-height: 85vh;
    position: relative;
    box-shadow:
        0 22px 50px rgba(0,0,0,0.6),
        0 0 0 1px rgba(255,255,255,0.05) inset,
        inset 0 2px 0 rgba(255,255,255,0.07),
        inset 0 -6px 20px rgba(0,0,0,0.26);
    transform: translateY(18px) scale(0.98);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-overlay.open .modal-parchment {
    transform: translateY(0) scale(1);
}

.modal-parchment::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 21px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(212,168,83,0.35), rgba(95,180,162,0.22), rgba(138,122,184,0.28));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 2;
}

/* Scrollable content area */
.modal-content {
    padding: clamp(24px, 5vw, 48px);
    overflow-y: auto;
    max-height: 85vh;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
    position: relative;
    z-index: 1;
}

.modal-content::-webkit-scrollbar { width: 6px; }
.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
}

/* Corner decorations - positioned at frame edges, not content edges */
.corner-deco {
    position: absolute;
    width: 34px;
    height: 34px;
    border: 1.5px solid rgba(212,168,83,0.22);
    pointer-events: none;
    z-index: 3;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.03) inset;
}

.corner-deco.tl { top: 12px; left: 12px; border-right: none; border-bottom: none; border-radius: 8px 0 0 0; }
.corner-deco.tr { top: 12px; right: 12px; border-left: none; border-bottom: none; border-radius: 0 8px 0 0; }
.corner-deco.bl { bottom: 12px; left: 12px; border-right: none; border-top: none; border-radius: 0 0 0 8px; }
.corner-deco.br { bottom: 12px; right: 12px; border-left: none; border-top: none; border-radius: 0 0 8px 0; }

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.55);
    font-size: 1rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.modal-close:hover {
    color: var(--ink);
    background: rgba(255,255,255,0.12);
    transform: rotate(90deg);
}

/* Bottom fade gradient to indicate scrollability */
.modal-parchment::after {
    content: '';
    position: absolute;
    bottom: 1px;
    left: 1px;
    right: 1px;
    height: 50px;
    background: linear-gradient(to top, #0c1a24, transparent);
    border-radius: 0 0 15px 15px;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.open .modal-parchment::after {
    opacity: 1;
}

.modal-parchment h2 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    margin-bottom: 8px;
    color: var(--accent-gold);
    letter-spacing: -0.5px;
}

.modal-parchment h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--accent-teal);
    letter-spacing: 0.3px;
}

.modal-parchment p {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: clamp(0.92rem, 1.5vw, 1.02rem);
    line-height: 1.7;
    color: var(--ink-soft);
    margin-bottom: 16px;
}

.divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-gold), transparent);
    margin: 16px 0 20px;
    border-radius: 1px;
}

/* Images now align left (inline with text) instead of centered */
.modal-img {
    width: 100%;
    max-width: 520px;
    display: block;
    margin: 20px 0;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

#rccarModal .modal-parchment {
    width: min(940px, 94vw);
}

.rc-project {
    padding-top: clamp(30px, 5vw, 52px);
}

.project-kicker {
    margin: -10px 0 22px;
    color: rgba(216, 235, 72, 0.82);
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.milestone-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 15px;
    align-items: start;
    margin: 12px 0 26px;
    padding: 18px 20px;
    border: 1px solid rgba(66, 224, 137, 0.24);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(21, 172, 91, 0.16), rgba(9, 31, 39, 0.45));
}

.milestone-pulse {
    width: 11px;
    height: 11px;
    margin-top: 5px;
    border-radius: 50%;
    background: #42e089;
    box-shadow: 0 0 0 6px rgba(66, 224, 137, 0.1), 0 0 16px rgba(66, 224, 137, 0.6);
    animation: milestonePulse 2s ease-out infinite;
}

@keyframes milestonePulse {
    50% { box-shadow: 0 0 0 11px rgba(66, 224, 137, 0), 0 0 18px rgba(66, 224, 137, 0.72); }
}

.milestone-label {
    display: block;
    margin-bottom: 3px;
    color: #42e089;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.milestone-card strong {
    display: block;
    color: var(--ink);
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.12rem, 2vw, 1.35rem);
    font-weight: 400;
}

.milestone-card p {
    margin: 6px 0 0;
    font-size: 0.92rem;
    line-height: 1.55;
}

.rc-model-section {
    margin: 30px 0 38px;
    padding: clamp(18px, 3vw, 28px);
    border: 1px solid rgba(214, 222, 208, 0.16);
    border-radius: 6px 18px 8px 14px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        #111e25;
    background-size: 24px 24px;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.05), 0 18px 36px rgba(0, 0, 0, 0.25);
}

.rc-model-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.rc-model-heading h3 {
    margin: 2px 0 0;
    color: var(--ink);
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 400;
}

.model-eyebrow {
    color: #42e089;
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.model-gesture-hint {
    color: rgba(216, 235, 72, 0.82);
    font-family: 'Caveat', cursive;
    font-size: 1.25rem;
    transform: rotate(-4deg);
}

.rc-model-stage {
    position: relative;
    max-width: 610px;
    margin: 0 auto;
    padding: 8px 8px 34px;
    perspective: 1100px;
}

.rc-touch-model {
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    --shine-x: 50%;
    --shine-y: 40%;
    position: relative;
    z-index: 2;
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px 15px 8px 12px;
    outline: none;
    transform-style: preserve-3d;
    transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateZ(0);
    transition: transform 180ms ease, box-shadow 180ms ease;
    box-shadow: 0 22px 35px rgba(0, 0, 0, 0.45), 10px 12px 0 rgba(6, 12, 16, 0.48);
    touch-action: pan-y;
}

.rc-touch-model:focus-visible {
    box-shadow: 0 0 0 3px rgba(66, 224, 137, 0.5), 0 22px 35px rgba(0, 0, 0, 0.45);
}

.rc-touch-model.is-touching {
    transition-duration: 80ms;
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.5), 5px 7px 0 rgba(6, 12, 16, 0.55);
}

.model-photo-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    background: #0d161c;
    transform: translateZ(14px);
}

.model-photo-layer::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at var(--shine-x) var(--shine-y), rgba(255, 255, 255, 0.16), transparent 28%),
        linear-gradient(135deg, rgba(19, 41, 48, 0.08), rgba(7, 16, 21, 0.22));
    mix-blend-mode: screen;
}

.model-photo-layer img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center 48%;
    filter: saturate(0.92) contrast(1.04);
    transform: scale(1.035);
}

.model-depth-edge {
    position: absolute;
    inset: 10px -9px -10px 9px;
    z-index: -1;
    border-radius: 10px 15px 8px 12px;
    background: #071016;
    transform: translateZ(-18px);
}

.model-floor-shadow {
    position: absolute;
    left: 12%;
    right: 8%;
    bottom: 9px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    filter: blur(13px);
    transform: rotate(-2deg);
}

.model-hotspot {
    position: absolute;
    z-index: 5;
    left: var(--hotspot-x);
    top: var(--hotspot-y);
    width: 34px;
    height: 34px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    color: #102027;
    background: #d8eb48;
    box-shadow: 0 5px 0 #73811f, 0 9px 18px rgba(0, 0, 0, 0.48);
    transform: translate(-50%, -50%) translateZ(46px);
    cursor: pointer;
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
    -webkit-tap-highlight-color: transparent;
}

.model-hotspot::after {
    content: '';
    position: absolute;
    inset: -9px;
    border: 1px solid rgba(216, 235, 72, 0.45);
    border-radius: 50%;
    animation: hotspotPing 2.4s ease-out infinite;
}

.model-hotspot span {
    position: relative;
    z-index: 1;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
}

.model-hotspot:hover,
.model-hotspot:focus-visible,
.model-hotspot.active {
    color: #07160e;
    background: #42e089;
    outline: none;
    transform: translate(-50%, -50%) translateZ(52px) scale(1.12);
    box-shadow: 0 3px 0 #177c47, 0 8px 22px rgba(0, 0, 0, 0.52), 0 0 0 5px rgba(66, 224, 137, 0.16);
}

.model-hotspot:active {
    transform: translate(-50%, -50%) translateZ(48px) scale(1.04);
    box-shadow: 0 1px 0 #177c47, 0 4px 12px rgba(0, 0, 0, 0.48);
}

@keyframes hotspotPing {
    70%, 100% { opacity: 0; transform: scale(1.35); }
}

.model-readout {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
    max-width: 610px;
    min-height: 88px;
    margin: 4px auto 0;
    padding: 15px 17px;
    border-left: 3px solid #42e089;
    background: rgba(4, 12, 16, 0.5);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.model-readout.has-changed {
    animation: readoutChange 260ms ease-out;
}

@keyframes readoutChange {
    0% { opacity: 0.4; transform: translateY(5px); }
}

.readout-number {
    color: rgba(216, 235, 72, 0.72);
    font-family: 'Caveat', cursive;
    font-size: 1.65rem;
    line-height: 1;
}

.model-readout strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
}

.model-readout p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.55;
}

.rc-gallery {
    margin: 0 0 28px;
}

.rc-gallery img {
    width: 100%;
    display: block;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
}

.rc-gallery figcaption {
    margin-top: 10px;
    color: rgba(200, 218, 224, 0.62);
    font-family: 'Inter', sans-serif;
    font-size: 0.76rem;
    line-height: 1.5;
}

.project-specs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 24px 0 30px;
}

.project-specs div {
    padding: 14px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
}

.project-specs span,
.project-specs strong {
    display: block;
    font-family: 'Inter', sans-serif;
}

.project-specs span {
    margin-bottom: 5px;
    color: rgba(200, 218, 224, 0.55);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-specs strong {
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 500;
}

.tracker-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.tracker-summary {
    padding: 18px 20px;
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025)),
        linear-gradient(120deg, rgba(95,180,162,0.11), transparent 70%);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.tracker-highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.tracker-card {
    padding: 16px 18px;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.055), rgba(255,255,255,0.028)),
        linear-gradient(120deg, rgba(212,168,83,0.08), transparent 70%);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.tracker-card h3 {
    margin: 0 0 10px;
    color: var(--accent-gold);
    font-size: 1rem;
}

.tracker-card ul {
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tracker-card li {
    font-family: 'Inter', sans-serif;
    font-size: 0.94rem;
    line-height: 1.5;
    color: var(--ink-soft);
}

.tracker-quote {
    padding: 14px 16px;
    border-left: 3px solid var(--accent-gold);
    border-radius: 0 12px 12px 0;
    background: linear-gradient(90deg, rgba(212,168,83,0.16), rgba(212,168,83,0.06));
    font-family: 'Caveat', cursive;
    font-size: 1.18rem;
    color: var(--ink);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

}

.modal-video {
    width: 100%;
    max-width: 560px;
    display: block;
    margin: 5px 0 0;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 10px 24px rgba(0,0,0,0.2);
}

.tracker-footnote {
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--ink-muted);
    padding-top: 2px;
}

.about-me-img {
    float: right;
    width: clamp(130px, 20vw, 200px);
    height: auto;
    margin: 0 0 20px 24px;
    border-radius: 16px;
    border: 2px solid rgba(212,168,83,0.25);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.resume-btn {
    display: inline-block;
    margin-top: 24px;
    background: transparent;
    color: var(--accent-gold);
    border: 1.5px solid var(--accent-gold);
    border-radius: 30px;
    padding: 10px 28px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.resume-btn:hover {
    background: var(--accent-gold);
    color: var(--bg-deep);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212,168,83,0.25);
}

#aboutMeModal .modal-parchment h2 {
    color: var(--accent-gold);
    text-shadow: 0 0 14px rgba(212,168,83,0.3);
}

/* Iterations timeline styling */
.iterations-timeline {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 16px;
}

.iteration-step {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid rgba(212,168,83,0.2);
}

.iteration-step .step-date {
    font-family: 'Caveat', cursive;
    font-size: 1.3rem;
    color: var(--accent-gold);
    display: block;
    margin-bottom: 4px;
}

.iteration-step h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--ink);
    margin-bottom: 8px;
}

.iteration-step p {
    margin-bottom: 12px;
}

.iteration-cad {
    max-width: 650px;
    margin: 18px 0 8px;
    padding: 10px 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px 14px 8px 12px;
    background: rgba(255, 255, 255, 0.035);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.32);
    transform: rotate(0.35deg);
}

.iteration-cad img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px 9px 5px 8px;
    background: #fff;
}

.iteration-cad figcaption {
    margin: 10px 5px 0;
    color: rgba(200, 218, 224, 0.68);
    font-family: 'Caveat', cursive;
    font-size: 1rem;
    line-height: 1.35;
}

.iteration-interface {
    max-width: 470px;
    margin: 18px 0 8px;
    padding: 9px 9px 12px;
    border: 1px solid rgba(66, 224, 137, 0.18);
    border-radius: 14px 8px 12px 7px;
    background: rgba(4, 8, 10, 0.72);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34);
    transform: rotate(-0.25deg);
}

.iteration-interface img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 9px 5px 8px 4px;
}

.iteration-interface figcaption {
    margin: 10px 5px 0;
    color: rgba(200, 218, 224, 0.68);
    font-family: 'Caveat', cursive;
    font-size: 1rem;
    line-height: 1.35;
}

@media (max-width: 640px) {
    .project-specs {
        grid-template-columns: repeat(2, 1fr);
    }

    .milestone-card {
        padding: 16px;
    }

    .rc-model-section {
        margin-inline: -6px;
        padding: 16px 12px 20px;
    }

    .model-gesture-hint {
        font-size: 1.05rem;
    }

    .model-hotspot {
        width: 38px;
        height: 38px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rc-touch-model,
    .model-hotspot,
    .model-readout {
        transition: none;
        animation: none;
    }

    .model-hotspot::after {
        animation: none;
    }
}
