/* ============================================================
    MATTY BELL — Portfolio Stylesheet
    ============================================================
    Core site styles for layout, colour, motion, and responsive behaviour.
    The custom properties below act as the central design system tokens.
    ============================================================ */

/* ============================================================
    CSS CUSTOM PROPERTIES — Central design tokens
    ============================================================ */
:root {
    /* Background colours */
    --bg:             #0a0a0b;
    --bg-card:        #111113;
    --bg-card-hover:  #161618;
    --bg-glass:       rgba(255, 255, 255, 0.03);
    --bg-glass-hover: rgba(255, 255, 255, 0.06);

    /* Text colours */
    --text:           #e8e8ec;
    --text-secondary: #8b8b96;
    --text-muted:     #5a5a66;

    /* Accent colours used throughout the site */
    --nebula-1: #06b6d4;   /* Cyan */
    --nebula-2: #8b5cf6;   /* Purple */
    --nebula-3: #ec4899;   /* Pink/Magenta */
    --nebula-4: #10b981;   /* Emerald */
    --nebula-5: #f59e0b;   /* Amber */

    /* Nebula gradients */
    --gradient-nebula:       linear-gradient(135deg, var(--nebula-1), var(--nebula-2), var(--nebula-3));
    --gradient-nebula-soft:  linear-gradient(135deg, rgba(6,182,212,0.15), rgba(139,92,246,0.15), rgba(236,72,153,0.15));
    --gradient-nebula-text:  linear-gradient(90deg, var(--nebula-1), var(--nebula-2), var(--nebula-3), var(--nebula-1));

    /* Borders */
    --border:         rgba(255, 255, 255, 0.06);
    --border-bright:  rgba(255, 255, 255, 0.12);

    /* Sizing / spacing */
    --nav-height:     72px;
    --container-max:  1280px;
    --section-pad:    clamp(80px, 12vh, 160px);

    /* Timing */
    --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);

    /* Fonts */
    --font-heading:   'Plus Jakarta Sans', sans-serif;
    --font-body:      'Plus Jakarta Sans', sans-serif;
    --font-mono:      'JetBrains Mono', monospace;
}

/* ============================================================
   RESETS & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scrollbar-width: thin;
    scrollbar-color: var(--nebula-2) var(--bg);
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(6, 182, 212, 0.10), transparent 28%),
        radial-gradient(circle at 85% 12%, rgba(139, 92, 246, 0.10), transparent 32%),
        radial-gradient(circle at 50% 85%, rgba(236, 72, 153, 0.07), transparent 30%),
        linear-gradient(180deg, #08090c 0%, #090a0e 35%, #0a0a0b 100%);
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.03), transparent 0 2px, transparent 3px),
        radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.02), transparent 0 1px, transparent 2px),
        radial-gradient(circle at 40% 75%, rgba(255, 255, 255, 0.02), transparent 0 1px, transparent 2px);
    background-size: 220px 220px, 280px 280px, 320px 320px;
    opacity: 0.55;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 18%, transparent 82%, rgba(0,0,0,0.18));
}

/* Custom scrollbar (webkit) */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--nebula-1), var(--nebula-2));
    border-radius: 10px;
}

/* Selection highlight */
::selection {
    background: rgba(139, 92, 246, 0.3);
    color: #fff;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; border: none; background: none; cursor: pointer; color: inherit; }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 60px);
}

.text-gradient {
    background: var(--gradient-nebula-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer-text 4s linear infinite;
}

@keyframes shimmer-text {
    to { background-position: 200% center; }
}

/* ============================================================
   CUSTOM CURSOR — Desktop only
   ============================================================ */
@media (pointer: fine) {
    .cursor {
        position: fixed;
        width: 8px;
        height: 8px;
        background: var(--nebula-1);
        border-radius: 50%;
        pointer-events: none;
        z-index: 10000;
        transform: translate(-50%, -50%);
        transition: width 0.3s, height 0.3s, background 0.3s;
        mix-blend-mode: difference;
    }
    .cursor-follower {
        position: fixed;
        width: 36px;
        height: 36px;
        border: 1px solid rgba(6, 182, 212, 0.4);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        transform: translate(-50%, -50%);
        transition: width 0.4s var(--ease-out-expo), height 0.4s var(--ease-out-expo),
                    border-color 0.3s, opacity 0.3s;
    }
    .cursor.hovering {
        width: 50px;
        height: 50px;
        background: rgba(139, 92, 246, 0.15);
        border: 1px solid var(--nebula-2);
    }
    .cursor-follower.hovering {
        width: 60px;
        height: 60px;
        border-color: var(--nebula-3);
        opacity: 0.5;
    }
}
@media (pointer: coarse) {
    .cursor, .cursor-follower { display: none !important; }
}

/* ============================================================
   SOFT ATMOSPHERIC OVERLAY
   ============================================================ */
.noise {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.35;
    background:
        radial-gradient(circle at 50% 0%, rgba(255,255,255,0.05), transparent 35%),
        radial-gradient(circle at 0% 100%, rgba(6,182,212,0.05), transparent 28%),
        radial-gradient(circle at 100% 20%, rgba(139,92,246,0.05), transparent 30%);
}

/* ============================================================
   LOADER
   ============================================================ */
.loader {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s, visibility 0.6s;
}
.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.loader-inner { text-align: center; }
.loader-line {
    width: 60px;
    height: 2px;
    margin: 0 auto 24px;
    background: var(--gradient-nebula);
    transform-origin: left;
    animation: loader-line 1.8s var(--ease-out-expo) forwards;
}
@keyframes loader-line {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}
.loader-text {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: flex;
    gap: 2px;
    justify-content: center;
}
.loader-letter {
    opacity: 0;
    transform: translateY(20px);
    animation: loader-letter 0.6s var(--ease-out-expo) forwards;
    animation-delay: calc(var(--i) * 0.06s + 0.3s);
    background: var(--gradient-nebula-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
@keyframes loader-letter {
    to { opacity: 1; transform: translateY(0); }
}
.loader-counter {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 20px;
    letter-spacing: 0.2em;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: background 0.3s, backdrop-filter 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 60px);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.03em;
    position: relative;
}
.nav-logo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gradient-nebula);
    display: inline-block;
}

/* Nav links */
.nav-links {
    display: flex;
    gap: 36px;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    transition: color 0.3s;
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gradient-nebula);
    transition: width 0.3s var(--ease-out-expo);
}
.nav-link:hover, .nav-link.active {
    color: var(--text);
}
.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}
.nav-link-number {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--nebula-1);
}

/* Hamburger */
.nav-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
}
.hamburger {
    width: 24px;
    height: 14px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.hamburger-line {
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.hamburger.active .hamburger-line:first-child {
    transform: translateY(6px) rotate(45deg);
}
.hamburger.active .hamburger-line:last-child {
    transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-menu-btn { display: flex; }
}

/* ============================================================
   MOBILE MENU
   ============================================================ */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 999;
    pointer-events: none;
}
.mobile-menu.active {
    pointer-events: auto;
}
.mobile-menu-bg {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 11, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    opacity: 0;
    transition: opacity 0.4s;
}
.mobile-menu.active .mobile-menu-bg { opacity: 1; }
.mobile-menu-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}
.mobile-menu-link {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 700;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.4s, transform 0.4s var(--ease-out-expo), color 0.3s;
    position: relative;
}
.mobile-menu-link::before {
    content: attr(data-index);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--nebula-1);
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
}
.mobile-menu-link:hover {
    color: var(--nebula-1);
}
.mobile-menu.active .mobile-menu-link {
    opacity: 1;
    transform: translateY(0);
}
.mobile-menu.active .mobile-menu-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-menu-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.active .mobile-menu-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-menu-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu.active .mobile-menu-link:nth-child(5) { transition-delay: 0.3s; }
.mobile-menu.active .mobile-menu-link:nth-child(6) { transition-delay: 0.35s; }
.mobile-menu.active .mobile-menu-link:nth-child(7) { transition-delay: 0.4s; }
.mobile-menu-footer {
    margin-top: 40px;
    display: flex;
    gap: 20px;
    opacity: 0;
    transition: opacity 0.4s 0.5s;
}
.mobile-menu.active .mobile-menu-footer { opacity: 1; }
.mobile-menu-footer a {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color 0.3s;
}
.mobile-menu-footer a:hover { color: var(--nebula-1); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: calc(var(--nav-height) + 40px) 0 60px;
    padding-left: clamp(20px, 4vw, 60px);
    padding-right: clamp(20px, 4vw, 60px);
    max-width: var(--container-max);
    margin: 0 auto;
    gap: 60px;
}

/* Background effects */
.hero-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}
.hero-gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.16;
}
.hero-gradient-orb-1 {
    width: 600px; height: 600px;
    background: var(--nebula-1);
    top: -15%; left: -10%;
    animation: float-orb 20s ease-in-out infinite;
}
.hero-gradient-orb-2 {
    width: 500px; height: 500px;
    background: var(--nebula-2);
    top: 40%; right: -15%;
    animation: float-orb 25s ease-in-out infinite reverse;
}
.hero-gradient-orb-3 {
    width: 400px; height: 400px;
    background: var(--nebula-3);
    bottom: -10%; left: 30%;
    animation: float-orb 18s ease-in-out infinite 3s;
}
@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(30px, -40px) scale(1.05); }
    66%      { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Aurora bands */
.aurora {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.08;
}
.aurora-band {
    position: absolute;
    width: 200%;
    height: 100px;
    filter: blur(60px);
    animation: aurora-move 12s ease-in-out infinite;
}
.aurora-band-1 {
    top: 15%;
    background: linear-gradient(90deg, transparent, var(--nebula-1), transparent);
    animation-duration: 14s;
}
.aurora-band-2 {
    top: 40%;
    background: linear-gradient(90deg, transparent, var(--nebula-2), transparent);
    animation-duration: 18s;
    animation-delay: -4s;
}
.aurora-band-3 {
    top: 65%;
    background: linear-gradient(90deg, transparent, var(--nebula-3), transparent);
    animation-duration: 16s;
    animation-delay: -8s;
}
@keyframes aurora-move {
    0%, 100% { transform: translateX(-25%); }
    50%      { transform: translateX(0%); }
}

/* Hero content */
.hero-content {
    flex: 1;
    z-index: 2;
}
.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border-radius: 100px;
    border: 1px solid var(--border-bright);
    background: var(--bg-glass);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
}
.hero-tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--nebula-4);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
}
.hero-title {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 24px;
}
.hero-title-line {
    display: block;
}
.hero-title-word {
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: -0.04em;
}
.hero-title-accent {
    background: var(--gradient-nebula-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer-text 4s linear infinite;
}
.hero-description {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.7;
    margin-bottom: 36px;
}
.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Hero image */
.hero-image-wrapper {
    flex-shrink: 0;
    z-index: 2;
    position: relative;
}
.hero-image-container {
    width: clamp(240px, 22vw, 340px);
    height: clamp(240px, 22vw, 340px);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}
.hero-image-glow {
    position: absolute;
    inset: -20%;
    background: var(--gradient-nebula);
    filter: blur(50px);
    opacity: 0.2;
    border-radius: 50%;
    animation: glow-pulse 4s ease-in-out infinite;
}
@keyframes glow-pulse {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50%      { opacity: 0.35; transform: scale(1.05); }
}
.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 2;
}
.hero-image-border {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: var(--gradient-nebula) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 3;
}
.hero-image-badge {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-bright);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    z-index: 4;
}
.hero-image-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--nebula-4);
    animation: pulse-dot 2s ease-in-out infinite;
}

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: clamp(20px, 4vw, 60px);
    display: flex;
    align-items: center;
    gap: 16px;
}
.hero-scroll-line {
    width: 40px;
    height: 1px;
    background: var(--text-muted);
    position: relative;
    overflow: hidden;
}
.hero-scroll-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-nebula);
    animation: scroll-line 2s ease-in-out infinite;
}
@keyframes scroll-line {
    0%   { transform: translateX(-100%); }
    50%  { transform: translateX(0); }
    100% { transform: translateX(100%); }
}
.hero-scroll-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .hero { flex-direction: column-reverse; text-align: center; padding-top: calc(var(--nav-height) + 60px); }
    .hero-description { margin-left: auto; margin-right: auto; }
    .hero-cta { justify-content: center; }
    .hero-scroll { display: none; }
}

/* ============================================================
   MARQUEE — Infinite scroll ticker
   ============================================================ */
.marquee-section {
    padding: 30px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}
.marquee { position: relative; }
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
}
.marquee-item {
    font-family: var(--font-heading);
    font-size: clamp(0.9rem, 1.4vw, 1.1rem);
    font-weight: 500;
    white-space: nowrap;
    padding: 0 18px;
    color: var(--text-secondary);
    transition: color 0.3s;
}
.marquee-item:hover { color: var(--nebula-1); }
.marquee-separator {
    font-size: 0.6rem;
    color: var(--nebula-2);
    opacity: 0.4;
    display: flex;
    align-items: center;
}
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ============================================================
   SECTIONS — Common layout
   ============================================================ */
.section {
    padding: var(--section-pad) 0;
    position: relative;
}
.section-header {
    margin-bottom: clamp(48px, 6vh, 80px);
}
.section-number {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--nebula-1);
    letter-spacing: 0.2em;
    display: block;
    margin-bottom: 12px;
}
.section-title {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
}
.section-title-line {
    display: block;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    letter-spacing: -0.04em;
}
.section-title-outline {
    -webkit-text-stroke: 1.5px var(--text);
    -webkit-text-fill-color: transparent;
}
.section-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--text-secondary);
    margin-top: 12px;
    max-width: 600px;
}

.experience-work {
    padding-bottom: clamp(40px, 7vh, 88px);
}

.projects-section {
    padding-top: clamp(44px, 7vh, 96px);
    border-top: 1px solid var(--border);
}

/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
    transition-delay: var(--delay, 0s);
}
.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   BUTTONS — Nebula gradient primary + outline
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 100px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    transition: all 0.3s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}
.btn-primary {
    background: var(--gradient-nebula);
    color: #fff;
    border: none;
}
.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(6, 182, 212, 0.3); }

.btn-outline {
    border: 1px solid var(--border-bright);
    background: var(--bg-glass);
    color: var(--text);
}
.btn-outline:hover {
    border-color: var(--nebula-1);
    background: rgba(6, 182, 212, 0.06);
    transform: translateY(-2px);
}
.btn-icon { display: flex; align-items: center; }
.btn-full { width: 100%; justify-content: center; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
    display: grid;
    grid-template-columns: 0.8fr 1fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: start;
}
.about-image-wrapper { position: relative; }
.about-image-inner {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: auto;
    background: rgba(255, 255, 255, 0.02);
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.about-image {
    width: 100%;
    height: auto;
    max-height: min(78vh, 980px);
    object-fit: contain;
    transition: transform 0.6s var(--ease-out-expo);
}
.about-image-inner:hover .about-image {
    transform: scale(1.01);
}
.about-image-caption {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.about-image-caption-year { color: var(--nebula-1); }

.about-large-text {
    font-size: clamp(1.15rem, 1.8vw, 1.4rem);
    line-height: 1.7;
    margin-bottom: 24px;
}
.about-details p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.8;
}

/* Stat counters */
.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 36px 0;
    padding: 28px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.about-stat { text-align: center; }
.about-stat-number {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 700;
    background: var(--gradient-nebula-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer-text 4s linear infinite;
    line-height: 1;
}
.about-stat-suffix {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    background: var(--gradient-nebula-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.about-stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Interest tags */
.about-interests-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.about-interest-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: var(--bg-glass);
    font-size: 0.82rem;
    color: var(--text-secondary);
    transition: border-color 0.3s, background 0.3s;
    white-space: nowrap;
}
.tag:hover {
    border-color: var(--nebula-2);
    background: var(--bg-glass-hover);
}

@media (max-width: 768px) {
    .about-grid { grid-template-columns: 1fr; }
    .about-image-inner { padding: 10px; }
    .about-image { max-height: none; }
}

/* ============================================================
   WORK EXPERIENCE FEATURE
   ============================================================ */
.experience-feature {
    padding: clamp(28px, 4vw, 40px);
    border: 1px solid var(--border);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(6, 182, 212, 0.05), rgba(139, 92, 246, 0.03) 50%, rgba(255,255,255,0.02)),
        var(--bg-card);
    margin-bottom: 42px;
}

.experience-feature-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.company-mark {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.company-mark-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--nebula-4);
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.18);
    flex-shrink: 0;
}

.company-mark-icon-image {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.28);
    padding: 8px;
}

.company-mark-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.company-mark-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.company-mark-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.company-mark-location {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.experience-status {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.09);
    border: 1px solid rgba(16, 185, 129, 0.18);
    color: #b7f7d0;
    font-size: 0.8rem;
    font-weight: 600;
}

.experience-feature-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 28px;
    align-items: start;
}

.experience-kicker {
    color: var(--nebula-1);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.experience-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 2.8vw, 2.2rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 14px;
    letter-spacing: -0.03em;
}

.experience-description {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.96rem;
}

.experience-highlights {
    display: grid;
    gap: 14px;
}

.experience-highlight-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.02);
    padding: 18px 18px 16px;
}

.experience-highlight-label {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--text);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
}

.experience-highlight-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.9rem;
}

.projects-subheader {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.projects-subheader-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, var(--nebula-1), transparent);
}

.projects-subheader-text {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ============================================================
   SPOTIFY
   ============================================================ */
.spotify-panel {
    border: 1px solid var(--border);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(29, 185, 84, 0.06), rgba(255,255,255,0.02)),
        var(--bg-card);
    padding: clamp(24px, 4vw, 36px);
}

.spotify-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.spotify-kicker {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #1db954;
    margin-bottom: 10px;
}

.spotify-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
    line-height: 1.1;
    margin-bottom: 10px;
}

.spotify-copy {
    max-width: 760px;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
}

.spotify-embeds {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.spotify-embeds-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.spotify-embed {
    width: 100%;
    min-height: 352px;
    border: 0;
    border-radius: 18px;
    background: #121212;
}

@media (max-width: 1100px) {
    .spotify-embeds {
        grid-template-columns: 1fr;
    }

    .spotify-embeds-two {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   PROJECT CARDS
   ============================================================ */
.projects-list {
    display: grid;
    gap: 32px;
}
.project-card {
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    background: var(--bg-card);
    transition: border-color 0.3s, transform 0.4s var(--ease-out-expo), box-shadow 0.4s;
}
.project-card:hover {
    border-color: var(--border-bright);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.project-card-link { display: flex; flex-direction: column; }
.project-card-featured .project-card-link {
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) 1fr;
    align-items: stretch;
}

.project-card-image-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #08080a;
}
.project-card-featured .project-card-image-wrapper {
    aspect-ratio: 16 / 9;
    min-height: 280px;
    max-height: 340px;
}
.project-card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 18px;
    background: radial-gradient(circle at 50% 20%, rgba(255,255,255,0.04), transparent 45%);
    transition: transform 0.6s var(--ease-out-expo);
}
.project-card:hover .project-card-image { transform: scale(1.02); }

.project-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(10, 10, 11, 0.7);
    opacity: 0;
    transition: opacity 0.4s;
    color: var(--text);
}
.project-card:hover .project-card-overlay { opacity: 1; }
.project-card-overlay-text {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.05em;
}

.project-featured-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(10, 10, 11, 0.75);
    backdrop-filter: blur(10px);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--nebula-1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    z-index: 2;
}
.project-featured-badge-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--nebula-1);
    animation: pulse-dot 2s ease-in-out infinite;
}

.project-card-content { padding: 28px 30px 30px; }
.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}
.project-card-title {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 2vw, 1.6rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}
.project-card-year {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}
.project-card-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
}
.project-card-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.project-tag {
    padding: 4px 12px;
    border-radius: 100px;
    border: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-glass);
}

.projects-cta {
    text-align: center;
    margin-top: 48px;
}

@media (max-width: 768px) {
    .project-card-featured .project-card-link { grid-template-columns: 1fr; }
    .project-card-featured .project-card-image-wrapper {
        min-height: 220px;
        max-height: none;
    }
    .experience-feature-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   GHOSTKERNEL SHOWCASE
   ============================================================ */
.gk-hero { margin-bottom: 60px; }
.gk-hero-inner {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #08080a;
    min-height: 320px;
}
.gk-hero-glow {
    position: absolute;
    inset: -30%;
    background: radial-gradient(circle, rgba(6,182,212,0.12), transparent 60%);
    animation: glow-pulse 5s ease-in-out infinite;
}
.gk-hero-image {
    width: 100%;
    max-height: 560px;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1;
}

.gk-section { margin-bottom: 60px; }
.gk-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}
.gk-section-icon { color: var(--nebula-1); display: flex; }
.gk-section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.gk-text-block p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
    font-size: 0.95rem;
}
.gk-text-block strong { color: var(--text); font-weight: 600; }
.gk-text-block code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    color: var(--nebula-1);
    background: rgba(6, 182, 212, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
}
.gk-text-block-intro {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 32px;
    line-height: 1.7;
}

/* GK Features Grid */
.gk-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.gk-feature-card {
    padding: 28px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: border-color 0.3s, transform 0.3s var(--ease-out-expo);
}
.gk-feature-card:hover {
    border-color: var(--border-bright);
    transform: translateY(-3px);
}
.gk-feature-icon {
    font-size: 1.8rem;
    margin-bottom: 14px;
}
.gk-feature-card h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.gk-feature-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* GK Terminal */
.gk-terminal {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #0c0c0e;
}
.gk-terminal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
}
.gk-terminal-dots {
    display: flex;
    gap: 6px;
}
.gk-terminal-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.gk-terminal-dots span:nth-child(1) { background: #ff5f57; }
.gk-terminal-dots span:nth-child(2) { background: #ffbd2e; }
.gk-terminal-dots span:nth-child(3) { background: #28ca42; }
.gk-terminal-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}
.gk-terminal-body {
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.8;
}
.gk-terminal-line { margin-bottom: 4px; }
.gk-terminal-prompt { color: var(--nebula-1); margin-right: 10px; }
.gk-terminal-cmd { color: var(--text); }
.gk-terminal-output {
    color: var(--text-muted);
    padding-left: 20px;
    margin-bottom: 16px;
}

/* GK Stats */
.gk-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}
.gk-stat { text-align: center; }
.gk-stat-number {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 700;
    background: var(--gradient-nebula-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer-text 4s linear infinite;
    line-height: 1;
}
.gk-stat-suffix {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    background: var(--gradient-nebula-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.gk-stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ============================================================
   PROJECT DETAIL SECTIONS
   ============================================================ */
.project-detail {
    border-top: 1px solid var(--border);
}

/* ============================================================
   3D PIPELINE DIAGRAMS
   Perspective-transformed cards with glowing connectors 
   Each diagram has a unique colour via --layer-hue on nodes
   ============================================================ */
.diagram-3d {
    margin: 40px 0;
    padding: 40px 0;
    position: relative;
    /* Subtle radial glow behind entire diagram */
    background: radial-gradient(ellipse 60% 40% at 50% 50%, rgba(139, 92, 246, 0.04), transparent);
    border-radius: 20px;
}

.diagram-3d-scene {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    perspective: 1200px;
    max-width: 600px;
    margin: 0 auto;
}

/* ---- Individual Node ---- */
.d3-node {
    width: 100%;
    max-width: 480px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s var(--ease-out-expo);
}
.d3-node:hover {
    transform: rotateX(2deg) rotateY(-3deg) translateZ(10px) scale(1.02);
}

/* Front face (visible content) */
.d3-node-front {
    padding: 22px 28px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    position: relative;
    z-index: 2;
    text-align: center;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.d3-node:hover .d3-node-front {
    border-color: var(--border-bright);
}

/* 3D side faces for layer nodes */
.d3-node-right {
    position: absolute;
    top: 4px;
    right: -8px;
    width: 8px;
    height: calc(100% - 8px);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 8px 8px 0;
    transform: rotateY(0deg);
    z-index: 1;
}
.d3-node-top {
    position: absolute;
    top: -6px;
    left: 6px;
    right: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px 10px 0 0;
    z-index: 1;
}

/* Shadow under nodes */
.d3-node-shadow {
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: -8px;
    height: 16px;
    border-radius: 50%;
    filter: blur(12px);
    z-index: 0;
}

/* Glow ring around important nodes */
.d3-node-glow {
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s;
}
.d3-node:hover .d3-node-glow { opacity: 1; }

/* ---- Colour theming per --layer-hue ---- */
.d3-node-layer .d3-node-front {
    border-color: hsla(var(--layer-hue, 260), 60%, 50%, 0.20);
    background: linear-gradient(135deg, hsla(var(--layer-hue, 260), 60%, 50%, 0.06), var(--bg-card));
}
.d3-node-layer:hover .d3-node-front {
    border-color: hsla(var(--layer-hue, 260), 70%, 55%, 0.45);
    box-shadow: 0 0 30px hsla(var(--layer-hue, 260), 70%, 55%, 0.10);
}
.d3-node-layer .d3-node-right {
    background: hsla(var(--layer-hue, 260), 50%, 40%, 0.10);
}
.d3-node-layer .d3-node-top {
    background: hsla(var(--layer-hue, 260), 50%, 50%, 0.08);
}
.d3-node-layer .d3-node-shadow {
    background: hsla(var(--layer-hue, 260), 60%, 40%, 0.12);
}
.d3-node-layer .d3-node-glow {
    background: hsla(var(--layer-hue, 260), 60%, 50%, 0.06);
    box-shadow: 0 0 20px hsla(var(--layer-hue, 260), 60%, 50%, 0.15);
}
.d3-node-layer .d3-node-badge {
    background: hsla(var(--layer-hue, 260), 60%, 50%, 0.15);
    color: hsla(var(--layer-hue, 260), 80%, 70%, 1);
    border: 1px solid hsla(var(--layer-hue, 260), 60%, 50%, 0.30);
}

/* Input node */
.d3-node-input .d3-node-front {
    border-color: rgba(6, 182, 212, 0.25);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.06), var(--bg-card));
}
.d3-node-input .d3-node-shadow {
    background: rgba(6, 182, 212, 0.10);
}

/* Output node */
.d3-node-output .d3-node-front {
    border-color: rgba(16, 185, 129, 0.25);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), var(--bg-card));
}
.d3-node-output:hover .d3-node-front {
    border-color: rgba(16, 185, 129, 0.50);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.10);
}
.d3-node-output .d3-node-shadow {
    background: rgba(16, 185, 129, 0.10);
}
.d3-node-output .d3-node-glow {
    background: rgba(16, 185, 129, 0.05);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

/* Node content text */
.d3-node-emoji {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 8px;
}
.d3-node-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.d3-node-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}
.d3-node-sub {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ---- Connector beams between nodes ---- */
.d3-connector {
    width: 2px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.d3-connector-beam {
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--border-bright), var(--border));
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}
.d3-connector-beam::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-nebula);
    animation: beam-flow 2.5s ease-in-out infinite;
}
@keyframes beam-flow {
    0%   { top: -100%; }
    50%  { top: 100%; }
    100% { top: 100%; }
}

/* Staggered animation for diagram nodes appearing */
.d3-anim {
    opacity: 0;
    transform: translateY(30px) perspective(800px) rotateX(8deg);
    transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
    transition-delay: calc(var(--node-i, 0) * 0.12s);
}
.d3-anim.d3-visible {
    opacity: 1;
    transform: translateY(0) perspective(800px) rotateX(0deg);
}

/* Connector staggered beam animation delays */
.d3-connector .d3-connector-beam::after {
    animation-delay: calc(var(--node-i, 0) * 0.3s);
}

/* Responsive: make diagram full-width on small screens */
@media (max-width: 600px) {
    .diagram-3d-scene { max-width: 100%; }
    .d3-node-front { padding: 16px 18px; }
    .d3-node-label { font-size: 0.95rem; }
    .d3-node-sub { font-size: 0.75rem; }
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}
.skill-category {
    padding: 32px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: border-color 0.3s;
}
.skill-category:hover { border-color: var(--border-bright); }
.skill-category-icon {
    color: var(--nebula-1);
    margin-bottom: 20px;
}
.skill-category-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 24px;
}
.skill-items { display: flex; flex-direction: column; gap: 16px; }
.skill-item { display: flex; align-items: center; gap: 14px; }
.skill-name {
    font-size: 0.88rem;
    color: var(--text-secondary);
    min-width: 120px;
}
.skill-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}
.skill-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 4px;
    background: var(--gradient-nebula);
    transition: width 1.2s var(--ease-out-expo);
}

/* ============================================================
   TIMELINE (Education)
   ============================================================ */
.timeline {
    position: relative;
    padding-left: 40px;
    max-width: 700px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border);
}
.timeline-item {
    position: relative;
    padding-bottom: 48px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
    position: absolute;
    left: -44px;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gradient-nebula);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
}
.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--nebula-1);
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 8px;
}
.timeline-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.timeline-place {
    font-size: 0.9rem;
    color: var(--nebula-2);
    margin-bottom: 8px;
}
.timeline-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 6vw, 80px);
}
.contact-intro {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}
.contact-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}
.contact-links { display: flex; flex-direction: column; gap: 12px; }
.contact-link-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease-out-expo);
}
.contact-link-item:hover {
    border-color: var(--nebula-1);
    background: var(--bg-card-hover);
    transform: translateX(4px);
}
.contact-link-icon { color: var(--nebula-1); display: flex; flex-shrink: 0; }
.contact-link-text { flex: 1; font-size: 0.9rem; }
.contact-link-arrow {
    color: var(--text-muted);
    transition: color 0.3s, transform 0.3s;
}
.contact-link-item:hover .contact-link-arrow {
    color: var(--nebula-1);
    transform: translateX(4px);
}

/* Form */
.contact-form-wrapper {
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg-card);
}
.form-group { margin-bottom: 28px; position: relative; }
.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
}
.form-input {
    width: 100%;
    padding: 14px 0;
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}
.form-input:focus { border-color: var(--nebula-1); }
.form-input::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-nebula);
    transition: width 0.4s var(--ease-out-expo);
}
.form-input:focus ~ .form-line { width: 100%; }

@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr; }
    .contact-form-wrapper { padding: 28px; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-left { display: flex; align-items: center; gap: 16px; }
.footer-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
}
.footer-logo-dot { color: var(--nebula-1); }
.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.footer-right { display: flex; align-items: center; gap: 20px; }
.footer-socials { display: flex; gap: 12px; }
.footer-social {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: border-color 0.3s, color 0.3s;
}
.footer-social:hover { border-color: var(--nebula-1); color: var(--nebula-1); }
.footer-built {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal-up { opacity: 1; transform: none; }
    .d3-anim { opacity: 1; transform: none; }
}

/* Focus visible */
:focus-visible {
    outline: 2px solid var(--nebula-1);
    outline-offset: 4px;
}
