/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}


/* Selection Color */
::selection {
    background: var(--primary);
    color: #000;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Saira", sans-serif;
    font-optical-sizing: auto;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Saira", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings: "wdth" 100;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    touch-action: none;
}
/* CSS variables for theming */
:root {
    --bg: #0f0f0f;
    --text: #e0e0e0;
    --muted: #a0a0a0;
    --nav-bg: rgba(15, 15, 15, 0.95);
    --nav-border: rgba(255,255,255,0.08);
    --primary: #00d4ff;
    --accent: #9d4edd;
    --gold: #ffd700;
    --card-bg-grad: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, rgba(157, 78, 221, 0.05) 100%);
    --hero-bg-start: #0f0f0f;
    --hero-bg-mid1: #1a1a2e;
    --hero-bg-mid2: #0a3d62;
    --section-bg: #0f0f0f;
    --section-bg2: #1a1a2e;
    --card-border: rgba(255, 215, 0, 0.15);
}

/* Theme toggle slider switch */
.theme-toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    cursor: pointer;
    opacity: 0;
    z-index: 1000;
}

.theme-toggle-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-slider {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 30px;
    border-radius: 15px;
    background-color: #1a1a2e;
    cursor: pointer;
    transition: all 0.4s ease;
    pointer-events: none;
    border: 2px solid rgba(0, 212, 255, 0.3);
}

.theme-slider:before {
    position: absolute;
    left: 3px;
    bottom: 3px;
    width: 22px;
    height: 22px;
    content: "";
    border-radius: 50%;
    background-color: #00d4ff;
    transition: all 0.4s ease;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.theme-toggle:checked ~ .theme-slider {
    background-color: #e0f2fe;
    border-color: rgba(0, 102, 204, 0.3);
}

.theme-toggle:checked ~ .theme-slider:before {
    background-color: #fbbf24;
    box-shadow: inset -8px -4px 0 0px #0066cc, 0 0 15px rgba(251, 191, 36, 0.6);
    transform: translateX(30px);
}

/* Sliding background overlay */
.theme-slide-overlay {
    position: fixed;
    top: 0;
    width: 150vw;
    height: 100vh;
    background: radial-gradient(circle at top left, #bae6fd, #e0f2fe);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    left: -150vw;
    border-bottom-right-radius: 100%;
    border-top-right-radius: 100%;
    z-index: -1;
    pointer-events: none;
}

body[data-theme="light"] .theme-slide-overlay {
    left: 0;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

/* Light theme overrides via CSS variables (keeps consistent colors) */
body[data-theme="light"] {
    --bg: #f8fafc;
    --text: #1a1a1a;
    --muted: #4a5568;
    --nav-bg: rgba(255,255,255,0.98);
    --nav-border: rgba(26,26,26,0.1);
    --primary: #0066cc; /* darker blue for visibility */
    --accent: #6b21a8;
    --gold: #d97706;
    --card-bg-grad: linear-gradient(135deg, rgba(0, 102, 204, 0.06), rgba(107, 33, 168, 0.04));
    --hero-bg-start: #e0f2fe;
    --hero-bg-mid1: #bae6fd;
    --hero-bg-mid2: #7dd3fc;
    --section-bg: #ffffff;
    --section-bg2: #f1f5f9;
    --card-border: rgba(26, 26, 26, 0.12);
}

/* Hide 3D tubes canvas in light mode */
body[data-theme="light"] #canvas {
    opacity: 0.2;
}

/* Adjust stars for light mode */
body[data-theme="light"] #stars-canvas {
    opacity: 0.3;
}

/* Light theme specific overrides for better contrast */
body[data-theme="light"] .name {
    background: linear-gradient(90deg, #1a1a1a, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body[data-theme="light"] .contact-btn {
    border-color: var(--text);
    color: var(--text);
}

body[data-theme="light"] .opportunity-badge {
    border-color: var(--primary);
}

body[data-theme="light"] .badge-text {
    color: var(--primary);
}

body[data-theme="light"] .about h2,
body[data-theme="light"] .resume h2,
body[data-theme="light"] .projects h2,
body[data-theme="light"] .languages h2,
body[data-theme="light"] .stats h2 {
    background: linear-gradient(90deg, var(--text) 0%, var(--accent) 50%, var(--text) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body[data-theme="light"] .project-item h4 {
    color: var(--primary);
}

body[data-theme="light"] .project-type {
    color: var(--primary);
}

body[data-theme="light"] .skill-category h3 {
    color: var(--primary);
    border-bottom-color: var(--gold);
}

body[data-theme="light"] .timeline-item h4 {
    color: var(--primary);
}

body[data-theme="light"] .about p:first-of-type {
    color: var(--primary);
}

body[data-theme="light"] .about {
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 102, 204, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(107, 33, 168, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, #ffffff 0%, #f0f4ff 50%, #ffffff 100%);
}

body[data-theme="light"] .about::before {
    background: 
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 80px,
            rgba(0, 102, 204, 0.05) 80px,
            rgba(0, 102, 204, 0.05) 81px
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 80px,
            rgba(107, 33, 168, 0.05) 80px,
            rgba(107, 33, 168, 0.05) 81px
        );
}



body[data-theme="light"] .back-to-top {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    border-color: var(--nav-border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] .modal {
    background: var(--bg);
    color: var(--text);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.15);
}

body[data-theme="light"] .modal-close {
    color: var(--text);
}

body[data-theme="light"] #resume-three-app {
    opacity: 0.25;
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Navigation */
nav {
    padding: 1.2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--nav-border);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #00d4ff;
}

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

.phone-icon {
    width: 45px;
    height: 45px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0, 212, 255, 0.05);
}

.phone-icon:hover {
    background: rgba(0, 212, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
    transform: scale(1.1);
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.contact-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
}

.contact-btn:hover {
    background: linear-gradient(135deg, var(--gold) 0%, var(--accent) 100%);
    color: var(--bg);
    border-color: var(--gold);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.6), 0 0 15px rgba(157, 78, 221, 0.4);
    transform: scale(1.1) translateY(-2px);
}

.contact-btn i {
    font-size: 1.3rem;
    position: relative;
    z-index: 2;
}

/* Opportunity Badge */
.opportunity-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    border: 1.5px solid var(--primary);
    border-radius: 30px;
    background: var(--card-bg-grad);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    cursor: default;
}

.opportunity-badge:hover {
    border-color: var(--primary);
    background: var(--card-bg-grad);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px #00ff88;
}

.badge-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: #00d4ff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.work-prefs {
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 0.3px;
    white-space: nowrap;
    display: none;
}

@media (min-width: 1100px) {
    .work-prefs {
        display: inline-block;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding-top: 80px;
    padding-bottom: 3rem;
    padding-left: 3rem;
    padding-right: 3rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    background: linear-gradient(-45deg, var(--hero-bg-start), var(--hero-bg-mid1), var(--hero-bg-mid2), var(--hero-bg-start));
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    overflow: hidden;
}

/* Starry galaxy background canvas for all sections */
#stars-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.7;
}

/* 3D Tubes Canvas - only visible in hero section */
#canvas {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: auto;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s linear infinite;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: 10%;
    right: 5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(157, 78, 221, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 25s ease-in-out infinite;
    pointer-events: none;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    z-index: 2;
}

.name {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #ffffff, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-headline {
    font-size: 1rem;
    font-weight: 500;
    color: var(--muted);
    max-width: 36rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.hero-location {
    font-size: 0.95rem;
    color: var(--muted);
    margin-top: -1.25rem;
    margin-bottom: 2rem;
}

.title {
    font-size: 1.3rem;
    font-weight: 300;
    display: inline-block;
    background: linear-gradient(90deg, #00d4ff, #9d4edd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    min-height: 1.5em; /* Reserve space to prevent layout shift */
}

/* Typing cursor */
.cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background-color: #00d4ff; /* Fallback color */
    background-color: var(--primary);
    margin-left: 5px;
    vertical-align: bottom; /* Align with text baseline */
    animation: blink 1s infinite;
    -webkit-text-fill-color: initial; /* Override parent's text-fill-color */
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Buttons and Icons */
.buttons {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 2.5rem;
}

.btn {
    padding: 0.9rem 2.2rem;
    border: 2px solid #00d4ff;
    border-radius: 30px;
    background: transparent;
    background-image: linear-gradient(90deg, #00d4ff, #9d4edd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

.btn:hover {
    background: linear-gradient(135deg, #00d4ff 0%, #9d4edd 100%);
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
    color: #ffffff;
    border-color: #9d4edd;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4), 0 0 20px rgba(157, 78, 221, 0.3), 0 0 15px rgba(0, 212, 255, 0.6);
}

.social-icons {
    display: flex;
    gap: 1.5rem;
}

.social-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #00d4ff;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.05);
    color: #00d4ff;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #00d4ff, #9d4edd);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-icon:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(157, 78, 221, 0.15));
    border-color: #9d4edd;
    color: #9d4edd;
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.3), 0 0 15px rgba(157, 78, 221, 0.2);
}

/* Hero Animation SVG */
.hero-animation {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.8s ease-out;
    margin-right: -2rem;
}

.hero-animation svg {
    width: 420px;
    height: auto;
    max-width: 100%;
}

/* Straight-line word sweep with a single ball */
.lineMaskCircle {
    offset-path: path("M 5,53 L 115,53");
    motion-path: path("M 5,53 L 115,53");
    animation: MaskLineMove 6s ease-in-out infinite;
}

.ball-line {
    fill: #0e232e;
    animation: BallLineMove 6s ease-in-out infinite;
    motion-path: path("M 5,53 L 115,53");
    offset-path: path("M 5,53 L 115,53");
    filter: drop-shadow(0 0 6px rgba(0,212,255,0.9)) drop-shadow(0 0 12px rgba(157,78,221,0.8));
}

@keyframes MaskLineMove {
    0%   { motion-offset: 0%;   offset-distance: 0%;   transform: scale(0.8); }
    50%  { motion-offset: 100%; offset-distance: 100%; transform: scale(1); }
    100% { motion-offset: 0%;   offset-distance: 0%;   transform: scale(0.8); }
}

@keyframes BallLineMove {
    0% {
        motion-offset: 0%;
        offset-distance: 0%;
        transform: scale(0.9);
    }
    50% {
        motion-offset: 100%;
        offset-distance: 100%;
        transform: scale(1.25);
    }
    100% {
        motion-offset: 0%;
        offset-distance: 0%;
        transform: scale(0.9);
    }
}

/* About Section */
.about {
    min-height: 100vh;
    padding: 6rem 3rem;
    display: flex;
    align-items: center;
    gap: 4rem;
    background: 
        radial-gradient(circle at 20% 50%, rgba(157, 78, 221, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 212, 255, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, var(--section-bg) 0%, #1a1535 50%, var(--section-bg) 100%);
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 80px,
            rgba(157, 78, 221, 0.03) 80px,
            rgba(157, 78, 221, 0.03) 81px
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 80px,
            rgba(0, 212, 255, 0.03) 80px,
            rgba(0, 212, 255, 0.03) 81px
        );
    pointer-events: none;
    z-index: 1;
}

.about > * {
    position: relative;
    z-index: 2;
}

#about-spheres-canvas {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.about h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    background: linear-gradient(90deg, #ffffff 0%, #9d4edd 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.about-content {
    flex: 1;
    animation: slideInLeft 0.8s ease-out;
}

.about p {
    margin-bottom: 1.5rem;
    line-height: 1.9;
}

.about p:first-of-type {
    color: #00d4ff;
    font-weight: 600;
    font-size: 1.1rem;
}

.bio {
    color: var(--muted);
    font-size: 1rem;
    padding: 2rem;
    border-left: 4px solid var(--gold);
    background: var(--card-bg-grad);
    border-radius: 8px;
    margin: 2rem 0;
    position: relative;
}

/* Typing cursor effect removed */

.bio strong {
    color: var(--primary);
    font-weight: 700;
}

.location {
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.linkedin-connect {
    margin-top: 1rem;
}

.linkedin-connect a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.linkedin-connect a:hover {
    color: var(--accent);
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
    animation: slideInRight 0.8s ease-out;
}

.image-container {
    position: relative;
    max-width: 400px;
    width: 100%;
    height: auto;
    cursor: pointer;
    perspective: 1000px;
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    transform-style: preserve-3d;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(0, 212, 255, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    filter: blur(40px);
    transition: all 0.6s ease;
    z-index: -1;
    pointer-events: none;
}

.image-container:hover .image-glow {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.3);
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.6;
        filter: blur(40px);
    }
    50% {
        opacity: 1;
        filter: blur(50px);
    }
}

.about-image img {
    max-width: 400px;
    width: 100%;
    height: auto;
    border-radius: 15px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    box-shadow: 
        0 20px 70px rgba(0, 212, 255, 0.25), 
        0 0 50px rgba(255, 215, 0, 0.15),
        inset 0 0 30px rgba(255, 255, 255, 0.05);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    top: 0;
    left: 0;
    backface-visibility: hidden;
}

.about-image .real-image {
    position: relative;
    z-index: 1;
    opacity: 0;
    filter: grayscale(20%) brightness(1.05);
    transform: scale(0.95) rotateY(180deg);
}

.about-image .artistic-bw-image {
    position: absolute;
    z-index: 2;
    opacity: 1;
    filter: grayscale(100%) contrast(1.1);
    transform: scale(1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0) 0%, rgba(157, 78, 221, 0) 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 3;
    pointer-events: none;
}

.overlay-text {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 1rem 2rem;
    background: rgba(0, 212, 255, 0.9);
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.5);
    transform: translateY(20px);
    transition: all 0.4s ease;
}

/* Hover effects */
.image-container:hover .image-wrapper {
    transform: translateY(-10px) scale(1.03);
}

.image-container:hover .artistic-bw-image {
    filter: grayscale(0%) contrast(1.1) brightness(1.1);
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 
        0 30px 90px rgba(0, 212, 255, 0.4), 
        0 0 60px rgba(255, 215, 0, 0.3),
        inset 0 0 40px rgba(255, 255, 255, 0.1);
}

.image-container:hover .image-overlay {
    opacity: 1;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15) 0%, rgba(157, 78, 221, 0.15) 100%);
}

.image-container:hover .overlay-text {
    transform: translateY(0);
}

/* Click/Active state - reveal real image */
.image-container.clicked .image-wrapper {
    transform: translateY(-15px) scale(1.05);
}

.image-container.clicked .artistic-bw-image {
    opacity: 0;
    transform: scale(1.1) rotateY(-180deg);
}

.image-container.clicked .real-image {
    opacity: 1;
    transform: scale(1) rotateY(0deg);
    filter: grayscale(0%) brightness(1.15) saturate(1.1);
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow: 
        0 35px 100px rgba(0, 212, 255, 0.5), 
        0 0 80px rgba(255, 215, 0, 0.4),
        inset 0 0 50px rgba(255, 255, 255, 0.15);
}

.image-container.clicked .image-overlay {
    opacity: 0;
}

.image-container.clicked .image-glow {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.5);
    background: radial-gradient(circle, rgba(255, 215, 0, 0.5) 0%, rgba(0, 212, 255, 0.3) 50%, transparent 70%);
    animation: glowPulseGold 2s ease-in-out infinite;
}

@keyframes glowPulseGold {
    0%, 100% {
        opacity: 0.8;
        filter: blur(50px);
    }
    50% {
        opacity: 1;
        filter: blur(60px);
    }
}

.about.visible .about-content,
.about.visible .about-image {
    animation: fadeInUp 0.8s ease-out;
}

/* Resume Section */
.resume {
    min-height: 100vh;
    padding: 6rem 3rem;
    background-color: var(--bg);
    position: relative;
    z-index: 2;
    overflow: hidden;
}

#resume-three-app {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: auto;
    opacity: 0.4;
}

#resume-three-app canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    pointer-events: auto;
}

.resume > * {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.resume h2,
.projects h2,
.languages h2,
.stats h2 {
    font-size: 2.2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 3.5rem;
    background: linear-gradient(90deg, #ffffff 0%, #9d4edd 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

/* Keep resume cards equal height on desktop and scroll only tools card */
@media (min-width: 992px) {
    .skills-grid {
        align-items: stretch;
    }

    .skills-grid > .skill-category {
        height: 540px;
    }

    .skills-grid > .skill-category:first-child {
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-gutter: stable;
    }

    .skills-grid > .skill-category:first-child::-webkit-scrollbar {
        width: 4px;
    }

    .skills-grid > .skill-category:first-child::-webkit-scrollbar-track {
        background: transparent;
    }

    .skills-grid > .skill-category:first-child::-webkit-scrollbar-thumb {
        background: rgba(0, 212, 255, 0.35);
        border-radius: 999px;
        border: none;
    }

    .skills-grid > .skill-category:first-child::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 212, 255, 0.6);
    }
}

.skill-category {
    background: var(--card-bg-grad);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 2.5rem;
    border-radius: 15px;
    border: 2px solid var(--card-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255, 215, 0, 0.3), transparent);
    transition: all 0.3s ease;
}

.skill-category::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(to bottom, #ffd700, #9d4edd);
    transition: height 0.3s ease;
}

.skill-category:hover {
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.12) 0%, rgba(157, 78, 221, 0.12) 100%);
}

.skill-category:hover::after {
    height: 100%;
}

.skill-category h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--gold);
    background: linear-gradient(90deg, var(--primary) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.skill-item {
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.skill-item span {
    display: block;
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 500;
}

.skill-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #00d4ff, #0099ff);
    transition: width 1s ease-in-out;
    border-radius: 10px;
}

.experience-timeline {
    margin-top: 1rem;
}

.timeline-item h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.timeline-item p {
    color: var(--muted);
    font-size: 0.9rem;
}

.capabilities-list {
    list-style: none;
    padding-left: 0;
}

.capabilities-list li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--muted);
    font-size: 0.9rem;
}

.capabilities-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* Projects Section */
.projects {
    min-height: auto;
    padding: 6rem 3rem;
    background-color: var(--section-bg2);
    position: relative;
    z-index: 2;
}

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

.project-item {
    background: var(--card-bg-grad);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 12px;
    border: 1px solid var(--card-border);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-item:hover {
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.15);
    transform: translateY(-8px);
}

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(-45deg, #1a1a2e, #0a3d62, #0f0f0f);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #00d4ff;
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: float 20s linear infinite;
}

.project-image i {
    position: relative;
    z-index: 2;
}

.project-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #00d4ff;
    margin-bottom: 0.5rem;
}

.project-type {
    font-size: 0.8rem;
    color: #00d4ff;
    opacity: 0.7;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-description {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    background: var(--card-bg-grad);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.tag:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--gold) 100%);
    border-color: var(--gold);
    color: var(--bg);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
    transform: scale(1.05);
}

/* Languages Section */
.languages {
    min-height: auto;
    padding: 6rem 3rem;
    background-color: var(--section-bg1);
    position: relative;
    z-index: 2;
}

.languages h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3.5rem;
    background: linear-gradient(90deg, #ffffff 0%, #9d4edd 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.languages-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.languages-list p {
    margin-bottom: 0;
    font-size: 1rem;
    line-height: 1.8;
    padding: 2rem;
    border: 2px solid var(--card-border);
    border-radius: 15px;
    background: var(--card-bg-grad);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.languages-list p::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(to bottom, #ffd700, #9d4edd);
    transition: height 0.3s ease;
}

.languages-list p:hover {
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.15), 0 0 25px rgba(255, 215, 0, 0.1);
    transform: translateY(-5px);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.12) 0%, rgba(157, 78, 221, 0.1) 100%);
}

.languages-list p:hover::before {
    height: 100%;
}

.languages-list strong {
    color: var(--primary);
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
}

/* Stats Section */
.stats {
    min-height: auto;
    padding: 6rem 3rem;
    background-color: var(--section-bg2);
    position: relative;
    z-index: 2;
}

.stats h2 {
    font-size: 2.2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 3.5rem;
    color: var(--text);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.stat-item {
    background: var(--card-bg-grad);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 2px solid var(--card-border);
    border-radius: 15px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 15px 50px rgba(0, 212, 255, 0.2), 0 0 30px rgba(255, 215, 0, 0.15);
    transform: translateY(-8px);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15) 0%, rgba(157, 78, 221, 0.12) 100%);
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Clickable stat cards */
.stat-item[data-stat] {
    cursor: pointer;
}

.stat-hint {
    display: block;
    margin-top: 0.8rem;
    font-size: 0.7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-item:hover .stat-hint {
    opacity: 0.7;
}

/* Stat detail modal content */
.stat-detail-content {
    padding: 0.5rem 0;
}

.stat-detail-content h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: 1px;
}

.stat-detail-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.8rem;
}

.stat-detail-list li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1.2rem;
    background: var(--card-bg-grad);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.stat-detail-list li:hover {
    border-color: var(--primary);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.1);
}

.stat-detail-list li i {
    font-size: 1.2rem;
    color: var(--primary);
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.stat-detail-list li .stat-detail-name {
    font-weight: 600;
    color: var(--text);
    flex: 1;
}

.stat-detail-list li .stat-detail-sub {
    font-size: 0.8rem;
    color: var(--muted);
    margin-left: auto;
    flex-shrink: 0;
}

.resume.visible .skills-grid,
.projects.visible .projects-grid {
    animation: fadeInUp 0.8s ease-out;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
    }
}

/* Hero text animation */
.name {
    animation: fadeInUp 0.8s ease-out, pulse 3s ease-in-out 0.8s;
}

.title {
    animation: slideInDown 0.8s ease-out 0.2s both;
}

.buttons {
    animation: slideInUp 0.8s ease-out 0.4s both;
}

.social-icons {
    animation: slideInUp 0.8s ease-out 0.6s both;
}

/* About section animations */
.about-content {
    animation: slideInLeft 0.8s ease-out;
}

.about-image {
    animation: slideInRight 0.8s ease-out;
}

.about-image img {
    transition: transform 0.3s ease;
}

.about-image img:hover {
    transform: scale(1.05);
}

/* Skill items stagger animation */
.skill-item {
    opacity: 0;
    transition: all 0.3s ease;
}

.skill-item:hover span {
    color: #9d4edd;
    text-shadow: 0 0 8px rgba(157, 78, 221, 0.3);
}

/* Project cards interactive effects */
.project-item {
    opacity: 0;
    cursor: pointer;
    position: relative;
    border: 2px solid rgba(255, 215, 0, 0.15);
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, rgba(157, 78, 221, 0.05) 100%);
}

.project-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.project-item:hover::before {
    opacity: 1;
}

.project-item:hover {
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 15px 50px rgba(0, 212, 255, 0.2), 0 0 30px rgba(255, 215, 0, 0.1);
    transform: translateY(-8px);
}

/* Modal for project details */
.modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(11, 19, 32, 0.6);
    z-index: 2000;
    padding: 2rem;
}

.modal-overlay[aria-hidden="false"] { display: flex; }

.modal {
    background: var(--bg);
    color: var(--text);
    max-width: 900px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 80px rgba(2,6,23,0.6);
    position: relative;
    overflow: auto;
    max-height: 90vh;
    padding: 1.5rem;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--muted);
}

.modal-body {
    padding-top: 1.5rem;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.45);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease;
    font-size: 1.2rem;
}

.back-to-top.show {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}


/* Stats counter animation */
.stat-number {
    font-weight: 700;
    transition: color 0.3s ease;
}

.stat-item:hover .stat-number {
    color: #9d4edd;
    text-shadow: 0 0 10px rgba(157, 78, 221, 0.6);
}

.stat-item {
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: rgba(157, 78, 221, 0.5) !important;
}

/* Navigation hover glow */
nav a:hover {
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Button hover animations */
.btn:active {
    transform: translateY(-5px) scale(0.98);
}

.contact-btn:active {
    color: var(--primary);
}

/* Smooth scrollbar styling */
::-webkit-scrollbar {
    color: var(--primary);
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

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

/* Scroll Progress Bar */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 9999;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    transition: width 0.1s;
    box-shadow: 0 0 10px var(--primary);
}

/* Certifications Section */
.certifications {
    min-height: auto;
    padding: 6rem 3rem;
    background-color: var(--section-bg);
    position: relative;
    z-index: 2;
}

.certifications h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3.5rem;
    background: linear-gradient(90deg, #ffffff 0%, #9d4edd 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.cert-item {
    background: var(--card-bg-grad);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.cert-item:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.15);
}

.cert-icon {
    font-size: 1.75rem;
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cert-item:hover .cert-icon {
    transform: scale(1.08);
}

.cert-icon--html {
    color: #ff6b4a;
    background: rgba(255, 107, 74, 0.12);
    border: 1px solid rgba(255, 107, 74, 0.3);
    box-shadow: 0 0 18px rgba(255, 107, 74, 0.15);
}

.cert-icon--idea {
    color: #ffd166;
    background: rgba(255, 209, 102, 0.12);
    border: 1px solid rgba(255, 209, 102, 0.3);
    box-shadow: 0 0 18px rgba(255, 209, 102, 0.15);
}

.cert-icon--hack {
    color: #06ffa5;
    background: rgba(6, 255, 165, 0.1);
    border: 1px solid rgba(6, 255, 165, 0.3);
    box-shadow: 0 0 18px rgba(6, 255, 165, 0.15);
}

.cert-icon--course {
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.15);
}

.cert-icon--python {
    color: #3776ab;
    background: rgba(55, 118, 171, 0.15);
    border: 1px solid rgba(55, 118, 171, 0.35);
    box-shadow: 0 0 18px rgba(55, 118, 171, 0.2);
}

.cert-icon--web {
    color: #9d4edd;
    background: rgba(157, 78, 221, 0.12);
    border: 1px solid rgba(157, 78, 221, 0.3);
    box-shadow: 0 0 18px rgba(157, 78, 221, 0.15);
}

.cert-icon--ai {
    color: #ff006e;
    background: rgba(255, 0, 110, 0.1);
    border: 1px solid rgba(255, 0, 110, 0.3);
    box-shadow: 0 0 18px rgba(255, 0, 110, 0.15);
}

.cert-content h4 {
    color: var(--text);
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.cert-issuer {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
}

.cert-date {
    color: var(--muted);
    font-size: 0.85rem;
}

/* Footer */
footer {
    background: var(--nav-bg);
    padding: 4rem 2rem 2rem;
    text-align: center;
    border-top: 1px solid var(--nav-border);
    position: relative;
    z-index: 10;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-quote {
    color: var(--muted);
    font-style: italic;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-socials a {
    color: var(--text);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.footer-socials a:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

.copyright {
    color: var(--muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader {
    position: relative;
    width: 80px;
    height: 80px;
}

.loader-circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-circle::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 3px solid transparent;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

.loader-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    color: var(--text);
    font-size: 1.2rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Project Filters */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--text);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

/* Contact Section */
.contact {
    min-height: auto;
    padding: 6rem 3rem;
    background-color: var(--section-bg2);
    position: relative;
    z-index: 2;
}

.contact h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3.5rem;
    background: linear-gradient(90deg, #ffffff 0%, #9d4edd 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-info h3 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.contact-info p {
    color: var(--muted);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.method {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text);
}

.method i {
    width: 40px;
    height: 40px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.method a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.method a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.contact-form {
    flex: 1.5;
    min-width: 300px;
    background: var(--card-bg-grad);
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid var(--card-border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 212, 255, 0.05);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.1);
}

.submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.submit-btn.success {
    background: #28a745;
    border-color: #28a745;
    color: white;
    -webkit-text-fill-color: white;
}

.submit-btn.error {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
    -webkit-text-fill-color: white;
}

/* Responsive adjustments (mobile/tablet only - desktop 992px+ unchanged) */
@media (max-width: 991px) {
    body {
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }

    html,
    body {
        overflow-x: hidden;
        max-width: 100%;
    }

    img,
    svg,
    video {
        max-width: 100%;
        height: auto;
    }

    #canvas,
    #resume-three-app,
    #resume-three-app canvas {
        pointer-events: none !important;
    }

    nav {
        padding: 0.9rem max(1rem, env(safe-area-inset-right)) 0.9rem max(1rem, env(safe-area-inset-left));
        padding-top: max(0.9rem, env(safe-area-inset-top));
    }

    .nav-right {
        gap: 0.6rem;
        flex-shrink: 0;
    }

    .opportunity-badge {
        display: none;
    }

    .theme-toggle-wrapper {
        transform: scale(0.92);
        transform-origin: center;
    }

    .contact-btn {
        width: 42px;
        height: 42px;
        font-size: 1rem;
        border-width: 1.5px;
    }

    .nav-links {
        gap: 1rem;
        overflow-x: auto;
        white-space: nowrap;
        max-width: calc(100vw - 170px);
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        font-size: 0.88rem;
        flex-shrink: 0;
    }

    .hero,
    .about,
    .resume,
    .projects,
    .languages,
    .stats,
    .certifications,
    .contact {
        padding-left: max(1.25rem, env(safe-area-inset-left));
        padding-right: max(1.25rem, env(safe-area-inset-right));
    }

    .hero {
        min-height: auto;
        padding-top: 110px;
        padding-bottom: 2.5rem;
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .hero-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .name {
        font-size: 2.4rem;
        overflow-wrap: anywhere;
    }

    .title {
        font-size: 1.1rem;
        max-width: 100%;
    }

    .buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.8rem;
        margin-bottom: 1.8rem;
        width: 100%;
    }

    .btn {
        padding: 0.75rem 1.4rem;
        font-size: 0.9rem;
    }

    .social-icons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.9rem;
    }

    .social-icon {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .hero-animation {
        margin-right: 0;
        width: 100%;
    }

    .hero-animation svg {
        width: min(360px, 90vw);
    }

    .about {
        min-height: auto;
        padding-top: 4.5rem;
        flex-direction: column;
        gap: 2rem;
    }

    .about-content,
    .about-image {
        width: 100%;
    }

    .bio {
        padding: 1.2rem;
        font-size: 0.95rem;
        overflow-wrap: anywhere;
    }

    .image-container {
        max-width: min(340px, 88vw);
        margin: 0 auto;
    }

    .about-image img {
        max-width: 100%;
    }

    .skill-category,
    .project-content,
    .stat-item,
    .contact-form {
        padding: 1.25rem;
    }

    .skill-category {
        height: auto !important;
        overflow: visible !important;
    }

    .project-image {
        height: 170px;
        font-size: 3rem;
    }

    .project-item h4,
    .project-description,
    .timeline-item p,
    .capabilities-list li {
        overflow-wrap: anywhere;
    }

    .project-filters {
        gap: 0.55rem;
        margin-bottom: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .filter-btn {
        padding: 0.45rem 0.9rem;
        font-size: 0.8rem;
    }

    .languages-list p {
        padding: 1.25rem;
        font-size: 0.95rem;
        overflow-wrap: anywhere;
    }

    .contact-container {
        flex-direction: column;
        gap: 2rem;
    }

    .contact-info,
    .contact-form {
        min-width: 0;
        width: 100%;
    }

    .cert-item {
        flex-direction: row;
        text-align: left;
        align-items: center;
        padding: 1.5rem;
        gap: 1rem;
    }

    .cert-content h4 {
        font-size: 1rem;
        overflow-wrap: anywhere;
    }

    .modal-overlay {
        padding: 1rem;
        align-items: flex-end;
    }

    .modal {
        max-height: 85vh;
        padding: 1rem;
        border-radius: 12px 12px 0 0;
    }

    .stat-detail-list li {
        flex-wrap: wrap;
        gap: 0.35rem 0.8rem;
    }

    .stat-detail-list li .stat-detail-sub {
        margin-left: 0;
        flex-basis: 100%;
        padding-left: calc(24px + 0.8rem);
    }

    #resume-three-app {
        opacity: 0.2;
    }

    footer {
        padding: 3rem max(1.25rem, env(safe-area-inset-right)) 2rem max(1.25rem, env(safe-area-inset-left));
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }

    .footer-quote {
        font-size: 1rem;
        padding: 0 0.5rem;
    }

    .back-to-top {
        bottom: max(14px, env(safe-area-inset-bottom));
        right: max(12px, env(safe-area-inset-right));
    }

    #home,
    #about,
    #resume,
    #projects,
    #languages,
    #certifications,
    #stats,
    #contact {
        scroll-margin-top: 90px;
    }
}

/* Tablet layout */
@media (min-width: 768px) and (max-width: 991px) {
    .skills-grid,
    .projects-grid,
    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .skills-grid > .skill-category:nth-child(3) {
        grid-column: 1 / -1;
    }

    .about {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .about-content,
    .about-image {
        flex: 1 1 calc(50% - 1rem);
    }

    .about-image {
        justify-content: center;
    }

    .contact-container {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .contact-info,
    .contact-form {
        flex: 1 1 calc(50% - 1rem);
    }
}

/* Mobile layout */
@media (max-width: 767px) {
    .skills-grid,
    .projects-grid,
    .cert-grid,
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .cert-item {
        flex-direction: column;
        text-align: center;
    }

    .stat-detail-list li .stat-detail-sub {
        padding-left: 0;
        text-align: center;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 0.75rem max(0.75rem, env(safe-area-inset-right)) 0.75rem max(0.75rem, env(safe-area-inset-left));
    }

    .nav-right {
        gap: 0.45rem;
    }

    .nav-links {
        max-width: calc(100vw - 145px);
        gap: 0.75rem;
    }

    .hero {
        padding-top: 100px;
    }

    .name {
        font-size: 2rem;
    }

    .resume h2,
    .projects h2,
    .languages h2,
    .stats h2,
    .contact h2,
    .certifications h2,
    .about h2 {
        font-size: 1.9rem;
        margin-bottom: 2.2rem;
        letter-spacing: 1px;
    }

    .certifications {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

@media (max-width: 480px) {
    .nav-links {
        max-width: calc(100vw - 132px);
    }

    .nav-links a {
        font-size: 0.8rem;
    }

    .theme-toggle-wrapper {
        transform: scale(0.85);
    }

    .contact-btn {
        width: 38px;
        height: 38px;
    }

    .name {
        font-size: 1.75rem;
    }

    .title {
        font-size: 1rem;
    }

    .bio,
    .languages-list p {
        line-height: 1.7;
        padding: 1rem;
    }

    .about,
    .resume,
    .projects,
    .languages,
    .stats,
    .certifications,
    .contact {
        padding-top: 4.5rem;
        padding-bottom: 4.5rem;
    }

    .resume h2,
    .projects h2,
    .languages h2,
    .stats h2,
    .contact h2,
    .certifications h2,
    .about h2 {
        font-size: 1.7rem;
    }

    .project-filters {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.35rem;
        margin-left: -0.25rem;
        margin-right: -0.25rem;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .project-filters::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        flex-shrink: 0;
    }

    .project-content {
        padding: 1.1rem;
    }

    .project-tags {
        gap: 0.4rem;
    }

    .tag {
        font-size: 0.7rem;
        padding: 0.25rem 0.65rem;
    }

    .stat-item {
        padding: 1.5rem 1rem;
    }

    .stat-number {
        font-size: 2.2rem;
    }

    .contact-info h3 {
        font-size: 1.4rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px;
    }

    .modal-overlay {
        padding: 0;
    }

    .modal {
        width: 100%;
        max-height: 92vh;
        border-radius: 16px 16px 0 0;
    }

    .back-to-top {
        width: 38px;
        height: 38px;
    }

    .overlay-text {
        font-size: 0.85rem;
        padding: 0.75rem 1.25rem;
        letter-spacing: 1px;
    }
}

/* Reduce sticky hover effects on touch screens */
@media (hover: none) and (pointer: coarse) {
    .project-item:hover,
    .cert-item:hover,
    .stat-item:hover,
    .skill-category:hover,
    .languages-list p:hover {
        transform: none;
    }

    .image-container:hover .image-wrapper {
        transform: none;
    }
}

/* Glitch animation class */
.image-wrapper.glitching {
    animation: glitch-anim 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
}

.image-wrapper.glitching .artistic-bw-image {
    filter: invert(1);
    transform: translateX(-5px);
}

.image-wrapper.glitching::before,
.image-wrapper.glitching::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    background: inherit;
    opacity: 0.5;
}

@keyframes glitch-anim {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-3px, 3px);
    }
    40% {
        transform: translate(-3px, -3px);
    }
    60% {
        transform: translate(3px, 3px);
    }
    80% {
        transform: translate(3px, -3px);
    }
    100% {
        transform: translate(0);
    }
}