/* ==========================================================================
   CSS Custom Properties (Design System)
   ========================================================================== */
:root {
    /* Colors - Deep Dark Theme with Gold & Neon Accents */
    --bg-main: #0a0a0f;
    --bg-alt: #13131a;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;

    --accent-gold: #f59e0b;
    /* Amber */
    --accent-neon: #06b6d4;
    /* Cyan */
    --accent-glow: rgba(245, 158, 11, 0.15);

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', 'Inter', sans-serif;

    /* Spacing & Layout */
    --sys-spacing-sm: 0.5rem;
    --sys-spacing-md: 1rem;
    --sys-spacing-lg: 2rem;
    --sys-spacing-xl: 4rem;
    --container-max: 1200px;

    /* Animation */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Smooth scrolling handled dynamically via Javascript for cross-browser compatibility */

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

h1,
h2,
h3,
h4,
.logo {
    font-family: var(--font-heading);
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Layout Components
   ========================================================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--sys-spacing-lg);
}

.section {
    padding: 100px 0;
    scroll-margin-top: 80px;
}

.dark-alt {
    background-color: var(--bg-alt);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

/* Typography elements */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: var(--sys-spacing-xl);
}

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

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: background-color var(--transition-smooth), padding var(--transition-smooth), backdrop-filter var(--transition-smooth);
}

.navbar.scrolled {
    padding: 1rem 0;
    background-color: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--sys-spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: #fff;
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: -8px;
    width: 6px;
    height: 6px;
    background-color: var(--accent-gold);
    border-radius: 50%;
}

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-links a:hover {
    color: #fff;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-contact {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: all var(--transition-smooth);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent-gold);
    color: #000;
    border: 1px solid var(--accent-gold);
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-gold);
    box-shadow: 0 0 25px var(--accent-glow);
}

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

.btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.05);
}

.btn-contact {
    border: 1px solid var(--accent-neon);
    color: var(--accent-neon) !important;
    padding: 0.5rem 1rem;
}

.btn-contact:hover {
    background-color: rgba(6, 182, 212, 0.1);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 var(--sys-spacing-lg);
    overflow: hidden;
}

.hero-bg-accent {
    position: absolute;
    top: 50%;
    right: 10%;
    transform: translateY(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, rgba(6, 182, 212, 0.03) 50%, transparent 70%);
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    color: var(--accent-gold);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.hero-tagline {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

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

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.6;
    animation: fadePulse 2s infinite;
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--text-secondary);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 3px;
    height: 6px;
    background-color: var(--text-secondary);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 1.5s infinite;
}

@keyframes scrollWheel {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 15px);
        opacity: 0;
    }
}

@keyframes fadePulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.8;
    }
}

/* ==========================================================================
   About Section
   ========================================================================== */
.section-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
}

.section-title-wrap {
    position: relative;
}

.title-line {
    width: 60px;
    height: 3px;
    background-color: var(--accent-gold);
    margin-top: 1rem;
}

.about-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.about-content p.lead {
    font-size: 1.3rem;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.5;
}

/* ==========================================================================
   Innovations / Core Projects Grid
   ========================================================================== */
.grid {
    display: grid;
    gap: 2rem;
}

.cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 12px;
    transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-neon), transparent);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #fff;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 2px;
    background-color: var(--glass-border);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-dot {
    position: absolute;
    left: 17px;
    top: 5px;
    width: 8px;
    height: 8px;
    background-color: var(--accent-gold);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-gold);
}

.glass-card {
    padding: 2rem;
}

.timeline-title {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.timeline-company {
    font-size: 1rem;
    color: var(--accent-neon);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.timeline-date {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.timeline-content p {
    color: var(--text-secondary);
}

/* ==========================================================================
   Legacy Projects Grid
   ========================================================================== */
.projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.generic-project-card {
    padding: 2rem;
    text-align: center;
}

.generic-project-card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.generic-project-card span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: block;
}

/* ==========================================================================
   Skills Section
   ========================================================================== */
.skills-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    color: var(--accent-gold);
    font-size: 1.2rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

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

.tag {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1.5rem;
    border-radius: 40px;
    font-size: 0.95rem;
    color: #e2e8f0;
    transition: all var(--transition-fast);
}

.tag:hover {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.4);
    color: var(--accent-gold);
}

/* ==========================================================================
   Contact & Footer
   ========================================================================== */
.contact-container {
    text-align: center;
    max-width: 600px;
}

.contact-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 900px) {
    .section-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .nav-links {
        display: none;
        /* In a full app, add a hamburger menu here */
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .timeline {
        padding-left: 20px;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-item {
        padding-left: 30px;
    }

    .timeline-dot {
        left: -4px;
    }
}