/* ============================================================
   SPACEX × AI/ML DESIGN SYSTEM
   Cinematic full-viewport portfolio
   ============================================================ */

/* --- Design Tokens --- */
:root {
    /* SpaceX Core Palette */
    --space-black: #000000;
    --spectral-white: #f0f0fa;
    --ghost-surface: rgba(240, 240, 250, 0.1);
    --ghost-border: rgba(240, 240, 250, 0.35);
    --ghost-hover: rgba(240, 240, 250, 0.2);
    --overlay-dark: rgba(0, 0, 0, 0.55);
    --overlay-darker: rgba(0, 0, 0, 0.7);
    --text-dim: rgba(240, 240, 250, 0.6);

    /* Typography */
    --font-display: 'Outfit', Arial, Verdana, sans-serif;

    /* Spacing */
    --nav-height: 72px;

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- Reset --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    font-family: var(--font-display);
    background-color: var(--space-black);
    color: var(--spectral-white);
    line-height: 1.5;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    display: flex;
    align-items: center;
    background: var(--space-black);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav--scrolled {
    background: var(--space-black);
}

.nav__inner {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--spectral-white);
}

.nav__links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav__link {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.17px;
    color: var(--spectral-white);
    opacity: 0.7;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.nav__link:hover,
.nav__link--active {
    opacity: 1;
}

/* Hamburger */
.nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav__hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--spectral-white);
    transition: all 0.3s ease;
}

.nav__hamburger--open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav__hamburger--open span:nth-child(2) {
    opacity: 0;
}

.nav__hamburger--open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav overlay */
.nav__mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.nav__mobile-overlay--open {
    display: flex;
}

.nav__mobile-link {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--spectral-white);
    opacity: 0;
    transform: translateY(20px);
    animation: mobileNavIn 0.4s var(--ease-out-expo) forwards;
}

.nav__mobile-link:nth-child(1) { animation-delay: 0.1s; }
.nav__mobile-link:nth-child(2) { animation-delay: 0.15s; }
.nav__mobile-link:nth-child(3) { animation-delay: 0.2s; }
.nav__mobile-link:nth-child(4) { animation-delay: 0.25s; }
.nav__mobile-link:nth-child(5) { animation-delay: 0.3s; }
.nav__mobile-link:nth-child(6) { animation-delay: 0.35s; }

@keyframes mobileNavIn {
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   CINEMATIC SECTIONS (Full-Viewport)
   ============================================================ */
.scene {
    position: relative;
    padding: 80px 0;
    min-height: auto;
    width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: transparent; /* Show 3D scene behind */
}

/* Global 3D Canvas Container */
#global-3d-scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    background: #000;
}

/* Futuristic System Overlays */
.futuristic-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: 9998;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.1) 50%
    );
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.3;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-display);
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    width: 90%;
    max-width: 350px;
}

.loading-bar-container {
    width: 100%;
    height: 2px;
    background: rgba(100, 180, 255, 0.1);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.loading-bar {
    width: 0%;
    height: 100%;
    background: #64b4ff;
    box-shadow: 0 0 15px #64b4ff;
    animation: loadBar 2s ease-in-out forwards;
}

.loading-text {
    font-size: 0.7rem;
    letter-spacing: 4px;
    color: #64b4ff;
    margin-bottom: 8px;
    font-weight: 700;
    word-break: break-all; /* Force long text without spaces to wrap instead of overflowing */
}

.loading-subtext {
    font-size: 0.5rem;
    letter-spacing: 2px;
    color: rgba(240, 240, 250, 0.4);
    text-transform: uppercase;
}

@keyframes loadBar {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Reduced spacing for sections with small content */
.scene--compact {
    padding: 60px 0;
    min-height: auto;
}

.scene__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

/* --- Animated Nebula Background System --- */
.scene__bg::before,
.scene__bg::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    animation: nebulaShift 25s ease-in-out infinite alternate;
}

.scene__bg::before {
    background:
        radial-gradient(ellipse 600px 400px at 20% 30%, rgba(20, 60, 120, 0.25), transparent),
        radial-gradient(ellipse 500px 500px at 80% 70%, rgba(40, 20, 80, 0.2), transparent),
        radial-gradient(ellipse 300px 300px at 50% 50%, rgba(10, 40, 60, 0.15), transparent);
    animation-duration: 25s;
}

.scene__bg::after {
    background:
        radial-gradient(ellipse 400px 300px at 70% 20%, rgba(30, 80, 120, 0.15), transparent),
        radial-gradient(ellipse 500px 400px at 30% 80%, rgba(50, 20, 70, 0.12), transparent);
    animation-duration: 35s;
    animation-direction: alternate-reverse;
}

/* Per-section color theming */
.scene--hero .scene__bg::before {
    background:
        radial-gradient(ellipse 800px 600px at 30% 40%, rgba(15, 50, 100, 0.3), transparent),
        radial-gradient(ellipse 600px 400px at 70% 60%, rgba(60, 20, 90, 0.2), transparent);
}

.scene--edu .scene__bg::before {
    background:
        radial-gradient(ellipse 700px 500px at 25% 35%, rgba(10, 60, 80, 0.25), transparent),
        radial-gradient(ellipse 500px 400px at 75% 65%, rgba(20, 40, 100, 0.2), transparent);
}

.scene--exp .scene__bg::before {
    background:
        radial-gradient(ellipse 700px 500px at 20% 50%, rgba(30, 30, 80, 0.25), transparent),
        radial-gradient(ellipse 500px 400px at 80% 40%, rgba(50, 10, 60, 0.2), transparent);
}

.scene--skills .scene__bg::before {
    background:
        radial-gradient(ellipse 600px 400px at 40% 30%, rgba(10, 80, 60, 0.2), transparent),
        radial-gradient(ellipse 500px 500px at 60% 70%, rgba(20, 50, 100, 0.2), transparent);
}

/* Floating particle dots via box-shadow */
.scene__bg .particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: particleDrift 40s linear infinite;
}

.scene__bg .particles::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(240, 240, 250, 0.4);
    border-radius: 50%;
    box-shadow:
        120px 80px 0 rgba(240,240,250,0.15),
        340px 200px 0 rgba(240,240,250,0.1),
        560px 120px 0 rgba(240,240,250,0.2),
        780px 350px 0 rgba(240,240,250,0.08),
        200px 450px 0 rgba(240,240,250,0.12),
        450px 50px 0 rgba(240,240,250,0.18),
        700px 500px 0 rgba(240,240,250,0.1),
        900px 150px 0 rgba(240,240,250,0.14),
        150px 300px 0 rgba(240,240,250,0.06),
        600px 400px 0 rgba(240,240,250,0.2),
        850px 250px 0 rgba(240,240,250,0.08),
        50px 500px 0 rgba(240,240,250,0.16),
        400px 350px 0 rgba(240,240,250,0.1),
        1000px 100px 0 rgba(240,240,250,0.12),
        250px 150px 0 rgba(240,240,250,0.14);
    animation: particleTwinkle 8s ease-in-out infinite alternate;
}

@keyframes nebulaShift {
    0%   { transform: translate(0, 0) rotate(0deg); }
    33%  { transform: translate(2%, -1%) rotate(0.5deg); }
    66%  { transform: translate(-1%, 2%) rotate(-0.3deg); }
    100% { transform: translate(1%, -2%) rotate(0.2deg); }
}

@keyframes particleDrift {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(-30px, -20px); }
}

@keyframes particleTwinkle {
    0%   { opacity: 0.5; }
    50%  { opacity: 1; }
    100% { opacity: 0.6; }
}

.scene__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--overlay-dark) 0%, var(--overlay-darker) 50%, var(--space-black) 100%);
    z-index: 1;
}

.scene__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}
@media (min-width: 768px) {
    .scene__content {
        padding: 0 48px;
    }
}

.data-wash {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-5deg);
    font-family: 'Courier New', monospace;
    font-size: 8rem;
    font-weight: 900;
    color: rgba(240, 240, 250, 0.015); /* Extremely faint */
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 20px;
    width: 200%;
    text-align: center;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: var(--nav-height); /* Ensure content never gets trapped under the solid navbar */
}

.hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Removed static brain image so the 3D space background shows through */
    background: transparent;
    z-index: 0;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
}

.hero__canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.4;
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 0 24px;
}

.hero__kicker {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-dim);
    margin-bottom: 24px;
    display: block;
}

.hero__name {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.96px;
    line-height: 1.0;
    color: var(--spectral-white);
    margin-bottom: 20px;
}

.hero__role {
    font-family: var(--font-display);
    font-size: clamp(0.85rem, 1.5vw, 1.1rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dim);
    margin-bottom: 32px;
}

.hero__bio {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto 40px;
    text-transform: none;
    letter-spacing: 0;
}

.hero__actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Ghost Buttons (SpaceX's single interactive element) */
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    background: var(--ghost-surface);
    border: 1px solid var(--ghost-border);
    border-radius: 32px;
    color: var(--spectral-white);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.17px;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
}

.ghost-btn:hover {
    background: var(--ghost-hover);
    border-color: var(--spectral-white);
}

.ghost-btn i {
    margin-right: 8px;
}

/* Scroll indicator */
.hero__scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hero__scroll-indicator span {
    font-family: var(--font-display);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.hero__scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--spectral-white), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ============================================================
   SECTION TYPOGRAPHY (Universal Uppercase)
   ============================================================ */
.section-label {
    font-family: var(--font-display);
    font-size: 0.625rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-dim);
    margin-bottom: 16px;
    display: block;
}

.section-heading {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.96px;
    line-height: 1.0;
    color: var(--spectral-white);
    margin-bottom: 40px;
}

/* ============================================================
   CONTENT BLOCKS (Text on Image, no cards)
   ============================================================ */
.content-block {
    max-width: 720px;
}

.content-block p {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    color: rgba(240, 240, 250, 0.8);
    margin-bottom: 16px;
    text-transform: none;
    letter-spacing: 0;
}

.content-block strong {
    color: var(--spectral-white);
    font-weight: 700;
}

.content-block .aside {
    color: var(--text-dim);
    font-style: italic;
    opacity: 0.7;
}

/* Role/Company header */
.role-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(240, 240, 250, 0.1);
}

.role-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.96px;
    color: var(--spectral-white);
    margin-bottom: 4px;
}

.role-company {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1.17px;
    color: var(--text-dim);
}

.role-date {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    opacity: 0.6;
    margin-top: 8px;
}

/* Tags (ghost surface treatment) */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.tag {
    font-family: var(--font-display);
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 16px;
    background: var(--ghost-surface);
    border: 1px solid rgba(240, 240, 250, 0.15);
    border-radius: 32px;
    color: var(--text-dim);
    transition: border-color 0.3s ease, color 0.3s ease;
}

.tag:hover {
    border-color: var(--ghost-border);
    color: var(--spectral-white);
}

/* ============================================================
   PROJECTS LIST
   ============================================================ */
.projects-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 20px 48px 60px;
    max-width: 1440px;
    margin: 0 auto;
}

.project-scene {
    position: relative;
    padding: 0;
    min-height: auto;
    width: 100%;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    border: 1px solid rgba(240, 240, 250, 0.08);
    background: rgba(10, 10, 15, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    border-radius: 6px;
}

.project-scene:hover {
    border-color: rgba(240, 240, 250, 0.25);
    background: rgba(15, 15, 25, 0.6);
}

.project-scene__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: 0;
}

.project-scene__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--space-black) 0%, rgba(0,0,0,0.85) 30%, rgba(0,0,0,0.85) 70%, var(--space-black) 100%);
    z-index: 1;
}

.project-scene__content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-scene__visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-ascii {
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    color: var(--spectral-white);
    white-space: pre;
    line-height: 1.4;
    opacity: 0.3;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-scene__info {
    max-width: 680px;
}

.project-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.96px;
    color: var(--spectral-white);
    margin-bottom: 8px;
}

.project-subtitle {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1.17px;
    color: var(--text-dim);
    margin-bottom: 24px;
}

/* ============================================================
   SKILLS SECTION — Animated Dashboard
   ============================================================ */
.skills-section-wrapper {
    position: relative;
}

/* Scanning line effect */
.skills-scanner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(100, 200, 255, 0.4), transparent);
    animation: scanLine 6s ease-in-out infinite;
    z-index: 10;
    pointer-events: none;
}

@keyframes scanLine {
    0%   { top: 0; opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Force visibility for skills during transition */
.skill-group {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.tags .tag {
    transition: all 0.4s var(--ease-out-expo);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    z-index: 5;
}
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(100, 180, 255, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.skill-group:hover {
    border-color: rgba(100, 180, 255, 0.2);
    box-shadow: 0 0 30px rgba(50, 100, 200, 0.08);
}

.skill-group:hover::before {
    opacity: 1;
}

.skill-group__title {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.17px;
    color: rgba(100, 180, 255, 0.7);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.skill-group__title::before {
    content: '◆';
    font-size: 0.5rem;
    color: rgba(100, 180, 255, 0.5);
}

/* Skill tags get a subtle pulse on hover */
.skill-group .tag {
    transition: all 0.3s ease;
}

.skill-group .tag:hover {
    border-color: rgba(100, 180, 255, 0.4);
    color: var(--spectral-white);
    box-shadow: 0 0 12px rgba(50, 100, 200, 0.15);
    transform: translateY(-1px);
}

/* ============================================================
   CONTACT / FOOTER
   ============================================================ */
.contact-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-prompt {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-dim);
    margin-bottom: 32px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.contact-link {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.17px;
    color: var(--text-dim);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-link:hover {
    color: var(--spectral-white);
}

/* ============================================================
   CODE BLOCK (Hero decorative element)
   ============================================================ */
.code-block {
    background: rgba(240, 240, 250, 0.03);
    border: 1px solid rgba(240, 240, 250, 0.08);
    border-radius: 4px;
    padding: 24px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: rgba(240, 240, 250, 0.6);
    text-align: left;
    max-width: 500px;
    margin: 40px auto 0;
    overflow-x: auto;
}

.code-block .kw { color: rgba(255, 123, 114, 0.8); }
.code-block .def { color: rgba(121, 192, 255, 0.8); }
.code-block .str { color: rgba(165, 214, 255, 0.8); }
.code-block .cmt { color: rgba(240, 240, 250, 0.3); font-style: italic; }
.code-line { display: block; line-height: 1.6; }

/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-left--visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-right--visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-scale--visible {
    opacity: 1;
    transform: scale(1);
}

/* Delay modifiers */
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.15s; }
.reveal-d3 { transition-delay: 0.2s; }
.reveal-d4 { transition-delay: 0.25s; }
.reveal-d5 { transition-delay: 0.3s; }

/* ============================================================
   TECHNICAL UI COMPONENTS (Filling the blank space)
   ============================================================ */
.metadata {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 24px;
    margin-top: 32px;
    font-family: var(--font-display);
    border-left: 1px solid var(--ghost-border);
    padding-left: 24px;
}

.metadata__item {
    display: flex;
    flex-direction: column;
}

.metadata__label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--spectral-white);
    opacity: 0.4;
    margin-bottom: 6px;
}

.metadata__value {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--spectral-white);
    letter-spacing: 0.5px;
}

.terminal-box {
    background: rgba(10, 10, 15, 0.6);
    border: 1px solid var(--ghost-border);
    padding: 24px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.7rem;
    color: #4ade80; /* Clean Matrix green */
    position: relative;
    overflow: hidden;
    margin-top: 32px;
    max-width: 500px;
    line-height: 1.6;
}

.terminal-box::after {
    content: "MISSION_LOGS // DECODED";
    position: absolute;
    top: 6px;
    right: 10px;
    font-size: 0.4rem;
    opacity: 0.3;
    letter-spacing: 2px;
}

.terminal-line {
    display: block;
    margin-bottom: 2px;
}

.terminal-line::before {
    content: "> ";
    opacity: 0.5;
}

/* Medium Feed Styles */
.medium-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.medium-card {
    background: var(--ghost);
    border: 1px solid var(--ghost-border);
    padding: 32px;
    border-radius: 4px;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.medium-card:hover {
    background: rgba(240, 240, 250, 0.08);
    transform: translateY(-5px);
    border-color: rgba(240, 240, 250, 0.5);
}

.medium-card__date {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.4;
    margin-bottom: 16px;
}

.medium-card__title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.4;
    color: var(--spectral-white);
}

.medium-card__excerpt {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-bottom: 24px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.medium-card__link {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--spectral-white);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s ease;
}

.medium-card:hover .medium-card__link {
    gap: 12px;
}

#medium-loader {
    width: 100%;
    text-align: center;
    padding: 80px;
    font-size: 0.7rem;
    letter-spacing: 4px;
    opacity: 0.3;
    text-transform: uppercase;
}

/* ============================================================
   SECTION DIVIDER
   ============================================================ */
.divider {
    width: 1px;
    height: 80px;
    background: linear-gradient(to bottom, transparent, rgba(240, 240, 250, 0.2), transparent);
    margin: 0 auto;
}

/* ============================================================
   EXPERIENCE TIMELINE (multi-entry within one scene)
   ============================================================ */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.timeline__item {
    max-width: 720px;
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

/* Ultra-wide */
@media (min-width: 1500px) {
    .scene__content,
    .hero__content,
    .project-scene__content {
        max-width: 1600px;
    }

    .hero__name {
        font-size: 5rem;
    }
}

/* Desktop */
@media (max-width: 1280px) {
    .scene__content,
    .project-scene__content {
        padding: 0 40px;
    }

    .nav__inner {
        padding: 0 40px;
    }
}

/* Tablet */
@media (max-width: 960px) {
    .project-scene__content {
        padding: 24px;
    }

    .project-scene__visual {
        display: none;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .scene__content {
        padding: 0 32px;
    }

    .nav__inner {
        padding: 0 24px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    :root {
        --nav-height: 60px;
    }

    .nav__links {
        display: none;
    }

    .nav__hamburger {
        display: flex;
    }

    .nav__inner {
        padding: 0 20px;
    }



    .hero__name {
        font-size: 2.2rem;
    }

    .hero__bio {
        font-size: 0.9rem;
    }

    .hero__actions {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }

    .ghost-btn {
        width: 100%;
        justify-content: center;
    }

    .scene__content {
        padding: 60px 20px;
    }

    .section-heading {
        font-size: 1.75rem;
    }

    .project-scene__content {
        padding: 20px;
    }

    .projects-container {
        padding: 20px 20px 40px;
    }

    .project-scene__visual {
        display: none;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .role-header {
        flex-direction: column;
    }

    .contact-links {
        flex-direction: column;
        gap: 20px;
    }

    .code-block {
        font-size: 0.7rem;
        padding: 16px;
    }

    .tags {
        gap: 6px;
    }

    .tag {
        font-size: 0.6rem;
        padding: 6px 12px;
    }

    .content-block p {
        font-size: 0.9rem;
    }

    .timeline {
        gap: 40px;
    }
}

/* Very small mobile */
@media (max-width: 380px) {
    .hero__name {
        font-size: 1.8rem;
    }

    .hero__kicker {
        font-size: 0.65rem;
        letter-spacing: 2px;
    }

    .section-heading {
        font-size: 1.4rem;
    }
}

/* ============================================================
   PARALLAX BACKGROUND (GSAP-driven)
   ============================================================ */
.parallax-bg {
    will-change: transform;
}

/* ============================================================
   SELECTION STYLE & CURSOR
   ============================================================ */
::selection {
    background: rgba(240, 240, 250, 0.2);
    color: var(--spectral-white);
}

body, a, button, .tag, .ghost-btn, .timeline__item, .project-scene, .medium-card, .skill-group {
    cursor: none !important;
}

/* Custom Cursor */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    background: var(--blue-glow);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px var(--blue-glow), 0 0 20px var(--blue-glow);
    transition: background 0.2s, box-shadow 0.2s;
}

.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(100, 180, 255, 0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.cursor-ring.hovered {
    width: 70px;
    height: 70px;
    background: rgba(100, 180, 255, 0.05);
    border-color: rgba(100, 180, 255, 0.8);
    backdrop-filter: blur(2px);
}

.cursor-ring.clicking {
    width: 20px;
    height: 20px;
    background: rgba(100, 180, 255, 0.3);
}

/* Glitch Text Effect */
.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}

.glitch-text.is-glitching::before {
    left: 2px;
    text-shadow: -1px 0 red;
    animation: glitch-anim-1 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
    opacity: 0.8;
}

.glitch-text.is-glitching::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    animation: glitch-anim-2 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite reverse;
    opacity: 0.8;
}

@keyframes glitch-anim-1 {
    0% { clip-path: inset(20% 0 80% 0); transform: translate(-2px, 1px); }
    20% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); }
    40% { clip-path: inset(40% 0 50% 0); transform: translate(-2px, 2px); }
    60% { clip-path: inset(80% 0 5% 0); transform: translate(2px, -2px); }
    80% { clip-path: inset(10% 0 70% 0); transform: translate(-1px, 1px); }
    100% { clip-path: inset(30% 0 50% 0); transform: translate(1px, -1px); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(10% 0 60% 0); transform: translate(2px, -1px); }
    20% { clip-path: inset(30% 0 20% 0); transform: translate(-2px, 2px); }
    40% { clip-path: inset(70% 0 10% 0); transform: translate(2px, -2px); }
    60% { clip-path: inset(20% 0 50% 0); transform: translate(-1px, 1px); }
    80% { clip-path: inset(50% 0 30% 0); transform: translate(1px, -1px); }
    100% { clip-path: inset(5% 0 80% 0); transform: translate(-2px, 1px); }
}

/* Spotlight Effect */
.project-scene, .timeline__item, .skill-group, .medium-card {
    position: relative;
    overflow: hidden;
}

.project-scene::before, .timeline__item::before, .skill-group::before, .medium-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle 300px at var(--mouseX, -100%) var(--mouseY, -100%), rgba(100, 180, 255, 0.1), transparent 80%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 10;
    mix-blend-mode: screen;
}

.project-scene:hover::before, .timeline__item:hover::before, .skill-group:hover::before, .medium-card:hover::before {
    opacity: 1;
}

/* --- Futuristic Global Fixes --- */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(100, 180, 255, 0) 50%,
        rgba(100, 180, 255, 0.02) 50%
    );
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.3;
}

.futuristic-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
    z-index: 9998;
}



.reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
    will-change: opacity, transform;
}

.reveal--visible, .reveal-left--visible, .reveal-right--visible, .reveal-scale--visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.reveal { transform: translateY(15px); }
.reveal-left { transform: translateX(-15px); }
.reveal-right { transform: translateX(15px); }
.reveal-scale { transform: scale(0.98); }

/* Remove previous reveal definitions to favor this bottom-up override */


::-webkit-scrollbar-thumb:hover {
    background: rgba(240, 240, 250, 0.3);
}

/* Firefox scrollbar */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(240, 240, 250, 0.15) var(--space-black);
}

/* ============================================================
   EDUCATION ENTRIES (stacked within scene)
   ============================================================ */
.education-entries {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* ============================================================
   UNIQUE SIDE-CARD WIDGETS
   ============================================================ */
.rich-visualizer {
    position: relative;
    width: 100%;
    height: 180px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(100, 180, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
}
.mini-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
}
.visualizer-overlay {
    position: absolute;
    bottom: 10px; right: 10px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--blue-glow);
    background: rgba(0,0,0,0.8);
    padding: 4px 8px;
    border: 1px solid rgba(100, 180, 255, 0.3);
    z-index: 2;
    text-transform: uppercase;
}
    position: relative;
    padding: 30px;
    background: rgba(10, 15, 30, 0.6);
    border: 1px solid rgba(100, 180, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
}
.holo-ring {
    position: absolute;
    top: -50px; right: -50px;
    width: 150px; height: 150px;
    border: 1px dashed var(--blue-glow);
    border-radius: 50%;
    opacity: 0.2;
    animation: spin 10s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Neural Pathway (Education) */
.neural-pathway-visualizer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-left: 2px solid rgba(100, 180, 255, 0.3);
}
.pathway-node {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}
.node-core {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--blue-glow);
    box-shadow: 0 0 10px var(--blue-glow);
}
.node-data .node-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--spectral-white);
}
.node-data .node-focus {
    font-size: 0.65rem;
    color: var(--blue-glow);
    opacity: 0.8;
}

/* Architecture Flow (Experience) */
.architecture-flow-diagram {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.arch-block {
    padding: 15px;
    background: linear-gradient(90deg, rgba(10,20,40,0.8), transparent);
    border: 1px solid rgba(100, 180, 255, 0.15);
    border-left: 4px solid var(--blue-glow);
    display: flex;
    flex-direction: column;
}
.arch-title { font-family: var(--font-display); font-size: 0.8rem; }
.arch-stat { font-family: var(--font-mono); font-size: 0.65rem; color: var(--blue-glow); margin-top: 4px; }
.arch-arrow {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    animation: float-down 2s ease-in-out infinite;
}
@keyframes float-down { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* Project: Node Graph */
.project-node-graph {
    position: relative;
    width: 100%; height: 150px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(100, 180, 255, 0.1);
}
.node-graph-container {
    position: relative; width: 100%; height: 100%;
}
.node {
    position: absolute; width: 8px; height: 8px;
    background: #fff; border-radius: 50%;
    box-shadow: 0 0 10px #fff;
}
.agent-node { top: 20%; left: 50%; }
.memory-node { top: 50%; left: 20%; }
.logic-node { top: 50%; left: 80%; }
.node-edges {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none;
}
.node-stats {
    position: absolute; bottom: 10px; right: 10px;
    font-family: var(--font-mono); font-size: 0.6rem; color: var(--blue-glow);
}

/* Project: Orbital Canvas */
.project-orbital-canvas {
    position: relative;
    width: 100%; height: 150px;
    display: flex; justify-content: center; align-items: center;
}
.orbital-rings {
    position: relative; width: 100px; height: 100px;
}
.ring {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    border: 1px solid rgba(100, 180, 255, 0.3);
    border-radius: 50%;
}
.ring.r1 { transform: rotateX(60deg) rotateY(20deg); animation: spin 8s linear infinite; }
.ring.r2 { transform: rotateX(70deg) rotateY(-30deg); animation: spin 12s linear infinite reverse; }
.debris-particle {
    position: absolute; top: -5px; left: 50%; width: 4px; height: 4px;
    background: var(--blue-glow); border-radius: 50%;
    box-shadow: 0 0 8px var(--blue-glow);
}
.debris-particle.p2 { top: 50%; left: -5px; }
.orbital-stat {
    position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%);
    font-family: var(--font-mono); font-size: 0.6rem; white-space: nowrap; opacity: 0.6;
}

/* Project: Attention Heatmap */
.project-attention-heat {
    background: rgba(0,0,0,0.5); padding: 20px; border: 1px solid rgba(100, 180, 255, 0.1);
}
.attention-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; position: relative;
}
.cell { height: 30px; border-radius: 2px; }
.cell.high { background: rgba(100, 180, 255, 0.8); }
.cell.med { background: rgba(100, 180, 255, 0.4); }
.cell.low { background: rgba(100, 180, 255, 0.1); }
.cell.max { background: #fff; box-shadow: 0 0 10px #fff; }
.attention-stat { margin-top: 10px; font-family: var(--font-mono); font-size: 0.6rem; color: var(--blue-glow); text-align: right; }

/* Project: Alignment Scale */
.project-alignment-scale {
    padding: 20px; background: rgba(0,0,0,0.5); border-left: 2px solid var(--blue-glow);
}
.scale-bar { width: 100%; height: 4px; background: rgba(255,255,255,0.1); margin-bottom: 10px; }
.scale-fill { height: 100%; background: var(--blue-glow); box-shadow: 0 0 10px var(--blue-glow); }
.scale-stat { font-family: var(--font-display); font-size: 1rem; color: #fff; }
.scale-sub { font-family: var(--font-mono); font-size: 0.6rem; opacity: 0.5; }

/* Project: Vision Matrix */
.project-vision-matrix {
    position: relative; width: 100%; height: 150px; background: url('data:image/svg+xml;utf8,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><rect width="20" height="20" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></svg>');
    border: 1px solid rgba(100, 180, 255, 0.2);
}
.vision-scanline {
    position: absolute; top: 0; left: 0; width: 100%; height: 2px;
    background: var(--blue-glow); box-shadow: 0 0 10px var(--blue-glow);
    animation: scan 3s ease-in-out infinite;
}
@keyframes scan { 0%, 100% { top: 0; } 50% { top: 100%; } }
.vision-target {
    position: absolute; top: 50%; left: 50%; width: 40px; height: 40px;
    transform: translate(-50%, -50%); border: 2px solid #fff; opacity: 0.5;
}
.vision-stat { position: absolute; bottom: 10px; right: 10px; font-family: var(--font-mono); font-size: 0.6rem; color: var(--blue-glow); }

/* ============================================================
   ULTRAWIDE & TV SCALING
   ============================================================ */
@media (min-width: 1920px) {
    html { font-size: 110%; }
    .scene__content, .project-scene__content { max-width: 1600px; }
    .rich-visualizer { height: 220px; }
}

@media (min-width: 2560px) {
    html { font-size: 130%; }
    .scene__content, .project-scene__content { max-width: 2000px; }
    .rich-visualizer { height: 260px; }
}

@media (min-width: 3840px) { /* 4K TVs */
    html { font-size: 160%; }
    .scene__content, .project-scene__content { max-width: 3000px; }
    .rich-visualizer { height: 350px; }
}