@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Space+Mono&display=swap');

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
}

p, .mono-text {
    font-family: 'Space Mono', monospace, 'Courier New';
    font-size: 0.9rem;
    color: #b0b8c4;
    line-height: 1.65;
}

.bg-dark-custom { background-color: #070b12; }
.bg-light-custom { background-color: #f7f9fc; }

.text-light-custom { color: #f8f9fa; }
.text-dark-custom { color: #0f172a; }
.border-dark-custom { border-color: #222222 !important; }

/* =========================================================
   TOP CINEMATIC SCROLL PROGRESS BEAM (GPU scaleX only)
   ========================================================= */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 9999;
    pointer-events: none;
    transform-origin: 0% 50%;
    transform: scaleX(0);
    background: linear-gradient(90deg, #0077ff 0%, #00e5ff 50%, #00ff88 100%);
}

/* =========================================================
   DARK STAGE: ZERO-BLUR SOFT RADIAL AURORA + CYBER GRID
   (No CSS filter:blur or backdrop-filter -> 0 GPU lag!)
   ========================================================= */
.dark-stage {
    position: relative;
    overflow: hidden;
    background-color: #070b12;
}

.dark-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(120, 195, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 195, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
}

.aurora-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Pure mathematical radial-gradient falloff — looks identical to blur(90px) with ZERO GPU blur cost */
.aurora-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.aurora-orb.orb-blue {
    width: 680px;
    height: 680px;
    top: -200px;
    left: -160px;
    background: radial-gradient(circle, rgba(0, 140, 255, 0.2) 0%, rgba(0, 140, 255, 0.07) 38%, rgba(0, 140, 255, 0) 70%);
    animation: auroraFloat1 20s ease-in-out infinite alternate;
}

.aurora-orb.orb-emerald {
    width: 720px;
    height: 720px;
    top: 2%;
    right: -180px;
    background: radial-gradient(circle, rgba(0, 220, 145, 0.17) 0%, rgba(255, 140, 66, 0.06) 38%, rgba(0, 0, 0, 0) 70%);
    animation: auroraFloat2 24s ease-in-out infinite alternate;
}

.aurora-orb.orb-violet {
    width: 640px;
    height: 640px;
    bottom: -220px;
    left: 24%;
    background: radial-gradient(circle, rgba(98, 54, 255, 0.15) 0%, rgba(0, 195, 255, 0.05) 42%, rgba(0, 0, 0, 0) 70%);
    animation: auroraFloat3 22s ease-in-out infinite alternate;
}

/* =========================================================
   LIGHT STAGE (OPTION 3 HYBRID): PEARL + TOPOGRAPHIC + DAYLIGHT AURORA
   (Zero filter:blur -> featherlight 144fps scroll!)
   ========================================================= */
.light-stage {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f6fb 50%, #f8fafc 100%);
    color: #0f172a;
}

.light-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        radial-gradient(rgba(15, 23, 42, 0.075) 1px, transparent 1px),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='440' height='440' viewBox='0 0 440 440'%3E%3Cg fill='none' stroke='%230284c7' stroke-opacity='0.065' stroke-width='1.25'%3E%3Cpath d='M-40 90 Q 110 15 230 105 T 480 85'/%3E%3Cpath d='M-40 140 Q 120 65 245 155 T 480 135'/%3E%3Cpath d='M-40 265 Q 130 185 275 275 T 480 245'/%3E%3Cpath d='M-40 315 Q 140 235 285 325 T 480 295'/%3E%3Ccircle cx='350' cy='85' r='26' stroke-opacity='0.05'/%3E%3Ccircle cx='350' cy='85' r='44' stroke-opacity='0.035'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 28px 28px, 440px 440px;
}

.light-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.light-orb.orb-sky {
    width: 680px;
    height: 680px;
    top: -180px;
    right: -160px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.14) 0%, rgba(56, 189, 248, 0.05) 40%, rgba(14, 165, 233, 0) 70%);
    animation: auroraFloat2 22s ease-in-out infinite alternate;
}

.light-orb.orb-mint {
    width: 650px;
    height: 650px;
    bottom: -180px;
    left: -160px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.13) 0%, rgba(245, 158, 11, 0.05) 42%, rgba(0, 0, 0, 0) 70%);
    animation: auroraFloat1 24s ease-in-out infinite alternate;
}

@keyframes auroraFloat1 {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(55px, 35px, 0); }
}

@keyframes auroraFloat2 {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50px, 40px, 0); }
}

@keyframes auroraFloat3 {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(40px, -30px, 0); }
}

.constellation-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.dark-stage > nav,
.dark-stage > section,
.dark-stage > .container,
.light-stage > nav,
.light-stage > section,
.light-stage > .container {
    position: relative;
    z-index: 2;
}

/* =========================================================
   ULTRA-LIGHTWEIGHT GPU SCROLL CHOREOGRAPHY (translate3d + opacity ONLY)
   ========================================================= */
.word-mask {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    padding-bottom: 0.08em;
    margin-bottom: -0.08em;
}

.word-inner {
    display: inline-block;
    transform: translate3d(0, 108%, 0);
    opacity: 0;
    transition:
        transform 0.78s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.65s ease;
    transition-delay: var(--w-delay, 0ms);
}

.is-inview .word-inner {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

.section-accent-line {
    width: 72px;
    height: 3px;
    margin: 0 auto 1.5rem auto;
    border-radius: 999px;
    background: linear-gradient(90deg, #0077ff, #00e5ff, #4CAF50);
    transform: scaleX(0);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s, opacity 0.6s ease 0.1s;
}

.section-accent-line.is-inview {
    transform: scaleX(1);
    opacity: 1;
}

.anim-rise {
    opacity: 0;
    transform: translate3d(0, 34px, 0);
    transition:
        transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.75s ease;
    transition-delay: var(--delay, 0ms);
}

.anim-rise.is-inview {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.anim-scale {
    opacity: 0;
    transform: translate3d(0, 28px, 0) scale(0.93);
    transition:
        transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.75s ease;
    transition-delay: var(--delay, 0ms);
}

.anim-scale.is-inview {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
    .word-inner,
    .section-accent-line,
    .anim-rise,
    .anim-scale {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* =========================================================
   CLEAN CARDS & UNCROPPED SCHOOL EMBLEMS (No heavy backdrop-filter!)
   ========================================================= */
.education-card {
    background: linear-gradient(145deg, #ffffff 0%, #f9fbff 100%);
    border: 1px solid rgba(14, 165, 233, 0.14);
    border-radius: 24px;
    padding: 2.2rem 2.5rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.education-card:hover {
    transform: translate3d(0, -4px, 0);
    box-shadow: 0 18px 40px rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.32);
}

.logo-pedestal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 210px;
    height: 210px;
    padding: 22px;
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid rgba(15, 23, 42, 0.07);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.education-card:hover .logo-pedestal {
    transform: scale(1.04);
}

.logo-pedestal img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    display: block;
}

.case-detail-card {
    background: linear-gradient(145deg, rgba(15, 23, 40, 0.94), rgba(10, 15, 28, 0.97));
    border: 1px solid rgba(100, 180, 255, 0.18);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.case-detail-card-light {
    background: #ffffff;
    border: 1px solid rgba(14, 165, 233, 0.15);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.case-logo-badge {
    flex-shrink: 0;
    width: 110px;
    height: 110px;
    padding: 13px;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-logo-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
}

/* Parallax Frame for real photos & videos (#hobi) */
.parallax-frame {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
}

.parallax-frame > img {
    width: 100%;
    height: 114%;
    margin-top: -7%;
    object-fit: cover;
    display: block;
}

.parallax-frame > video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hobi-card {
    background: linear-gradient(145deg, #ffffff 0%, #f9fbff 100%);
    border: 1px solid rgba(14, 165, 233, 0.14);
    border-radius: 22px;
    padding: 1.5rem;
    height: 100%;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.hobi-card:hover {
    transform: translate3d(0, -4px, 0);
    box-shadow: 0 18px 40px rgba(14, 165, 233, 0.1);
}

/* =========================================================
   COMPONENTS & BUTTONS
   ========================================================= */
.btn-neon {
    background-color: #4CAF50;
    color: #ffffff;
    font-family: 'Space Mono', monospace;
    font-weight: bold;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
    box-shadow: 0 0 18px rgba(76, 175, 80, 0.5);
}

.btn-neon:hover {
    background-color: #45a049;
    box-shadow: 0 0 26px rgba(76, 175, 80, 0.85);
    transform: translate3d(0, -2px, 0);
    color: white;
}

.btn-orange,
.btn-orange:hover,
.btn-orange:focus-visible,
.btn-orange:active {
    background-color: #ff9800 !important;
    color: #111827 !important;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
}
.btn-blue,
.btn-blue:hover,
.btn-blue:focus-visible,
.btn-blue:active {
    background-color: #0055ff !important;
    color: #ffffff !important;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
}
.btn-teal,
.btn-teal:hover,
.btn-teal:focus-visible,
.btn-teal:active {
    background-color: #0d9488 !important;
    color: #ffffff !important;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
}
.btn-orange, .btn-blue, .btn-teal {
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}
.btn-orange:hover, .btn-blue:hover, .btn-teal:hover {
    transform: translate3d(0, -2px, 0);
    filter: brightness(1.08);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
}

.badge-custom {
    font-family: 'Space Mono';
    font-size: 0.72rem;
    padding: 6px 12px;
    border-radius: 999px;
}

.testimonial-card {
    background: linear-gradient(145deg, rgba(16, 24, 42, 0.92), rgba(10, 15, 28, 0.96));
    border: 1px solid rgba(100, 180, 255, 0.18);
    border-radius: 16px;
    padding: 30px;
    position: relative;
    transition: transform 0.25s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    border-color: rgba(0, 200, 255, 0.48);
    box-shadow: 0 14px 32px rgba(0, 150, 255, 0.16);
}

.quote-icon {
    font-size: 2rem;
    color: #ffffff;
    position: absolute;
    top: 20px;
    left: 20px;
    font-family: serif;
}

.form-control-custom {
    background-color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 12px;
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
}

label {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: #ffffff;
    margin-bottom: 5px;
}

.text-led-animated {
    background: linear-gradient(90deg, #ff0000, #ff8000, #ffff00, #00ff00, #00ffff, #0088ff, #8000ff, #ff00ff, #ff0000);
    background-size: 250% auto;
    color: transparent !important;
    -webkit-background-clip: text;
    background-clip: text;
    animation: led-move 10s linear infinite;
    display: inline-block;
}

@keyframes led-move {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.hero-avatar-wrap {
    display: inline-block;
    position: relative;
}

@media (min-width: 992px) {
    .hero-avatar-wrap {
        margin-top: -28px;
    }
}

.hero-avatar {
    width: 450px;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 2px solid rgba(120, 210, 255, 0.28);
    box-shadow: 0 18px 50px rgba(0, 165, 255, 0.22);
    animation: avatarFloat 5s ease-in-out infinite alternate;
}

@keyframes avatarFloat {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(0, -9px, 0); }
}

@media (max-width: 991.98px) {
    .hero-avatar {
        width: 260px;
    }
    .parallax-frame {
        max-width: 100%;
    }
    .education-card {
        padding: 1.75rem 1.5rem;
    }
    .logo-pedestal {
        width: 170px;
        height: 170px;
        padding: 18px;
    }
}

@media (max-width: 575.98px) {
    .hero-avatar {
        width: 220px;
    }
    .testimonial-card {
        padding: 22px;
    }
    .case-detail-card,
    .case-detail-card-light {
        padding: 1.5rem;
    }
    .case-logo-badge {
        width: 88px;
        height: 88px;
        padding: 10px;
    }
    p, .mono-text {
        font-size: 0.85rem;
    }
}

/* =========================================================
   CMS ADDITIONS: repo icon, case body, admin live-preview mode
   ========================================================= */
.repo-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.15rem;
    background: linear-gradient(135deg, rgba(0, 119, 255, 0.55), rgba(0, 229, 255, 0.35));
    border: 1px solid rgba(120, 210, 255, 0.35);
}

.case-detail-card strong { color: #fff; }
.case-detail-card .case-p,
.case-detail-card .case-list { line-height: 1.8; }
.case-detail-card h5 { color: #fff; }

.is-preview .anim-rise,
.is-preview .anim-scale,
.is-preview .word-inner,
.is-preview .section-accent-line {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}
.is-preview .scroll-progress-bar { display: none; }
