/* Design System & Variables */
:root {
    /* Color Palette - Light Mode (Default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    /* Apple-like light gray */
    --text-primary: #1d1d1f;
    /* Apple-like almost black */
    --text-secondary: #86868b;
    --accent-color: #0071e3;
    /* Classic Apple Blue */
    --border-color: #d2d2d7;
    --nav-bg: rgba(255, 255, 255, 0.8);
    --card-bg: #ffffff;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);

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

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
}

[data-theme="dark"] {
    /* Color Palette - Dark Mode */
    --bg-primary: #000000;
    --bg-secondary: #1d1d1f;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --accent-color: #2997ff;
    /* Lighter blue for dark mode */
    --border-color: #424245;
    --nav-bg: rgba(0, 0, 0, 0.8);
    --card-bg: #1c1c1e;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background-color var(--transition-medium), color var(--transition-medium);
}

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

ul {
    list-style: none;
}

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

/* Layout Utilities */
.container {
    max-width: 1000px;
    /* narrowed slightly for better readability on text-heavy sections */
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 0;
    /* Ensure content isn't clipped on short screens */
    height: auto;
}

.flex {
    display: flex;
}

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

.grid {
    display: grid;
}

/* Typography Utilities */
.h1 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.h2 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 2rem;
}

.h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.text-lead {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Header & Nav */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    /* Initially transparent or subtle */
    transition: background-color var(--transition-medium), border-bottom-color var(--transition-medium), box-shadow var(--transition-medium);
}

.header.scrolled {
    background-color: var(--nav-bg);
    /* Ensures variable is used */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    /* Subtle shadow on scroll */
}

[data-theme="dark"] .header.scrolled {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav {
    height: 44px;
    /* Apple navbar height */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.nav-link {
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

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

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 60px;
    /* Offset for fixed header */
}

.hero-content {
    max-width: 800px;
    opacity: 0;
    animation: fadeUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.hero-logo-container img {
    width: 120px;
    /* Adjust size as needed, assumed decent starting point */
    height: auto;
    object-fit: contain;
}

.hero-title {
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--accent-color);
    color: white;
    border-radius: 980px;
    /* Pill shape */
    font-weight: 500;
    font-size: 1rem;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.btn:hover {
    transform: scale(1.02);
    /* opacity: 0.9; Apple style hover is usually strictly opacity or scale without bg change */
}

/* Experience List Styles */
/* Experience List Styles */
.experience-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-height: 70vh;
    /* Constrain height for vertical scroll */
    overflow-y: auto;
    padding: 1rem;
    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--text-secondary) transparent;
}

.experience-list::-webkit-scrollbar {
    width: 6px;
}

.experience-list::-webkit-scrollbar-thumb {
    background-color: var(--text-secondary);
    border-radius: 20px;
}

.experience-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 2rem;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.company-logo {
    width: 80px;
    height: 80px;
    background: var(--card-bg);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    /* For image clipping */
}

.company-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.experience-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.exp-role {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.exp-company {
    color: var(--accent-color);
    font-weight: 500;
}

.exp-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.exp-projects {
    margin-top: 1rem;
    padding-left: 1.2rem;
    list-style-type: disc;
    color: var(--text-secondary);
}

.exp-projects li {
    margin-bottom: 0.5rem;
}

@media (max-width: 600px) {
    .experience-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .company-logo {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .exp-header {
        flex-direction: column;
    }
}

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

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

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

/* Responsive */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    z-index: 1001;
    /* Above mobile menu overlay */
}

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

    .mobile-menu-btn {
        display: block;
        padding: 0.5rem;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateY(-100%);
        transition: transform var(--transition-medium);
        z-index: 999;
        /* Below header content but covers page */
        padding: 2rem;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-link {
        font-size: 1.5rem;
        font-weight: 500;
        color: var(--text-primary);
    }
}