:root {
    /* --- Colors --- */
    --bg-base: #0b1219; /* Slightly darker for better contrast */
    --bg-surface: #111c2a;
    --bg-card: #162436;
    --bg-card-hover: #1c2c40;
    --bg-elevated: #223a50;

    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.2);

    /* Text Colors - Brightened for readability */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8; /* Much lighter than before */
    --text-tertiary: #64748b;
    --text-muted: #475569;

    /* Accents */
    --blue: #38bdf8;
    --blue-bg: rgba(56, 189, 248, 0.1);
    --green: #34d399;
    --green-bg: rgba(52, 211, 153, 0.1);
    --orange: #fb923c;
    --orange-bg: rgba(251, 146, 60, 0.1);
    --purple: #a78bfa;
    --purple-bg: rgba(167, 139, 250, 0.1);
    --pink: #f472b6;
    --pink-bg: rgba(244, 114, 182, 0.1);
    --teal: #2dd4bf;
    --teal-bg: rgba(45, 212, 191, 0.1);
    --red: #f87171;

    /* --- Dimensions & Effects --- */
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 6px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    --transition: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* --- Typography --- */
    --font: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size fix */
    -webkit-font-smoothing: antialiased;
}

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

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

::selection {
    background: rgba(56, 189, 248, 0.2);
    color: var(--blue);
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 2rem;
    height: 80px; /* Made slightly taller to fit the new boxes */

    /* THE MAGIC TRICK for perfect centering */
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;

    /* No background on the full bar anymore (cleaner look) */
    background: transparent;
}

/* 1. Left: The Logo */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);

    /* Glass background just for the logo area */
    background: rgba(11, 18, 25, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 50px;
    width: fit-content;
}

.nav-brand-logo {
    width: 32px;
    height: 32px;
}

/* 2. Center: The "Floating Dock" Menu */
.nav-links {
    display: flex;
    align-items: center;
    gap: 6px; /* Space between buttons */

    /* The "Big Box" Container */
    background: rgba(11, 18, 25, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    padding: 6px; /* Padding inside the dock */
    border-radius: 100px; /* Pill shape */
    box-shadow: 0 4px 24px rgba(0,0,0,0.3); /* Nice floating shadow */
}

/* 3. The Individual Links (Buttons) */
.nav-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;

    /* Making them look like big buttons */
    padding: 10px 24px;
    border-radius: 50px;
    transition: all 0.2s ease;
}

/* Hover Effect */
.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08); /* Subtle light up */
    transform: translateY(-1px);
}

/* Optional: Active State (you can add class="active" in HTML to current section) */
.nav-links a.active {
    background: var(--blue-bg);
    color: var(--blue);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

/* 4. Right: Empty area (needed for the grid trick) */
/* We don't need CSS here, the grid handles the empty space automatically */

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

/* Ambient Background Glow */
.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: 0;
    width: 60%;
    height: 600px;
    background: radial-gradient(circle at center, rgba(56, 189, 248, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 4rem;
    align-items: center;
}

/* Hero Left: Photo */
.hero-photo-col {
    position: relative;
    animation: fadeUp 0.6s ease-out forwards;
}

.hero-photo {
    width: 100%;
    aspect-ratio: 1 / 1.1;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-photo-status {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    border-radius: 50px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-hover);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    white-space: nowrap;
    z-index: 2;
    width: max-content;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
    animation: pulse 2s infinite;
}

.scroll-cta {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    text-decoration: none; /* Removes underline */
    cursor: pointer;       /* Shows hand cursor */
    animation: fadeUp 0.6s 1s forwards; /* Delays appearance slightly */
    z-index: 10;
}

.scroll-cta span {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 500;
    transition: color 0.3s;
}

.scroll-cta:hover span {
    color: var(--blue); /* Turns blue on hover */
}

.scroll-cta-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--blue), transparent);
    animation: scrollPulse 2s infinite;
}

.company-link {
    font-weight: 600;
    color: var(--blue);
}

/* Hero Right: Text */
.hero-right {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: fadeUp 0.6s 0.1s ease-out forwards;
    opacity: 0;
}

.hero-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--blue-bg);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--blue);
}

.hero-name {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-name span {
    background: linear-gradient(135deg, var(--blue), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 300;
    max-width: 600px;
    line-height: 1.6;
}

.hero-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    /* Changed from 16px to 2.5rem (40px) to give it breathing room */
    margin-top: 2.5rem;
    margin-bottom: 2rem; /* Added bottom margin so it doesn't hit the buttons/stats */
}

.hero-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--text-tertiary);
}

.hero-meta-item .material-icons-outlined {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.hero-meta-item a:hover {
    color: var(--blue);
    text-decoration: underline;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-chip {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.stat-chip:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.stat-chip-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: grid;
    place-items: center;
}

.stat-chip-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-primary);
}

.stat-chip-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* Certifications Row */
.certs-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 4px 8px;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
}

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

.section-head {
    margin-bottom: 3rem;
    max-width: 700px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Experience Blocks --- */
.exp-block {
    margin-bottom: 4rem;
}

.exp-block-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.exp-block-company {
    font-size: 1.8rem;
    font-weight: 700;
}

.exp-block-role {
    font-size: 1.1rem;
    color: var(--blue);
    margin-top: 0.25rem;
}

.exp-block-dates {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.achievement {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.75rem;
    transition: var(--transition);

    display: flex;              /* 1. Turn on Flexbox */
    flex-direction: column;     /* 2. Stack items vertically */
    height: 100%;               /* 3. Force card to fill the grid cell */
}

.achievement:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.achievement-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    margin-bottom: 1rem;
}

.achievement-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.achievement-text {
    font-size: 1rem; /* Scaled up for readability */
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.achievement-metric {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-mono);
    margin-top: auto;
    width: fit-content;
}

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

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.75rem;
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.skill-card-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

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

.skill-tag {
    font-size: 0.9rem;
    padding: 6px 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
}

.skill-tag:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}

/* --- Project & Education Cards (Reused styles) --- */
.edu-grid, .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.edu-card, .project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2rem;
}

.edu-degree, .project-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Footer */
footer {
    padding: 4rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

footer a {
    margin: 0 1rem;
    color: var(--text-tertiary);
    font-weight: 500;
    transition: var(--transition);
}

footer a:hover {
    color: var(--blue);
}

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

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

    .hero-photo-col {
        max-width: 300px;
        margin: 0 auto;
    }

    .hero-right {
        align-items: center;
    }

    .hero-meta {
        justify-content: center;
    }

    .exp-block-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .achievements-grid, .edu-grid, .projects-grid {
        grid-template-columns: 1fr;
    }
}