/* Global Variables & Design Tokens */
:root {
    --bg-dark: #070913;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-teal: #00f0ff;
    --accent-purple: #b538ff;
    
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    --font-main: 'Outfit', sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Glow Effects */
.background-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.4;
}

.pos-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--accent-purple);
}

.pos-2 {
    top: 20%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: var(--accent-teal);
}

/* Typography Utilities */
.gradient-text {
    background: linear-gradient(90deg, var(--accent-teal), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navigation - Glassmorphism */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(7, 9, 19, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}

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

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    cursor: pointer;
}

.logo span {
    color: var(--accent-teal);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

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

/* Buttons */
.btn-primary-sm {
    background: linear-gradient(90deg, var(--accent-teal), #00add6);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    color: #000 !important;
    font-weight: 600 !important;
}

.btn-primary-sm:hover {
    box-shadow: 0 0 15px var(--accent-teal);
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-teal));
    padding: 1rem 2rem;
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary:hover {
    box-shadow: 0 0 20px rgba(181, 56, 255, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-block;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    border-radius: 50px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-main);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10rem 2rem 5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.sub-headline {
    font-weight: 600;
    color: var(--accent-teal);
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.main-headline {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 300;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

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

/* Hero Visual & Glass Cards */
.hero-visual {
    flex: 1;
    position: relative;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    width: 100%;
}

.glass-card.highlight {
    border-color: var(--accent-purple);
    box-shadow: 0 0 20px rgba(181, 56, 255, 0.2);
}

/* Animations */
.floating-card {
    animation: float 6s ease-in-out infinite;
    width: max-content;
    font-weight: 600;
    font-size: 1.1rem;
}

.delay-1 { animation-delay: 0s; align-self: flex-start; }
.delay-2 { animation-delay: 1.5s; align-self: center; margin-left: 2rem;}
.delay-3 { animation-delay: 3s; align-self: flex-end; }

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

/* Responsive */
@media (max-width: 900px) {
    .nav-container { flex-direction: column; gap: 1rem; align-items: center; }
    .nav-links { 
        display: flex; 
        width: 100%; 
        overflow-x: auto; 
        padding-bottom: 0.5rem; 
        -webkit-overflow-scrolling: touch; 
        justify-content: flex-start;
        gap: 15px;
    }
    .nav-links li { flex: 0 0 auto; }
    .hero {
        flex-direction: column;
        padding-top: 8rem;
        text-align: center;
    }
    .hero-content { display: flex; flex-direction: column; align-items: center; }
    .hero-visual { align-items: center; width: 100%; }
    .main-headline { font-size: 3rem; }
    .delay-2 { margin-left: 0; }
}

/* Sections Common Styles */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2rem;
}

.alternate-bg {
    background: rgba(255, 255, 255, 0.01);
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    text-align: center;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.about-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-badge {
    background: var(--glass-bg);
    border: 1px solid var(--accent-purple);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-teal);
    transition: var(--transition-smooth);
}

.skill-badge:hover {
    background: var(--accent-purple);
    color: #fff;
    box-shadow: 0 0 15px rgba(181, 56, 255, 0.5);
}

/* Services & Tutorials Section */
.services-grid, .tutorials-grid, .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card, .tutorial-card, .project-card {
    transition: var(--transition-smooth);
    width: 100%;
}

.service-card:hover, .tutorial-card:hover, .project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-teal);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
}

.service-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3, .tutorial-card h3, .project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.service-card p, .tutorial-card p, .project-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Research Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    border-left: 2px solid var(--glass-border);
    padding-left: 2rem;
    margin-left: 1rem;
}

.timeline-item {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--accent-teal);
    border-radius: 50%;
    left: -2.7rem;
    top: 1.5rem;
    box-shadow: 0 0 10px var(--accent-teal);
}

.timeline-date {
    color: var(--accent-teal);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Footer Section */
.footer-container {
    padding: 6rem 2rem 2rem;
    text-align: center;
    border-radius: 40px 40px 0 0;
    max-width: 100%;
    margin-top: 4rem;
    border-bottom: none;
    border-left: none;
    border-right: none;
}

.footer-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.footer-cta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 6rem;
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; }
    .footer-cta { flex-direction: column; align-items: center; }
}

/* SPA Navigation Styles */
.page-section {
    display: none !important;
}

header.page-section.active-section {
    display: flex !important;
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

section.page-section.active-section, footer.page-section.active-section {
    display: block !important;
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
        filter: blur(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}
