/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&family=Playfair+Display:ital,wght@0,700;1,700&display=swap');

:root {
    /* Color Palette - Deep Premium */
    --bg-primary: #0a0f1c;
    --bg-secondary: #111827;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;

    /* Gradients */
    --accent-gradient: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 50%, #22d3ee 100%);
    --gold-gradient: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    --glass-border: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));

    /* Glassmorphism */
    --card-bg: rgba(17, 24, 39, 0.7);
    --card-backdrop: blur(16px);

    /* Accents */
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.3);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 4rem;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Outfit', sans-serif;
    /* Cleaner, more modern sans */
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    /* Aurora Background Base */
    /* Aurora Background Base */
    background-image:
        radial-gradient(circle at 15% 50%, rgba(56, 189, 248, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(251, 191, 36, 0.05), transparent 25%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    background-attachment: fixed;
}

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--accent-gradient);
    z-index: 2000;
    transition: width 0.1s;
    box-shadow: 0 0 10px var(--accent);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

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

ul {
    list-style: none;
}

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

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Premium Button */
.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    background: var(--accent-gradient);
    color: #fff;
    /* Always white on gradient */
    border: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--accent-glow);
    transition: var(--transition-medium);
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
    z-index: -1;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.btn:hover::before {
    left: 100%;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    /* White text default */
    border: 1px solid rgba(56, 189, 248, 0.5);
    box-shadow: none;
}

.btn-outline:hover {
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    background: linear-gradient(to right, #fff, #94a3b8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.9;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 15, 28, 0.8);
    backdrop-filter: blur(12px);
    z-index: 1000;
    padding: 1.2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-medium);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: var(--transition-medium);
}

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

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

/* Hamburger */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
    background: none;
    border: none;
    padding: 0.5rem;
}

/* Accessibility Focus */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: var(--transition-medium);
}

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

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

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

/* Animated Background Blobs */
/* Blob Wrapper for Parallax */
.blob-wrapper {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: -1;
}

/* Inner blobs relative to wrapper */
.hero-bg-blob {
    position: absolute;
    width: 50vw;
    height: 50vw;
    filter: blur(80px);
    opacity: 0.15;
    /* No z-index needed on blob itself as wrapper handles it, but keep for safety if needed */
    animation: blob-float 10s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.blob-1 {
    top: -10%;
    right: -10%;
    background: var(--accent);
}

.blob-2 {
    bottom: -10%;
    left: -10%;
    background: #8b5cf6;
    /* Violet accent */
    animation-delay: -5s;
}

@keyframes blob-float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(20px, 40px) scale(1.1);
    }
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: var(--spacing-lg);
}

.hero-text h1 {
    font-size: 4.5rem;
    margin-bottom: var(--spacing-sm);
    line-height: 1.1;
}

.hero-text .highlight {
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 550px;
    line-height: 1.8;
}

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

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    perspective: 1000px;
    /* For 3D floating effect */
}

.hero-image img {
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 420px;
    width: 100%;
    height: auto;
    box-shadow: 0 20px 80px -20px rgba(0, 0, 0, 0.5);
    /* Subtle float animation */
    animation: float-profile 6s ease-in-out infinite;
}

@keyframes float-profile {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(1deg);
    }
}

/* Sections Base */
section {
    padding: var(--spacing-lg) 0;
    position: relative;
}

/* Glass Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: var(--card-backdrop);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Fallback */
    border-image-source: var(--glass-border);
    border-radius: 1.5rem;
    padding: 1.5rem;
    transition: var(--transition-medium);
}

/* About Section */
.about p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.9;
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--accent), transparent);
    opacity: 0.3;
}

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

.timeline-content {
    background: var(--card-bg);
    backdrop-filter: var(--card-backdrop);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 1.5rem;
    width: 45%;
    position: relative;
    transition: var(--transition-fast);
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 40px -10px rgba(56, 189, 248, 0.15);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
}


/* Re-adjust dots for exact centering, simpler to rely on visual check or pseudo on timeline line */
/* Actually let's just make the simple center dot on the line */
.timeline-item::after {
    content: '';
    position: absolute;
    top: 2.5rem;
    /* Align with content padding top */
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: var(--bg-primary);
    border: 2px solid var(--accent);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 15px var(--accent);
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.timeline-content .company {
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
}

.timeline-content .date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--spacing-xs);
    width: 100%;
    margin: 0 auto;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
    text-align: center;
    border-radius: 1.25rem;
    transition: var(--transition-bounce);
    cursor: default;
    /* 3D Transform Prep */
    transform-style: preserve-3d;
    perspective: 1000px;
}

.skill-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 15px 35px -5px rgba(56, 189, 248, 0.15);
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.8), rgba(56, 189, 248, 0.05));
}

.skill-card i {
    font-size: 2.5rem;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    display: inline-block;
}

.skill-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* Contact */
.contact-actions {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
}

/* Footer */
footer {
    background-color: #05080f;
    padding: 4rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}



/* Back To Top */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--accent-glow);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition-medium);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.social-links a {
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: var(--transition-bounce);
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-5px);
}

/* Responsiveness */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-image {
        order: -1;
        /* Image on top on mobile */
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .hero-text .cta-group {
        justify-content: center;
    }

    .timeline-content {
        width: 100% !important;
        margin-left: 0 !important;
        margin-top: 1rem;
    }

    /* Move line to left but not so far it hits edge */
    .timeline::before {
        left: 20px;
    }

    .timeline-item::after {
        left: 20px;
    }

    .timeline-item {
        padding-left: 50px;
        /* Space for the line/dots */
    }

    .timeline-item:nth-child(odd) .timeline-content::after,
    .timeline-item:nth-child(even) .timeline-content::after {
        display: none;
        /* Hide confusing side dots on mobile */
    }

    /* Wrap skills on mobile */
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: var(--spacing-sm);
    }
}

/* Animations Classes (Managed by JS) */
/* Animations Classes (Managed by JS) */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

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

/* Detailed Experience Lists */
.timeline-content ul {
    list-style: none;
    padding-left: 0;
    margin-top: 1rem;
    text-align: left;
}

.timeline-content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.timeline-content li::before {
    content: '▹';
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--accent);
    font-weight: bold;
    font-size: 1.1em;
}

.timeline-content li strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Stagger delays dummy classes if needed */

/* =========================================
   Utility Classes (Extracted from Inline)
   ========================================= */

/* Hero */
.hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: -1rem;
}

.hero-cta {
    margin-top: 2rem;
}

/* Skills */
.skill-desc {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    color: var(--text-secondary);
}

/* Education */
.education-section {
    background-color: var(--bg-secondary);
    padding: 4rem 0;
}

.education-card {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.education-icon {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.education-degree {
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    display: block;
    margin: 0.5rem 0;
}

.education-year {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.education-desc {
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-secondary);
}

/* Contact */
.contact-actions {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

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

/* About wrapper */
.about-card {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

/* Generic Helpers */
.text-center {
    text-align: center;
}

/* Responsiveness */
@media (max-width: 900px) {
    .container {
        padding: 0 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Hero Mobile */
    .hero {
        padding-top: 100px;
        height: auto;
        min-height: 100vh;
        padding-bottom: 4rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-image {
        order: -1;
        /* Image on top on mobile */
        margin-bottom: 1rem;
    }

    .hero-image img {
        max-width: 280px;
        box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    }

    .hero-text h1 {
        font-size: 2.75rem;
    }

    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-text .cta-group {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Navigation Mobile */
    .hamburger {
        display: flex;
    }

    nav {
        justify-content: space-between;
        flex-direction: row;
        /* reset direction */
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background: rgba(10, 15, 28, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease-in-out;
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        gap: 2.5rem;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
        opacity: 0;
        transform: translateY(20px);
        transition: 0.4s ease forwards;
    }

    .nav-links.active a {
        opacity: 1;
        transform: translateY(0);
        /* Stagger happens via JS or fixed delay here */
    }

    /* Timeline Mobile */
    .timeline::before {
        left: 20px;
    }

    .timeline-item::after {
        left: 20px;
    }

    .timeline-content {
        width: calc(100% - 50px);
        margin-left: 50px !important;
    }

    .timeline-item:nth-child(odd) .timeline-content::after,
    .timeline-item:nth-child(even) .timeline-content::after {
        display: none;
    }

    /* Skills Mobile */
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.75rem;
    }

    .hero-text h1 {
        font-size: 2.25rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}