


@property --border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}


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



:root,
[data-theme="dark"] {
    --bg-deep:        #06060e;
    --bg-surface:     #0c0c18;
    --bg-elevated:    #111126;
    --bg-card:        rgba(10, 10, 24, 0.88);
    --bg-card-solid:  #0e0e20;

    --border-subtle:  rgba(255, 255, 255, 0.06);
    --border-hover:   rgba(0, 212, 255, 0.35);

    --text-primary:   #ffffff;
    --text-secondary: #e2e2f0;
    --text-muted:     #a5a5c0;

    --accent-cyan:    #00d4ff;
    --accent-violet:  #7c3aed;
    --accent-amber:   #f59e0b;
    --accent-green:   #10b981;

    --gradient-main:  linear-gradient(135deg, #00d4ff, #7c3aed);
    --gradient-card:  linear-gradient(160deg, rgba(0, 212, 255, 0.06), rgba(124, 58, 237, 0.04));

    --glow-cyan:          0 0 30px rgba(0, 212, 255, 0.15);
    --glow-cyan-strong:   0 0 50px rgba(0, 212, 255, 0.25);
    --shadow-card:        0 4px 24px rgba(0, 0, 0, 0.3);

    --terminal-bg:    rgba(6, 6, 15, 0.96);
    --terminal-header: rgba(255, 255, 255, 0.03);

    --orb-opacity-1:  0.05;
    --orb-opacity-2:  0.04;
    --orb-opacity-3:  0.03;

    --noise-dot:      rgba(255, 255, 255, 0.025);
    --cursor-glow:    rgba(0, 212, 255, 0.045);

    --hero-overlay:   linear-gradient(to top, var(--bg-deep), transparent);

    color-scheme: dark;
}

[data-theme="light"] {
    --bg-deep:        #f4f4fa;
    --bg-surface:     #ffffff;
    --bg-elevated:    #eeeef6;
    --bg-card:        rgba(255, 255, 255, 0.94);
    --bg-card-solid:  #ffffff;

    --border-subtle:  rgba(0, 0, 0, 0.08);
    --border-hover:   rgba(0, 160, 210, 0.5);

    --text-primary:   #000000;
    --text-secondary: #22223b;
    --text-muted:     #4d4d68;

    --accent-cyan:    #0099cc;
    --accent-violet:  #6d28d9;
    --accent-amber:   #d97706;
    --accent-green:   #059669;

    --gradient-main:  linear-gradient(135deg, #00b8e6, #7c3aed);
    --gradient-card:  linear-gradient(160deg, rgba(0, 180, 230, 0.04), rgba(109, 40, 217, 0.03));

    --glow-cyan:          0 4px 24px rgba(0, 153, 204, 0.1);
    --glow-cyan-strong:   0 8px 40px rgba(0, 153, 204, 0.15);
    --shadow-card:        0 4px 24px rgba(0, 0, 0, 0.06);

    --terminal-bg:    rgba(255, 255, 255, 0.98);
    --terminal-header: rgba(0, 0, 0, 0.03);

    --orb-opacity-1:  0.07;
    --orb-opacity-2:  0.05;
    --orb-opacity-3:  0.04;

    --noise-dot:      rgba(0, 0, 0, 0.03);
    --cursor-glow:    rgba(0, 153, 204, 0.06);

    --hero-overlay:   linear-gradient(to top, var(--bg-deep), transparent);

    color-scheme: light;
}


body.theme-transitioning,
body.theme-transitioning *,
body.theme-transitioning *::before,
body.theme-transitioning *::after {
    transition: background-color 0.5s ease,
                color 0.5s ease,
                border-color 0.5s ease,
                box-shadow 0.5s ease,
                opacity 0.5s ease !important;
}



html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.85;
    font-weight: 500;
    letter-spacing: 0.015em;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 40px);
}

.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.accent { color: var(--accent-cyan); }

.section {
    padding: clamp(80px, 10vh, 140px) 0;
    position: relative;
    z-index: 1;
    background: radial-gradient(circle at center, rgba(6, 6, 14, 0.85) 0%, transparent 85%);
}

[data-theme="light"] .section {
    background: radial-gradient(circle at center, rgba(244, 244, 250, 0.9) 0%, transparent 85%);
}


.section + .section::before {
    content: '';
    display: block;
    height: 1px;
    max-width: 1180px;
    margin: 0 auto clamp(80px, 10vh, 140px);
    background: linear-gradient(90deg, transparent, var(--border-subtle) 20%, rgba(0, 212, 255, 0.12) 50%, var(--border-subtle) 80%, transparent);
}



.ambient-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    will-change: transform;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-cyan);
    opacity: var(--orb-opacity-1);
    top: -10%;
    right: -8%;
    animation: orbDrift1 28s ease-in-out infinite;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-violet);
    opacity: var(--orb-opacity-2);
    bottom: 5%;
    left: -6%;
    animation: orbDrift2 24s ease-in-out infinite;
}

.glow-3 {
    width: 400px;
    height: 400px;
    background: var(--accent-amber);
    opacity: var(--orb-opacity-3);
    top: 45%;
    left: 35%;
    animation: orbDrift3 32s ease-in-out infinite;
}

@keyframes orbDrift1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, 60px) scale(1.05); }
    66% { transform: translate(30px, -30px) scale(0.95); }
}

@keyframes orbDrift2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -40px) scale(1.08); }
    66% { transform: translate(-30px, 50px) scale(0.92); }
}

@keyframes orbDrift3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, 30px) scale(1.1); }
    50% { transform: translate(-50px, -20px) scale(0.9); }
    75% { transform: translate(20px, -40px) scale(1.05); }
}



.noise-overlay {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(var(--noise-dot) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 0;
}

.cursor-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--cursor-glow) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    will-change: transform;
}

.cursor-glow.active {
    opacity: 1;
}

#hero-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.vignette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(circle at center, transparent 30%, rgba(6, 6, 14, 0.4) 100%);
    transition: background 0.6s ease;
}

[data-theme="light"] .vignette-overlay {
    background: radial-gradient(circle at center, transparent 40%, rgba(244, 244, 250, 0.3) 100%);
}
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-main);
    z-index: 1001;
    transform-origin: left;
    transform: scaleX(0);
    will-change: transform;
}





.animate-on-scroll {
    opacity: 0;
    transform: translateY(36px);
    filter: blur(4px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}



#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0 20px;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(6, 6, 14, 0.82);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    box-shadow: 0 1px 0 var(--border-subtle), 0 4px 30px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] #navbar.scrolled {
    background: rgba(244, 244, 250, 0.85);
}

.nav-container {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.nav-logo:hover { color: var(--accent-cyan); }

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: color 0.3s ease, background 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(0, 212, 255, 0.05);
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
    background: rgba(0, 153, 204, 0.06);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}


.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    border-color: var(--border-hover);
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.06);
    transform: rotate(15deg);
}

.theme-toggle svg {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    position: absolute;
}

[data-theme="dark"] .icon-sun  { opacity: 1; transform: rotate(0deg) scale(1); }
[data-theme="dark"] .icon-moon { opacity: 0; transform: rotate(90deg) scale(0.5); }
[data-theme="light"] .icon-sun  { opacity: 0; transform: rotate(-90deg) scale(0.5); }
[data-theme="light"] .icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }


.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

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

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



#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 220px;
    background: var(--hero-overlay);
    pointer-events: none;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 20px;
}


.hero-anim {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
    filter: blur(6px);
    animation: heroReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: var(--delay, 0s);
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 22px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.15);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.05);
    margin-bottom: 28px;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.hero-badge:hover {
    background: rgba(0, 212, 255, 0.12);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.15);
    transform: translateY(-2px);
}

.badge-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
    animation: badgePulse 2s infinite ease-in-out;
}

.badge-icon-explore {
    animation: compassRotate 12s linear infinite;
    transform-origin: center;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(0.95); opacity: 0.6; }
    50% { transform: scale(1.25); opacity: 1; box-shadow: 0 0 12px var(--accent-cyan); }
}

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

.hero-name {
    font-size: clamp(3.5rem, 10vw, 7.5rem);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.hero-tagline {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 44px;
}

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


.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: none;
    position: relative;
}

.btn-primary {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 8px 35px rgba(0, 212, 255, 0.35);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
    border-color: var(--border-hover);
    background: rgba(0, 212, 255, 0.04);
}


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

.scroll-indicator span {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 500;
}

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

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



.section-header {
    margin-bottom: 52px;
}

.section-number {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent-cyan);
    opacity: 0.35;
    margin-bottom: 2px;
}

.section-tag {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent-cyan);
    margin-bottom: 12px;
    opacity: 0.7;
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

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



.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 1.12rem;
    font-weight: 500;
    line-height: 1.85;
}

.about-text strong { color: var(--text-primary); font-weight: 600; }
.about-text em { color: var(--accent-cyan); font-style: normal; }


.about-tagline {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 24px;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.4;
}

.bio-milestones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 28px 0;
}

.milestone-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.milestone-card:hover {
    background: rgba(0, 212, 255, 0.03);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.05);
}

.milestone-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.milestone-card:hover .milestone-icon {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--accent-cyan);
}

.milestone-details {
    display: flex;
    flex-direction: column;
}

.milestone-details strong {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.milestone-details span {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

.bio-footer-code {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    background: var(--terminal-bg);
    border-left: 3px solid var(--accent-cyan);
    border-radius: 0 8px 8px 0;
    border-top: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-top: 16px;
}

.bio-footer-code .code-keyword {
    color: var(--accent-cyan);
}

.bio-footer-code .code-string {
    color: var(--accent-amber);
}

@media (max-width: 600px) {
    .bio-milestones {
        grid-template-columns: 1fr;
    }
}


.terminal-window {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    background: var(--terminal-bg);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-card), var(--glow-cyan);
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.terminal-window:hover {
    box-shadow: var(--shadow-card), var(--glow-cyan-strong);
    border-color: var(--border-hover);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--terminal-header);
    border-bottom: 1px solid var(--border-subtle);
}

.terminal-dots { display: flex; gap: 7px; }

.terminal-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.terminal-body {
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.92rem;
    line-height: 2.0;
}


.t-line {
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.terminal-visible .t-line {
    opacity: 1;
    transform: translateX(0);
    transition-delay: var(--line-delay, 0s);
}

.terminal-line { color: var(--text-primary); }

.prompt {
    color: var(--accent-cyan);
    margin-right: 8px;
    font-weight: 500;
}

.terminal-output {
    color: var(--text-primary);
    padding-left: 18px;
    margin-bottom: 4px;
}

.cursor-blink {
    animation: blink 1s step-end infinite;
    color: var(--accent-cyan);
}

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



.project-group-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 12px;
    letter-spacing: -0.01em;
}

.project-group-title .group-icon {
    color: var(--accent-cyan);
    flex-shrink: 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.project-card {
    position: relative;
    background: var(--bg-card);
    background-image: var(--gradient-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 28px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 14px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    will-change: transform;
    transform-style: preserve-3d;
    cursor: pointer;
    overflow: hidden;
    transition: box-shadow 0.4s ease;
}


.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1.5px;
    background: conic-gradient(
        from var(--border-angle),
        transparent 25%,
        var(--accent-cyan) 48%,
        var(--accent-violet) 52%,
        transparent 75%
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: rotateBorder 3s linear infinite;
    pointer-events: none;
}


.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.04),
        transparent
    );
    pointer-events: none;
    z-index: 2;
    transition: left 0.8s ease;
}

[data-theme="light"] .project-card::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.project-card:hover {
    box-shadow: var(--glow-cyan-strong);
}

.project-card:hover::before { opacity: 1; }
.project-card:hover::after { left: 160%; }

@keyframes rotateBorder {
    to { --border-angle: 360deg; }
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 3;
}

.project-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    flex-shrink: 0;
}

.project-card-external {
    color: var(--text-muted);
    transition: color 0.35s ease, transform 0.35s ease;
}

.project-card:hover .project-card-external {
    color: var(--accent-cyan);
    transform: translate(3px, -3px);
}

.project-card-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    z-index: 3;
}

.project-card-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.75;
    font-weight: 500;
    flex-grow: 1;
    position: relative;
    z-index: 3;
}

.project-card-desc.loading {
    color: var(--text-muted);
    font-style: italic;
}

.project-card-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
    position: relative;
    z-index: 3;
    flex-wrap: wrap;
}

.project-lang-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: 8px;
}



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

.learning-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 32px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
    position: relative;
    overflow: hidden;
}


.learning-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    pointer-events: none;
    transition: left 0.8s ease;
}

.learning-card:hover { border-color: var(--border-hover); box-shadow: var(--glow-cyan); }
.learning-card:hover::after { left: 160%; }

.learning-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.learning-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tryhackme-icon {
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.12);
    color: var(--accent-cyan);
}

.coursera-icon {
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.12);
    color: var(--accent-violet);
}

.learning-card h3 { font-size: 1.2rem; font-weight: 700; }

.learning-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: var(--accent-cyan);
    text-decoration: none;
    margin-bottom: 20px;
    transition: opacity 0.3s ease;
}

.learning-profile-link:hover { opacity: 0.7; }


.thm-badge-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.22);
    padding: 12px;
    border: 1px solid var(--border-subtle);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .thm-badge-container {
    background: rgba(0, 0, 0, 0.03);
}

.thm-live-badge {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.learning-course-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.learning-items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.learning-items li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.badge-complete {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.badge-progress {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-amber);
    border: 1px solid rgba(245, 158, 11, 0.15);
}


.leetcode-icon { color: #ffa116; }


.lc-total {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 14px;
}

.lc-total-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.lc-total-label {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.lc-bar-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lc-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lc-diff {
    font-size: 0.72rem;
    font-weight: 700;
    width: 36px;
    flex-shrink: 0;
    text-transform: uppercase;
}

.lc-easy { color: #00b8a3; }
.lc-medium { color: #ffc01e; }
.lc-hard { color: #ef4743; }

.lc-bar {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

[data-theme="light"] .lc-bar {
    background: rgba(0, 0, 0, 0.06);
}

.lc-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 2px;
}

.lc-fill-easy { background: #00b8a3; }
.lc-fill-medium { background: #ffc01e; }
.lc-fill-hard { background: #ef4743; }

.lc-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 60px;
    text-align: right;
}

.lc-of {
    color: var(--text-muted);
    font-weight: 400;
}

.lc-rank {
    margin-top: 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
}



.trusthouse-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 40px;
    display: flex;
    align-items: flex-start;
    gap: 28px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.trusthouse-glow {
    position: absolute;
    top: -60%;
    right: -15%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
    pointer-events: none;
    animation: orbDrift1 20s ease-in-out infinite;
}

.trusthouse-card:hover {
    border-color: rgba(245, 158, 11, 0.25);
    box-shadow: 0 0 35px rgba(245, 158, 11, 0.1);
}

.trusthouse-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-amber);
    flex-shrink: 0;
}

.trusthouse-description {
    font-size: 1.18rem;
    color: var(--text-secondary);
    line-height: 1.85;
    font-weight: 500;
    margin-bottom: 20px;
}

.trusthouse-description strong { color: var(--text-primary); }
.trusthouse-description em { color: var(--accent-amber); font-style: normal; }

.trusthouse-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tech-tag {
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    background: rgba(245, 158, 11, 0.06);
    color: var(--accent-amber);
    border: 1px solid rgba(245, 158, 11, 0.1);
}

.trusthouse-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--accent-amber);
    font-weight: 500;
    margin-top: 20px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.trusthouse-link:hover {
    color: var(--text-primary);
}

.trusthouse-link svg {
    transition: transform 0.3s ease;
}

.trusthouse-card:hover .trusthouse-link svg {
    transform: translate(2px, -2px);
}


.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.cert-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 32px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cert-preview-container {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.2);
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.cert-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.cert-card:hover .cert-img {
    transform: scale(1.03);
}

.cert-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    pointer-events: none;
    transition: left 0.8s ease;
}

.cert-card:hover {
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.15), var(--shadow-card);
}

.cert-card:hover::after {
    left: 160%;
}

.cert-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.cert-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-badge {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.cert-issuer {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #ef4444;
    text-transform: uppercase;
    display: block;
    margin-bottom: 6px;
}

.cert-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 8px;
    line-height: 1.35;
}

.cert-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.cert-description {
    font-size: 0.95rem;
    color: var(--text-body);
    line-height: 1.6;
    margin-bottom: 24px;
}

.cert-footer {
    margin-top: auto;
}

.cert-verify-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-heading);
    padding: 10px 18px;
    border-radius: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    transition: all 0.25s ease;
    text-decoration: none;
}

.cert-verify-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ffffff;
    transform: translateY(-2px);
}



#contact { padding-bottom: 0; }

.social-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 80px;
}

.social-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 24px 36px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-secondary);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.social-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
    pointer-events: none;
    transition: left 0.8s ease;
}

.social-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-card-arrow {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-muted);
    opacity: 0;
    transform: translate(-4px, 4px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-label {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 4px;
}

.social-handle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: color 0.35s ease;
}


.social-card:hover {
    transform: translateY(-8px);
    color: var(--text-primary);
}

.social-card:hover::after {
    left: 160%;
}

.social-card:hover .social-card-arrow {
    opacity: 1;
    transform: translate(0, 0);
    color: var(--text-primary);
}

.social-card:hover .social-handle {
    color: var(--text-secondary);
}


#social-github:hover {
    border-color: rgba(0, 212, 255, 0.35);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.12);
}
#social-github:hover .social-icon-wrapper {
    background: rgba(0, 212, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.3);
    color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

#social-x:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.06);
}
#social-x:hover .social-icon-wrapper {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}
[data-theme="light"] #social-x:hover .social-icon-wrapper {
    color: #1a1a2e;
}

#social-linkedin:hover {
    border-color: rgba(0, 119, 181, 0.4);
    box-shadow: 0 10px 30px rgba(0, 119, 181, 0.12);
}
#social-linkedin:hover .social-icon-wrapper {
    background: rgba(0, 119, 181, 0.12);
    border-color: rgba(0, 119, 181, 0.3);
    color: #0077b5;
    box-shadow: 0 0 20px rgba(0, 119, 181, 0.25);
}

.footer-bottom {
    text-align: center;
    padding: 28px 0;
    border-top: 1px solid var(--border-subtle);
}

.footer-bottom p { font-size: 0.82rem; color: var(--text-muted); }



.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
    backdrop-filter: blur(12px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    border-color: var(--border-hover);
    color: var(--accent-cyan);
    transform: translateY(-4px);
    box-shadow: var(--glow-cyan);
}



@media (max-width: 1024px) {
    .about-grid { grid-template-columns: 1fr; gap: 36px; }
    .social-links { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .social-card { padding: 28px 16px 24px; }
    .social-icon-wrapper { width: 50px; height: 50px; }
}

@media (max-width: 768px) {
    
    .nav-toggle { display: flex; }
    .nav-container { height: 60px; }
    .nav-logo { font-size: 1.3rem; }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: min(320px, 85vw);
        height: 100vh;
        flex-direction: column;
        background: rgba(6, 6, 14, 0.96);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        padding: 80px 28px 40px;
        gap: 4px;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        border-left: 1px solid var(--border-subtle);
    }

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

    .nav-links.open { transform: translateX(0); }
    .nav-link { font-size: 1.05rem; padding: 12px 16px; }

    
    .section { padding: clamp(48px, 8vh, 80px) 0; }
    .section + .section::before { margin: 0 auto clamp(48px, 8vh, 80px); }
    .section-header { margin-bottom: 32px; }
    .section-header h2 { font-size: clamp(1.6rem, 5vw, 2.2rem); }
    .section-subtitle { font-size: 0.9rem; margin-top: 8px; }

    
    .hero-content { padding: 0 16px; }
    .hero-badge { padding: 6px 16px; font-size: 0.72rem; gap: 8px; margin-bottom: 20px; }
    .hero-name { font-size: clamp(2.8rem, 12vw, 4.5rem); margin-bottom: 12px; }
    .hero-tagline { font-size: 0.95rem; margin-bottom: 32px; }
    .hero-cta { gap: 12px; }
    .btn { padding: 12px 24px; font-size: 0.85rem; border-radius: 10px; }

    .scroll-indicator { display: none; }
    .cursor-glow { display: none; }
    .floating-shapes { display: none; }

    
    .about-text p { font-size: 1rem; line-height: 1.75; margin-bottom: 16px; }

    
    .terminal-body {
        padding: 16px;
        font-size: 0.78rem;
        line-height: 1.9;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .terminal-header { padding: 10px 14px; gap: 10px; }
    .terminal-dot { width: 9px; height: 9px; }
    .terminal-title { font-size: 0.68rem; }
    .terminal-output { padding-left: 14px; }

    
    .projects-grid { grid-template-columns: 1fr; gap: 16px; }
    .project-card { padding: 22px; gap: 12px; border-radius: 14px; }
    .project-card-title { font-size: 0.95rem; }
    .project-card-desc { font-size: 0.88rem; line-height: 1.7; }

    
    .learning-grid { grid-template-columns: 1fr; gap: 16px; }
    .learning-card { padding: 24px; border-radius: 14px; }
    .learning-card h3 { font-size: 1.08rem; }
    .learning-profile-link { font-size: 0.75rem; margin-bottom: 16px; }
    .learning-items li { font-size: 0.85rem; gap: 8px; }

    
    .trusthouse-card { flex-direction: column; padding: 24px; gap: 20px; border-radius: 14px; }
    .trusthouse-icon { width: 48px; height: 48px; border-radius: 12px; }
    .trusthouse-description { font-size: 1rem; line-height: 1.75; margin-bottom: 16px; }
    .trusthouse-link { font-size: 0.82rem; margin-top: 16px; }

    
    .social-links { grid-template-columns: 1fr; gap: 12px; margin-bottom: 48px; }
    .social-card {
        flex-direction: row;
        justify-content: flex-start;
        padding: 18px 20px;
        gap: 14px;
        border-radius: 14px;
    }
    .social-icon-wrapper { width: 44px; height: 44px; }
    .social-icon-wrapper svg { width: 20px; height: 20px; }
    .social-label { font-size: 0.95rem; margin-top: 0; }
    .social-handle { font-size: 0.75rem; }
    .social-card-arrow { top: 50%; right: 16px; transform: translateY(-50%); }
    .social-card:hover .social-card-arrow { transform: translateY(-50%) translate(2px, -2px); }

    .footer-bottom { padding: 20px 0; }
    .footer-bottom p { font-size: 0.78rem; }

    
    .back-to-top {
        bottom: 80px;
        right: 16px;
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    
    .glow-1 { width: 300px; height: 300px; }
    .glow-2 { width: 250px; height: 250px; }
    .glow-3 { width: 200px; height: 200px; }
}

@media (max-width: 480px) {
    .hero-name { font-size: clamp(2.2rem, 14vw, 3rem); }
    .hero-tagline { font-size: 0.88rem; margin-bottom: 28px; }
    .hero-cta { flex-direction: column; align-items: stretch; }
    .btn { width: 100%; justify-content: center; padding: 14px 20px; }

    .container { padding: 0 clamp(14px, 4vw, 20px); }

    .project-card { padding: 18px; }
    .project-card-title { font-size: 0.9rem; }
    .project-card-desc { font-size: 0.84rem; }

    .learning-card { padding: 20px; }
    .trusthouse-card { padding: 20px; }
    .trusthouse-description { font-size: 0.92rem; }

    .terminal-body { font-size: 0.72rem; padding: 12px; }

    .section-header h2 { font-size: 1.5rem; }

    .badge { font-size: 0.65rem; padding: 2px 8px; }
    .tech-tag { font-size: 0.72rem; padding: 4px 10px; }
}

@media (max-width: 360px) {
    .hero-name { font-size: 2rem; }
    .hero-badge { font-size: 0.65rem; padding: 5px 12px; }
    .nav-container { height: 54px; }
    .nav-logo { font-size: 1.2rem; }
    .container { padding: 0 12px; }
    .terminal-body { font-size: 0.68rem; }
}




::selection {
    background: rgba(0, 212, 255, 0.25);
    color: #fff;
}

[data-theme="light"] ::selection {
    background: rgba(0, 153, 204, 0.2);
    color: #1a1a2e;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.14); }

[data-theme="light"]::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.1); }
[data-theme="light"]::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.18); }



.physics-dock {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 14px 10px;
    border-radius: 20px;
    background: rgba(10, 10, 24, 0.92);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 212, 255, 0.06);
    z-index: 998;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    animation: dockSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 1.5s;
}

@keyframes dockSlideIn {
    from { opacity: 0; transform: translateY(-50%) translateX(30px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

[data-theme="light"] .physics-dock {
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 0 20px rgba(0, 153, 204, 0.06);
}

.dock-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.dock-btn-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.dock-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.dock-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .dock-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}


.dock-btn.active {
    color: #fff;
    border-color: transparent;
}

#btn-gravity.active {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.25), rgba(0, 212, 255, 0.1));
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2), inset 0 0 12px rgba(0, 212, 255, 0.08);
    color: var(--accent-cyan);
}

#btn-vacuum.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(124, 58, 237, 0.1));
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.2), inset 0 0 12px rgba(124, 58, 237, 0.08);
    color: var(--accent-violet);
}

#btn-blackhole.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(245, 158, 11, 0.1));
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2), inset 0 0 12px rgba(245, 158, 11, 0.08);
    color: var(--accent-amber);
}

#btn-explode.active {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(239, 68, 68, 0.1));
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.25), inset 0 0 12px rgba(239, 68, 68, 0.08);
    color: #ef4444;
}


.dock-btn-reset {
    margin-top: 4px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 10px;
    border-radius: 12px;
    color: var(--text-muted);
}

.dock-btn-reset:hover {
    color: var(--accent-amber);
    background: rgba(245, 158, 11, 0.08);
}


#black-hole-vortex {
    position: fixed;
    top: 0;
    left: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, #000 40%, rgba(0, 0, 0, 0.8) 60%, transparent 70%);
    box-shadow:
        0 0 30px 10px rgba(124, 58, 237, 0.6),
        0 0 60px 25px rgba(0, 212, 255, 0.3),
        0 0 100px 50px rgba(124, 58, 237, 0.15),
        inset 0 0 30px rgba(0, 0, 0, 1);
    pointer-events: none;
    z-index: 997;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}

#black-hole-vortex.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    animation: vortexPulse 2s ease-in-out infinite;
}


#black-hole-vortex::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(124, 58, 237, 0.4),
        rgba(0, 212, 255, 0.5),
        transparent,
        rgba(245, 158, 11, 0.3),
        rgba(124, 58, 237, 0.4),
        transparent
    );
    -webkit-mask: radial-gradient(circle, transparent 35%, #000 38%, #000 48%, transparent 51%);
    mask: radial-gradient(circle, transparent 35%, #000 38%, #000 48%, transparent 51%);
    animation: vortexSpin 2s linear infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#black-hole-vortex.active::before {
    opacity: 1;
}


#black-hole-vortex::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        circle,
        transparent 30%,
        rgba(124, 58, 237, 0.08) 50%,
        rgba(0, 212, 255, 0.05) 70%,
        transparent 80%
    );
    animation: vortexSpin 6s linear infinite reverse;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#black-hole-vortex.active::after {
    opacity: 1;
}

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

@keyframes vortexPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.08); }
}


@keyframes screenShake {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-3px, 2px); }
    20% { transform: translate(4px, -2px); }
    30% { transform: translate(-2px, 3px); }
    40% { transform: translate(3px, -1px); }
    50% { transform: translate(-1px, 2px); }
    60% { transform: translate(2px, -2px); }
    70% { transform: translate(-3px, 1px); }
    80% { transform: translate(1px, -1px); }
    90% { transform: translate(-1px, 1px); }
}

body.phy-shake {
    animation: screenShake 0.4s ease-out;
}


.phy-particle {
    
}

.phy-active .phy-particle {
    display: inline-block !important;
    will-change: transform, opacity;
    transition: none !important;
}

.phy-particle.resetting {
    display: inline-block !important;
    will-change: transform, opacity;
    transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.5s ease,
                filter 0.5s ease !important;
}

.phy-word {
    display: inline;
    white-space: nowrap;
}

.phy-active .phy-word,
.phy-resetting .phy-word {
    display: inline-block;
}

.phy-cloned-wrapper {
    display: inline;
}

.phy-active .phy-cloned-wrapper,
.phy-resetting .phy-cloned-wrapper {
    display: inline-block;
}

.phy-space {
    display: inline;
}

.phy-active .phy-space,
.phy-resetting .phy-space {
    display: inline-block;
}


.phy-active .gradient-text .phy-particle,
.gradient-text .phy-particle.resetting {
    background: var(--gradient-main) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}


@media (max-width: 768px) {
    
    html.phy-active,
    html.phy-active body {
        overflow: hidden !important;
        height: 100%;
    }

    .physics-dock {
        width: calc(100% - 32px);
        left: 16px;
        right: auto;
        bottom: 16px;
        top: auto;
        transform: none;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        padding: 8px 6px;
        border-radius: 16px;
        gap: 4px;
        animation: dockSlideInMobile 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
        animation-delay: 1.5s;
        z-index: 9999;
    }

    @keyframes dockSlideInMobile {
        from { opacity: 0; transform: translateY(20px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .dock-btn-label { display: none; }

    .dock-btn {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        padding: 0;
        justify-content: center;
        gap: 0;
    }

    .dock-icon {
        width: 18px;
        height: 18px;
    }

    .dock-btn-reset {
        margin-top: 0;
        border-top: none;
        padding-top: 0;
        width: auto;
        height: auto;
        padding: 8px 14px;
        border-radius: 12px;
    }

    .dock-btn-reset .dock-btn-label {
        display: inline;
        font-size: 0.7rem;
    }

    
    #black-hole-vortex::before {
        width: 100px;
        height: 100px;
    }

    #black-hole-vortex::after {
        width: 140px;
        height: 140px;
    }

    #black-hole-vortex {
        width: 50px;
        height: 50px;
    }
}
