/* Design System & Variables */
:root {
    /* Colors - Lumina Dark Theme */
    --bg-primary: #020202;
    --bg-secondary: #0a0a0a;
    --bg-card: rgba(255, 255, 255, 0.02);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;

    /* Accents - Orange/Amber */
    --accent-primary: #f97316;
    /* Orange 500 */
    --accent-secondary: #ea580c;
    /* Orange 600 */
    --accent-glow: #fb923c;
    /* Orange 400 */

    --accent-gradient: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    --accent-glow-radial: radial-gradient(circle at center, rgba(249, 115, 22, 0.15) 0%, transparent 70%);

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

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

    /* Effects */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: 1px solid rgba(255, 255, 255, 0.06);
    --glass-highlight: 1px solid rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

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

.section {
    padding: var(--spacing-lg) 0;
    /* Reduced padding for better flow */
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    text-align: center;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    /* Slightly rounder for premium feel */
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.05);
}

.gradient-text {
    color: var(--text-primary);
    text-shadow: 0 0 30px rgba(249, 115, 22, 0.3);
    /* Removed heavy gradient, kept subtle glow */
}

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

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.01);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

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

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

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
    /* Removed radial gradient to show bg.png */
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--accent-glow-radial);
    filter: blur(100px);
    z-index: -1;
    opacity: 0.6;
}

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

.hero-text h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    font-weight: 800;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.bio {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

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

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-item i {
    color: var(--accent-primary);
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

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

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.hero-image {
    display: flex;
    justify-content: center;
    position: relative;
}

.img-wrapper {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1 / 1;
    /* Square for circle */
    border-radius: 50%;
    /* Circular frame */
    overflow: hidden;
    position: relative;
    border: var(--glass-border);
    box-shadow: var(--shadow-lg);
    background: var(--bg-card);
    margin: 0 auto;
}

.img-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    /* Match circular frame */
    padding: 1px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.img-wrapper:hover img {
    transform: scale(1.05);
}

/* Bento Grid System */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: minmax(180px, auto);
    }

    .col-span-2 {
        grid-column: span 2;
    }

    .row-span-2 {
        grid-row: span 2;
    }
}

/* Card Updates */
.card {
    background: rgba(255, 255, 255, 0.01);
    /* Very transparent for frosted effect */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 2rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px) saturate(180%);
    /* Stronger blur for frosted glass */
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

.card:hover {
    transform: translateY(-5px) scale(1.01);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px -10px rgba(249, 115, 22, 0.1);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0 2rem 140px;
    /* Added left padding for dates */
}

.timeline::before {
    display: none;
    /* Remove old static line */
}

.timeline-line {
    position: absolute;
    top: 0;
    left: 190px;
    /* Adjusted to align with dots after padding change (140px + 50px) */
    height: 100%;
    width: 2px;
    background: var(--glass-border);
    z-index: 0;
}

.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--accent-gradient);
    box-shadow: 0 0 15px var(--accent-primary);
    transition: height 0.1s linear;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 80px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 41px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--glass-border);
    z-index: 1;
    transition: all 0.3s ease;
}

.timeline-item.active .timeline-dot {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    box-shadow: 0 0 20px var(--accent-primary);
}

.timeline-date {
    position: absolute;
    left: -140px;
    top: 0;
    width: 120px;
    text-align: right;
    font-weight: 600;
    color: var(--accent-primary);
    display: block;
    font-size: 0.95rem;
    line-height: 1.5rem;
    /* Align with h3 line-height roughly */
    padding-top: 0.25rem;
    /* Slight adjustment to align with title */
}

@media (max-width: 768px) {
    .timeline {
        padding-left: 0;
    }

    .timeline-line {
        left: 20px;
    }

    .timeline-dot {
        left: 11px;
    }

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

    .timeline-date {
        position: relative;
        left: 0;
        width: auto;
        text-align: left;
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }
}

.timeline-content h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.timeline-content h4 {
    font-size: 1rem;
    color: var(--accent-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

.about-content p {
    line-height: 1.8;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.card {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 24px;
    /* Match img-wrapper */
    padding: 2rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-lg);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.link-arrow:hover {
    gap: 0.75rem;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-card h3 {
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

/* Grid 2 Column */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* List Items */
.list-items {
    list-style: disc;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.list-items li {
    margin-bottom: 0.5rem;
}

.timeline-content ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.timeline-content li {
    margin-bottom: 0.5rem;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card .date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.article-card h3 {
    font-size: 1.5rem;
    /* Consistent with projects */
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.01);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

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

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

.social-links a:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.center-btn {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

/* Animations */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.fade-in {
    animation: fadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

    .bio {
        margin: 0 auto 2rem;
    }

    .cta-buttons {
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        /* Stack stats on mobile */
        justify-content: center;
        gap: 2rem;
        max-width: 300px;
        margin: 0 auto;
    }

    .img-wrapper {
        width: 300px;
        height: 300px;
        margin: 0 auto;
    }

    .nav-links {
        display: none;
        /* Simple hide for now, could add hamburger later */
    }
}