/* ============================================================
   KRISHAN KUMAR AWASTHI — PORTFOLIO DESIGN SYSTEM
   Dark Cyberpunk Theme with Glassmorphism & Neon Accents
   ============================================================ */

/* ---- CSS Custom Properties ---- */
:root {
    /* Dark palette */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a2e;
    --bg-card: rgba(22, 22, 40, 0.65);

    /* Accent palette */
    --accent-primary: #00f0ff;
    --accent-secondary: #7b2ff7;
    --accent-tertiary: #ff2daa;
    --accent-gradient: linear-gradient(135deg, #00f0ff 0%, #7b2ff7 50%, #ff2daa 100%);
    --accent-gradient-hover: linear-gradient(135deg, #ff2daa 0%, #7b2ff7 50%, #00f0ff 100%);

    /* Text */
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0b8;
    --text-muted: #6a6a80;

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    /* Spacing */
    --section-padding: 120px 0;
    --container-width: 1200px;
    --gap: 2rem;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

    /* Font */
    --font-main: 'Outfit', sans-serif;
    --font-code: 'Fira Code', monospace;
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    cursor: none;
}

::selection {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

a {
    text-decoration: none;
    color: var(--accent-primary);
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    display: block;
}

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-gradient);
    border-radius: 10px;
}

/* ---- Custom Cursor ---- */
.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10001;
    transition: width 0.2s, height 0.2s, background 0.2s;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px var(--accent-primary);
}

.cursor-ring {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(0, 240, 255, 0.4);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10000;
    transition: width 0.3s, height 0.3s, border-color 0.3s;
    transform: translate(-50%, -50%);
}

.cursor-dot.hover {
    width: 16px;
    height: 16px;
    background: var(--accent-tertiary);
    box-shadow: 0 0 20px var(--accent-tertiary);
}

.cursor-ring.hover {
    width: 60px;
    height: 60px;
    border-color: rgba(255, 45, 170, 0.4);
}

/* ---- Preloader ---- */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    transition: opacity 0.6s, visibility 0.6s;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-inner {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
}

.preloader-ring:nth-child(1) {
    border-top-color: var(--accent-primary);
    animation: preloaderSpin 1.2s linear infinite;
}

.preloader-ring:nth-child(2) {
    inset: 8px;
    border-right-color: var(--accent-secondary);
    animation: preloaderSpin 1.6s linear infinite reverse;
}

.preloader-ring:nth-child(3) {
    inset: 16px;
    border-bottom-color: var(--accent-tertiary);
    animation: preloaderSpin 2s linear infinite;
}

.preloader-text {
    font-family: var(--font-code);
    font-size: 1.2rem;
    font-weight: 600;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes preloaderSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ---- Three.js Canvas ---- */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* ---- Container ---- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: none;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--bg-primary);
    border: none;
    box-shadow: 0 4px 25px rgba(0, 240, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(0, 240, 255, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
}

/* ===========================
   NAVBAR
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 1.2rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.8rem 2.5rem;
}

.nav-logo {
    font-family: var(--font-code);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-bracket {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: none;
    padding: 5px;
    z-index: 10001;
}

.hamburger-line {
    width: 28px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 10px;
    transition: var(--transition-smooth);
}

.nav-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Navbar Resume Button */
.btn-nav-resume {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    background: var(--accent-gradient);
    color: var(--bg-primary);
    font-family: var(--font-main);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: none;
    transition: var(--transition-smooth);
    white-space: nowrap;
    box-shadow: 0 2px 15px rgba(0, 240, 255, 0.2);
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.btn-nav-resume:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 25px rgba(0, 240, 255, 0.4);
    color: var(--bg-primary);
}

.btn-nav-resume i {
    font-size: 0.75rem;
}

/* About CTA Buttons */
.about-cta-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Footer Resume Button */
.btn-footer-resume {
    margin: 1.5rem 0;
    padding: 0.9rem 2.2rem;
    font-size: 1rem;
}

/* ===========================
   HERO SIDE DECORATIONS
   =========================== */

/* -- Vertical Social Bar (Left) -- */
.hero-social-bar {
    position: absolute;
    left: 2.5rem;
    bottom: 10%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    z-index: 5;
}

/* Small circular profile photo */
.hero-side-photo {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3), 0 0 30px rgba(0, 240, 255, 0.1);
    margin-bottom: 0.3rem;
    transition: var(--transition-smooth);
    animation: photo-glow 4s ease-in-out infinite alternate;
}

.hero-side-photo:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.5), 0 0 50px rgba(123, 47, 247, 0.2);
}

@keyframes photo-glow {
    0% {
        box-shadow: 0 0 15px rgba(0, 240, 255, 0.3), 0 0 30px rgba(0, 240, 255, 0.1);
    }

    100% {
        box-shadow: 0 0 20px rgba(123, 47, 247, 0.4), 0 0 40px rgba(123, 47, 247, 0.15);
    }
}

.hero-social-bar a {
    color: var(--text-muted);
    font-size: 1.15rem;
    transition: var(--transition-smooth);
    position: relative;
}

.hero-social-bar a:hover {
    color: var(--accent-primary);
    transform: translateX(3px);
    text-shadow: 0 0 12px var(--accent-primary);
}

.social-bar-line {
    width: 2px;
    height: 90px;
    background: linear-gradient(to bottom, var(--accent-primary), transparent);
    margin-top: 0.5rem;
    border-radius: 2px;
}

/* -- Floating Code Snippets (Right) -- */
.hero-code-float {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 3;
}

.code-snippet {
    font-family: var(--font-code);
    font-size: 0.72rem;
    line-height: 1.7;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    color: var(--text-muted);
    opacity: 0.6;
    max-width: 210px;
    transition: var(--transition-smooth);
    animation: float-code 6s ease-in-out infinite;
}

.code-snippet:hover {
    opacity: 1;
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.code-snippet-2 {
    animation-delay: -3s;
}

.code-keyword {
    color: #c678dd;
}

.code-var {
    color: #e06c75;
}

.code-key {
    color: #61afef;
}

.code-string {
    color: #98c379;
}

.code-bool {
    color: #d19a66;
}

@keyframes float-code {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* -- Glowing Orbs -- */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    z-index: 1;
    pointer-events: none;
}

.hero-orb-1 {
    width: 350px;
    height: 350px;
    background: var(--accent-primary);
    top: 10%;
    left: -5%;
    animation: orb-float-1 8s ease-in-out infinite;
}

.hero-orb-2 {
    width: 280px;
    height: 280px;
    background: var(--accent-secondary);
    bottom: 10%;
    right: -3%;
    animation: orb-float-2 10s ease-in-out infinite;
}

.hero-orb-3 {
    width: 200px;
    height: 200px;
    background: var(--accent-tertiary);
    top: 60%;
    left: 15%;
    animation: orb-float-3 7s ease-in-out infinite;
}

@keyframes orb-float-1 {

    0%,
    100% {
        transform: translate(0, 0);
        opacity: 0.15;
    }

    50% {
        transform: translate(30px, -20px);
        opacity: 0.25;
    }
}

@keyframes orb-float-2 {

    0%,
    100% {
        transform: translate(0, 0);
        opacity: 0.12;
    }

    50% {
        transform: translate(-25px, 15px);
        opacity: 0.22;
    }
}

@keyframes orb-float-3 {

    0%,
    100% {
        transform: translate(0, 0);
        opacity: 0.1;
    }

    50% {
        transform: translate(15px, -25px);
        opacity: 0.18;
    }
}

/* Light mode orb adjustments */
body.light-mode .hero-orb {
    opacity: 0.08;
    filter: blur(100px);
}

body.light-mode .code-snippet {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .social-bar-line {
    background: linear-gradient(to bottom, var(--accent-primary), transparent);
}

/* ===========================
   HERO SECTION
   =========================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 2rem 60px;
    position: relative;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

/* Mobile-only profile photo (hidden on desktop) */
.hero-mobile-photo {
    display: none;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 3px solid var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.35), 0 0 40px rgba(123, 47, 247, 0.15);
    margin-bottom: 1.2rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--accent-primary);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.5);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(0, 255, 136, 0);
    }
}

.hero-name {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.greeting {
    display: block;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.name-main {
    display: block;
    background: linear-gradient(135deg, #fff 0%, #c0c0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.name-accent {
    display: block;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-typed-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    margin-bottom: 1.5rem;
    min-height: 2.5rem;
}

.typed-prefix {
    color: var(--text-secondary);
    font-weight: 400;
}

.typed-text {
    color: var(--accent-primary);
    font-weight: 600;
    font-family: var(--font-code);
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
}

.typed-cursor {
    color: var(--accent-primary) !important;
}

.hero-tagline {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.hero-tagline strong {
    color: var(--text-primary);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0.2rem;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: float-up-down 2.5s ease-in-out infinite;
}

.mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.mouse-wheel {
    width: 4px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 2s ease-in-out infinite;
}

@keyframes scroll-wheel {

    0%,
    100% {
        opacity: 1;
        top: 6px;
    }

    50% {
        opacity: 0.3;
        top: 18px;
    }
}

@keyframes float-up-down {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* ===========================
   SECTION COMMON
   =========================== */
.section {
    padding: var(--section-padding);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: var(--accent-primary);
    display: block;
    margin-bottom: 0.8rem;
    opacity: 0.7;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
}

.highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-line {
    width: 80px;
    height: 4px;
    background: var(--accent-gradient);
    margin: 1.2rem auto 0;
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 1.5rem auto 0;
}

/* ===========================
   ABOUT SECTION
   =========================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image {
    width: 280px;
    height: 280px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    z-index: 2;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.profile-placeholder {
    font-size: 5rem;
    color: var(--accent-primary);
    opacity: 0.3;
}

.about-image-border {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 24px;
    border: 2px solid transparent;
    background: var(--accent-gradient) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 3;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.about-image-decoration {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 24px;
    border: 2px dashed var(--accent-primary);
    opacity: 0.15;
    transform: translate(15px, 15px);
    z-index: 1;
}

.about-subtitle {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.about-text {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.about-text strong {
    color: var(--text-primary);
}

.about-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.info-item:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.info-item i {
    color: var(--accent-primary);
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.info-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-value {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* ===========================
   SKILLS SECTION
   =========================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 5rem;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(15px);
    transition: var(--transition-smooth);
}

.skill-category:hover {
    border-color: rgba(0, 240, 255, 0.2);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.05);
}

.skill-category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.skill-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--bg-primary);
}

.skill-category h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.skill-item {
    margin-bottom: 1.2rem;
}

.skill-item:last-child {
    margin-bottom: 0;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.skill-info span:last-child {
    color: var(--accent-primary);
    font-family: var(--font-code);
    font-size: 0.8rem;
}

.skill-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-primary);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    width: 0;
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

/* Floating Tech Orbit */
.tech-orbit {
    position: relative;
    width: 350px;
    height: 350px;
    margin: 0 auto;
}

.orbit-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-code);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bg-primary);
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.4);
    z-index: 2;
}

.orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px dashed var(--glass-border);
}

.orbit-ring-1 {
    width: 220px;
    height: 220px;
    margin-top: -110px;
    margin-left: -110px;
    animation: orbit-rotate 20s linear infinite;
}

.orbit-ring-2 {
    width: 320px;
    height: 320px;
    margin-top: -160px;
    margin-left: -160px;
    animation: orbit-rotate 30s linear infinite reverse;
}

@keyframes orbit-rotate {
    to {
        transform: rotate(360deg);
    }
}

.orbit-icon {
    position: absolute;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--accent-primary);
    top: 50%;
    left: 50%;
    transform: rotate(var(--angle)) translateX(calc(min(110px, 50%))) rotate(calc(-1 * var(--angle)));
}

.orbit-ring-1 .orbit-icon {
    transform: rotate(var(--angle)) translateX(110px) rotate(calc(-1 * var(--angle)));
    animation: counter-orbit 20s linear infinite;
}

.orbit-ring-2 .orbit-icon {
    transform: rotate(var(--angle)) translateX(160px) rotate(calc(-1 * var(--angle)));
    animation: counter-orbit 30s linear infinite reverse;
}

@keyframes counter-orbit {
    /* icon stays upright */
}

/* ===========================
   PROJECTS SECTION
   =========================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(15px);
    transition: var(--transition-smooth);
}

.project-card:hover {
    border-color: rgba(0, 240, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.project-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.project-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    color: var(--accent-primary);
    opacity: 0.5;
}

.project-img-2 {
    color: var(--accent-secondary) !important;
    background: linear-gradient(135deg, #1a1030, #0f0f20) !important;
}

.project-img-3 {
    color: var(--accent-tertiary) !important;
    background: linear-gradient(135deg, #1f0a1a, #0f0f20) !important;
}

.project-img-4 {
    color: #00ff88 !important;
    background: linear-gradient(135deg, #0a1f15, #0f0f20) !important;
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 1.1rem;
    transition: var(--transition-fast);
    transform: translateY(20px);
}

.project-card:hover .project-link {
    transform: translateY(0);
}

.project-link:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.project-info {
    padding: 1.5rem 2rem 2rem;
}

.project-category {
    font-size: 0.78rem;
    color: var(--accent-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.project-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tech span {
    font-size: 0.75rem;
    font-family: var(--font-code);
    padding: 0.3rem 0.8rem;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: 50px;
    color: var(--accent-primary);
}

/* ===========================
   EDUCATION TIMELINE
   =========================== */
.timeline {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    padding-left: 60px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--glass-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -60px;
    top: 1.5rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-marker-inner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 1rem;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
    z-index: 2;
    position: relative;
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(15px);
    transition: var(--transition-smooth);
}

.timeline-content:hover {
    border-color: rgba(0, 240, 255, 0.2);
    transform: translateX(5px);
}

.timeline-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--bg-primary);
    background: var(--accent-gradient);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.timeline-content h4 {
    font-size: 0.95rem;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 0.8rem;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

.timeline-date {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-family: var(--font-code);
}

.timeline-date i {
    margin-right: 0.3rem;
    color: var(--accent-primary);
}

/* ===========================
   CONTACT SECTION
   =========================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: start;
}

.contact-info-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(15px);
    margin-bottom: 2rem;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.contact-info-item:last-child {
    border-bottom: none;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: rgba(0, 240, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.contact-info-item h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.contact-info-item a,
.contact-info-item span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.contact-info-item a:hover {
    color: var(--accent-primary);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.social-link:hover {
    background: var(--accent-gradient);
    color: var(--bg-primary);
    border-color: transparent;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 240, 255, 0.3);
}

/* Contact Form */
.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(15px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input,
.input-wrapper textarea {
    width: 100%;
    padding: 1rem 1rem 1rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
    cursor: none;
}

.input-wrapper textarea {
    resize: vertical;
    min-height: 120px;
}

.input-wrapper label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition-fast);
    pointer-events: none;
    background: transparent;
    padding: 0 0.3rem;
}

.input-wrapper input:focus,
.input-wrapper textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1);
}

.input-wrapper input:focus+label,
.input-wrapper input:not(:placeholder-shown)+label,
.input-wrapper textarea:focus+label,
.input-wrapper textarea:not(:placeholder-shown)+label {
    top: -0.6rem;
    left: 0.8rem;
    font-size: 0.75rem;
    color: var(--accent-primary);
    background: var(--bg-card);
}

/* Ensure placeholder is invisible for the :not(:placeholder-shown) trick */
.input-wrapper input::placeholder,
.input-wrapper textarea::placeholder {
    color: transparent;
}

.input-highlight {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
    transition: width 0.4s, left 0.4s;
}

.input-wrapper input:focus~.input-highlight,
.input-wrapper textarea:focus~.input-highlight {
    width: 100%;
    left: 0;
}

.btn-submit {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    font-size: 1rem;
}

/* ===========================
   FOOTER
   =========================== */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--glass-border);
    position: relative;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    font-family: var(--font-code);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: inline-block;
    margin-bottom: 1rem;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: var(--accent-gradient);
    color: var(--bg-primary);
    border: none;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: none;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 9998;
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 240, 255, 0.5);
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-image-wrapper {
        justify-content: center;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
    }

    body {
        cursor: auto;
    }

    .cursor-dot,
    .cursor-ring {
        display: none;
    }

    .navbar {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 100px 2rem 2rem;
        gap: 0.2rem;
        transition: var(--transition-smooth);
        border-left: 1px solid var(--glass-border);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 0.8rem 1rem;
    }

    .nav-toggle {
        display: flex;
    }

    .btn-nav-resume {
        display: none;
    }

    .hero {
        padding: 80px 1.5rem 40px;
    }

    .hero-name {
        font-size: 2.2rem;
    }

    .hero-stats {
        gap: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .about-image {
        width: 220px;
        height: 220px;
    }

    .about-image-border,
    .about-image-decoration {
        width: 220px;
        height: 220px;
    }

    .about-info-grid {
        grid-template-columns: 1fr;
    }

    .tech-orbit {
        width: 280px;
        height: 280px;
    }

    .orbit-ring-1 {
        width: 180px;
        height: 180px;
        margin-top: -90px;
        margin-left: -90px;
    }

    .orbit-ring-2 {
        width: 260px;
        height: 260px;
        margin-top: -130px;
        margin-left: -130px;
    }

    .orbit-ring-1 .orbit-icon {
        transform: rotate(var(--angle)) translateX(90px) rotate(calc(-1 * var(--angle)));
    }

    .orbit-ring-2 .orbit-icon {
        transform: rotate(var(--angle)) translateX(130px) rotate(calc(-1 * var(--angle)));
    }

    .timeline {
        padding-left: 45px;
    }

    .timeline::before {
        left: 16px;
    }

    .timeline-marker {
        left: -45px;
        width: 36px;
        height: 36px;
    }

    .timeline-marker-inner {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }

    .timeline-content {
        padding: 1.5rem;
    }

    .scroll-indicator {
        display: none;
    }

    .project-image {
        height: 180px;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.88rem;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .about-subtitle {
        font-size: 1.3rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .project-info {
        padding: 1.2rem 1.5rem 1.5rem;
    }
}

/* ===========================
   THEME TOGGLE BUTTON
   =========================== */
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: none;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
    transform: rotate(15deg);
}

.theme-toggle .fa-sun {
    position: absolute;
    font-size: 1.1rem;
    color: #fbbf24;
    opacity: 0;
    transform: rotate(-90deg) scale(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle .fa-moon {
    position: absolute;
    font-size: 1.1rem;
    color: var(--accent-primary);
    opacity: 1;
    transform: rotate(0deg) scale(1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* When light mode is active */
body.light-mode .theme-toggle .fa-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

body.light-mode .theme-toggle .fa-moon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

/* Resume Button Pulse */
.btn-resume {
    position: relative;
}

.btn-resume::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50px;
    background: var(--accent-gradient);
    z-index: -1;
    opacity: 0;
    animation: resume-pulse 3s ease-in-out infinite;
}

@keyframes resume-pulse {

    0%,
    100% {
        opacity: 0;
        transform: scale(1);
    }

    50% {
        opacity: 0.3;
        transform: scale(1.05);
    }
}

/* ===========================
   LIGHT MODE THEME
   =========================== */
body.light-mode {
    --bg-primary: #f5f5fa;
    --bg-secondary: #eeeef5;
    --bg-tertiary: #e4e4f0;
    --bg-card: rgba(255, 255, 255, 0.75);

    --accent-primary: #0077cc;
    --accent-secondary: #6a1fd0;
    --accent-tertiary: #d91d80;
    --accent-gradient: linear-gradient(135deg, #0077cc 0%, #6a1fd0 50%, #d91d80 100%);

    --text-primary: #1a1a2e;
    --text-secondary: #4a4a66;
    --text-muted: #8888a0;

    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

body.light-mode #bg-canvas {
    opacity: 0.25;
}

body.light-mode .navbar.scrolled {
    background: rgba(245, 245, 250, 0.9);
}

body.light-mode .cursor-dot {
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

body.light-mode .cursor-ring {
    border-color: rgba(0, 119, 204, 0.35);
}

body.light-mode .preloader {
    background: var(--bg-primary);
}

body.light-mode .name-main {
    background: linear-gradient(135deg, #1a1a2e 0%, #3a3a5e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-mode .typed-text {
    text-shadow: none;
}

body.light-mode .btn-primary {
    box-shadow: 0 4px 20px rgba(0, 119, 204, 0.25);
}

body.light-mode .btn-primary:hover {
    box-shadow: 0 8px 30px rgba(0, 119, 204, 0.4);
}

body.light-mode .project-image-placeholder {
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
}

body.light-mode .project-img-2 {
    background: linear-gradient(135deg, #ede0f8, #f0f0fa) !important;
}

body.light-mode .project-img-3 {
    background: linear-gradient(135deg, #f8e0ee, #f0f0fa) !important;
}

body.light-mode .project-img-4 {
    background: linear-gradient(135deg, #e0f5ec, #f0f0fa) !important;
}

body.light-mode .project-overlay {
    background: rgba(245, 245, 250, 0.9);
}

body.light-mode .skill-bar {
    background: var(--bg-tertiary);
}

body.light-mode .skill-progress {
    box-shadow: 0 0 8px rgba(0, 119, 204, 0.25);
}

body.light-mode .orbit-icon {
    background: var(--bg-card);
    border-color: var(--glass-border);
}

body.light-mode .input-wrapper input,
body.light-mode .input-wrapper textarea {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .input-wrapper input:focus+label,
body.light-mode .input-wrapper input:not(:placeholder-shown)+label,
body.light-mode .input-wrapper textarea:focus+label,
body.light-mode .input-wrapper textarea:not(:placeholder-shown)+label {
    background: var(--bg-card);
}

body.light-mode ::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

body.light-mode .social-link:hover {
    box-shadow: 0 10px 25px rgba(0, 119, 204, 0.25);
}

body.light-mode .back-to-top {
    box-shadow: 0 4px 20px rgba(0, 119, 204, 0.25);
}

/* Mobile adjustments for theme toggle */
@media (max-width: 768px) {
    .theme-toggle {
        position: fixed;
        top: 1rem;
        right: 4.5rem;
        z-index: 10002;
    }

    body.light-mode {
        cursor: auto;
    }

    body.light-mode .cursor-dot,
    body.light-mode .cursor-ring {
        display: none;
    }

    /* Hide hero side decorations on mobile */
    .hero-social-bar,
    .hero-code-float {
        display: none;
    }

    /* Show profile photo on mobile */
    .hero-mobile-photo {
        display: block;
    }

    .hero-orb-1 {
        width: 150px;
        height: 150px;
    }

    .hero-orb-2 {
        width: 120px;
        height: 120px;
    }

    .hero-orb-3 {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 1100px) {
    .hero-code-float {
        display: none;
    }
}
