/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --primary: #00D9FF;
    --primary-dark: #00B8D4;
    --primary-light: #4DFFFF;
    --secondary: #1a1a1a;
    --accent: #FF6B35;
    --accent-2: #4ECDC4;
    --accent-3: #FFD93D;
    --dark: #0d1117;
    --darker: #0a0a0a;
    --darkest: #050505;
    --light: #ffffff;
    --gray: #6c757d;
    --gray-light: #f8f9fa;
    --gray-dark: #343a40;
    --gray-darker: #212529;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00D9FF 0%, #00B8D4 100%);
    --gradient-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    --gradient-tech: linear-gradient(135deg, #00D9FF 0%, #4ECDC4 50%, #FF6B35 100%);
    --gradient-dark: linear-gradient(135deg, #0d1117 0%, #1a1a1a 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Spacing */
    --section-padding: 120px 0;
    --container-padding: 0 20px;
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 30px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(0, 217, 255, 0.3);
    --shadow-glow-lg: 0 0 40px rgba(0, 217, 255, 0.4);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
    
    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s ease;
    --transition-bounce: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Components */
    --cube-size: 200px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--light);
    background: var(--dark);
    overflow-x: hidden;
    font-weight: 400;
}
/* Responsive media defaults */
img, svg, video { max-width: 100%; height: auto; }
iframe { max-width: 100%; }
button, a, .btn { -webkit-tap-highlight-color: rgba(0,0,0,0); }

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    text-align: center;
}

.loader-circle {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(0, 217, 255, 0.2);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loader-text {
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    letter-spacing: 1px;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--gray);
    font-size: 1rem;
    line-height: 1.7;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: var(--transition);
    padding: 0.5rem 0;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--light);
    box-shadow: var(--shadow-glow);
}

.logo-text {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

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

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

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

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--gradient-dark);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.parallax-bg {
    position: relative;
    width: 100%;
    height: 100%;
}

.circuit-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(90deg, rgba(0, 217, 255, 0.1) 1px, transparent 1px),
        linear-gradient(rgba(0, 217, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: circuit-move 20s linear infinite;
    transform: translateZ(0);
}

@keyframes circuit-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

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

.floating-particles::before,
.floating-particles::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary);
    border-radius: 50%;
    animation: float-particle 8s ease-in-out infinite;
}

.floating-particles::before {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-particles::after {
    top: 60%;
    right: 20%;
    animation-delay: 4s;
}

@keyframes float-particle {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.5; }
    50% { transform: translateY(-30px) rotate(180deg); opacity: 1; }
}

.tech-orbs {
    position: absolute;
    width: 100%;
    height: 100%;
}

.orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.3) 0%, transparent 70%);
    animation: orb-float 10s ease-in-out infinite;
}

.orb-1 {
    width: 100px;
    height: 100px;
    top: 20%;
    right: 15%;
    animation-delay: 0s;
}

.orb-2 {
    width: 60px;
    height: 60px;
    bottom: 30%;
    left: 10%;
    animation-delay: 3s;
}

.orb-3 {
    width: 80px;
    height: 80px;
    top: 60%;
    left: 20%;
    animation-delay: 6s;
}

@keyframes orb-float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.1); }
}

.hero-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 25px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
}

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

.typing-container {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    min-height: 2rem;
    display: flex;
    align-items: center;
}

.cursor {
    animation: blink 1s infinite;
    margin-left: 2px;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--light);
    box-shadow: var(--shadow-glow);
}

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

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

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

.hero-3d-container {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.tech-cube {
    width: var(--cube-size);
    height: var(--cube-size);
    position: relative;
    transform-style: preserve-3d;
    animation: cube-rotate 20s linear infinite;
}

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

.cube-face {
    position: absolute;
    width: var(--cube-size);
    height: var(--cube-size);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(0, 217, 255, 0.3);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.cube-face:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.cube-face i {
    font-size: 2.5rem;
    color: var(--primary);
}

.cube-face span {
    font-size: 0.875rem;
    color: var(--light);
    font-weight: 500;
}

.cube-face.front { transform: translateZ(calc(var(--cube-size) / 2)); }
.cube-face.back { transform: translateZ(calc(var(--cube-size) / -2)) rotateY(180deg); }
.cube-face.right { transform: translateX(calc(var(--cube-size) / 2)) rotateY(90deg); }
.cube-face.left { transform: translateX(calc(var(--cube-size) / -2)) rotateY(-90deg); }
.cube-face.top { transform: translateY(calc(var(--cube-size) / -2)) rotateX(90deg); }
.cube-face.bottom { transform: translateY(calc(var(--cube-size) / 2)) rotateX(-90deg); }

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: var(--light);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    font-family: var(--font-mono);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray);
    font-weight: 500;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    font-size: 0.875rem;
    z-index: 2;
}

.scroll-line {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--primary), transparent);
    animation: scroll-bounce 2s infinite;
}

@keyframes scroll-bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 25px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--primary);
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* About Section */
.about {
    padding: var(--section-padding);
    background: var(--darker);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(0, 217, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    position: relative;
    z-index: 1;
}

.about-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-card);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--light);
}

/* Ensure About card header icon matches other icon sizes */
.about .card-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
}
.about .card-icon i { font-size: 28px; line-height: 0; }
.about .card-icon svg,
.about .card-icon img { width: 28px; height: 28px; display: block; object-fit: contain; }

.about-card h3 {
    color: var(--light);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.education-timeline {
    margin-top: 2rem;
}

.timeline-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.5rem;
}

.timeline-content h4 {
    color: var(--light);
    margin-bottom: 0.25rem;
    font-size: 1.125rem;
}

.timeline-content p {
    color: var(--gray);
    margin-bottom: 0.25rem;
}

.timeline-date {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 500;
}

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

.expertise-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.expertise-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.expertise-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: var(--light);
}

.expertise-item h4 {
    color: var(--light);
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.expertise-item p {
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

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

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transform: scaleX(0);
    transform-origin: left;
    animation: progress-fill 2s ease-out forwards;
}

@keyframes progress-fill {
    to { transform: scaleX(1); }
}

/* Skills Section */
.skills {
    padding: var(--section-padding);
    background: var(--dark);
    position: relative;
    text-align: center;
}

.skills::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(0, 217, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

/* Skills parallax decorative layers */
.skills-parallax { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.sp-dot, .sp-ring { position: absolute; display: block; opacity: 0.35; }
.sp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 16px rgba(0,217,255,0.35); }
.sp-ring { width: 120px; height: 120px; border-radius: 50%; border: 2px solid rgba(0,217,255,0.25); }

/* Dot positions */
.sp-dot:nth-child(1) { top: 20%; left: 12%; }
.sp-dot:nth-child(2) { top: 65%; left: 18%; }
.sp-dot:nth-child(3) { top: 35%; right: 14%; }

/* Ring positions */
.sp-ring:nth-child(4) { top: 15%; right: 25%; }
.sp-ring:nth-child(5) { bottom: 10%; left: 22%; }

/* Minimal, organized grid */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0;
    position: relative;
    z-index: 1;
}

/* Center wrapper */
.skills-content { display: flex; justify-content: center; }
.skill-category { display: flex; justify-content: center; width: 100%; }

/* Remove card look */
.skill-category {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    transition: none;
}

/* Hide header (icon + title) */
.category-header { display: none; }

/* Compact chip list */
.skill-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    transition: var(--transition-fast);
}

.skill-item:hover {
    border-color: rgba(0, 217, 255, 0.35);
    background: rgba(255, 255, 255, 0.06);
}

/* Minimal chip icon */
.skill-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #b9e8f7;
}

.skill-icon i,
.skill-icon svg { font-size: 14px; line-height: 0; }

.skill-item span {
    color: var(--light);
    font-size: 0.85rem;
}

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

.level-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    animation: level-fill 1.5s ease-out forwards;
}

@keyframes level-fill {
    to { transform: scaleX(1); }
}

/* Projects Section */
.projects {
    padding: var(--section-padding);
    background: var(--darker);
    position: relative;
}

.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 217, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* Inline style moved from HTML */
#projects a.project-card-link { text-decoration: none; }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
    align-items: stretch;
}

.projects-grid > a {
    display: block;
    height: 100%;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow-lg);
}

.project-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--light);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: var(--light);
}

.overlay-content i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

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

.project-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    flex-shrink: 0;
    box-sizing: border-box;
}

.project-icon i {
    font-size: 28px;
    line-height: 0;
}

.project-icon svg,
.project-icon img {
    width: 28px;
    height: 28px;
    display: block;
    object-fit: contain;
}

.project-card h3 {
    color: var(--light);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.project-card p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.tech-tag {
    background: rgba(0, 217, 255, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(0, 217, 255, 0.2);
    transition: var(--transition);
    line-height: 1;
}

.tech-tag:hover {
    background: var(--primary);
    color: var(--light);
}

/* Contact Section */
.contact {
    padding: var(--section-padding);
    background: var(--dark);
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 20%, rgba(0, 217, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    position: relative;
    z-index: 1;
}

.contact-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-card);
}

.contact-card h3 {
    color: var(--light);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.contact-list {
    list-style: none;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 217, 255, 0.1);
    transition: var(--transition);
}

.contact-list li:hover {
    border-color: var(--primary);
    transform: translateX(5px);
}

.list-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--light);
    flex-shrink: 0;
}

.list-content h4 {
    color: var(--light);
    margin-bottom: 0.25rem;
    font-size: 1.125rem;
}

.list-content p {
    color: var(--gray);
    margin: 0;
    font-size: 0.875rem;
}

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

.contact-link {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: var(--border-radius-lg);
    text-decoration: none;
    color: var(--light);
    transition: var(--transition);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-card);
}

.contact-link:hover {
    transform: translateX(10px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.link-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--light);
    flex-shrink: 0;
}

.link-content {
    flex: 1;
}

.link-content h4 {
    color: var(--light);
    margin-bottom: 0.25rem;
    font-size: 1.125rem;
}

.link-content p {
    color: var(--gray);
    margin: 0;
    font-size: 0.875rem;
}

.link-arrow {
    color: var(--primary);
    font-size: 1.25rem;
    transition: var(--transition);
}

.contact-link:hover .link-arrow {
    transform: translateX(5px);
}

.contact-link.linkedin:hover {
    border-color: #0077B5;
}

.contact-link.email:hover {
    border-color: #D14836;
}

.contact-link.portfolio:hover {
    border-color: #FF5722;
}

/* Footer */
.footer {
    background: var(--darker);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.footer-text p {
    color: var(--gray);
    margin: 0;
}

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

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

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

/* Footer socials (icons only) */
.footer-socials {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.footer-socials a {
    color: var(--light);
    font-size: 1.4rem;
    transition: transform 0.2s ease, color 0.3s ease;
}

.footer-socials a:hover {
    color: var(--primary);
    transform: scale(1.2);
}

.footer-socials a:active { transform: scale(0.95); }
.footer-socials a:visited { color: var(--light); }

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: var(--gray);
    margin: 0;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    :root {
        --section-padding: 96px 0;
        --cube-size: 180px;
    }
    .hero-content { gap: 3rem; }
    .projects-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
        --container-padding: 0 16px;
        --cube-size: 160px;
    }
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--dark);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        backdrop-filter: blur(20px);
    }
    .nav-link { padding: 0.875rem 1rem; font-size: 1.05rem; }
    .hamburger { padding: 0.5rem; margin-left: 0.25rem; }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-cta {
        justify-content: center;
    }
    .btn { padding: 0.9rem 1.25rem; font-size: 1rem; }
    
    .hero-stats {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .expertise-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .contact-link { padding: 1.25rem; }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 64px 0;
        --cube-size: 140px;
    }
    .nav-container { padding: 0 14px; }
    .logo-icon { width: 36px; height: 36px; }
    .container { padding: 0 15px; }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .skill-items {
        grid-template-columns: 1fr;
    }
    
    .contact-link { flex-direction: column; text-align: center; gap: 1rem; }
    .hero-title { font-size: clamp(2rem, 7.5vw, 2.4rem); }
    .typing-container { font-size: 1.1rem; }
    .project-card { border-radius: 16px; }
}

@media (max-width: 360px) {
    :root {
        --section-padding: 56px 0;
        --cube-size: 120px;
    }
    h1 { font-size: clamp(2rem, 8vw, 2.5rem); }
    .project-content { padding: 1.25rem; }
}

/* AOS Animations */
[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

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

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

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

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

/* Selection */
::selection {
    background: var(--primary);
    color: var(--light);
}

/* Focus styles */
*:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .hero-bg,
    .scroll-indicator,
    .loading-screen {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .hero,
    .about,
    .skills,
    .projects,
    .contact {
        padding: 2rem 0 !important;
    }
}

/* Icon-only skills carousel */
.skills-carousel {
    overflow: hidden;
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.5rem 0;
}

.carousel-track {
    display: flex;
    gap: 2.25rem;
    align-items: center;
    width: max-content;
    margin: 0 auto;
    animation: scroll-icons 22s linear infinite;
}

.carousel-item {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #d7f6ff;
}

.carousel-item i,
.carousel-item svg { font-size: 26px; line-height: 0; }

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

/* Pause on hover */
.skills-carousel:hover .carousel-track { animation-play-state: paused; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .carousel-track { animation: none; }
}

/* Static skills icon grid */
.skills-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.skill-pill {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #d7f6ff;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.skill-pill i, .skill-pill svg { font-size: 26px; line-height: 0; }
.skill-pill img { width: 28px; height: 28px; display: block; object-fit: contain; }

/* Force white variant for specific brand marks */
.skill-pill[data-skill="GitHub"] img {
    filter: invert(1) brightness(1.6);
}

/* Espressif (ESP32) brand red */
.skill-pill[data-skill^="ESP32"] img {
    filter: invert(18%) sepia(89%) saturate(5792%) hue-rotate(351deg) brightness(95%) contrast(99%);
}

.skill-pill:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 217, 255, 0.35);
    box-shadow: 0 8px 24px rgba(0, 217, 255, 0.15);
}

/* Tooltip from data-skill */
.skill-pill::after {
    content: attr(data-skill);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.skill-pill:hover::after { opacity: 1; transform: translateX(-50%) translateY(-2px); }

/* Generic minimalist parallax for sections */
.section-parallax { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.section-parallax .p-dot { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); opacity: 0.28; box-shadow: 0 0 12px rgba(0,217,255,0.25); }
.section-parallax .p-line { position: absolute; width: 140px; height: 140px; border-radius: 50%; border: 1px solid rgba(0,217,255,0.18); opacity: 0.4; }

/* Helper placements (can be overridden if needed) */
.p-dot.pos-a { top: 18%; left: 10%; }
.p-dot.pos-b { top: 70%; left: 18%; }
.p-dot.pos-c { top: 32%; right: 12%; }
.p-line.pos-d { top: 12%; right: 22%; }
.p-line.pos-e { bottom: 12%; left: 20%; }
