/* Variables — Design System: Modern Blue */
:root {
    --bg-color: #050508;
    --bg-light: #0d0d14;
    
    /* New Design System Tokens */
    --primary: #1275e2;
    --secondary: #5f78a3;
    --tertiary: #c55b00;
    --neutral: #74777f;
    
    /* Aliases for backward compatibility */
    --cyan: var(--primary);
    --purple: var(--secondary);
    --gold: var(--tertiary);
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --glass-bg: rgba(13, 13, 20, 0.6);
    --glass-border: rgba(18, 117, 226, 0.2);
    
    /* Glow colors derived from primary */
    --primary-glow: rgba(18, 117, 226, 0.5);
    --secondary-glow: rgba(95, 120, 163, 0.5);
    --tertiary-glow: rgba(197, 91, 0, 0.5);
    
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Inter', monospace;
    
    /* Shape — Maximum Roundedness */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 9999px;  /* Pill shape */
    
    /* Fluid Typography */
    --text-hero: clamp(2rem, 8vw, 6rem);
    --text-section-title: clamp(1.2rem, 4vw, 2.5rem);
    --text-body: clamp(0.875rem, 2vw, 1rem);
}

/* Reset & Global */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

canvas {
    display: block;
    touch-action: none;
}

/* Touch targets */
a, button {
    min-height: 44px;
    min-width: 44px;
}

html {
    scroll-behavior: smooth;
    cursor: none; /* For custom cursor */
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Boot Screen */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #020204;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    font-family: var(--font-mono);
    color: var(--cyan);
    font-size: 1.2rem;
    transition: opacity 1s ease 0.5s, visibility 1s ease 0.5s;
}

#boot-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

#boot-text {
    white-space: pre-wrap;
    line-height: 1.8;
}

.blinking-cursor {
    display: inline-block;
    width: 12px;
    height: 1.2em;
    background-color: var(--cyan);
    animation: boot-blink 1s step-end infinite;
    vertical-align: text-bottom;
}

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

/* Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    box-shadow: 0 0 10px var(--cyan), 0 0 5px var(--purple);
    z-index: 9999;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: var(--purple);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--cyan);
}

/* Custom Cursor */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    background-color: var(--cyan);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px var(--cyan);
}

.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 1px solid var(--purple);
    border-radius: 50%;
    z-index: 9998;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, border-color 0.2s;
}

a:hover ~ .cursor-outline, button:hover ~ .cursor-outline, .project-card-3d:hover ~ .cursor-outline {
    width: 60px;
    height: 60px;
    border-color: var(--cyan);
    background: rgba(0, 245, 255, 0.1);
}

/* Base Classes */
.section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.section-header {
    margin-bottom: 4rem;
    text-align: center;
}

.section-title {
    font-family: var(--font-heading);
    font-size: var(--text-section-title);
    color: var(--text-primary);
    display: inline-block;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-md);
}

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

/* Navbar */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 2rem;
    transition: all 0.3s ease;
}

#navbar.scrolled {
    padding: 1rem 2rem;
    background: rgba(5, 5, 8, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 2px;
}

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

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

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--cyan);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--purple);
    transition: width 0.3s ease;
}

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

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

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

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 5, 15, 0.97);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.mobile-nav-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-overlay a {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s;
}

.mobile-nav-overlay a:hover {
    color: var(--cyan);
}

/* Hero Section Wrapper */
#hero-wrapper {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    overflow: hidden;
}

/* Shader Background */
#vanta-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none; /* Let clicks pass through to content */
    background: transparent;
}

#vanta-bg canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Hero Section */
#home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 6rem;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 4rem;
}

.hero-text {
    flex: 1;
}

/* Glitch Effect */
.glitch {
    font-family: var(--font-heading);
    font-size: var(--text-hero);
    font-weight: 900;
    position: relative;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px var(--primary-glow);
    white-space: nowrap;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--cyan);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--purple);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip-path: inset(20% 0 80% 0); }
    20% { clip-path: inset(60% 0 10% 0); }
    40% { clip-path: inset(40% 0 50% 0); }
    60% { clip-path: inset(80% 0 5% 0); }
    80% { clip-path: inset(10% 0 70% 0); }
    100% { clip-path: inset(30% 0 20% 0); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(10% 0 60% 0); }
    20% { clip-path: inset(30% 0 20% 0); }
    40% { clip-path: inset(70% 0 10% 0); }
    60% { clip-path: inset(20% 0 50% 0); }
    80% { clip-path: inset(50% 0 30% 0); }
    100% { clip-path: inset(5% 0 80% 0); }
}

.subtitle-container {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--cyan);
    margin-bottom: 2rem;
    min-height: 2.5rem;
}

.bracket {
    color: var(--purple);
    font-weight: bold;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.counter {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--gold);
    font-weight: 700;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* Cyber Button */
.cyber-button {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 1rem;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--primary);
    padding: 1rem 2.5rem;
    position: relative;
    border: none;
    outline: none;
    cursor: none;
    font-weight: 700;
    border-radius: var(--radius-lg);
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    letter-spacing: 1px;
}

.cyber-button:hover {
    background: var(--text-primary);
    color: var(--bg-color);
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--primary-glow);
}

.button__glitch {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--secondary);
    transform: translate(-5px, 5px);
    z-index: -1;
    border-radius: var(--radius-lg);
    transition: transform 0.2s;
}

.cyber-button:hover .button__glitch {
    transform: translate(0, 0);
}

/* Hero Visual */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.profile-container {
    position: relative;
    width: 350px;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#three-hero-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    z-index: 10;
    pointer-events: auto; /* Changed to auto so we can interact with Earth */
}

.profile-image-wrapper {
    position: relative;
    width: 250px;
    height: 250px;
    z-index: 2;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    padding: 4px;
    animation: float 6s ease-in-out infinite;
}

.profile-image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-color);
    border-radius: 50%;
    z-index: -1;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    filter: contrast(1.1) grayscale(20%);
    transition: filter 0.3s;
}

.profile-img:hover {
    filter: contrast(1.2) grayscale(0%);
}

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

/* About Section - Overlapping Card Layout */
.about-hero-module {
    width: 100%;
    max-width: 85rem; /* Expanded to allow a very wide info card */
    margin: 0 auto;
}

.about-desktop {
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 3rem;
}

.about-avatar-container {
    width: 470px;
    height: 470px;
    flex-shrink: 0;
    border-radius: 1.5rem;
    overflow: hidden;
    background: rgba(13, 13, 20, 0.4);
    border: 1px solid var(--secondary);
    box-shadow: 0 0 20px var(--secondary-glow);
    z-index: 1; 
}

.about-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.1);
    transition: transform 0.4s, filter 0.4s;
}

.about-avatar-container:hover .about-avatar-img {
    transform: scale(1.03);
    filter: contrast(1.2);
}

.about-info-card {
    border-radius: 1.5rem;
    padding: 2.5rem;
    margin-left: -80px; 
    z-index: 10;
    flex: 1;
    max-width: 52rem; /* Significantly expanded to ensure horizontal layout drops vertical height */
}

.about-card-header {
    margin-bottom: 1.5rem;
}

.about-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.about-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--cyan);
}

.about-text-new {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.about-socials {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-icon {
    width: 3rem;
    height: 3rem;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
    cursor: pointer;
}

.social-icon i {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.social-icon:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 0 15px var(--primary-glow);
}

.border-top-separator {
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
}

@media (max-width: 900px) {
    .about-desktop {
        flex-direction: column;
        text-align: center;
    }
    
    .about-avatar-container {
        width: 100%;
        max-width: 400px;
        height: auto;
        aspect-ratio: 1 / 1;
    }
    
    .about-info-card {
        margin-left: 0;
        margin-top: -40px; 
        max-width: 100%;
        padding: 1.5rem;
    }
    
    .about-socials {
        justify-content: center;
    }
}

.github-graph-wrapper {
    padding: 0;
    margin-top: 1rem;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.graph-title {
    font-family: var(--font-mono);
    color: var(--purple);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    white-space: nowrap;
}

.github-graph-img {
    max-width: none;
    height: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(5, 5, 8, 0.5);
    padding: 10px;
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.about-3d-container {
    width: 100%;
    height: 400px;
    background: rgba(13, 13, 20, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.desk-hardware-title {
    position: absolute;
    top: 15px;
    left: 20px;
    font-family: var(--font-mono);
    color: var(--cyan);
    font-size: 1rem;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#about-3d-desk {
    flex: 1;
    width: 100%;
    height: 100%;
    cursor: grab;
}

#about-3d-desk:active {
    cursor: grabbing;
}

.desk-hints {
    position: absolute;
    bottom: 15px;
    right: 20px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 0.8rem;
    z-index: 10;
    pointer-events: none;
}

.card-decor-tl {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--cyan);
    border-left: 2px solid var(--cyan);
}

.card-decor-br {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--purple);
    border-right: 2px solid var(--purple);
}

/* Skills Section */
.bento-grid-center {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 2rem;
    align-items: center;
}

/* Specific Grid Placement */
.bento-card-tl { grid-area: 1 / 1 / 2 / 2; }
.bento-card-tr { grid-area: 1 / 3 / 2 / 4; }
.bento-card-bl { grid-area: 2 / 1 / 3 / 2; }
.bento-card-br { grid-area: 2 / 3 / 3 / 4; }
.bento-card-center { 
    grid-area: 1 / 2 / 3 / 3; 
    height: 100% !important;
    min-height: 400px;
}

/* Three.js canvas container */
#skills-canvas-container {
    width: 100%;
    position: relative;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    overflow: hidden;
}

#skills-canvas-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.bento-card {
    background: rgba(20, 20, 30, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    position: relative;
    overflow: hidden;
    height: 100%;
}

@media (max-width: 1024px) {
    .bento-grid-center {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .bento-card-tl, .bento-card-tr, .bento-card-bl, .bento-card-br, .bento-card-center {
        grid-area: auto;
    }
    .bento-card-center {
        order: -1; /* Keep the visuals on top for mobile */
        min-height: 300px;
    }
}

.bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.bento-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--glass-border);
}

.bento-card:hover::before {
    transform: translateX(100%);
}

.bento-card h3 {
    font-family: var(--font-heading);
    color: var(--cyan);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-bar-container {
    margin-bottom: 1.2rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

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

.progress-fill {
    height: 100%;
    width: 0; /* Animated by JS */
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    border-radius: 3px;
    box-shadow: 0 0 10px var(--cyan);
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1rem;
}

.tag, .tech-tags span {
    font-family: var(--font-body);
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    background: rgba(95, 120, 163, 0.1);
    border: 1px solid rgba(95, 120, 163, 0.3);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    transition: all 0.3s;
    min-width: max-content;
}

.tag:hover, .tech-tags span:hover {
    background: rgba(18, 117, 226, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Terminal Section */
.terminal-container {
    background: #0d0d14;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(18, 117, 226, 0.1);
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    font-family: var(--font-body);
}

.terminal-header {
    background: #1a1a24;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.terminal-buttons {
    display: flex;
    gap: 8px;
    margin-right: 15px;
}

.terminal-buttons span {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.btn-close { background: #ff5f56; box-shadow: 0 0 5px #ff5f56; }
.btn-min { background: #ffbd2e; box-shadow: 0 0 5px #ffbd2e; }
.btn-max { background: #27c93f; box-shadow: 0 0 5px #27c93f; }

.terminal-title {
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-grow: 1;
    text-align: center;
    padding-right: 49px; /* Balance the buttons */
}

.terminal-body {
    padding: 20px;
    min-height: 250px;
    max-height: 400px;
    overflow-y: auto;
    font-size: 1rem;
    color: #fff;
    line-height: 1.5;
}

.terminal-output p {
    margin-bottom: 8px;
}

.term-cmd { color: var(--gold); }
.term-err { color: #ff5f56; }
.term-system { color: var(--purple); }

.terminal-input-line {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.term-prompt {
    color: var(--cyan);
    margin-right: 10px;
}

#terminal-input {
    background: transparent;
    border: none;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 1rem;
    flex-grow: 1;
    outline: none;
    caret-color: var(--cyan);
}

/* Projects Section */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

.project-card-3d {
    background: var(--bg-light);
    border: 1px solid #222;
    border-radius: var(--radius-md);
    padding: 2.5rem;
    position: relative;
    transform-style: preserve-3d;
    cursor: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: border-color 0.3s;
}

.project-card-3d:hover {
    border-color: var(--purple);
}

.project-content {
    transform: translateZ(30px);
}

.project-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 15px var(--primary-glow);
}

.project-card-3d h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.proj-subtitle {
    font-family: var(--font-mono);
    color: var(--gold);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.cyber-list {
    list-style: none;
    margin-bottom: 2rem;
}

.cyber-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

.cyber-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--purple);
    font-family: var(--font-mono);
    font-weight: bold;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
}

.tech-stack span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--cyan);
    text-transform: uppercase;
}

/* Timeline */
.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--cyan), var(--purple), var(--cyan));
    transform: translateX(-50%);
    opacity: 0.3;
}

.timeline-node {
    display: flex;
    justify-content: flex-end;
    padding-right: 50%;
    position: relative;
    margin-bottom: 3rem;
}

.timeline-node.right {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: 50%;
}

.node-marker {
    position: absolute;
    left: 50%;
    top: 20px;
    width: 16px;
    height: 16px;
    background: var(--bg-color);
    border: 3px solid var(--cyan);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 10px var(--cyan);
    transition: all 0.3s;
}

.timeline-node:hover .node-marker {
    background: var(--cyan);
    box-shadow: 0 0 20px var(--cyan);
    transform: translateX(-50%) scale(1.2);
}

.node-content {
    width: 90%;
    padding: 2rem;
    position: relative;
}

.timeline-node.right .node-content {
    margin-left: 10%;
}

.timeline-node:not(.right) .node-content {
    margin-right: 10%;
}

.node-year {
    position: absolute;
    top: -15px;
    left: 20px;
    background: var(--bg-color);
    border: 1px solid var(--secondary);
    color: var(--secondary);
    padding: 0.2rem 1rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    border-radius: var(--radius-lg);
}

.timeline-node.right .node-year {
    left: auto;
    right: 20px;
}

.node-content h3 {
    font-family: var(--font-heading);
    color: var(--cyan);
    margin-bottom: 0.5rem;
}

.node-location {
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* Certifications Carousel */
.cert-carousel-wrapper {
    overflow: hidden;
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    padding: 2rem 0;
}

/* Left & Right edge fade overlays */
.cert-carousel-wrapper::before,
.cert-carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    width: 15%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.cert-carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-color) 0%, transparent 100%);
}

.cert-carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-color) 0%, transparent 100%);
}

.cert-carousel {
    display: flex;
    width: max-content;
    animation: scroll 40s linear infinite;
    gap: 2rem;
    padding: 0 2rem;
}

.cert-carousel:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 1rem)); }
}

.cert-card {
    background: rgba(13, 13, 20, 0.8);
    border: 1px solid var(--secondary);
    padding: 1.5rem 2rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    transition: all 0.3s;
}

.cert-card i {
    color: var(--tertiary);
    font-size: 1.5rem;
}

.cert-card span {
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.cert-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    transform: translateY(-5px);
}

/* Webgame Embed Section */
.game-wrapper {
    padding: 2rem;
    position: relative;
    border-radius: var(--radius-md);
    border: 1px solid var(--secondary);
    box-shadow: 0 0 30px var(--secondary-glow);
}

.game-hud-top, .game-hud-bottom {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    font-family: var(--font-body);
    color: var(--primary);
    font-size: 0.85rem;
    letter-spacing: 2px;
}

.game-hud-bottom {
    justify-content: center;
    color: var(--text-secondary);
}

#game-container {
    width: 100%;
    height: 60vh;
    min-height: 400px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
}

#game-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Contact Section */
.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: rgba(18, 117, 226, 0.1);
    border: 1px solid var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    transition: all 0.3s;
}

.contact-item:hover .contact-icon {
    background: var(--primary);
    color: var(--bg-color);
    box-shadow: 0 0 25px var(--primary);
    transform: scale(1.1);
}

.contact-info .label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
}

.contact-info a, .contact-info p {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: var(--purple);
}

/* Footer & Resume Modal */
.footer {
    position: relative;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 4rem;
    background: var(--bg-color);
    overflow: hidden;
    width: 100%;
}

.footer-top {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    position: relative;
    z-index: 20; /* Above canvas */
    padding: 4rem 2rem 2rem;
}

@media (min-width: 768px) {
    .footer-top {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-brand {
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.05em;
}

.footer-logo-accent {
    color: var(--primary);
}

.footer-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-columns {
    display: flex;
    gap: 4rem;
    flex-wrap: wrap;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-col-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-col a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-col a:hover {
    color: var(--text-primary);
}

.footer-col a::after {
    content: "›";
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.3s ease;
    font-size: 1.2rem;
    color: var(--primary);
}

.footer-col a:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* Flickering Grid Container */
.flicker-grid-wrapper {
    position: relative;
    width: 100%;
    height: 16rem;
    margin-top: 2rem;
    z-index: 10;
}

@media (min-width: 768px) {
    .flicker-grid-wrapper {
        height: 20rem;
    }
}

.flicker-grid-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, transparent 40%, var(--bg-color) 100%);
    z-index: 15;
    pointer-events: none;
}

#flicker-grid-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

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

.social-btn {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: all 0.3s;
}

.social-btn:hover.linkedin { color: var(--primary); text-shadow: 0 0 10px var(--primary-glow); }
.social-btn:hover.github { color: var(--tertiary); text-shadow: 0 0 10px var(--tertiary-glow); }
.social-btn.resume {
    font-family: var(--font-body);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.social-btn:hover.resume { color: var(--secondary); text-shadow: 0 0 10px var(--secondary-glow); }

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 90vw;
    max-width: 1000px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: var(--font-mono);
    color: var(--cyan);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #ff4757;
}

.modal-content iframe {
    flex: 1;
    border: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 2rem;
    }
    
    .timeline-line {
        left: 20px;
        transform: none;
    }
    
    .timeline-node, .timeline-node.right {
        justify-content: flex-start;
        padding-left: 50px;
        padding-right: 0;
    }
    
    .timeline-node .node-content, .timeline-node.right .node-content {
        margin: 0;
        width: 100%;
    }
    
    .node-marker {
        left: 20px;
        transform: translateX(-50%);
    }
    
    .timeline-node:hover .node-marker {
        transform: translateX(-50%) scale(1.2);
    }
    
    .node-year, .timeline-node.right .node-year {
        right: 20px;
        left: auto;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(5, 5, 8, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        text-align: center;
        border-bottom: 1px solid var(--purple);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }

    .cursor-dot, .cursor-outline {
        display: none; /* Hide custom cursor on mobile */
    }
    html {
        cursor: auto;
    }
    .cyber-button, a, .project-card-3d, .modal-close {
        cursor: pointer;
    }
}

/* Header Span Colors */
.cyber-bracket {
    color: var(--primary);
    font-weight: 700;
    text-shadow: 0 0 10px var(--primary-glow);
}

.cyber-bracket:last-child {
    color: var(--secondary);
    text-shadow: 0 0 10px var(--secondary-glow);
}

.tracking-tighter {
    letter-spacing: 0.05em;
}

/* --- 12. Radial Orbital Timeline (Technical Arsenal) --- */
.orbital-timeline-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

/* Center Core */
.orbital-center {
    position: absolute;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--primary), var(--tertiary));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: orbital-pulse-glow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.orbital-center-ping1, .orbital-center-ping2 {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: orbital-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.orbital-center-ping1 {
    width: 80px; height: 80px; opacity: 0.7;
}
.orbital-center-ping2 {
    width: 96px; height: 96px; opacity: 0.5; animation-delay: 0.5s;
}

.orbital-center-core {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
}

.orbital-ring {
    position: absolute;
    width: 384px;
    height: 384px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Orbiting Nodes */
.orbit-node {
    position: absolute;
    transition: all 0.7s ease;
    cursor: pointer;
}

.orbit-node-bg-pulse {
    position: absolute;
    border-radius: 50%;
    inset: -4px;
}

.orbit-node-icon-container {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.4);
    background: rgba(0,0,0,1);
    color: white;
    transition: all 0.3s;
}

.orbit-node-expanded .orbit-node-icon-container {
    background: white;
    color: black;
    border-color: white;
    box-shadow: 0 0 15px rgba(255,255,255,0.3);
    transform: scale(1.5);
}

.orbit-node-related .orbit-node-icon-container {
    background: rgba(255,255,255,0.5);
    color: black;
    border-color: white;
    animation: orbital-pulse-glow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.orbit-node-title {
    position: absolute;
    top: 48px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: all 0.3s;
    color: rgba(255,255,255,0.7);
}

.orbit-node-expanded .orbit-node-title {
    color: white;
    transform: translateX(-50%) scale(1.25);
    top: 55px;
}

/* Orbit Node Expanding Card (Details) */
.orbit-card {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 256px;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,245,255,0.1);
    z-index: 300;
    cursor: default;
    /* Custom connection line to node */
    border-top: 1px solid var(--glass-border);
}

.orbit-card::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
}

.orbit-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.orbit-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid white;
    font-weight: bold;
}

.orbit-badge-completed {
    background: var(--cyan);
    color: black;
    border-color: var(--cyan);
}
.orbit-badge-inprogress {
    background: white;
    color: black;
}
.orbit-badge-pending {
    background: rgba(0,0,0,0.4);
    color: white;
    border-color: rgba(255,255,255,0.5);
}

.orbit-card-date {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: rgba(255,255,255,0.5);
}

.orbit-card-title {
    font-size: 0.875rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.orbit-card-content {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 1rem;
}

.orbit-energy-section {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 0.75rem;
    margin-bottom: 1rem;
}

.orbit-energy-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    margin-bottom: 4px;
}

.orbit-energy-bar-bg {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.orbit-energy-bar-fill {
    height: 100%;
    background: linear-gradient(to right, var(--purple), var(--cyan));
}

.orbit-connections-section {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 0.75rem;
}

.orbit-connections-title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.5rem;
}

.orbit-related-link {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 8px;
    font-size: 0.7rem;
    border: 1px solid rgba(255,255,255,0.2);
    background: transparent;
    color: rgba(255,255,255,0.8);
    margin-right: 4px;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.orbit-related-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.orbit-related-link i {
    font-size: 0.5rem;
    margin-left: 4px;
    opacity: 0.6;
}

/* Animations translated from Tailwind */
@keyframes orbital-pulse-glow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes orbital-ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* --- Spotlight Glow Card Styles --- */
[data-glow] {
    --radius: 20;
    --border: 2;
    --backdrop: hsl(0 0% 60% / 0.12);
    --backup-border: var(--backdrop);
    --size: 250;
    --outer: 1;
    --border-size: calc(var(--border) * 1px);
    --spotlight-size: calc(var(--size) * 1px);
    --hue: calc(var(--base) + (var(--xp, 0) * var(--spread, 0)));
    
    background-color: var(--backdrop, transparent);
    background-size: calc(100% + (2 * var(--border-size))) calc(100% + (2 * var(--border-size)));
    background-position: 50% 50%;
    background-attachment: fixed;
    border: var(--border-size) solid var(--backup-border);
    position: relative;
    touch-action: none;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

[data-glow]::before,
[data-glow]::after {
    pointer-events: none;
    content: "";
    position: absolute;
    inset: calc(var(--border-size) * -1);
    border: var(--border-size) solid transparent;
    border-radius: calc(var(--radius) * 1px);
    background-attachment: fixed;
    background-size: calc(100% + (2 * var(--border-size))) calc(100% + (2 * var(--border-size)));
    background-repeat: no-repeat;
    background-position: 50% 50%;
    
    /* Standard composite for modern browsers */
    mask: linear-gradient(transparent, transparent), linear-gradient(white, white);
    mask-clip: padding-box, border-box;
    mask-composite: intersect;
    
    /* Webkit-specific composite for Safari/older Webkit */
    -webkit-mask: linear-gradient(transparent, transparent), linear-gradient(white, white);
    -webkit-mask-clip: padding-box, border-box;
    -webkit-mask-composite: source-in;
}

[data-glow]::before {
    background-image: radial-gradient(
        calc(var(--spotlight-size) * 0.75) calc(var(--spotlight-size) * 0.75) at
        calc(var(--x, 0) * 1px)
        calc(var(--y, 0) * 1px),
        hsl(var(--hue, 210) 80% 60% / 1), transparent 100%
    );
    filter: brightness(2);
}

[data-glow]::after {
    background-image: radial-gradient(
        calc(var(--spotlight-size) * 0.5) calc(var(--spotlight-size) * 0.5) at
        calc(var(--x, 0) * 1px)
        calc(var(--y, 0) * 1px),
        hsl(0 100% 100% / 1), transparent 100%
    );
}

/* Inner glow element */
[data-glow] > .glow-inner {
    position: absolute;
    inset: 0;
    will-change: filter;
    opacity: var(--outer, 1);
    border-radius: calc(var(--radius) * 1px);
    border-width: calc(var(--border-size) * 20);
    filter: blur(calc(var(--border-size) * 10));
    background: none;
    pointer-events: none;
    border: none;
}

[data-glow] > .glow-inner::before {
    inset: -10px;
    border-width: 10px;
    content: "";
    position: absolute;
    pointer-events: none;
    border: var(--border-size) solid transparent;
    border-radius: calc(var(--radius) * 1px);
    background-attachment: fixed;
    background-size: calc(100% + (2 * var(--border-size))) calc(100% + (2 * var(--border-size)));
    background-repeat: no-repeat;
    background-position: 50% 50%;
    background-image: radial-gradient(
        calc(var(--spotlight-size) * 0.75) calc(var(--spotlight-size) * 0.75) at
        calc(var(--x, 0) * 1px)
        calc(var(--y, 0) * 1px),
        hsl(var(--hue, 210) 80% 60% / 1), transparent 100%
    );
    mask: linear-gradient(transparent, transparent), linear-gradient(white, white);
    mask-clip: padding-box, border-box;
    mask-composite: intersect;
    -webkit-mask: linear-gradient(transparent, transparent), linear-gradient(white, white);
    -webkit-mask-clip: padding-box, border-box;
    -webkit-mask-composite: source-in;
}


/* ====== RESPONSIVE FIXES (MOBILE/TABLET) ====== */

/* Touch Game Controls */
.touch-controls {
  display: none;
}

@media (max-width: 768px) {
  /* Snap Scroll Disable */
  html {
    scroll-snap-type: none;
  }
  section {
    scroll-snap-align: unset;
    min-height: auto;
  }

  /* About profile image */
  .about-full-img {
    max-width: 280px;
    margin: 0 auto;
    display: block;
  }
  
  /* Hero Text Override */
  .glitch {
    font-size: 11vw !important;
  }
  
  /* Prevent Globe / 3D Model overflowing horizontal mobile */
  .profile-container {
    width: 250px;
    height: 250px;
  }
  #three-hero-container {
    width: 110%;
    height: 110%;
  }

  .about-image-wrapper {
    display: flex;
    justify-content: center;
    border: none;
    background: transparent;
    box-shadow: none;
  }

  /* Timeline */
  .timeline {
    padding-left: 24px;
  }
  .timeline-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .timeline-item:nth-child(even) {
    flex-direction: column;
  }
  .timeline-line {
    left: 0;
  }

  /* Contact */
  .contact-card {
    padding: 2rem 1.5rem;
    align-items: center;
    text-align: center;
  }
  .contact-item {
    flex-direction: column;
    gap: 1rem;
  }

  /* Footer Links */
  .footer-columns {
    flex-direction: column;
    gap: 2rem;
  }
  .footer-col {
    align-items: center;
    text-align: center;
  }

  /* Game Mobile Controls */
  .touch-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    gap: 16px;
  }
}

.dpad {
  display: grid;
  grid-template-areas: '. up .' 'left . right' '. down .';
  gap: 4px;
}
.dpad .up { grid-area: up; }
.dpad .left { grid-area: left; }
.dpad .right { grid-area: right; }
.dpad .down { grid-area: down; }

.dpad-btn, .jump-btn {
  background: rgba(0, 245, 255, 0.1);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  border-radius: 8px;
  width: 52px;
  height: 52px;
  font-size: 1.2rem;
  touch-action: manipulation;
  cursor: pointer;
}
.jump-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}

/* Terminal Adjustments */
.terminal-container {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}
.terminal-body {
  overflow-x: auto;
  font-size: clamp(13px, 3vw, 15px);
}
#terminal-input {
  width: 100%;
}

/* Grids improvements for smaller screens */
.project-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

