:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

body.nav-open {
    overflow: hidden;
}

/* Typography */
h1, h2, h3 {
    font-weight: 800;
}

a {
    transition: all 0.3s ease-in-out;
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

section {
    padding: 100px 0;
}

.bg-light {
    background: rgba(30, 41, 59, 0.5);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    position: relative;
    z-index: 1001;
}

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

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

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    cursor: pointer;
    font-size: 1.25rem;
    position: relative;
    z-index: 1001;
}

.menu-toggle:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 3px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.15), transparent);
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* Buttons */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: bold;
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn.primary {
    background: var(--accent-gradient);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn.secondary {
    padding: 0.8rem 2rem;
    border: 2px solid var(--primary);
    border-radius: 50px;
    font-weight: bold;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.5);
}

/* Sections Heading */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    margin: 15px auto;
    border-radius: 2px;
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: rgba(99, 102, 241, 0.3);
}

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

.timeline-item:nth-child(odd) {
    margin-right: auto;
    text-align: right;
    padding-right: 4rem;
}

.timeline-item:nth-child(even) {
    margin-left: auto;
    text-align: left;
    padding-left: 4rem;
}

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

.card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

/* Project Showcases */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--bg-card);
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.project-image {
    height: 220px;
    width: 100%;
    background: #334158;
}

.project-info {
    padding: 1.5rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tags span {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
}

/* Contact Section */
.center {
    text-align: center;
}

.btn-large {
    display: table;
    margin: 2rem auto 0;
}

.contact-cta {
    text-align: center;
    padding: 4rem 0;
}

.social-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 1.5rem;
}

.social-links a:hover,
.social-links a:focus-visible {
    color: var(--primary);
}

/* Animations */
.fade-in {
    animation: fadeInUp 1s ease forwards;
}

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

/* Mobile adjustment */
@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }

    section {
        padding: 80px 0;
    }

    .navbar {
        padding: 0.75rem 0;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: fixed;
        inset: 0 0 auto 0;
        top: 69px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
        max-height: calc(100vh - 69px);
        overflow-y: auto;
        padding: 1rem 1.25rem 1.5rem;
        background: rgba(15, 23, 42, 0.98);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        width: 100%;
        padding: 1rem;
        border-radius: 12px;
    }

    .nav-links a:hover,
    .nav-links a:focus-visible {
        background: rgba(99, 102, 241, 0.12);
    }

    .cta-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .timeline::before {
        left: 16px;
    }

    .timeline-item,
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        text-align: left;
        padding: 1.25rem 0 1.25rem 2.5rem;
    }

    .grid,
    .project-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .project-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-image {
        height: 190px;
    }
}
