/* Custom Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-primary: #05060A;
    --bg-secondary: #05060A;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Typography System */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Typography Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
    --text-7xl: 4.5rem;
    --text-8xl: 6rem;
    
    /* Line Heights */
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
    
    /* Letter Spacing */
    --tracking-tighter: -0.05em;
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;
    
    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
    --font-black: 900;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: var(--leading-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Classes */
.font-display {
    font-family: var(--font-display);
}

.font-body {
    font-family: var(--font-body);
}

.font-mono {
    font-family: var(--font-mono);
}

/* Language Toggle Styles */
#langIcon {
    font-size: 1.2rem;
    line-height: 1;
    display: inline-block;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

/* Glassmorphism Card Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Animation for Multiple Elements */
.reveal:nth-child(1) { transition-delay: 0.1s; }
.reveal:nth-child(2) { transition-delay: 0.2s; }
.reveal:nth-child(3) { transition-delay: 0.3s; }
.reveal:nth-child(4) { transition-delay: 0.4s; }
.reveal:nth-child(5) { transition-delay: 0.5s; }
.reveal:nth-child(6) { transition-delay: 0.6s; }

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

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Selection Styling */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: white;
}

/* Button Hover Glow Effect */
button, a {
    position: relative;
    overflow: hidden;
}

button::before, a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

button:hover::before, a:hover::before {
    width: 300px;
    height: 300px;
}

/* Gradient Text Animation */
@keyframes gradient-x {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.animate-gradient-x {
    background-size: 200% 200%;
    animation: gradient-x 3s ease infinite;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fade-in 0.8s ease forwards;
}

@keyframes fade-in-up {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease forwards;
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    }
    50% { 
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Glitch Animation */
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* Scan Animation */
@keyframes scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.animate-scan {
    animation: scan 2s linear infinite;
}

/* Neon Glow Effect */
.neon-glow-blue {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3),
                0 0 40px rgba(59, 130, 246, 0.1);
}

.neon-glow-cyan {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3),
                0 0 40px rgba(6, 182, 212, 0.1);
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Pulse Animation */
@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.pulse-glow {
    animation: pulse-glow 4s ease-in-out infinite;
}

/* Skill Badge Hover Effect */
span[class*="rounded-full"] {
    transition: all 0.3s ease;
}

span[class*="rounded-full"]:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Navigation Active State */
nav a.active {
    color: white !important;
    position: relative;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
    border-radius: 2px;
}

/* Timeline Animation */
.timeline-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:nth-child(even) {
    transform: translateX(20px);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Project Card Image Hover */
.glass-card .aspect-video {
    transition: transform 0.5s ease;
}

.glass-card:hover .aspect-video {
    transform: scale(1.05);
}

/* Timeline Border Animation */
.border-l-4 {
    position: relative;
}

.border-l-4::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--accent-blue), var(--accent-cyan));
    border-radius: 2px;
}

/* Contact Button Special Effect */
a[href*="linkedin"] {
    position: relative;
    overflow: hidden;
}

a[href*="linkedin"]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.2));
    opacity: 0;
    transition: opacity 0.3s ease;
}

a[href*="linkedin"]:hover::after {
    opacity: 1;
}

/* Responsive Typography */
@media (max-width: 480px) {
    :root {
        --text-xs: 0.7rem;
        --text-sm: 0.8rem;
        --text-base: 0.95rem;
        --text-lg: 1.1rem;
        --text-xl: 1.2rem;
        --text-2xl: 1.4rem;
        --text-3xl: 1.6rem;
        --text-4xl: 1.8rem;
        --text-5xl: 2.2rem;
        --text-6xl: 2.5rem;
        --text-7xl: 3rem;
        --text-8xl: 3.5rem;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    :root {
        --text-xs: 0.75rem;
        --text-sm: 0.875rem;
        --text-base: 1rem;
        --text-lg: 1.125rem;
        --text-xl: 1.25rem;
        --text-2xl: 1.5rem;
        --text-3xl: 1.75rem;
        --text-4xl: 2rem;
        --text-5xl: 2.5rem;
        --text-6xl: 3rem;
        --text-7xl: 3.5rem;
        --text-8xl: 4rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    :root {
        --text-5xl: 2.75rem;
        --text-6xl: 3.5rem;
        --text-7xl: 4rem;
        --text-8xl: 5rem;
    }
}

@media (min-width: 1025px) {
    :root {
        --text-5xl: 3rem;
        --text-6xl: 3.75rem;
        --text-7xl: 4.5rem;
        --text-8xl: 6rem;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

/* Smooth Section Transitions */
section {
    position: relative;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* Social Icon Hover */
a[class*="hover:text-white"] svg {
    transition: transform 0.3s ease, filter 0.3s ease;
}

a[class*="hover:text-white"]:hover svg {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

/* Focus States for Accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .glass-card {
        background: white;
        border: 1px solid #ccc;
    }
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    /* Adjust padding for mobile */
    section {
        padding: 4rem 1rem !important;
    }
    
    /* Improve touch targets */
    button, a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better spacing for mobile cards */
    .skill-card {
        padding: 1rem !important;
    }
    
    /* Optimize mobile menu */
    #mobileMenu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 49;
        overflow-y: auto;
    }
}

/* Tablet-specific improvements */
@media (min-width: 769px) and (max-width: 1024px) {
    section {
        padding: 6rem 2rem !important;
    }
}

/* Desktop-specific improvements */
@media (min-width: 1025px) {
    section {
        padding: 8rem 1.5rem !important;
    }
}
