/* ==========================================================================
   CSS Variables & Linear/Brittany Chiang Inspired Theme Tokens
   ========================================================================== */
:root {
    /* Color Palette - Architectural Beige */
    --bg-base: #F5F2ED;
    --bg-primary: #EDE8E1;
    --bg-surface: #FFFFFF;
    --bg-surface-hover: #FAFAFA;

    --border-color: #D1CDC4;
    --border-hover: #AFAAA0;

    --text-primary: #2C1E1A;
    --text-secondary: #5C4B44;
    --text-tertiary: #84756E;

    /* Subtle Gradients */
    --accent-glow: rgba(163, 106, 71, 0.1);
    /* Architectural rust glow */
    --accent-color: #A36A47;
    /* Rust/Copper accent */
    --gradient-text: linear-gradient(180deg, #2C1E1A 0%, #84756E 100%);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-base);
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Utilities for Image Background blending */
.bg-blend-multiply {
    mix-blend-mode: multiply;
}

::selection {
    background-color: var(--accent-color);
    color: var(--bg-base);
}

/* Typography Utility */
.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Sections */
section {
    padding: 80px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ==========================================================================
   Navigation (Frosted Glass)
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 5%;
    background: rgba(245, 242, 237, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

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

.btn-primary-outline {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    background: transparent;
    transition: var(--transition-fast);
    text-decoration: none;
}

.btn-primary-outline:hover {
    background: var(--bg-surface);
    border-color: var(--border-hover);
}

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

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    max-width: 100vw;
    background: radial-gradient(circle, rgba(163, 106, 71, 0.08) 0%, rgba(245, 242, 237, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 100%;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Animated Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-secondary);
    font-size: 2rem;
    animation: bounceUpDown 2s infinite ease-in-out;
    text-decoration: none;
    transition: color var(--transition-fast);
    z-index: 10;
}

.scroll-indicator:hover {
    color: var(--accent-color);
}

@keyframes bounceUpDown {

    0%,
    100% {
        transform: translate(-50%, 0);
    }

    50% {
        transform: translate(-50%, -15px);
        /* Bounces UP */
    }
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.pulse {
    display: block;
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-color);
    animation: pulse-anim 2s infinite;
}

@keyframes pulse-anim {
    0% {
        box-shadow: 0 0 0 0 rgba(163, 106, 71, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(163, 106, 71, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(163, 106, 71, 0);
    }
}

.title {
    font-size: clamp(2.5rem, 5.5vw, 5rem);
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 600;
    white-space: nowrap;
}

.subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition-fast);
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-base);
    border: 1px solid var(--text-primary);
}

.btn-primary:hover {
    background: #5C4B44;
    border-color: #5C4B44;
    color: #FFFFFF;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-surface-hover);
    border-color: var(--border-hover);
    color: var(--accent-color);
}

.icon-link {
    color: var(--text-secondary);
    font-size: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition-fast);
    padding: 0 8px;
    /* Extra horizontal click padding */
}

.icon-link:hover {
    color: var(--accent-color);
    transform: translateY(-2px) scale(1.05);
}

/* ==========================================================================
   Bento Grid Section
   ========================================================================== */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(280px, auto);
    gap: 16px;
    /* Linear style gaps */
}

/* Cards */
.bento-card {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: border-color var(--transition-fast);
}

.bento-card:hover {
    border-color: var(--border-hover);
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(0, 0, 0, 0.04), transparent 40%);
    opacity: 0;
    transition: opacity var(--transition-smooth);
    pointer-events: none;
    z-index: 1;
}

.bento-card:hover .card-glow {
    opacity: 1;
}

.card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-icon {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 24px;
    opacity: 0.8;
}

.bento-card h3 {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.bento-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

/* Monospace Technical Specs */
.tech-specs {
    margin-top: auto;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.spec-label {
    color: var(--text-tertiary);
}

.spec-value {
    color: var(--accent-color);
}

/* Grid Layout Assignments */
.card-large {
    grid-column: span 2;
    grid-row: span 1;
}

.card-tall {
    grid-column: span 1;
    grid-row: span 2;
}

.card-wide {
    grid-column: span 2;
    grid-row: span 1;
}

/* ==========================================================================
   Experience List (Brittany Chiang Inspiration)
   ========================================================================== */
.experience-list {
    display: flex;
    flex-direction: column;
}

/* Easter Egg Hyperlinks */
.easter-egg-link {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

.easter-egg-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.experience-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 32px;
    border-radius: 12px;
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    position: relative;
}

.experience-card:hover {
    background: rgba(255, 255, 255, 0.5);
    border-color: var(--border-color);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 8px;
}

.exp-header > div:first-child {
    max-width: 75%;
}

.exp-header h3 {
    margin-bottom: 2px;
}

.exp-header h4 {
    margin-bottom: 0px;
}

.exp-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-tertiary);
    text-align: right;
    white-space: nowrap;
    position: absolute;
    top: 32px;
    right: 32px;
}

.exp-meta .location {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.exp-content h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    transition: color var(--transition-fast);
}

.experience-card:hover .exp-content h3 {
    color: var(--accent-color);
}

.company {
    color: var(--text-secondary);
}

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

.company a:hover {
    color: var(--accent-color);
}

.google-logo {
    font-family: 'Product Sans', 'Inter', Roboto, sans-serif;
    font-weight: 500;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.role-title {
    font-size: 0.95rem;
    color: var(--text-tertiary);
    font-weight: 400;
    margin-bottom: 12px;
}

.exp-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Chips */
.tech-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 4px 12px;
    background: rgba(163, 106, 71, 0.1);
    color: var(--accent-color);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-decoration: none;
    transition: all var(--transition-fast);
}

a.chip:hover {
    background: var(--accent-color);
    color: var(--bg-base);
}

/* Project Images */
.project-image {
    max-width: 100%;
    width: auto;
    max-height: 350px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: block;
    margin: 0 auto 24px auto;
    transition: transform var(--transition-smooth), border-color var(--transition-fast);
}

.project-image:hover {
    transform: scale(1.015);
    border-color: var(--accent-color);
}

.project-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 0;
    margin-bottom: 24px;
}

.project-image:last-child,
.project-gallery:last-child {
    margin-bottom: 0;
}

.project-gallery .project-image {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .project-gallery {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-family: var(--font-mono);
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
    margin-bottom: 40px;
}

/* ==========================================================================
   Side Navigation
   ========================================================================== */
.side-nav {
    position: fixed;
    right: 2%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    z-index: 1000;
    transition: opacity var(--transition-smooth);
    opacity: 0;
    pointer-events: none;
}

.side-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 1.15rem;
    transition: all var(--transition-fast);
    opacity: 0.4;
}

.side-nav-item:hover,
.side-nav-item.active {
    opacity: 1;
    color: var(--accent-color);
    transform: scale(1.15);
}

.journey-section {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 20vh;
}

.journey-section:last-of-type {
    margin-bottom: 10vh;
}

/* Custom Image Icons */
.nav-icon {
    width: 28px;
    height: auto;
    max-height: 48px;
    object-fit: contain;
}

.timeline-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.experience-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
}

/* Display Utilities */
.mobile-only {
    display: none;
}

.desktop-only {
    display: inline;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 900px) {
    .mobile-only {
        display: block;
    }

    .desktop-only {
        display: none;
    }

    .title {
        white-space: normal;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-large,
    .card-tall,
    .card-wide {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 600px) {
    section {
        padding: 48px 5%;
    }

    .nav-links {
        display: none;
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .card-large,
    .card-tall,
    .card-wide {
        grid-column: span 1;
    }

    .experience-card {
        grid-template-columns: 1fr;
        padding: 24px 16px;
    }

    .exp-meta {
        position: static;
        align-items: flex-start;
        text-align: left;
        margin-bottom: 16px;
    }

    .exp-header > div:first-child {
        max-width: 100%;
    }

}

/* ==========================================================================
   Experience Bullet Layouts
   ========================================================================== */
.exp-bullets {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 24px 0;
    padding-left: 1.2rem;
    flex-grow: 1;
}

.exp-bullets li {
    margin-bottom: 8px;
    padding-left: 4px;
}

.exp-bullets li:last-child {
    margin-bottom: 0;
}

.exp-bullets:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Inline Involvement Clustering
   ========================================================================== */
.involvement-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.involvement-text b {
    color: var(--text-primary);
    font-weight: 500;
}

.divider {
    color: var(--border-hover);
    margin: 0 6px;
    font-weight: 300;
}

.exp-bullets li::marker {
    color: var(--accent-color);
}