/* ===========================
   Global Styles & Variables
   =========================== */
:root {
    /* Colors */
    --primary-color: #3b82f6;
    --secondary-color: #8b5cf6;
    --accent-color: #f59e0b;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    --gradient-bg: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    --gradient-accent: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #f59e0b 100%);
    --gradient-glow: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    
    /* Spacing */
    --section-padding: 120px 0;
    --container-padding: 0 20px;
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --transition-slow: 0.8s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(59, 130, 246, 0.1);
    --shadow-md: 0 4px 20px rgba(59, 130, 246, 0.15);
    --shadow-lg: 0 10px 40px rgba(59, 130, 246, 0.2);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.4);
}

/* light theme overrides */
[data-theme="light"] {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --accent-color: #d97706;
    --bg-dark: #f1f5f9;
    --bg-darker: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --shadow-sm: 0 2px 10px rgba(37, 99, 235, 0.08);
    --shadow-md: 0 4px 20px rgba(37, 99, 235, 0.1);
    --shadow-lg: 0 10px 40px rgba(37, 99, 235, 0.12);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.25);
    --gradient-bg: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

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

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

.cube-loader {
    width: 100px;
    height: 100px;
    position: relative;
    margin: 0 auto 30px;
    transform-style: preserve-3d;
    animation: rotateCube 3s infinite linear;
}

.cube-loader .cube-face {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 20px var(--primary-color);
}

.cube-loader .cube-face:nth-child(1) { transform: translateZ(50px); }
.cube-loader .cube-face:nth-child(2) { transform: rotateY(180deg) translateZ(50px); }
.cube-loader .cube-face:nth-child(3) { transform: rotateY(90deg) translateZ(50px); }
.cube-loader .cube-face:nth-child(4) { transform: rotateY(-90deg) translateZ(50px); }
.cube-loader .cube-face:nth-child(5) { transform: rotateX(90deg) translateZ(50px); }
.cube-loader .cube-face:nth-child(6) { transform: rotateX(-90deg) translateZ(50px); }

.preloader h2 {
    font-size: 36px;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 15px;
}

.loading-text {
    color: var(--text-muted);
    font-size: 16px;
}

.dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

.about, .skills, .projects, .experience, .contact {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

.section {
    padding: var(--section-padding);
    position: relative;
}

/* ===========================
   Particles Background
   =========================== */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: var(--gradient-bg);
    pointer-events: none;
}

#particles-js::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
}

/* ===========================
   Navigation
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    transition: var(--transition-medium);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.97);
    box-shadow: 0 4px 30px rgba(59, 130, 246, 0.12), var(--shadow-md);
    border-bottom-color: rgba(59, 130, 246, 0.25);
}

/* Scroll progress bar */
#scroll-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.7);
    transition: width 0.12s linear;
    z-index: 2;
    border-radius: 0 2px 2px 0;
    pointer-events: none;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    position: relative;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.logo::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--primary-color);
    border-right-color: rgba(59, 130, 246, 0.3);
    animation: logoSpin 2.5s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 3;
}

.logo:hover::after {
    opacity: 1;
}

@keyframes logoSpin {
    to { transform: rotate(360deg); }
}

.logo-image {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.5);
    position: relative;
    z-index: 2;
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.logo:hover .logo-image {
    border-color: var(--primary-color);
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.65), 0 0 32px rgba(59, 130, 246, 0.2);
    transform: scale(1.06);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
    margin-left: auto;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease, background 0.3s ease;
    padding: 6px 14px;
    border-radius: 20px;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.65);
    border-radius: 0 0 20px 20px;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.08);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.13);
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: var(--transition-fast);
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding-top: 80px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.hero-text {
    animation: fadeInLeft 1s ease;
}

.hero-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 30px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.hero-badge-primary {
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary-color);
    position: relative;
}

/* Pulsing "available" dot */
.hero-badge-primary::after {
    content: '';
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
    animation: availableDot 2s ease-in-out infinite;
}

@keyframes availableDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
}

.hero-badge-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.hero-greeting {
    color: var(--accent-color);
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 15px;
}

.hero-name {
    font-size: 72px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    font-family: 'Orbitron', sans-serif;
}

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

.name-solid {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.hero-title-container {
    min-height: 60px;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 32px;
    color: var(--text-secondary);
    font-weight: 600;
}

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

.cursor {
    animation: blink 1s infinite;
    color: var(--primary-color);
}

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

.hero-description {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-signal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 28px 0 36px;
}

.signal-card {
    position: relative;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 50px rgba(5, 8, 22, 0.28);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.signal-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 18px 50px rgba(5, 8, 22, 0.38), 0 0 22px rgba(59, 130, 246, 0.14);
    transform: translateY(-3px);
}

.signal-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 45%);
    pointer-events: none;
}

.signal-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.signal-card strong {
    display: block;
    font-size: 16px;
    line-height: 1.4;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-primary);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    transform: translateY(-3px);
}

.btn-large {
    padding: 18px 45px;
    font-size: 18px;
    gap: 15px;
}

.btn-large:hover {
    transform: translateY(-5px) scale(1.02);
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 20px;
    text-decoration: none;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transform: scale(0);
    border-radius: 50%;
    transition: var(--transition-fast);
}

.social-link:hover::before {
    transform: scale(1);
}

.social-link:hover {
    color: var(--bg-dark);
    border-color: transparent;
    box-shadow: 0 0 20px var(--primary-color), 0 0 40px var(--primary-color);
    animation: pulse-glow 1.5s infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 15px rgba(59, 130, 246, 0.5); }
    50% { box-shadow: 0 0 25px rgba(59, 130, 246, 0.6), 0 0 40px rgba(139, 92, 246, 0.3); }
}

.social-link i {
    position: relative;
    z-index: 1;
}

.section-subtitle {
    margin-top: 14px;
    color: var(--text-secondary);
    max-width: 680px;
    line-height: 1.7;
}

/* ===========================
   3D Cube Animation
   =========================== */
.hero-3d {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInRight 1s ease;
}

.cube-container {
    perspective: 1000px;
    width: 300px;
    height: 300px;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 20s infinite linear;
    filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.3));
}

.cube:hover {
    animation-duration: 10s;
    filter: drop-shadow(0 0 50px rgba(59, 130, 246, 0.5));
}

@keyframes rotateCube {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

.cube-face {
    position: absolute;
    width: 300px;
    height: 300px;
    border: 2px solid var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: var(--primary-color);
    backdrop-filter: blur(10px);
}

.cube-face i {
    filter: drop-shadow(0 0 20px var(--primary-color));
}

.front  { transform: translateZ(150px); }
.back   { transform: rotateY(180deg) translateZ(150px); }
.right  { transform: rotateY(90deg) translateZ(150px); }
.left   { transform: rotateY(-90deg) translateZ(150px); }
.top    { transform: rotateX(90deg) translateZ(150px); }
.bottom { transform: rotateX(-90deg) translateZ(150px); }

.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-icon {
    position: absolute;
    font-size: 40px;
    color: var(--secondary-color);
    animation: float 3s infinite ease-in-out;
    animation-delay: var(--delay);
    left: 50%;
    top: 50%;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y)));
    filter: drop-shadow(0 0 10px var(--secondary-color));
}

@keyframes float {
    0%, 100% { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) translateY(0); }
    50% { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) translateY(-20px); }
}

#threejs-preview {
    display: none;
}

.hero-3d.three-earth-mode .cube-container,
.hero-3d.three-earth-mode .floating-icons {
    display: none;
}

.hero-3d.three-earth-mode #threejs-preview {
    display: grid;
    place-items: center;
    position: relative;
    transform: translateY(-120px);
    width: 360px;
    height: 360px;
    border-radius: 50%;
    border: 1px solid rgba(59, 130, 246, 0.38);
    background: radial-gradient(circle at 30% 30%, rgba(96, 165, 250, 0.22), rgba(15, 23, 42, 0.75));
    box-shadow: 0 22px 80px rgba(15, 23, 42, 0.45), 0 0 45px rgba(59, 130, 246, 0.2);
    overflow: hidden;
    pointer-events: none;
}

.hero-3d.three-earth-mode #threejs-preview::before,
.hero-3d.three-earth-mode #threejs-preview::after {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    border: 1px dashed rgba(96, 165, 250, 0.24);
    animation: hudSpin 24s linear infinite;
}

.hero-3d.three-earth-mode #threejs-preview::after {
    inset: 26px;
    border-style: solid;
    border-color: rgba(167, 139, 250, 0.18);
    animation-duration: 18s;
    animation-direction: reverse;
}

.three-hud {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    z-index: 3;
    text-align: center;
}

.three-hud-tag {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #93c5fd;
    text-shadow: 0 0 12px rgba(59, 130, 246, 0.45);
}

.three-hud-status {
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.88);
}

.three-scanline {
    position: absolute;
    left: 12%;
    right: 12%;
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.95), transparent);
    filter: blur(0.2px);
    animation: scanlineSweep 4.2s ease-in-out infinite;
    z-index: 3;
}

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

@keyframes scanlineSweep {
    0%, 100% { top: 24%; opacity: 0.3; }
    50% { top: 72%; opacity: 0.85; }
}

#threejs-preview canvas {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* ===========================
   Scroll Indicator
   =========================== */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: fadeIn 2s ease 1s both;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { opacity: 1; top: 10px; }
    100% { opacity: 0; top: 30px; }
}

.scroll-indicator p {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ===========================
   Section Headers
   =========================== */
.section-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}

.section-title {
    font-size: 48px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-family: 'Orbitron', sans-serif;
}

.title-number {
    font-size: 24px;
    color: var(--primary-color);
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

.title-line {
    width: 100px;
    height: 3px;
    background: var(--gradient-primary);
    margin: 20px auto 0;
    border-radius: 2px;
    animation: titleLinePulse 3s ease-in-out infinite;
}

@keyframes titleLinePulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(59, 130, 246, 0.35);
        width: 100px;
    }
    50% {
        box-shadow: 0 0 18px rgba(59, 130, 246, 0.65), 0 0 30px rgba(139, 92, 246, 0.3);
        width: 125px;
    }
}

/* ===========================
   About Section
   =========================== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
}

.image-wrapper {
    position: relative;
    width: 350px;
    height: 450px;
}

/* Offset decorative border — now purple glow */
.image-border {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-radius: 20px;
    transform: translate(16px, 16px);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    background: linear-gradient(var(--bg-darker), var(--bg-darker)) padding-box,
                linear-gradient(135deg, var(--secondary-color), var(--primary-color)) border-box;
    box-shadow: 4px 4px 24px rgba(139, 92, 246, 0.25);
    z-index: 0;
}

.image-wrapper:hover .image-border {
    transform: translate(8px, 8px);
    box-shadow: 4px 4px 40px rgba(139, 92, 246, 0.4), 0 0 60px rgba(59, 130, 246, 0.2);
}

/* Main photo container */
.profile-img {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    z-index: 1;
    /* Animated gradient ring */
    border: 3px solid transparent;
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
                linear-gradient(var(--ring-angle, 135deg), var(--primary-color), var(--secondary-color), var(--accent-color), var(--primary-color)) border-box;
    animation: ringRotate 4s linear infinite;
    box-shadow: 0 8px 40px rgba(59, 130, 246, 0.3), 0 0 0 1px rgba(59, 130, 246, 0.08);
    transition: box-shadow 0.4s ease;
}

.image-wrapper:hover .profile-img {
    box-shadow: 0 12px 60px rgba(59, 130, 246, 0.5), 0 0 80px rgba(139, 92, 246, 0.2);
    animation-duration: 2s;
}

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

@keyframes ringRotate {
    to { --ring-angle: 495deg; }
}

.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 17px;
    display: block;
    transition: transform 0.5s ease, filter 0.4s ease;
}

.image-wrapper:hover .profile-img img {
    transform: scale(1.04);
    filter: brightness(1.05) saturate(1.1);
}

/* Scan line that sweeps down on hover */
.profile-scanline {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.85), transparent);
    filter: blur(1px);
    top: -10%;
    opacity: 0;
    z-index: 2;
    transition: opacity 0.2s ease;
}

.image-wrapper:hover .profile-scanline {
    opacity: 1;
    animation: scanDown 1.8s ease-in-out infinite;
}

@keyframes scanDown {
    0%   { top: -5%; opacity: 0; }
    10%  { opacity: 0.9; }
    90%  { opacity: 0.9; }
    100% { top: 105%; opacity: 0; }
}

/* Corner bracket decorations */
.img-corner {
    position: absolute;
    width: 22px;
    height: 22px;
    z-index: 3;
    transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
    opacity: 0.6;
    pointer-events: none;
}

.image-wrapper:hover .img-corner {
    width: 28px;
    height: 28px;
    opacity: 1;
}

.img-corner--tl { top: -4px; left: -4px; border-top: 2px solid var(--primary-color); border-left: 2px solid var(--primary-color); border-radius: 4px 0 0 0; }
.img-corner--tr { top: -4px; right: -4px; border-top: 2px solid var(--primary-color); border-right: 2px solid var(--primary-color); border-radius: 0 4px 0 0; }
.img-corner--bl { bottom: -4px; left: -4px; border-bottom: 2px solid var(--secondary-color); border-left: 2px solid var(--secondary-color); border-radius: 0 0 0 4px; }
.img-corner--br { bottom: -4px; right: -4px; border-bottom: 2px solid var(--secondary-color); border-right: 2px solid var(--secondary-color); border-radius: 0 0 4px 0; }

.stats-overlay {
    position: absolute;
    bottom: -30px;
    right: -30px;
    background: var(--bg-card);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 20px 30px;
    display: flex;
    gap: 30px;
    box-shadow: var(--shadow-lg);
    z-index: 2;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Orbitron', sans-serif;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
}

.about-text {
    animation: fadeIn 1s ease;
}

.about-paragraph {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

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

.about-highlights {
    display: grid;
    gap: 20px;
    margin-top: 40px;
}

.about-actions {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.about-actions .btn {
    flex: 1;
    min-width: 200px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 15px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: var(--transition-fast);
}

.highlight-item:hover {
    border-color: var(--primary-color);
    transform: translateX(10px);
    box-shadow: var(--shadow-md), -3px 0 0 0 var(--primary-color);
}

.highlight-item i {
    font-size: 32px;
    color: var(--primary-color);
}

.highlight-item h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.highlight-item p {
    font-size: 14px;
    color: var(--text-muted);
}

/* ===========================
   Skills Section
   =========================== */
.skills {
    background: rgba(30, 41, 59, 0.3);
}

.skills-content {
    display: grid;
    gap: 60px;
}

.skills-category {
    animation: fadeIn 1s ease;
}

.category-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--primary-color);
}

.category-title i {
    font-size: 32px;
}

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

.skill-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: var(--transition-fast);
    cursor: pointer;
}

.skill-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(59, 130, 246, 0.05) 100%);
}

.skill-card:hover .skill-icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 15px var(--primary-color));
}

.skill-icon {
    transition: var(--transition-fast);
}

.skill-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.skill-card h4 {
    font-size: 20px;
    margin-bottom: 15px;
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    width: 0;
    border-radius: 4px;
    transition: width 1.5s ease;
    position: relative;
    overflow: hidden;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes gradient-border {
    0%, 100% { border-color: var(--primary-color); }
    25% { border-color: var(--secondary-color); }
    50% { border-color: var(--accent-color); }
    75% { border-color: var(--secondary-color); }
}

.animate-border {
    animation: gradient-border 3s infinite;
}

.skill-card:hover .skill-progress {
    width: var(--width) !important;
}

/* ===========================
   Languages Section
   =========================== */
.languages-section {
    margin-top: 60px;
}

.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.language-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    text-align: center;
    transition: var(--transition-fast);
}

.language-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.language-flag {
    font-size: 64px;
    margin-bottom: 20px;
}

.language-card h4 {
    font-size: 24px;
    margin-bottom: 10px;
}

.language-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.language-level {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.level-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.2);
    transition: var(--transition-fast);
}

.level-dot.active {
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

/* ===========================
   Projects Section
   =========================== */
.projects-grid {
    display: grid;
    gap: 40px;
}

.projects-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 32px;
}

.projects-summary-card {
    padding: 20px 22px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(59, 130, 246, 0.12);
}

.projects-summary-label {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.projects-summary-card strong {
    font-size: 24px;
}

.project-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: var(--transition-fast);
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    min-height: 350px;
}

.project-card.featured {
    grid-column: 1 / -1;
}

.project-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.project-card.featured:hover {
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.3);
}

.project-card.featured {
    position: relative;
}

.project-card.featured::after {
    content: 'Featured Repo';
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--accent-color);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-image {
    position: relative;
    /* Fallback gradient shown while image loads or on error */
    background-color: #0f172a;
    background-image: linear-gradient(135deg, rgba(59,130,246,0.18) 0%, rgba(139,92,246,0.18) 100%);
    background-size: cover;
    background-position: center top;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    overflow: hidden;
}

/* When an actual GitHub preview image is set, let it shine through cleanly */
.project-image[style*="background-image: url"] {
    background-image: attr(style);
}

/* Light vignette on normal state so text/content next to it contrasts */
.project-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(15, 23, 42, 0.05) 0%,
        rgba(15, 23, 42, 0.0) 60%,
        rgba(15, 23, 42, 0.35) 100%
    );
    transition: background 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

/* On hover: darken to reveal the icon */
.project-card:hover .project-image::before {
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.55) 0%,
        rgba(15, 23, 42, 0.45) 100%
    );
}

/* Icon: hidden by default, fades in on hover */
.project-overlay {
    font-size: 72px;
    color: rgba(255, 255, 255, 0.0);
    transition: color 0.3s ease, transform 0.4s ease, text-shadow 0.3s ease;
    position: relative;
    z-index: 2;
    text-shadow: none;
}

.project-card:hover .project-overlay {
    color: rgba(255, 255, 255, 0.85);
    transform: scale(1.15) rotate(8deg);
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.7), 0 4px 20px rgba(0, 0, 0, 0.6);
}

.project-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-label {
    color: var(--accent-color);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.project-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    font-family: 'Orbitron', sans-serif;
    line-height: 1.3;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.project-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.12);
    color: var(--text-secondary);
    font-size: 13px;
}

.project-meta-item i {
    color: var(--primary-color);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.tech-tag {
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 20px;
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 20px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
}

.project-link:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    transform: translateY(-2px);
}

.project-link-secondary {
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--text-primary);
}

.project-link-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.16);
}

.projects-cta {
    text-align: center;
    margin-top: 60px;
    animation: fadeIn 1s ease;
}

.projects-cta .btn {
    display: inline-flex;
    box-shadow: var(--shadow-lg);
}

.projects-cta .btn:hover {
    box-shadow: var(--shadow-glow);
}

/* ===========================
   Timeline (Experience)
   =========================== */
.experience {
    background: rgba(30, 41, 59, 0.3);
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto 80px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--gradient-primary);
}

.timeline-item {
    position: relative;
    padding-left: 80px;
    margin-bottom: 60px;
    animation: fadeIn 1s ease;
}

.timeline-dot {
    position: absolute;
    left: 20px;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 20px var(--primary-color);
    border: 4px solid var(--bg-darker);
}

.timeline-content {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: var(--transition-fast);
}

.timeline-content:hover {
    border-color: var(--primary-color);
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.timeline-date {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 20px;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
}

.timeline-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.timeline-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline-subtitle i {
    color: var(--primary-color);
}

.timeline-list {
    list-style: none;
    margin-bottom: 20px;
}

.timeline-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.timeline-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 20px;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    padding: 6px 14px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--secondary-color);
    border-radius: 15px;
    font-size: 12px;
    color: var(--secondary-color);
    font-weight: 500;
}

/* ===========================
   Soft Skills
   =========================== */
.soft-skills {
    margin-top: 80px;
}

.soft-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.soft-skill-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    text-align: center;
    transition: var(--transition-fast);
    cursor: pointer;
}

.soft-skill-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.soft-skill-card i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: block;
}

.soft-skill-card h4 {
    font-size: 16px;
    color: var(--text-primary);
}

/* ===========================
   Contact Section
   =========================== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-heading {
    font-size: 36px;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
}

.contact-info {
    display: grid;
    gap: 25px;
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--bg-dark);
}

.contact-details h4 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-details a,
.contact-details p {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition-fast);
}

.contact-details a:hover {
    color: var(--primary-color);
}

.contact-social {
    display: flex;
    gap: 15px;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 20px;
    text-decoration: none;
    transition: var(--transition-fast);
}

.social-btn:hover {
    background: var(--gradient-primary);
    color: var(--bg-dark);
    border-color: transparent;
    transform: translateY(-5px);
}

/* ===========================
   Contact Form
   =========================== */
.contact-form-wrapper {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.contact-form {
    display: grid;
    gap: 30px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    background: var(--bg-darker);
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    transition: var(--transition-fast);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
}

.form-group label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition-fast);
    font-size: 16px;
}

.form-group textarea + label {
    top: 25px;
    transform: none;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -10px;
    left: 15px;
    font-size: 12px;
    color: var(--primary-color);
    background: var(--bg-card);
    padding: 0 8px;
}

.form-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-fast);
}

.form-group input:focus ~ .form-line,
.form-group textarea:focus ~ .form-line {
    width: 100%;
}

.btn-submit {
    width: 100%;
    justify-content: center;
}

/* ===========================
   Footer
   =========================== */
.footer {
    background: var(--bg-darker);
    padding: 40px 0;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
    position: relative;
    z-index: 10;
}

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

.footer-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.highlight {
    color: var(--primary-color);
    font-weight: 600;
}

.footer-copyright {
    font-size: 14px;
    color: var(--text-muted);
}

/* ===========================
   Scroll to Top Button
   =========================== */
.scroll-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    color: var(--bg-dark);
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
    z-index: 9999;
    box-shadow: var(--shadow-md);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

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

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

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

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 1200px) {
    .hero-content {
        gap: 40px;
    }
    
    .hero-name {
        font-size: 56px;
    }
    
    .cube-container {
        width: 250px;
        height: 250px;
    }
    
    .cube-face {
        width: 250px;
        height: 250px;
        font-size: 60px;
    }
    
    .front, .back { transform: translateZ(125px); }
    .right { transform: rotateY(90deg) translateZ(125px); }
    .left { transform: rotateY(-90deg) translateZ(125px); }
    .top { transform: rotateX(90deg) translateZ(125px); }
    .bottom { transform: rotateX(-90deg) translateZ(125px); }
}

@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: rgba(15, 23, 42, 0.98);
        width: 100%;
        padding: 40px;
        gap: 20px;
        transition: var(--transition-fast);
        backdrop-filter: blur(10px);
        margin-left: 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }

    .nav-controls {
        margin-left: auto;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 60px;
    }
    
    .hero-name {
        font-size: 48px;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .hero-buttons {
        justify-content: center;
    }

    .hero-badge-row {
        justify-content: center;
    }

    .hero-signal-grid {
        grid-template-columns: 1fr;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .hero-3d {
        order: -1;
    }

    .hero-3d.three-earth-mode #threejs-preview {
        width: 280px;
        height: 280px;
        transform: translateY(-22px);
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .image-wrapper {
        margin: 0 auto;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .project-card {
        grid-template-columns: 1fr;
    }

    .projects-summary {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 36px;
    }
}

@media (max-width: 640px) {
    .section {
        padding: 80px 0;
    }
    
    .nav-container {
        padding: 15px 20px;
    }

    .nav-controls {
        gap: 6px;
    }
    
    .hero-name {
        font-size: 36px;
    }
    
    .hero-title {
        font-size: 20px;
    }
    
    .hero-description {
        font-size: 16px;
    }

    .hero-badge {
        width: 100%;
        justify-content: center;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .project-content {
        padding: 28px 22px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .cube-container {
        width: 200px;
        height: 200px;
    }
    
    .cube-face {
        width: 200px;
        height: 200px;
        font-size: 50px;
    }
    
    .front, .back { transform: translateZ(100px); }
    .right { transform: rotateY(90deg) translateZ(100px); }
    .left { transform: rotateY(-90deg) translateZ(100px); }

    .hero-3d.three-earth-mode #threejs-preview {
        width: 220px;
        height: 220px;
        transform: translateY(-14px);
    }

    .three-hud {
        bottom: 14px;
    }

    .three-hud-tag,
    .three-hud-status {
        font-size: 9px;
    }
    .top { transform: rotateX(90deg) translateZ(100px); }
    .bottom { transform: rotateX(-90deg) translateZ(100px); }
    
    .image-wrapper {
        width: 300px;
        height: 350px;
    }
    
    .stats-overlay {
        bottom: -20px;
        right: -20px;
        padding: 15px 20px;
        gap: 20px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 28px;
        flex-direction: column;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 15px;
    }
    
    .timeline-item {
        padding-left: 60px;
    }
    
    .timeline-dot {
        left: 6px;
        width: 20px;
        height: 20px;
    }
    
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}
