/* ═══════════════════════════════════════════════════
   NEURAL COSMOS — PORTFOLIO STYLESHEET
   Atharv Patil
   ═══════════════════════════════════════════════════ */

/* ─── FONTS ─── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Bebas+Neue&display=swap');

/* ─── CSS CUSTOM PROPERTIES ─── */
:root {
    /* Colors */
    --bg-base: #050510;
    --bg-surface: rgba(12, 12, 30, 0.7);
    --bg-card: rgba(15, 15, 40, 0.6);
    --text-primary: #e8e8f0;
    --text-secondary: #8a8aaa;
    --text-muted: #5a5a7a;

    --accent-blue: #4f8ef7;
    --accent-violet: #a855f7;
    --accent-green: #39ff14;
    --accent-cyan: #22d3ee;

    --glass-bg: rgba(15, 15, 45, 0.45);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

    /* Typography */
    --font-body: 'Space Grotesk', sans-serif;
    --font-display: 'Cabinet Grotesk', 'Space Grotesk', sans-serif;
    --font-mono: 'Bebas Neue', sans-serif;

    /* Spacing */
    --section-pad: clamp(80px, 12vh, 140px);
    --container: 1200px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── LIGHT THEME (Blueprint) ─── */
[data-theme="light"] {
    --bg-base: #f0f4ff;
    --bg-surface: rgba(220, 228, 255, 0.8);
    --bg-card: rgba(230, 236, 255, 0.85);
    --text-primary: #0a0a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #7a7a9a;
    --glass-bg: rgba(230, 236, 255, 0.65);
    --glass-border: rgba(79, 142, 247, 0.15);
    --glass-shadow: 0 8px 32px rgba(79, 142, 247, 0.1);
    --accent-green: #1aad0a;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    cursor: none;
}

a { color: inherit; text-decoration: none; cursor: none; }
button { cursor: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

::selection {
    background: var(--accent-violet);
    color: #fff;
}

/* ─── SCROLL PROGRESS BAR ─── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-violet), var(--accent-green));
    z-index: 10000;
    transition: width 0.1s linear;
}

/* ─── MAGNETIC CURSOR ─── */
.mag-cursor {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
}

.mag-cursor-dot {
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    transition: width 0.2s var(--ease-spring), height 0.2s var(--ease-spring);
}

.mag-cursor-ring {
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    transition: width 0.35s var(--ease-spring), height 0.35s var(--ease-spring), border-color 0.3s;
}

.mag-cursor.hovering .mag-cursor-ring {
    width: 60px;
    height: 60px;
    border-color: var(--accent-blue);
}
.mag-cursor.hovering .mag-cursor-dot {
    width: 10px;
    height: 10px;
}

/* ─── NEURAL CANVAS ─── */
#neuralCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Blueprint grid overlay for light mode */
[data-theme="light"] #neuralCanvas {
    opacity: 0.15;
}
[data-theme="light"] body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(79,142,247,0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79,142,247,0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    pointer-events: none;
}

/* ─── NAVBAR ─── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 clamp(20px, 4vw, 48px);
    height: 72px;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(5, 5, 16, 0.6);
    border-bottom: 1px solid var(--glass-border);
    transition: background 0.3s, box-shadow 0.3s;
}

[data-theme="light"] .navbar {
    background: rgba(240, 244, 255, 0.8);
}

.navbar.scrolled {
    box-shadow: var(--glass-shadow);
}

.nav-logo {
    display: none !important;
}

.logo-glyph {
    color: var(--accent-blue);
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    transition: color 0.25s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-blue);
    transition: width 0.3s var(--ease-out);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after, .nav-link:hover::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    position: absolute;
    right: clamp(20px, 4vw, 48px);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 4px;
    width: 56px;
    height: 28px;
    position: relative;
}

.toggle-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    position: relative;
    padding: 0 4px;
}

.toggle-icon {
    font-size: 13px;
    z-index: 1;
    transition: opacity 0.3s;
}

.toggle-thumb {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--accent-blue);
    border-radius: 50%;
    top: 50%;
    left: 4px;
    transform: translateY(-50%);
    transition: left 0.3s var(--ease-spring);
}

[data-theme="light"] .toggle-thumb {
    left: calc(100% - 24px);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: transform 0.3s, opacity 0.3s;
    display: block;
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ─── SECTION COMMON ─── */
.section {
    padding: var(--section-pad) clamp(20px, 5vw, 60px);
    max-width: var(--container);
    margin: 0 auto;
    position: relative;
}

.section-header {
    margin-bottom: 56px;
    text-align: center;
}

.section-tag {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-blue);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 10px;
}

.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 40px;
    position: relative;
    padding: 100px clamp(20px, 5vw, 60px) 60px;
    overflow: hidden;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    position: relative;
    z-index: 20;
    max-width: 600px;
}

.hero-label {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--accent-cyan);
    margin-bottom: 12px;
    overflow: hidden;
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 10vw, 7rem);
    font-weight: 900;
    line-height: 0.95;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.name-line {
    display: block;
    -webkit-text-stroke: 2px var(--text-primary);
    -webkit-text-fill-color: transparent;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-violet), var(--accent-green));
    -webkit-background-clip: text;
    background-clip: text;
    background-size: 200% 100%;
    animation: gradientShift 4s ease infinite;
    transition: -webkit-text-fill-color 0.4s;
    position: relative;
}

.name-line:hover {
    -webkit-text-fill-color: transparent;
    background-size: 100% 100%;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-tagline {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    margin-bottom: 20px;
    display: flex;
    align-items: baseline;
}

.tagline-prefix {
    color: var(--text-secondary);
}

.typewriter {
    font-weight: 600;
    color: var(--accent-blue);
}

.typewriter[data-role="fullstack"] { color: var(--accent-blue); }
.typewriter[data-role="data"] { color: var(--accent-violet); }
.typewriter[data-role="ml"] { color: var(--accent-green); }

.typewriter-cursor {
    animation: blink 1s step-end infinite;
    color: var(--accent-blue);
    font-weight: 300;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 500px;
    margin-bottom: 32px;
    line-height: 1.8;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
    border-radius: 4px;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
    background: rgba(79, 142, 247, 0.05);
    transition: background 0.3s, color 0.3s, transform 0.3s var(--ease-spring);
    position: relative;
    overflow: hidden;
}

.cta-btn:hover {
    background: var(--accent-blue);
    color: #050510;
    transform: translateY(-2px);
}

/* Hero Visual — Avatar */
.hero-visual {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: clamp(320px, 38vw, 520px);
    height: clamp(400px, 48vw, 650px);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hero-avatar-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(ellipse at 35% 50%, rgba(79, 142, 247, 0.25) 0%, transparent 55%),
                radial-gradient(ellipse at 65% 50%, rgba(168, 85, 247, 0.25) 0%, transparent 55%);
    filter: blur(40px);
    pointer-events: none;
    z-index: -1;
    transition: filter 0.4s, opacity 0.4s;
}

.hero-visual:hover .hero-avatar-glow {
    filter: blur(35px);
    background: radial-gradient(ellipse at 35% 50%, rgba(79, 142, 247, 0.35) 0%, transparent 55%),
                radial-gradient(ellipse at 65% 50%, rgba(168, 85, 247, 0.35) 0%, transparent 55%);
}

.hero-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    will-change: transform;
    animation: heroFloat 6s ease-in-out infinite, heroSlideIn 1.2s var(--ease-out) both;
    filter: drop-shadow(0 10px 40px rgba(79, 142, 247, 0.15));
    position: relative;
    z-index: 1;
    transition: filter 0.4s;
}

.hero-avatar-img:hover {
    filter: drop-shadow(0 10px 50px rgba(79, 142, 247, 0.3))
           drop-shadow(0 0 30px rgba(168, 85, 247, 0.2));
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-18px); }
}

@keyframes heroSlideIn {
    from {
        opacity: 0;
        transform: translateX(80px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Stat Pills */
.stat-pills {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

.stat-pill {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    animation: pillFloat 6s ease-in-out infinite;
}

.pill-1 { top: 22%; right: 8%; animation-delay: 0s; }
.pill-2 { top: 55%; right: 3%; animation-delay: -2s; }
.pill-3 { top: 75%; right: 15%; animation-delay: -4s; }

@keyframes pillFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

.pill-value {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pill-label {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

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

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

/* ═══════════════════════════════════════════════════
   ABOUT SECTION
   ═══════════════════════════════════════════════════ */
.about-split {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
}

.about-left {
    display: flex;
    justify-content: center;
}

.about-avatar-wrapper {
    position: relative;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 4/5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s var(--ease-out);
}

.about-avatar-wrapper.scale-up {
    transform: scale(1.05);
}

.neural-overlay {
    position: absolute;
    inset: -10%;
    width: 120%;
    height: 120%;
    z-index: 0;
    opacity: 0.6;
    pointer-events: none;
    animation: neuralPulse 4s ease-in-out infinite;
}

@keyframes neuralPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

.about-particles-canvas {
    position: absolute;
    inset: -15%;
    width: 130%;
    height: 130%;
    z-index: 1;
    pointer-events: none;
}

.about-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
    will-change: transform;
    filter: drop-shadow(0 8px 30px rgba(79, 142, 247, 0.12));
    transition: filter 0.4s;
}

.about-avatar-wrapper:hover .about-avatar-img {
    filter: drop-shadow(0 8px 40px rgba(79, 142, 247, 0.25))
           drop-shadow(0 0 20px rgba(168, 85, 247, 0.15));
}

.about-gauges {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
}

.gauge {
    position: relative;
    width: 110px;
    height: 110px;
}

.gauge svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.gauge-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 6;
}

.gauge-fill {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 326.7;
    stroke-dashoffset: 326.7;
    transition: stroke-dashoffset 1.5s var(--ease-out);
}

.gauge-fill[data-color="blue"] { stroke: var(--accent-blue); filter: drop-shadow(0 0 6px var(--accent-blue)); }
.gauge-fill[data-color="violet"] { stroke: var(--accent-violet); filter: drop-shadow(0 0 6px var(--accent-violet)); }
.gauge-fill[data-color="green"] { stroke: var(--accent-green); filter: drop-shadow(0 0 6px var(--accent-green)); }

.gauge-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.gauge-value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
}

.gauge-label {
    display: block;
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.about-bio p {
    color: var(--text-secondary);
    margin-bottom: 14px;
    font-size: 0.95rem;
}

.about-bio strong {
    color: var(--text-primary);
}

.about-highlight {
    color: var(--accent-blue) !important;
    font-weight: 500;
    font-style: italic;
    padding-left: 16px;
    border-left: 3px solid var(--accent-blue);
}

/* Timeline Strip */
.timeline-strip {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 40px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.timeline-strip::-webkit-scrollbar { display: none; }

.timeline-line {
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), var(--accent-violet), var(--accent-green), transparent);
    z-index: 0;
}

.timeline-node {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 160px;
    flex: 1;
}

.node-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-blue);
    border: 3px solid var(--bg-base);
    box-shadow: 0 0 12px var(--accent-blue);
    margin-bottom: 16px;
    transition: transform 0.3s var(--ease-spring);
}

.timeline-node:hover .node-dot {
    transform: scale(1.5);
}

.timeline-node:nth-child(3) .node-dot { background: var(--accent-violet); box-shadow: 0 0 12px var(--accent-violet); }
.timeline-node:nth-child(4) .node-dot { background: var(--accent-green); box-shadow: 0 0 12px var(--accent-green); }
.timeline-node:nth-child(5) .node-dot { background: var(--accent-cyan); box-shadow: 0 0 12px var(--accent-cyan); }

.node-content {
    text-align: center;
}

.node-title {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.node-sub {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ═══════════════════════════════════════════════════
   PROJECTS SECTION
   ═══════════════════════════════════════════════════ */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 8px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    border-radius: 4px;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
    transition: all 0.3s;
}

.filter-btn:hover, .filter-btn.active {
    background: rgba(79, 142, 247, 0.15);
    color: var(--accent-blue);
    border-color: rgba(79, 142, 247, 0.3);
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    transition: all 0.5s var(--ease-out);
}

.project-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    padding: 28px;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
    transition: transform 0.4s var(--ease-spring), box-shadow 0.4s;
    opacity: 0;
    transform: translateY(30px);
}

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

.card-border-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border-gradient);
}

.card-large {
    grid-column: span 2;
}

.card-small .card-desc {
    display: none;
}

.card-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 142, 247, 0.08), transparent 70%);
    pointer-events: none;
    top: var(--mouse-y, -150px);
    left: var(--mouse-x, -150px);
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    opacity: 0;
}

.project-card:hover .card-glow {
    opacity: 1;
}

.project-card:hover {
    box-shadow: 0 20px 60px rgba(79, 142, 247, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.card-icon {
    font-size: 2rem;
}

.card-links {
    display: flex;
    gap: 8px;
}

.card-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    color: var(--text-secondary);
    transition: color 0.3s, border-color 0.3s, background 0.3s;
}

.card-link:hover {
    color: var(--accent-blue);
    border-color: var(--accent-blue);
    background: rgba(79, 142, 247, 0.1);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card-tagline {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 8px;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* Impact Meter */
.impact-meter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.impact-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    min-width: 42px;
}

.impact-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.impact-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
    border-radius: 2px;
    transition: width 1.5s var(--ease-out);
}

.project-card.visible .impact-fill {
    width: var(--fill);
}

/* Tags */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    font-size: 0.68rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 3px;
    background: rgba(79, 142, 247, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(79, 142, 247, 0.15);
}

.tag-ml {
    background: rgba(57, 255, 20, 0.08);
    color: var(--accent-green);
    border-color: rgba(57, 255, 20, 0.15);
}

.tag-data {
    background: rgba(168, 85, 247, 0.1);
    color: var(--accent-violet);
    border-color: rgba(168, 85, 247, 0.15);
}

.tag-fs {
    background: rgba(79, 142, 247, 0.1);
    color: var(--accent-blue);
    border-color: rgba(79, 142, 247, 0.15);
}

.project-card.hidden-card {
    display: none;
}

/* ═══════════════════════════════════════════════════
   SKILLS — SOLAR SYSTEM
   ═══════════════════════════════════════════════════ */
.solar-system {
    position: relative;
    width: min(600px, 80vw);
    height: min(600px, 80vw);
    margin: 0 auto;
}

.skills-avatar-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 65%;
    height: 80%;
    object-fit: contain;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
    filter: blur(1px);
    transition: opacity 0.4s;
}

.solar-system:hover .skills-avatar-bg {
    opacity: 0.2;
}

.solar-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-violet));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(79, 142, 247, 0.4);
    z-index: 10;
}

.solar-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.4rem;
    color: #fff;
}

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

.orbit-inner {
    width: 55%;
    height: 55%;
    transform: translate(-50%, -50%);
    animation: orbitSpin 20s linear infinite;
}

.orbit-mid {
    width: 72%;
    height: 72%;
    transform: translate(-50%, -50%);
    animation: orbitSpin 35s linear infinite;
}

.orbit-outer {
    width: 88%;
    height: 88%;
    transform: translate(-50%, -50%);
    animation: orbitSpin 50s linear infinite;
}

.orbit-tools {
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    animation: orbitSpin 40s linear infinite reverse;
}

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

/* Pause orbit on hover so planets are hoverable */
.orbit-ring:hover {
    animation-play-state: paused;
}
.orbit-ring:hover .planet-icon {
    animation-play-state: paused;
}

.orbit-planet {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: transform 0.3s var(--ease-spring);
    pointer-events: auto;
}

.orbit-planet::before {
    content: attr(data-label);
    position: absolute;
    bottom: -22px;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
}

.orbit-planet:hover::before {
    opacity: 1;
}

.planet-fs {
    background: linear-gradient(135deg, var(--accent-blue), #6366f1);
    box-shadow: 0 0 16px rgba(79, 142, 247, 0.5);
}

.planet-data {
    background: linear-gradient(135deg, var(--accent-violet), #d946ef);
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.5);
}

.planet-ml {
    background: linear-gradient(135deg, var(--accent-green), #22d3ee);
    box-shadow: 0 0 16px rgba(57, 255, 20, 0.5);
}

.planet-tools {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.5);
}

.planet-icon {
    font-size: 1.2rem;
    animation: counterSpin 20s linear infinite;
}

.orbit-mid .planet-icon { animation-duration: 35s; }
.orbit-outer .planet-icon { animation-duration: 50s; }
.orbit-tools .planet-icon { animation-duration: 40s; animation-direction: reverse; }

@keyframes counterSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

/* Planet Chips Tooltip */
.planet-chips {
    position: absolute;
    top: 52px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 12px;
    background: rgba(10, 10, 30, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    min-width: 180px;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateX(-50%) translateY(-8px);
    z-index: 100;
}

.orbit-planet:hover .planet-chips {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1.05);
}

.chip {
    font-size: 0.65rem;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 3px;
    white-space: nowrap;
}

.chip-fs { background: rgba(79, 142, 247, 0.15); color: var(--accent-blue); }
.chip-data { background: rgba(168, 85, 247, 0.15); color: var(--accent-violet); }
.chip-ml { background: rgba(57, 255, 20, 0.12); color: var(--accent-green); }
.chip-tools { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

/* Mobile Skills fallback */
.skills-mobile { display: none; }

.skill-group {
    margin-bottom: 28px;
}

.group-label {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.group-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--c);
    box-shadow: 0 0 8px var(--c);
}

.group-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ═══════════════════════════════════════════════════
   ACHIEVEMENTS — EDITORIAL
   ═══════════════════════════════════════════════════ */
.achievements-avatar-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    max-width: 500px;
    height: auto;
    object-fit: contain;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
    filter: blur(0.5px) grayscale(0.2);
    transition: opacity 0.4s;
}

.achievements:hover .achievements-avatar-bg {
    opacity: 0.14;
}

.editorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2px;
    position: relative;
    z-index: 1;
}

.editorial-item {
    padding: 40px 32px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
    transition: transform 0.3s var(--ease-spring), background 0.3s;
    position: relative;
    overflow: hidden;
}

.editorial-item:hover {
    transform: translateY(-4px);
    background: rgba(15, 15, 45, 0.65);
}

.editorial-number {
    font-family: var(--font-mono);
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.04);
    position: absolute;
    top: 8px;
    right: 16px;
    line-height: 1;
}

.editorial-headline {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.hl-accent {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-accent="green"] .hl-accent {
    background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-accent="violet"] .hl-accent {
    background: linear-gradient(90deg, var(--accent-violet), #d946ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.editorial-org {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.03em;
}

.editorial-org a {
    color: var(--accent-blue);
    transition: color 0.3s;
}

.editorial-org a:hover {
    color: var(--accent-violet);
}

.editorial-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════
   CONTACT — CONVERSATIONAL
   ═══════════════════════════════════════════════════ */
.contact .section-header {
    margin-bottom: 48px;
}

.contact-headline {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.outline-text {
    display: block;
    -webkit-text-stroke: 2px var(--text-primary);
    -webkit-text-fill-color: transparent;
    transition: -webkit-text-fill-color 0.4s;
}

.outline-text:hover {
    -webkit-text-fill-color: var(--accent-blue);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 40px;
}

/* Chat Form */
.chat-form {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 420px;
}

.chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: none;
}

.chat-messages::-webkit-scrollbar { display: none; }

.chat-bubble {
    max-width: 85%;
    padding: 12px 18px;
    border-radius: 16px;
    font-size: 0.88rem;
    line-height: 1.5;
    animation: bubbleIn 0.3s var(--ease-spring);
}

@keyframes bubbleIn {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-bubble.bot {
    background: rgba(79, 142, 247, 0.12);
    border: 1px solid rgba(79, 142, 247, 0.15);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    color: var(--text-primary);
}

.chat-bubble.user {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-violet));
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    color: #fff;
}

.chat-input-wrap {
    display: flex;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid var(--glass-border);
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 10px 16px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.3s;
}

.chat-input:focus {
    border-color: var(--accent-blue);
}

.chat-send {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--accent-blue);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.2s;
}

.chat-send:hover {
    background: var(--accent-violet);
    transform: scale(1.05);
}

/* Contact Avatar */
.contact-avatar-wrap {
    position: relative;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    will-change: transform;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out), filter 0.4s;
    filter: drop-shadow(0 8px 30px rgba(79, 142, 247, 0.1));
}

.contact-avatar-wrap.revealed .contact-avatar-img {
    opacity: 1;
    transform: translateY(0);
}

.contact-avatar-wrap:hover .contact-avatar-img {
    filter: drop-shadow(0 8px 40px rgba(79, 142, 247, 0.25))
           drop-shadow(0 0 25px rgba(168, 85, 247, 0.15));
}

.contact-avatar-glow {
    position: absolute;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 142, 247, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    transition: background 0.4s;
}

.contact-avatar-wrap:hover .contact-avatar-glow {
    background: radial-gradient(circle, rgba(79, 142, 247, 0.15) 0%, transparent 70%);
}

.globe-pin {
    position: absolute;
    top: 45%;
    left: 55%;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pin-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 16px var(--accent-green);
    animation: pinPulse 2s ease infinite;
}

@keyframes pinPulse {
    0%, 100% { box-shadow: 0 0 8px var(--accent-green); }
    50% { box-shadow: 0 0 24px var(--accent-green), 0 0 48px rgba(57, 255, 20, 0.3); }
}

.pin-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Contact Info Bar */
.contact-info-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
    padding: 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.info-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.info-link:hover {
    color: var(--accent-blue);
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    transition: all 0.3s;
}

.social-btn:hover {
    color: var(--accent-blue);
    border-color: var(--accent-blue);
    background: rgba(79, 142, 247, 0.1);
    transform: translateY(-3px);
}

/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */
.footer {
    text-align: center;
    padding: 32px;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
}

.footer strong { color: var(--text-secondary); }

/* ═══════════════════════════════════════════════════
   SECTION REVEAL ANIMATION
   ═══════════════════════════════════════════════════ */
.section-header,
.about-split,
.about-left,
.about-right,
.timeline-strip,
.filter-bar,
.editorial-item,
.contact-wrapper,
.contact-info-bar {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.section-header.revealed,
.about-split.revealed,
.about-left.revealed,
.about-right.revealed,
.timeline-strip.revealed,
.filter-bar.revealed,
.editorial-item.revealed,
.contact-wrapper.revealed,
.contact-info-bar.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════
   PREFERS-REDUCED-MOTION
   ═══════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .project-card { opacity: 1; transform: none; }
    .stat-pill { animation: none; }
    .orbit-ring { animation: none; }
    .planet-icon { animation: none; }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .hero {
        display: flex;
        flex-direction: column;
        text-align: center;
        padding-top: 140px;
    }
    .hero-content { 
        max-width: 100%; 
        display: flex; 
        flex-direction: column; 
        align-items: center; 
    }
    .hero-name {
        align-items: center;
    }
    .hero-tagline {
        justify-content: center;
        flex-wrap: wrap;
        text-align: center;
    }
    .hero-visual {
        width: 260px;
        height: 340px;
        margin: 0 auto;
        order: -1;
    }
    .hero-desc { margin: 0 auto 32px; }
    .stat-pills { display: none; }
    .about-split {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .about-right {
        text-align: center;
    }
    .about-gauges {
        justify-content: center;
        flex-wrap: wrap;
    }
    .about-avatar-wrapper {
        max-width: 280px;
    }
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    .contact-avatar-wrap {
        height: 280px;
    }
    .achievements-avatar-bg {
        width: 60%;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(5, 5, 16, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s var(--ease-out), padding 0.4s;
    }
    .nav-links.open {
        max-height: 400px;
        padding: 20px 0;
    }
    .nav-links li { padding: 12px 0; }
    .hamburger { display: flex; }

    [data-theme="light"] .nav-links {
        background: rgba(240, 244, 255, 0.95);
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }
    .card-large {
        grid-column: span 1;
    }

    /* Show mobile skills, hide solar system */
    .solar-system { display: none; }
    .skills-mobile { display: block; }

    .editorial-grid {
        grid-template-columns: 1fr;
    }

    .hero-name {
        font-size: clamp(2.8rem, 12vw, 4.5rem);
    }

    body { cursor: auto; }
    .mag-cursor { display: none; }
    a, button { cursor: auto; }
}

@media (max-width: 480px) {
    .about-gauges {
        gap: 12px;
    }
    .gauge {
        width: 85px;
        height: 85px;
    }
    .gauge-value { font-size: 1rem; }
    .timeline-strip {
        gap: 8px;
    }
    .timeline-node {
        min-width: 120px;
    }
}
