/* Generated by tools/build-css.ps1. Edit the component files, then rebuild. */

/* ===== reset.css ===== */

/* css/reset.css */

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

html {
    /* Anchor navigation uses a short, controlled animation in main.js. */
    scroll-behavior: auto;
    /* Improve scroll performance on some browsers */
    scroll-padding-top: 60px; /* Offset for fixed nav, adjust as needed */
    background: rgb(16, 0, 22);
}

body {
    /* Define base font - typography.css will handle more specifics */
    font-family: var(--font-family-base);
    line-height: 1.7;
    /* Base text color - ensure good contrast with initial background */
    color: #e0e0e0; /* Light grey, good on dark purple */

    background: transparent;
    overflow-x: hidden; /* Prevent horizontal scrollbars caused by animations */
}

/* ===== Theme Color Variables ===== */
:root {
    /* Base Theme Colors */
    --color-dark-purple: rgb(32, 0, 44);   /* #20002c */
    --color-dark-purple-rgb: 32, 0, 44; /* For use with opacity */
    --color-light-lilac: rgb(203, 180, 212);/* #cbb4d4 */
    --color-anchor-dark: rgb(16, 0, 22);   /* Darker purple for gradient */

    /* Accent Colors */
    --color-accent-light: #d9c1e3; /* Slightly lighter lilac */
    --color-accent-medium: #b199c0; /* Muted lilac */
    --color-text-light: #f0f0f0;
    --color-text-dark: #333; /* For potential light backgrounds on elements */
    --color-subtle-bg: rgba(255, 255, 255, 0.05); /* Subtle background for cards */
    --color-subtle-border: rgba(203, 180, 212, 0.2); /* Lilac border */

    /* Animation Easing Functions */
    --ease-out-expo: cubic-bezier(.17,.67,.17,.98);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1); /* Slight overshoot */
}


/* ===== theme.css ===== */

/* css/theme.css */
:root {
    --gradient-progress: 0;
    --gradient-light-layer: rgb(196, 174, 205);
    /* Color Palette */
    --clr-bg-start: 260 50% 5%;        /* Darker purple for gradient start */
    --clr-bg-end: 280 40% 15%;         /* Medium purple for gradient end */
    --clr-text: 0 0% 95%;              /* near-white text on dark background */
    --clr-heading: 280 70% 80%;         /* light purple headings */
    --clr-accent: 290 60% 70%;          /* lighter accent for borders, highlights */
    --clr-muted: 0 0% 70%;             /* lighter muted color for better contrast */
    --clr-border: 290 60% 50%;          /* accent border color */
    
    /* Card and container backgrounds */
    --clr-surface: 270 30% 20%;         /* background for cards/containers */
    --clr-surface-light: 270 20% 30%;   /* lighter background for hovers */

    /* Spacing Scale (8px grid) */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;

    /* Typography Scale */
    --font-family-base: 'Manrope', system-ui, sans-serif;
    --font-family-display: 'Cormorant Garamond', Georgia, serif;
    --font-family-ui: 'Manrope', system-ui, sans-serif;
    --fs-base: clamp(1rem, 0.98rem + 0.18vw, 1.06rem);
    --fs-h6: clamp(0.8rem, 0.76rem + 0.2vw, 0.92rem);
    --fs-h5: clamp(0.98rem, 0.93rem + 0.3vw, 1.15rem);
    --fs-h4: clamp(1.25rem, 1.1rem + 0.7vw, 1.8rem);
    --fs-h3: clamp(1.75rem, 1.45rem + 1vw, 2.45rem);
    --fs-h2: clamp(2.4rem, 1.9rem + 1.8vw, 3.5rem);
    --fs-h1: clamp(3.25rem, 2.3rem + 3.8vw, 5.5rem);
    --line-height-body: 1.72;
    --line-height-heading: 0.95;
    --letter-spacing-body: 0.01em;
    --letter-spacing-label: 0.16em;
    --measure-body: 62ch;

    /* Fluid text clamp for hero can override using --fs-hero if needed */
}

/* Apply continuous background gradient globally */
body {
    position: relative;
    isolation: isolate;
    background: transparent;
    color: hsl(var(--clr-text));
    min-height: 100vh;
}

body::before,
body::after {
    position: fixed;
    inset: 0;
    z-index: -2;
    content: "";
    pointer-events: none;
}

body::before {
    background: linear-gradient(to top right, var(--color-dark-purple), var(--color-anchor-dark));
}

body::after {
    z-index: -1;
    background: linear-gradient(to top right, var(--gradient-light-layer), var(--color-anchor-dark));
    opacity: var(--gradient-progress);
    will-change: opacity;
}

@media (max-width: 768px) {
    :root {
        --gradient-light-layer: rgb(184, 160, 194);
    }
}


/* ===== typography.css ===== */

/* css/typography.css */

/* Base typography */
html {
    font-family: var(--font-family-base);
    font-size: var(--fs-base);
    line-height: var(--line-height-body);
    text-rendering: optimizeLegibility;
}
body {
    font-family: var(--font-family-base);
    color: hsl(var(--clr-text));
    letter-spacing: var(--letter-spacing-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1 {
    font-size: var(--fs-h1);
    margin-block: var(--space-md) 0;
    color: hsl(var(--clr-heading));
    font-family: var(--font-family-display);
    font-weight: 600;
    line-height: var(--line-height-heading);
    letter-spacing: -0.03em;
    text-wrap: balance;
}
h2 {
    font-size: var(--fs-h2);
    margin-block: var(--space-md) 0;
    color: hsl(var(--clr-heading));
    font-family: var(--font-family-display);
    font-weight: 600;
    line-height: var(--line-height-heading);
    letter-spacing: -0.025em;
    text-wrap: balance;
}
h3 {
    font-size: var(--fs-h3);
    margin-block: var(--space-md) 0;
    color: hsl(var(--clr-heading));
    font-family: var(--font-family-display);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    text-wrap: balance;
}
h4 {
    font-size: var(--fs-h4);
    margin-block: var(--space-sm) 0;
    color: hsl(var(--clr-heading));
    font-family: var(--font-family-base);
    font-weight: 700;
    line-height: 1.1;
}
h5 {
    font-size: var(--fs-h5);
    margin-block: var(--space-sm) 0;
    color: hsl(var(--clr-heading));
    font-family: var(--font-family-base);
    font-weight: 700;
    line-height: 1.2;
}
h6 {
    font-size: var(--fs-h6);
    margin-block: var(--space-xs) 0;
    color: hsl(var(--clr-heading));
    font-family: var(--font-family-base);
    font-weight: 700;
    line-height: 1.2;
}

/* Paragraphs and lists */
p,
ul,
ol {
    font-size: var(--fs-base);
    max-width: var(--measure-body);
    margin-block-end: var(--space-md);
    color: hsl(var(--clr-text) / 0.92);
    line-height: var(--line-height-body);
    text-wrap: pretty;
}

.section-heading {
    max-width: 14ch;
    margin-inline: auto;
}

.section-paragraph {
    font-size: clamp(1rem, 0.98rem + 0.25vw, 1.08rem);
}

strong,
b {
    font-weight: 700;
}

/* Small text */
small {
    font-size: var(--fs-h6);
    color: hsl(var(--clr-muted));
}

/* ===== layout.css ===== */

/* css/layout.css */

/* ===== Section Styling ===== */
section {
    min-height: 100vh;
    /* Use logical properties and spacing scale */
    padding-block-start: var(--space-xxl);
    padding-block-end: var(--space-lg);
    padding-inline: 5%;
    /* border-bottom: 1px solid hsl(var(--clr-border) / 0.2); */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden; /* Usually good, but be mindful if child elements need to overflow */
}

section:last-child {
    border-bottom: none;
}

/* ===== navigation.css ===== */

/* css/navigation.css */

/* ===== Navigation Styling ===== */
nav {
    position: fixed;
    inset-block-start: var(--space-md);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background-color: hsl(var(--clr-bg-end) / 0.6);
    backdrop-filter: blur(12px);
    border-radius: 50px;
    padding-block: var(--space-xs);
    padding-inline: var(--space-md);
    box-shadow: 0 4px 20px hsl(var(--clr-border) / 0.2);
    border: 1px solid hsl(var(--clr-text) / 0.1);
    transition: background-color 0.3s ease;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    height: 100%;
    gap: var(--space-md);
    padding: 0;
    margin: 0;
}

nav a {
    text-decoration: none;
    color: hsl(var(--clr-text));
    font-family: var(--font-family-ui);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: var(--letter-spacing-label);
    text-transform: uppercase;
    padding-block: var(--space-xs);
    padding-inline: var(--space-sm);
    border-radius: 50px;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    height: 48px;
    line-height: 1;
}

nav a:hover,
nav a:focus {
    background-color: hsl(var(--clr-text) / 0.15);
    color: hsl(var(--clr-text));
    transform: translateY(-2px);
    outline: none;
}

/* nav a.active { background-color: hsl(var(--clr-text) / 0.2); } */

/* ===== animation.css ===== */

/* css/animations.css */

/* ===== Animation Base States & Transitions (for Observer) ===== */
/* EXCLUDE home typing elements if their animation is fully JS controlled or specific */
.section-heading:not(#home-heading),
.section-paragraph:not(#home-paragraph),
.timeline-event, /* This is a class from your original CSS, used for scroll observer */
.project-placeholder,
.update-placeholder,
.contact-links {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

/* Staggering */
.section-heading:not(#home-heading) {
    transition-delay: 0.1s;
}

.section-paragraph:not(#home-paragraph),
.project-placeholder,
.update-placeholder,
.contact-links {
    transition-delay: 0.25s;
}

/* This .timeline-event seems like it's for the main timeline items,
   not the MDP timeline structure. Adjust if this class is not used
   or used differently now.
   If this applies to .timeline-state from MDP, move to timeline.css observer part.
*/
.timeline-event { /* If this class is specific to the MDP timeline items, move to timeline.css */
    transition-delay: 0.15s;
    opacity: 0; /* Base state, can be redundant if covered above */
    /* This transition is different, so it's okay here or in timeline.css if specific */
    transition: opacity 0.7s var(--ease-out-back), transform 0.7s var(--ease-out-back);
}


/* Make elements visible once 'is-visible' class is added */
.section-heading.is-visible:not(#home-heading),
.section-paragraph.is-visible:not(#home-paragraph),
.timeline-event.is-visible, /* Again, check usage of .timeline-event */
.project-placeholder.is-visible,
.update-placeholder.is-visible,
.contact-links.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Specific visible state for .timeline-event, check its relevance */
.timeline-event.is-visible {
    /* This implies .timeline-event might have other transforms (like rotate)
       that need resetting, or it's an older style. */
    transform: translateX(0) translateY(0) rotate(0deg);
}


/* --- Typing Cursor Blink Animation (can also be in home.css) --- */
@keyframes blink {
    from, to { background-color: transparent; }
    50% { background-color: var(--color-accent-light); }
}

/* Reduced motion for animations is handled in responsive.css */

/* ===== home.css ===== */

/* css/home.css */

/* ===== Home Section Specific Styles ===== */
section#home {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    /* min-height and padding are from layout.css */
}

.home-content-wrapper {
    z-index: 1;
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Specific overrides for home heading and paragraph for typing animation */
#home h1,
#home-heading,
#home p {
    min-height: 1.2em; /* Ensure space during typing */
    text-align: center;
    /* Reset observer animation effects as typing is JS controlled */
    opacity: 1;
    transform: none;
    transition: none;
    margin-bottom: 0.5rem; /* Typing specific margin */
}

#home-paragraph {
    line-height: 1.3;
    min-height: 5.8em; /* Increased to accommodate multiple lines */
    font-size: 1.1rem; /* Slightly larger font for better readability */
    margin-top: var(--space-md, 1rem); /* Add consistent spacing */
}

#home h1,
#home-heading {
    margin: 0 0 0.35rem;
    font-size: clamp(0.95rem, 0.88rem + 0.45vw, 1.1rem);
    font-weight: 600;
}

/* --- Typing Cursor --- */

/* .typing-cursor.visible {
    opacity: 1;
} */

.typing-cursor.blinking {
    animation: none;
}

/* --- Cluster Canvas Styling --- */
#cluster-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.26;
    transition: opacity 0.9s ease;
    will-change: opacity;
}

#cluster-canvas[data-cluster-section="home"] {
    opacity: 0.68;
}

#cluster-canvas[data-cluster-section="about"] {
    opacity: 0.32;
}

#cluster-canvas[data-cluster-section="timeline"] {
    opacity: 0.26;
}

#cluster-canvas[data-cluster-section="projects"] {
    opacity: 0.34;
}

#cluster-canvas[data-cluster-section="updates"] {
    opacity: 0.29;
}

#cluster-canvas[data-cluster-section="contact"] {
    opacity: 0.38;
}

/* If you had specific styling for #particle-canvas like opacity transitions */
/*
#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s ease-in;
}
#particle-canvas.visible {
    opacity: 0.6;
}
*/

.welcome-blur-box {
    background: hsl(var(--clr-surface) / 0.7);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg, 24px);
    border: 1px solid hsl(var(--clr-text) / 0.08);
    box-shadow: 0 12px 40px hsl(var(--clr-border) / 0.14);
    padding: clamp(1.75rem, 2.4vw, 2.5rem) clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: var(--space-sm); /* smallest margin */
    display: block;
    width: clamp(340px, 62vw, 620px); /* Fix width responsively to avoid jumps */
    max-width: 90vw;
    min-height: 18rem; /* Reserve vertical space for name + title lines */
    text-align: left; /* Left-align content inside the box */
}

#home-heading, #home-paragraph {
    position: relative;
    z-index: 2;
}

#home-heading {
    max-width: none;
    margin-inline: 0;
}

.seo-heading {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Small welcome text */
.welcome-small {
    font-family: var(--font-family-ui);
    font-size: clamp(0.82rem, 0.76rem + 0.28vw, 0.95rem);
    font-weight: 700;
    opacity: 0.78;
    display: inline-block;
    margin-bottom: 0.55rem;
    letter-spacing: 0.08em;
    text-transform: none;
    transition: font-size 0.8s ease, font-weight 0.8s ease, opacity 0.8s ease, letter-spacing 0.8s ease;
}

/* Big welcome text that will shrink */
.welcome-big {
    font-family: var(--font-family-display);
    font-size: clamp(3rem, 6vw, 4.6rem);
    font-weight: 600;
    line-height: 0.92;
    letter-spacing: -0.03em;
    display: block;
    margin-bottom: 0.8rem;
    transition: font-size 0.8s ease, font-weight 0.8s ease, opacity 0.8s ease, letter-spacing 0.8s ease;
}

#typing-text {
    font-family: var(--font-family-display);
    font-size: clamp(3.1rem, 7vw, 5.4rem);
    font-weight: 600;
    line-height: 0.70;
    display: block;
    margin-bottom: 0.5rem;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

#typing-text .name-text {
    display: inline-block;
}

#typing-text .title-text {
    font-family: var(--font-family-ui);
    font-size: clamp(1.35rem, 0.96rem + 0.68vw, 1.42rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: hsl(var(--clr-accent));
}

/* About section headshot image (moved from inline styles) */
#about .about-headshot {
    display: block;
    margin: 1rem auto 1.25rem;
    width: clamp(160px, 22vw, 260px);
    /* aspect-ratio: 4 / 5; portrait rounded-rectangle */
    object-fit: cover;
    border-radius:20%;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    /* Match About section observer animation base state */
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
    transition-delay: 0.2s; /* Stagger after heading */
}

/* Become visible when the About heading becomes visible (no JS changes needed) */
#about .section-heading.is-visible ~ .about-headshot {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure left alignment overrides section defaults inside the blur box */
.welcome-blur-box #home-heading,
.welcome-blur-box #home-paragraph {
    text-align: left;
}


/* ===== responsive.css ===== */

/* css/responsive.css */

/* ===== Responsive Design Adjustments ===== */

/* --- Medium Screens (Tablets) --- */
@media (max-width: 768px) {
    /* Navigation */
    nav {
        left: 50%;
        right: auto;
        top: 0.5rem;
        transform: translateX(-50%);
        width: min(92vw, 42rem);
        padding: 0.55rem 0.9rem;
        max-width: calc(100% - 1rem);
    }
    nav ul { 
        gap: 0.35rem 0.55rem;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    nav a { 
        font-size: 0.75rem; 
        padding: 0.2rem 0.45rem;
        height: auto;
        min-height: 36px;
        justify-content: center;
    }

    /* Typography */
    h1 { font-size: 2.2rem; } /* Was: clamp(2.5rem, 6vw, 4rem) */
    h2 { font-size: 1.9rem; } /* Was: clamp(2rem, 5vw, 3rem) */

    /* Layout */
    section {
        min-height: auto;
        padding: 7.5rem 4.5% 3.5rem;
    }

    #home {
        min-height: 100svh;
        justify-content: flex-start;
        padding-top: 8.75rem;
        padding-bottom: 2.5rem;
    }

    .home-content-wrapper {
        width: 100%;
    }

    .welcome-blur-box {
        width: min(100%, 34rem);
        max-width: 100%;
        min-height: 15rem;
        padding: 1.5rem 1.35rem;
        border-radius: 22px;
    }

    #home-paragraph {
        min-height: 4.6em;
    }

    #typing-text {
        font-size: clamp(2.55rem, 9vw, 4.2rem);
        line-height: 0.78;
    }

    #typing-text .title-text {
        font-size: clamp(1.05rem, 0.96rem + 0.65vw, 1.2rem);
        letter-spacing: 0.1em;
        line-height: 1.35;
    }

    #about-text-content,
    #updates .updates-container,
    .social-links-container,
    .projects-container {
        width: min(100%, 42rem);
    }

    #about .section-paragraph,
    #updates .updates-list li,
    .project-description,
    .timeline-company,
    .timeline-skills {
        overflow-wrap: anywhere;
    }

    /* MDP Timeline Responsive Adjustments */
    .timeline-container-mdp::after {
        left: 20px;
        transform: none;
    }

    .timeline-state,
    .timeline-state:nth-child(even) { /* Also applies to odd now for stacking */
        width: 100%;
        left: 0;
        padding-left: 55px;
        padding-right: 15px;
        text-align: left !important; /* Force left align for all stacked items */
    }
    .timeline-state:nth-child(odd) { /* Ensure odd items also stack left */
        text-align: left !important; /* Force left align */
    }


    .timeline-node,
    .timeline-state:nth-child(odd) .timeline-node, /* Consolidate for stacked view */
    .timeline-state:nth-child(even) .timeline-node {
        left: 10px; /* Position relative to new line */
        transform: translateX(-50%);
        top: 15px; /* Adjust vertical */
    }
    /* Adjust hover transform for mobile - applies to both odd/even now */
    .timeline-state:hover .timeline-node {
        transform: translateX(-50%) scale(1.2);
    }

    /* Hover info box for main timeline content (if you re-add it) */
    /*
    .timeline-state-content::after,
    .timeline-state:nth-child(odd) .timeline-state-content::after {
        left: 0;
        right: auto;
        max-width: calc(100% - 20px);
        text-align: left;
    }
    */

    /* Node Icon position on mobile */
    .node-icon,
    .timeline-state:nth-child(odd) .node-icon,
    .timeline-state:nth-child(even) .node-icon {
        left: 35px;
        right: auto;
        top: 18px;
    }

    /* Accomplishments Panel and Toggle on mobile */
    .timeline-accomplish-panel,
    .timeline-state:nth-child(odd) .timeline-accomplish-panel,
    .timeline-state:nth-child(even) .timeline-accomplish-panel {
        position: relative; /* Stack below content */
        left: auto;
        right: auto;
        top: auto;
        width: calc(100% - 20px); /* Adjust width to fit within padded .timeline-state */
        margin: 10px auto 20px auto; /* Center and add margin */
        float: none;
        transform: translateY(0); /* Reset transform */
        max-width: none; /* Allow it to fill available width */
    }

    .timeline-state {
        padding-block-end: 0;
    }

    .timeline-state-content {
        padding: 0.95rem 1rem;
    }

    .timeline-accomplish-panel ul {
        padding-left: 1rem;
    }

    .timeline-state:nth-child(odd) .timeline-accomplish-toggle,
    .timeline-state:nth-child(even) .timeline-accomplish-toggle {
        float: none; /* Stack button */
        display: block;
        margin-left: auto;
        margin-right: auto;
        max-width: 200px; /* Or adjust as needed */
    }

    /* Older .timeline-event responsive styles from original CSS */
    /* Review if these .timeline-event styles are still needed or conflict with .timeline-state */
    /*
    .timeline-container::after { // Assuming this was for a different timeline structure
        left: 30px;
        transform: none;
    }
    .timeline-event,
    .timeline-event:nth-child(even) {
        width: 100%;
        left: 0;
        padding-left: 70px;
        padding-right: 15px;
        text-align: left;
        transform: translateX(-30px) translateY(20px);
    }
    .timeline-event:nth-child(odd) .timeline-dot,
    .timeline-event:nth-child(even) .timeline-dot {
        left: 21px;
        right: auto;
        top: 25px;
    }
    .timeline-event.is-visible {
        transform: translateX(0) translateY(0);
    }
    */
}

/* --- Small Screens (Mobile) --- */
@media (max-width: 480px) {
    /* Base Body & Nav */
    body { font-size: 15px; } /* Consider if needed, or use clamp in typography */
    nav { 
        left: 50%;
        right: auto;
        top: 0.5rem;
        transform: translateX(-50%);
        width: min(95vw, 28rem);
        padding: 0.45rem 0.6rem;
        max-width: calc(100% - 1rem);
        border-radius: 25px;
    }
    nav ul { 
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.2rem 0.35rem;
        width: 100%;
    }
    nav li { min-width: 0; }
    nav a { 
        font-size: 0.68rem; 
        padding: 0.2rem 0.25rem;
        height: auto;
        min-height: 30px;
        width: 100%;
        text-align: center;
        letter-spacing: 0.12em;
    }

    /* Typography */
    h1 { font-size: 3rem; }
    h2 { font-size: 3rem; }
    p { font-size: 0.95rem; } /* General paragraph */

    /* Layout */
    section {
        padding: 7rem 4% 2.75rem;
    }

    #home {
        min-height: 100svh;
        padding-top: 8.5rem;
        padding-bottom: 2rem;
    }

    .welcome-blur-box {
        width: min(100%, 25.75rem);
        min-height: 13.75rem;
        padding: 1.35rem 1.15rem;
        border-radius: 20px;
    }

    #home h1 {
        margin-bottom: 0.2rem;
    }

    #home-paragraph {
        min-height: 4.1em;
        margin-top: 0.75rem;
    }

    #typing-text {
        font-size: clamp(3rem, 11vw, 3.35rem);
        line-height: 0.8;
        margin-bottom: 0.25rem;
    }

    #typing-text .title-text {
        display: inline-block;
        font-size: clamp(1.1rem, 4.2vw, 1.05rem);
        letter-spacing: 0.08em;
        line-height: 1.45;
    }

    #about .about-headshot {
        width: clamp(145px, 42vw, 200px);
    }

    #about-text-content,
    #updates .updates-container,
    .social-links-container,
    .projects-container,
    .timeline-container-mdp {
        width: 100%;
    }

    /* MDP Timeline on small mobile */
    .timeline-container-mdp::after {
        left: 15px;
    }
    .timeline-state { /* Applies to both odd and even due to stacking */
        padding-left: 45px; /* Less padding for smaller screens */
        margin-bottom: 30px; /* Reduce space between items */
    }
     .timeline-node, /* Applies to both odd and even */
     .timeline-state:nth-child(odd) .timeline-node,
     .timeline-state:nth-child(even) .timeline-node {
        left: 5px; /* Closer to the very edge for the line */
        width: 18px;
        height: 18px;
        border-width: 1.5px;
        top: 12px;
    }
    /* Hover transform is already translateX(-50%) scale(1.2) from 768px breakpoint */

    .timeline-title { font-size: 1.05rem; }
    .timeline-company, .timeline-skills { font-size: 0.85rem; }
    .timeline-date { font-size: 0.68rem; }
    .timeline-state-content { padding: 0.85rem 0.9rem; }
    .timeline-accomplish-panel { width: calc(100% - 8px); padding: 0.85rem; }
    .timeline-accomplish-toggle { width: 100%; max-width: none; }
    /* .timeline-state-content::after { font-size: 0.8rem; } */ /* If hover info is re-added */

    /* Node Icon position on small mobile */
     .node-icon,
     .timeline-state:nth-child(odd) .node-icon,
     .timeline-state:nth-child(even) .node-icon {
         left: 30px;
         top: 15px;
     }

    .projects-container {
        grid-template-columns: 1fr;
        gap: 1.4rem;
    }

    .project-card-wrapper {
        width: 100%;
        max-width: none;
    }

    .project-content {
        padding: 1rem;
    }

    .project-title {
        font-size: clamp(1.45rem, 7vw, 1.8rem);
    }

    .project-tech {
        font-size: 0.68rem;
        letter-spacing: 0.08em;
    }

    .project-description {
        font-size: 0.94rem;
        line-height: 1.6;
    }

    .project-links {
        flex-wrap: wrap;
        gap: 0.65rem;
    }

    .project-link {
        width: 100%;
        text-align: center;
    }

    #updates .updates-container {
        padding: 1rem 0.9rem;
        border-radius: 14px;
    }

    #updates .updates-list {
        font-size: 0.94rem;
    }

    #updates .updates-list li {
        padding-left: 22px;
        margin-bottom: 0.9rem;
    }

    #updates .updates-list li::before {
        top: 0.8em;
        transform: none;
    }

    .social-links-container {
        gap: 0.9rem;
        justify-content: space-between;
    }

    .social-link {
        width: calc(33.333% - 0.65rem);
        min-width: 72px;
    }

    .social-name {
        font-size: 0.66rem;
        letter-spacing: 0.06em;
        overflow-wrap: anywhere;
    }

    /* Older .timeline-event small mobile styles - review necessity */
    /*
    .timeline-container::after { left: 20px; } // Different timeline class
    .timeline-event { padding-left: 55px; margin-bottom: 40px; }
    .timeline-event:nth-child(odd) .timeline-dot,
    .timeline-event:nth-child(even) .timeline-dot { left: 11px; }
    .timeline-content { padding: 15px 20px; } // Different timeline class
    .timeline-title { font-size: 1.1rem; }
    */
}


/* ===== Accessibility: Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  /* Turn off complex transitions and animations */
  body,
  nav a,
  .timeline-state, /* Changed from .timeline-event */
  .section-heading:not(#home-heading),
  .section-paragraph:not(#home-paragraph),
  .timeline-node,  /* Changed from .timeline-dot */
  /* .timeline-content, // This is a generic class, be careful */
  #cluster-canvas, /* Was #particle-canvas */
  .project-placeholder,
  .update-placeholder,
  .contact-links,
  /* .typing-cursor, */
  .about-content,
  .timeline-accomplish-toggle,
  .timeline-accomplish-panel
   {
    transition: none !important;
    animation: none !important;
  }

  /* Ensure elements animated by observer are immediately visible */
  .section-heading:not(#home-heading),
  .section-paragraph:not(#home-paragraph),
  .timeline-state, /* Changed from .timeline-event */
  .project-placeholder,
  .update-placeholder,
  .contact-links,
  .about-content /* Ensure about content is visible if transitions are off */
  {
    opacity: 1 !important;
    transform: none !important;
  }
  /* If .about-content.active relies on transition for height, set it directly */
  .about-content.active {
      height: auto !important;
      visibility: visible !important;
  }
    .timeline-accomplish-panel:not([hidden]) {
        opacity: 1 !important;
        transform: none !important;
        visibility: visible !important;
    }


  /* Ensure timeline nodes are as intended */
  .timeline-node { /* Changed from .timeline-dot */
      transform: scale(1) !important; /* Reset any hover/focus scale */
      /* If it was translateX for positioning, that needs to be preserved or handled differently */
      box-shadow: none !important;
  }
   .timeline-state:nth-child(odd) .timeline-node { transform: translateX(50%) scale(1) !important; }
   .timeline-state:nth-child(even) .timeline-node { transform: translateX(-50%) scale(1) !important; }


  /* Ensure canvas is hidden if its visibility relies on animation/transition */
  #cluster-canvas { /* Was #particle-canvas */
      /* If it should be visible by default (no animation to show it), remove this.
         If JS shows it by adding a class, then that class should set opacity to 1. */
      opacity: 1 !important; /* Assuming it should be visible unless JS hides it */
      /* If it was opacity: 0 and JS fades it in, then it depends on how JS handles reduced motion */
  }
   /* If #particle-canvas was used and had a .visible class for JS:
   #particle-canvas.visible { opacity: 0.6 !important; }
   #particle-canvas:not(.visible) { opacity: 0 !important; }
   */


  /* Ensure typing cursor is not animated and potentially hidden if it relies on animation to be seen */
  .typing-cursor {
      opacity: 0 !important; /* If it should not be visible at all with reduced motion */
      animation: none !important;
  }
  /* If you have a "displayTypingImmediately()" JS function, it should handle showing text
     and hiding the cursor. */
}


/* ===== timeline.css ===== */

/* css/timeline.css */

/* ===== Experience Timeline ===== */

#timeline {
    align-items: stretch;
    text-align: left;
    padding-inline: 5%;
}

.timeline-intro {
    width: min(100%, 760px);
    margin-inline: auto;
    text-align: center;
}

.timeline-eyebrow {
    display: inline-block;
    margin-bottom: 0.9rem;
    color: hsl(var(--clr-accent));
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    line-height: 1.2;
    text-transform: uppercase;
}

#timeline .section-heading {
    max-width: none;
    margin-inline: auto;
    font-size: clamp(2.7rem, 2.2rem + 2vw, 4.5rem);
    text-align: center;
}

.timeline-container-mdp {
    position: relative;
    width: min(100%, 1020px);
    margin: clamp(2.25rem, 5vw, 4rem) auto 0;
    padding-block: 0.5rem;
}

/* The rail stays quiet so the cards remain the main focus. */
.timeline-container-mdp::after {
    content: "";
    position: absolute;
    top: 1.35rem;
    bottom: 1.35rem;
    left: 13px;
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent,
        hsl(var(--clr-accent) / 0.72) 8%,
        hsl(var(--clr-accent) / 0.72) 92%,
        transparent
    );
    box-shadow: 0 0 14px hsl(var(--clr-accent) / 0.22);
}

.timeline-state {
    position: relative;
    left: 0 !important;
    z-index: 1;
    display: block;
    width: 100% !important;
    margin: 0 0 1.6rem;
    padding-left: 42px !important;
    text-align: left !important;
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

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

.timeline-state.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-node {
    position: absolute;
    top: 1.35rem;
    left: 13px;
    width: 13px;
    height: 13px;
    border: 3px solid hsl(var(--clr-bg-start));
    border-radius: 50%;
    background: hsl(var(--clr-accent));
    box-shadow: 0 0 0 1px hsl(var(--clr-accent) / 0.72), 0 0 16px hsl(var(--clr-accent) / 0.45);
    transform: translateX(-50%);
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    z-index: 2;
}

.timeline-state:hover .timeline-node {
    background: hsl(var(--clr-text));
    box-shadow: 0 0 0 1px hsl(var(--clr-text) / 0.7), 0 0 20px hsl(var(--clr-accent) / 0.75);
    transform: translateX(-50%) scale(1.22);
}

.timeline-state-content {
    min-width: 0;
    padding: 1.35rem 1.55rem 1.25rem;
    border: 1px solid hsl(var(--clr-accent) / 0.25);
    border-radius: 18px;
    background: linear-gradient(135deg, hsl(var(--clr-surface) / 0.72), hsl(var(--clr-bg-end) / 0.58));
    box-shadow: 0 12px 30px hsl(var(--clr-bg-start) / 0.24), inset 0 1px 0 hsl(var(--clr-text) / 0.06);
    backdrop-filter: blur(10px);
    text-align: left;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.timeline-state:hover .timeline-state-content {
    border-color: hsl(var(--clr-accent) / 0.58);
    box-shadow: 0 16px 36px hsl(var(--clr-bg-start) / 0.3), 0 0 22px hsl(var(--clr-accent) / 0.1);
    transform: translateY(-3px);
}

.timeline-date {
    display: block;
    padding-top: 0;
    margin-bottom: 0.8rem;
    color: hsl(var(--clr-accent));
    font-size: 0.83rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    line-height: 1.55;
    text-align: left;
    text-transform: uppercase;
}

.timeline-company {
    display: block;
    margin-bottom: 1.1rem;
    color: hsl(var(--clr-text) / 0.82);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.timeline-title {
    margin: 0 0 0.25rem;
    color: hsl(var(--clr-text));
    font-family: var(--font-family-display);
    font-size: clamp(2rem, 1.7rem + 0.8vw, 2.8rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1;
    text-shadow: 0 1px 3px hsl(var(--clr-bg-start) / 0.42);
    transition: color 0.3s ease;
}

.timeline-state:hover .timeline-title {
    color: hsl(var(--clr-heading));
}

.timeline-skills {
    margin: 0;
    color: hsl(var(--clr-muted));
    font-size: 0.79rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.8;
    text-transform: uppercase;
}

/* Accomplishments are now part of the reading flow instead of hidden popovers. */
.timeline-accomplish-toggle {
    display: none !important;
}

.timeline-accomplish-panel,
.timeline-accomplish-panel[hidden],
.timeline-state:nth-child(odd) .timeline-accomplish-panel,
.timeline-state:nth-child(even) .timeline-accomplish-panel {
    position: static !important;
    display: block !important;
    width: auto !important;
    max-width: none !important;
    margin: -1.15rem 1.8rem 0;
    padding: 1.15rem 1.8rem 0.2rem;
    border: 0;
    border-top: 1px solid hsl(var(--clr-accent) / 0.17);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    text-align: left;
}

.timeline-accomplish-panel::before {
    display: none;
}

.timeline-accomplish-panel ul {
    max-width: none;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline-accomplish-panel li {
    position: relative;
    margin: 0;
    padding: 0.34rem 0 0.34rem 1.25rem;
    color: hsl(var(--clr-text) / 0.82);
    font-size: 0.94rem;
    line-height: 1.55;
}

.timeline-accomplish-panel li::before {
    position: absolute;
    top: 0.95rem;
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: hsl(var(--clr-accent));
    box-shadow: 0 0 8px hsl(var(--clr-accent) / 0.55);
    content: "";
}

@media (max-width: 768px) {
    #timeline {
        padding-inline: 4.5%;
    }

    .timeline-container-mdp {
        width: 100%;
        margin-top: 3.25rem;
        padding-left: 0.1rem;
    }

    .timeline-container-mdp::after {
        top: 1rem;
        bottom: 1rem;
        left: 0.35rem;
    }

    .timeline-state {
        margin-bottom: 2rem;
        padding-left: 1.35rem !important;
    }

    .timeline-node {
        top: 1.05rem;
        left: 0.35rem;
    }

    .timeline-date {
        display: block;
        padding: 0 0 0.65rem;
        text-align: left;
    }

    .timeline-state-content {
        padding: 1.25rem 1.15rem 1.1rem;
    }

    .timeline-title {
        font-size: clamp(1.85rem, 7vw, 2.35rem);
    }

    .timeline-accomplish-panel,
    .timeline-state:nth-child(odd) .timeline-accomplish-panel,
    .timeline-state:nth-child(even) .timeline-accomplish-panel {
        margin: -0.8rem 1.15rem 0;
        padding: 1rem 1.15rem 0.15rem;
    }

    .timeline-accomplish-panel li {
        font-size: 0.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .timeline-state,
    .timeline-state-content,
    .timeline-node,
    .timeline-state:hover .timeline-node {
        transition: none !important;
    }
}


/* ===== projects.css ===== */

/* css/projects.css */

/* ===== Project Gallery ===== */

#projects {
    align-items: stretch;
    text-align: left;
}

#projects > .section-heading,
#projects > .section-paragraph {
    align-self: center;
    text-align: center;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.35rem;
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
}

.project-source {
    /* The source becomes four grouped grids once JavaScript initializes. */
    display: grid;
}

.project-groups {
    width: min(100%, 1200px);
    margin: clamp(3rem, 6vw, 5rem) auto 0;
}

.project-group {
    position: relative;
    display: block;
    min-height: 0;
    margin: 0 0 clamp(4rem, 8vw, 7rem);
    padding: 0;
    overflow: visible;
    text-align: left;
}

.project-group:last-child {
    margin-bottom: 0;
}

.project-group-heading {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid hsl(var(--clr-text) / 0.14);
}

.project-group-heading h3 {
    margin: 0;
    color: hsl(var(--clr-heading));
    font-family: var(--font-family-display);
    font-size: clamp(2rem, 1.7rem + 1vw, 2.8rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1;
}

.project-group-heading p {
    margin: 0.5rem 0 0;
    color: hsl(var(--clr-text) / 0.68);
    font-size: 0.96rem;
    line-height: 1.55;
}

.project-group-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.35rem;
    margin: 0;
    align-items: start;
}

.project-group-grid .project-card {
    height: auto;
}

.project-group-grid .project-card-wrapper {
    width: 100%;
}

.project-group-grid .project-image-container {
    aspect-ratio: 4 / 3;
}

/* ===== Compact Project Card ===== */

.project-card-wrapper {
    position: relative;
    align-self: start;
    min-width: 0;
    padding: 0;
    border: 1px solid hsl(var(--clr-text) / 0.14);
    border-radius: 18px;
    background: hsl(var(--clr-surface) / 0.55);
    cursor: pointer;
    opacity: 1 !important;
    transform: none !important;
    transition: border-color 0.35s ease, transform 0.35s ease;
}

.project-card-wrapper::before {
    position: absolute;
    top: 0;
    left: 1.1rem;
    z-index: 3;
    padding: 0.42rem 0.65rem;
    border-radius: 0 0 8px 8px;
    background: hsl(var(--clr-bg-start) / 0.78);
    color: hsl(var(--clr-text) / 0.9);
    content: "Open project ↗";
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(-0.4rem);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-card-wrapper::after {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    z-index: 2;
    max-width: calc(100% - 1.5rem);
    padding: 0.5rem 0.72rem;
    border: 1px solid color-mix(in srgb, var(--project-accent) 45%, transparent);
    border-radius: 8px;
    background: hsl(var(--clr-bg-start) / 0.88);
    color: hsl(var(--clr-text));
    content: attr(data-project-title);
    font-family: var(--font-family-display);
    font-size: clamp(1.05rem, 0.9rem + 0.6vw, 1.4rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1;
    pointer-events: none;
}

.project-card-wrapper:hover::before,
.project-card-wrapper:focus-visible::before {
    opacity: 1;
    transform: translateY(0);
}

.project-card-wrapper:hover,
.project-card-wrapper:focus-visible {
    border-color: hsl(var(--clr-accent) / 0.75);
    transform: translateY(-6px) !important;
    outline: none;
}

.project-card-wrapper:focus-visible {
    outline: 2px solid hsl(var(--clr-accent));
    outline-offset: 4px;
}

.project-card {
    display: flex;
    min-height: 0;
    height: auto;
    flex-direction: column;
    overflow: hidden;
    border-radius: 17px;
    background: hsl(var(--clr-bg-end) / 0.48);
}

.project-image-container,
.project-image-container.full-size {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid hsl(var(--clr-accent) / 0.3);
    border-radius: 16px 16px 0 0;
    background: hsl(var(--clr-bg-start) / 0.45);
}

.project-card-wrapper[data-project-category="highlights"] {
    --project-accent: #f2c38a;
}

.project-card-wrapper[data-project-category="prototypes"] {
    --project-accent: #a9c7ff;
}

.project-card-wrapper[data-project-category="in-production"] {
    --project-accent: #8ee6b0;
}

.project-card-wrapper[data-project-category="research-academia"] {
    --project-accent: #c5a3ff;
}

.project-card-wrapper[data-project-category] {
    border-top-color: color-mix(in srgb, var(--project-accent) 65%, transparent);
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s cubic-bezier(.17,.67,.17,.98), filter 0.35s ease;
}

.project-image--contain {
    object-fit: contain;
    background: #fff;
}

.project-card-wrapper:hover .project-image,
.project-card-wrapper:focus-visible .project-image {
    filter: saturate(1.08);
    transform: scale(1.055);
}

.project-image-container--placeholder {
    display: grid;
    place-items: center;
    min-height: 100%;
    background:
        radial-gradient(circle at 16% 20%, hsl(var(--clr-accent) / 0.3), transparent 30%),
        radial-gradient(circle at 85% 80%, hsl(var(--clr-text) / 0.12), transparent 32%),
        linear-gradient(135deg, hsl(var(--clr-bg-start) / 0.92), hsl(var(--clr-bg-end) / 0.92));
}

.project-image-placeholder {
    z-index: 1;
    padding: 1rem;
    color: hsl(var(--clr-text) / 0.94);
    font-family: var(--font-family-display);
    font-size: clamp(1.7rem, 1.2rem + 1.5vw, 2.6rem);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 0.9;
    text-align: center;
}

.project-content {
    display: flex;
    min-height: 5.4rem;
    flex: 1;
    align-items: flex-start;
    padding: 1.1rem 1.2rem 1.25rem;
}

/* The gallery is visual-only; all project copy appears in the dialog. */
.project-card .project-content {
    display: none;
}

.project-title {
    margin: 0;
    color: hsl(var(--clr-text));
    font-family: var(--font-family-display);
    font-size: clamp(1.55rem, 1.35rem + 0.65vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1;
    text-wrap: balance;
    transition: color 0.3s ease;
}

.project-card-wrapper:hover .project-title,
.project-card-wrapper:focus-visible .project-title {
    color: hsl(var(--clr-heading));
}

/* Details move into the dialog, keeping the gallery intentionally quiet. */
.project-card .project-tech,
.project-card .project-description,
.project-card .project-links,
.project-card .project-details {
    display: none;
}

/* ===== Project Details Dialog ===== */

.project-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: min(980px, calc(100vw - 2rem));
    max-width: 980px;
    max-height: 88vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid hsl(var(--clr-accent) / 0.42);
    border-radius: 24px;
    background: linear-gradient(135deg, hsl(var(--clr-surface) / 0.98), hsl(var(--clr-bg-end) / 0.98));
    color: hsl(var(--clr-text));
    box-shadow: 0 30px 100px hsl(var(--clr-bg-start) / 0.68), 0 0 40px hsl(var(--clr-accent) / 0.12);
    opacity: 0;
    transform: translate(-50%, -47%) scale(0.96);
}

.project-dialog[open] {
    animation: project-dialog-in 0.38s var(--ease-out-expo) forwards;
}

@keyframes project-dialog-in {
    from {
        opacity: 0;
        transform: translate(-50%, -47%) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.project-dialog::backdrop {
    background: hsl(var(--clr-bg-start) / 0.78);
    backdrop-filter: blur(8px);
}

.project-dialog-layout {
    display: block;
    max-height: 88vh;
    overflow-y: auto;
}

.project-dialog-media {
    display: flex;
    max-height: 52vh;
    min-height: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: hsl(var(--clr-bg-start) / 0.5);
}

.project-dialog-media-frame {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 0;
    flex: 1;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-dialog-zoom {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid hsl(var(--clr-text) / 0.24);
    border-radius: 999px;
    background: hsl(var(--clr-bg-start) / 0.88);
    color: hsl(var(--clr-text));
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 18px hsl(var(--clr-bg-start) / 0.35);
    backdrop-filter: blur(8px);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.project-dialog-zoom[hidden] {
    display: none;
}

.project-dialog-zoom:hover,
.project-dialog-zoom:focus-visible {
    border-color: hsl(var(--clr-accent));
    background: hsl(var(--clr-bg-start) / 0.98);
    transform: translateY(-1px);
}

.project-dialog-media--gallery {
    height: 52vh;
}

.project-dialog-media--gallery .project-dialog-media-frame > img {
    height: 100%;
}

.project-dialog-media-frame > img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 52vh;
    object-fit: contain;
}

.project-dialog-media-frame > img[hidden],
.project-dialog-placeholder[hidden] {
    display: none !important;
}

.project-dialog-gallery-nav {
    width: 100%;
    padding: 0.65rem 1rem 0.8rem;
    border-top: 1px solid hsl(var(--clr-text) / 0.1);
    background: hsl(var(--clr-bg-end) / 0.75);
}

.project-dialog-gallery-nav[hidden] {
    display: none;
}

.project-dialog-image-caption {
    margin: 0 0 0.55rem;
    color: hsl(var(--clr-muted));
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.project-dialog-thumbnails {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
}

.project-dialog-thumbnail {
    width: 72px;
    height: 48px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 7px;
    background: hsl(var(--clr-bg-start));
    cursor: pointer;
    opacity: 0.62;
    transition: border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.project-dialog-thumbnail:hover,
.project-dialog-thumbnail:focus-visible,
.project-dialog-thumbnail.is-active {
    border-color: hsl(var(--clr-accent));
    opacity: 1;
    transform: translateY(-1px);
}

.project-dialog-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== Full-screen Project Image Viewer ===== */

.project-image-dialog {
    width: min(96vw, 1600px);
    height: 92vh;
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid hsl(var(--clr-accent) / 0.42);
    border-radius: 18px;
    background: hsl(var(--clr-bg-start) / 0.98);
    color: hsl(var(--clr-text));
    box-shadow: 0 30px 100px hsl(var(--clr-bg-start) / 0.75);
}

.project-image-dialog::backdrop {
    background: hsl(var(--clr-bg-start) / 0.88);
    backdrop-filter: blur(10px);
}

.project-image-dialog[open] {
    display: flex;
    flex-direction: column;
}

.project-image-dialog-close {
    position: absolute;
    top: 0.8rem;
    right: 0.9rem;
    z-index: 3;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid hsl(var(--clr-text) / 0.22);
    border-radius: 50%;
    background: hsl(var(--clr-bg-start) / 0.88);
    color: hsl(var(--clr-text));
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.project-image-stage {
    display: grid;
    min-width: 0;
    min-height: 0;
    flex: 1;
    overflow: auto;
    overscroll-behavior: contain;
    background:
        linear-gradient(45deg, hsl(var(--clr-text) / 0.035) 25%, transparent 25%),
        linear-gradient(-45deg, hsl(var(--clr-text) / 0.035) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, hsl(var(--clr-text) / 0.035) 75%),
        linear-gradient(-45deg, transparent 75%, hsl(var(--clr-text) / 0.035) 75%);
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    background-size: 20px 20px;
}

.project-image-stage img {
    align-self: center;
    justify-self: center;
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
}

.project-image-stage img.is-zoomed {
    width: var(--image-zoom);
    max-width: none;
    max-height: none;
    align-self: start;
    justify-self: start;
    cursor: move;
}

.project-image-controls {
    display: flex;
    min-height: 3.8rem;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.65rem 1rem;
    border-top: 1px solid hsl(var(--clr-text) / 0.12);
    background: hsl(var(--clr-bg-end) / 0.9);
}

.project-image-controls button {
    min-width: 2.6rem;
    height: 2.4rem;
    padding: 0 0.8rem;
    border: 1px solid hsl(var(--clr-text) / 0.2);
    border-radius: 8px;
    background: hsl(var(--clr-bg-start) / 0.7);
    color: hsl(var(--clr-text));
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.project-image-controls button:hover:not(:disabled),
.project-image-controls button:focus-visible {
    border-color: hsl(var(--clr-accent));
}

.project-image-controls button:disabled {
    cursor: not-allowed;
    opacity: 0.38;
}

#project-image-zoom-level {
    min-width: 4.2rem;
    color: hsl(var(--clr-muted));
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-align: center;
}

.project-dialog-media--placeholder {
    min-height: min(38vh, 340px);
    background:
        radial-gradient(circle at 16% 20%, hsl(var(--clr-accent) / 0.32), transparent 30%),
        radial-gradient(circle at 85% 80%, hsl(var(--clr-text) / 0.12), transparent 32%),
        linear-gradient(135deg, hsl(var(--clr-bg-start) / 0.92), hsl(var(--clr-bg-end) / 0.92));
}

.project-dialog-placeholder {
    padding: 2rem;
    color: hsl(var(--clr-text) / 0.94);
    font-family: var(--font-family-display);
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 600;
    letter-spacing: -0.05em;
    line-height: 0.9;
    text-align: center;
}

.project-dialog-body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
    padding: clamp(2rem, 4vw, 4rem);
}

.project-dialog-kicker {
    margin-bottom: 0.8rem;
    color: hsl(var(--clr-accent));
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.project-dialog-body h2 {
    margin: 0;
    color: hsl(var(--clr-text));
    font-family: var(--font-family-display);
    font-size: clamp(2.6rem, 2.1rem + 2vw, 4.4rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 0.95;
}

.project-dialog-tech {
    margin-top: 1.25rem;
    color: hsl(var(--clr-muted));
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1.7;
    text-transform: uppercase;
}

.project-dialog-description {
    max-width: 56ch;
    margin: 1.35rem 0 0;
    color: hsl(var(--clr-text) / 0.86);
    font-size: 1.02rem;
    line-height: 1.75;
}

.project-detail-section {
    min-height: 0;
    display: block;
    text-align: left;
    padding: 1.1rem 0;
    border-top: 1px solid hsl(var(--clr-text) / 0.12);
}

.project-detail-section:first-child {
    padding-top: 0;
    border-top: 0;
}

.project-detail-section h3 {
    margin: 0 0 0.35rem;
    color: hsl(var(--clr-accent));
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.project-detail-section p,
.project-detail-section ul {
    margin: 0;
}

.project-detail-section ul {
    display: grid;
    gap: 0.35rem;
    padding-left: 1.15rem;
}

.project-dialog-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.8rem;
}

.project-dialog-links .project-link {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 1rem;
    border: 1px solid hsl(var(--clr-accent) / 0.42);
    border-radius: 11px;
    background: hsl(var(--clr-accent) / 0.18);
    color: hsl(var(--clr-text));
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.project-dialog-links .project-link:hover,
.project-dialog-links .project-link:focus-visible {
    border-color: hsl(var(--clr-accent) / 0.8);
    background: hsl(var(--clr-accent) / 0.38);
    transform: translateY(-2px);
    outline: none;
}

.project-dialog-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid hsl(var(--clr-text) / 0.18);
    border-radius: 50%;
    background: hsl(var(--clr-bg-start) / 0.56);
    color: hsl(var(--clr-text));
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.project-dialog-close:hover,
.project-dialog-close:focus-visible {
    border-color: hsl(var(--clr-accent) / 0.72);
    background: hsl(var(--clr-accent) / 0.28);
    transform: rotate(8deg);
    outline: none;
}

@media (max-width: 900px) {
    .projects-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 640px) {
    .projects-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        width: 100%;
    }

    .project-group-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .project-group-grid .project-card-wrapper {
        width: 100%;
        justify-self: stretch;
        align-self: start;
    }

    .project-group-grid .project-image-container {
        aspect-ratio: 4 / 3;
        flex: none;
    }

    .project-group-heading {
        margin-bottom: 1.2rem;
    }

    .project-dialog {
        width: calc(100vw - 1.5rem);
        max-height: 92vh;
        border-radius: 19px;
    }

    .project-dialog-layout {
        max-height: 92vh;
    }

    .project-dialog-media {
        max-height: none;
        min-height: 0;
    }

    .project-dialog-media img {
        max-height: none;
        aspect-ratio: auto;
    }

    .project-dialog-body {
        padding: 1.8rem 1.35rem 2rem;
    }

    .project-dialog-body h2 {
        font-size: clamp(2.5rem, 12vw, 3.5rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-card-wrapper,
    .project-image,
    .project-dialog-close {
        transition: none !important;
    }
}


/* ===== updates.css ===== */

/* css/updates.css */

/* ===== Updates Board ===== */

#updates {
    align-items: stretch;
    padding-inline: 5%;
    text-align: left;
}

.updates-intro {
    width: min(100%, 760px);
    margin-inline: auto;
    text-align: center;
}

.updates-eyebrow {
    display: inline-block;
    margin-bottom: 0.9rem;
    color: hsl(var(--clr-accent));
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

#updates .section-heading {
    max-width: none;
    margin-inline: auto;
    font-size: clamp(2.7rem, 2.2rem + 2vw, 4.5rem);
    text-align: center;
}

.updates-summary {
    max-width: 56ch;
    margin: 1.25rem auto 0;
    color: hsl(var(--clr-text) / 0.76);
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.12rem);
    line-height: 1.7;
    text-align: center;
}

.updates-board {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
    gap: 1.4rem;
    width: min(100%, 1120px);
    margin: clamp(2.25rem, 4vw, 3.5rem) auto 0;
}

.updates-highlights {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.update-highlight {
    position: relative;
    display: flex;
    min-height: 210px;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.35rem;
    overflow: hidden;
    border: 1px solid hsl(var(--clr-accent) / 0.28);
    border-radius: 18px;
    background:
        radial-gradient(circle at 90% 0%, hsl(var(--clr-accent) / 0.23), transparent 42%),
        linear-gradient(145deg, hsl(var(--clr-surface) / 0.9), hsl(var(--clr-bg-end) / 0.66));
    box-shadow: 0 14px 32px hsl(var(--clr-bg-start) / 0.24);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.update-highlight::before {
    position: absolute;
    top: -4rem;
    right: -2rem;
    width: 10rem;
    height: 10rem;
    border: 1px solid hsl(var(--clr-accent) / 0.24);
    border-radius: 50%;
    box-shadow: 0 0 0 1.3rem hsl(var(--clr-accent) / 0.06), 0 0 0 2.6rem hsl(var(--clr-accent) / 0.04);
    content: "";
    pointer-events: none;
}

.update-highlight:hover {
    border-color: hsl(var(--clr-accent) / 0.65);
    box-shadow: 0 20px 40px hsl(var(--clr-bg-start) / 0.3), 0 0 24px hsl(var(--clr-accent) / 0.1);
    transform: translateY(-4px);
}

.update-highlight--primary {
    grid-row: span 2;
    min-height: 440px;
    padding: 1.8rem;
    background:
        radial-gradient(circle at 85% 5%, hsl(290 75% 72% / 0.3), transparent 36%),
        radial-gradient(circle at 10% 100%, hsl(320 70% 68% / 0.16), transparent 42%),
        linear-gradient(145deg, hsl(var(--clr-surface) / 0.94), hsl(var(--clr-bg-end) / 0.72));
}

.update-highlight-date {
    position: relative;
    z-index: 1;
    margin-bottom: 0.7rem;
    color: hsl(var(--clr-accent));
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.update-highlight-label {
    position: relative;
    z-index: 1;
    align-self: flex-start;
    margin-bottom: 1rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid hsl(var(--clr-accent) / 0.35);
    border-radius: 999px;
    color: hsl(var(--clr-text) / 0.8);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.update-highlight h3 {
    position: relative;
    z-index: 1;
    max-width: 18ch;
    margin: 0;
    color: hsl(var(--clr-text));
    font-family: var(--font-family-display);
    font-size: clamp(1.65rem, 1.35rem + 1vw, 2.45rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 0.98;
}

.update-highlight--primary h3 {
    max-width: 14ch;
    font-size: clamp(2.05rem, 1.7rem + 1.2vw, 3.15rem);
    overflow-wrap: break-word;
}

.update-highlight p {
    position: relative;
    z-index: 1;
    max-width: 38ch;
    margin: 0.8rem 0 0;
    color: hsl(var(--clr-text) / 0.76);
    font-size: 0.94rem;
    line-height: 1.65;
}

.updates-archive {
    align-self: stretch;
    padding: 1.4rem 1.5rem 0.5rem;
    border: 1px solid hsl(var(--clr-text) / 0.14);
    border-radius: 18px;
    background: hsl(var(--clr-surface) / 0.48);
    box-shadow: 0 14px 32px hsl(var(--clr-bg-start) / 0.2);
    backdrop-filter: blur(10px);
}

.updates-archive-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid hsl(var(--clr-text) / 0.14);
}

.updates-archive-heading h3 {
    margin: 0;
    color: hsl(var(--clr-heading));
    font-family: var(--font-family-display);
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.updates-archive-heading span {
    color: hsl(var(--clr-muted));
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.updates-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.updates-list li {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid hsl(var(--clr-text) / 0.1);
}

.updates-list li:last-child {
    border-bottom: 0;
}

.updates-list time {
    padding-top: 0.18rem;
    color: hsl(var(--clr-accent));
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.35;
    text-transform: uppercase;
}

.updates-list p {
    margin: 0;
    color: hsl(var(--clr-text) / 0.82);
    font-size: 0.88rem;
    line-height: 1.55;
}

@media (max-width: 900px) {
    .updates-board {
        grid-template-columns: 1fr;
    }

    .updates-archive {
        width: 100%;
    }
}

@media (max-width: 640px) {
    #updates {
        padding-inline: 4.5%;
    }

    .updates-highlights {
        display: block;
    }

    .update-highlight,
    .update-highlight--primary {
        min-height: 260px;
        margin-bottom: 1rem;
        padding: 1.35rem;
    }

    .update-highlight--primary h3 {
        font-size: clamp(2.3rem, 11vw, 3.3rem);
    }

    .updates-archive {
        padding-inline: 1rem;
    }

    .updates-list li {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .update-highlight {
        transition: none !important;
    }
}


/* ===== about.css ===== */

/* css/about.css */

/* ===== About Section ===== */

#about {
    align-items: stretch;
    padding-inline: 5%;
    text-align: left;
}

.about-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.5fr);
    gap: clamp(2.5rem, 7vw, 7rem);
    width: min(100%, 1120px);
    margin: 0 auto;
    align-items: center;
}

.about-profile {
    min-width: 0;
}

.about-image-frame {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border: 1px solid hsl(var(--clr-accent) / 0.42);
    border-radius: 24px;
    background: hsl(var(--clr-surface) / 0.6);
    box-shadow: 0 20px 50px hsl(var(--clr-bg-start) / 0.32), 0 0 28px hsl(var(--clr-accent) / 0.1);
}

.about-image-frame::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, hsl(var(--clr-bg-start) / 0.72), transparent 45%);
    content: "";
    pointer-events: none;
}

#about .about-headshot-new {
    display: block;
    margin: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    transform: none;
    transition: none;
}

.about-image-caption {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    z-index: 1;
    color: hsl(var(--clr-text) / 0.85);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.about-copy {
    min-width: 0;
}

.about-section-label {
    display: block;
    margin-bottom: 0.9rem;
    color: hsl(var(--clr-accent));
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.about-copy .section-heading {
    max-width: 22ch;
    margin: 0;
    color: hsl(var(--clr-heading));
    font-size: clamp(2.15rem, 1.9rem + 1.25vw, 3.35rem);
    line-height: 1.02;
    text-align: left;
}

.about-lede {
    max-width: 58ch;
    margin: 1.4rem 0 0;
    color: hsl(var(--clr-text));
    font-size: clamp(1.08rem, 1.02rem + 0.3vw, 1.28rem);
    font-weight: 600;
    line-height: 1.55;
}

.about-topics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.25rem, 3vw, 2rem);
    margin-top: 1.5rem;
}

.about-topic {
    min-width: 0;
}

.about-topic h3 {
    margin: 0 0 0.55rem;
    color: hsl(var(--clr-accent));
    font-family: var(--font-family-ui);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1.25;
    text-transform: uppercase;
}

.about-topic p {
    margin: 0;
    color: hsl(var(--clr-text) / 0.78);
    font-size: 0.92rem;
    line-height: 1.65;
}

.about-automation {
    margin-top: 1.5rem;
    padding: 1.15rem 1.25rem;
    border: 1px solid hsl(var(--clr-accent) / 0.28);
    border-radius: 16px;
    background: linear-gradient(135deg, hsl(var(--clr-surface) / 0.58), hsl(var(--clr-bg-end) / 0.35));
}

.about-automation span {
    display: block;
    color: hsl(var(--clr-accent));
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1.25;
    text-transform: uppercase;
}

.about-automation p {
    margin: 0.55rem 0 0;
    color: hsl(var(--clr-text) / 0.72);
    font-size: 0.92rem;
    line-height: 1.65;
}

@media (max-width: 900px) {
    .about-layout {
        grid-template-columns: minmax(180px, 0.65fr) minmax(0, 1.35fr);
        gap: 2.5rem;
    }

    .about-copy .section-heading {
        font-size: clamp(2.1rem, 4.2vw, 3rem);
    }

}

@media (max-width: 640px) {
    #about {
        padding-inline: 4.5%;
    }

    .about-layout {
        display: block;
    }

    .about-profile {
        width: min(100%, 260px);
        margin: 0 auto 2.5rem;
    }

    .about-copy .section-heading {
        max-width: 22ch;
        font-size: clamp(2.05rem, 8.5vw, 2.85rem);
    }

    .about-topics {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .about-image-frame,
    .about-automation {
        transition: none !important;
    }
}


/* ===== contact.css ===== */

/* css/contact.css */

/* ===== Contact CTA ===== */

#contact {
    align-items: stretch;
    padding-inline: 5%;
    text-align: left;
}

/* Hide the previous icon grid while its links remain in the source for cleanup. */
#contact > .section-heading,
#contact > .section-paragraph,
#contact > .social-links-container,
#contact > div[style] {
    display: none !important;
}

.contact-section-header {
    width: min(100%, 1120px);
    margin: 0 auto 1.5rem;
    text-align: center;
}

.contact-section-header span {
    display: block;
    margin-bottom: 0.7rem;
    color: hsl(var(--clr-accent));
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.contact-section-header h2 {
    margin: 0;
    color: hsl(var(--clr-heading));
    font-family: var(--font-family-display);
    font-size: clamp(2.5rem, 2.1rem + 1.8vw, 4rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 0.95;
}

.contact-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 1.05fr);
    gap: clamp(1rem, 3vw, 2rem);
    width: min(100%, 1120px);
    margin: 0 auto;
}

.contact-primary {
    position: relative;
    display: flex;
    min-height: 500px;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(1.6rem, 4vw, 3rem);
    overflow: hidden;
    border: 1px solid hsl(var(--clr-accent) / 0.42);
    border-radius: 24px;
    background:
        radial-gradient(circle at 90% 0%, hsl(290 75% 72% / 0.28), transparent 36%),
        radial-gradient(circle at 0% 100%, hsl(320 70% 68% / 0.18), transparent 42%),
        linear-gradient(145deg, hsl(var(--clr-surface) / 0.92), hsl(var(--clr-bg-end) / 0.7));
    box-shadow: 0 22px 55px hsl(var(--clr-bg-start) / 0.3), 0 0 30px hsl(var(--clr-accent) / 0.1);
}

.contact-primary::before,
.contact-primary::after {
    position: absolute;
    border: 1px solid hsl(var(--clr-accent) / 0.18);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.contact-primary::before {
    top: -5rem;
    right: -4rem;
    width: 15rem;
    height: 15rem;
    box-shadow: 0 0 0 1.2rem hsl(var(--clr-accent) / 0.05), 0 0 0 2.4rem hsl(var(--clr-accent) / 0.04);
}

.contact-primary::after {
    right: 2rem;
    bottom: 2rem;
    width: 4rem;
    height: 4rem;
    border-color: hsl(var(--clr-text) / 0.12);
}

.contact-eyebrow {
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
    color: hsl(var(--clr-accent));
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.contact-primary h2 {
    position: relative;
    z-index: 1;
    max-width: 9ch;
    margin: 0;
    color: hsl(var(--clr-text));
    font-family: var(--font-family-display);
    font-size: clamp(3rem, 2.4rem + 2.5vw, 5rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 0.92;
}

.contact-primary p {
    position: relative;
    z-index: 1;
    max-width: 42ch;
    margin: 1.25rem 0 0;
    color: hsl(var(--clr-text) / 0.78);
    font-size: 0.98rem;
    line-height: 1.7;
}

.contact-email {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: min(100%, 360px);
    margin-top: 1.8rem;
    padding: 0.9rem 1rem 0.9rem 1.15rem;
    border: 1px solid hsl(var(--clr-accent) / 0.48);
    border-radius: 12px;
    background: hsl(var(--clr-bg-start) / 0.38);
    color: hsl(var(--clr-text));
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.contact-email span:last-child {
    color: hsl(var(--clr-accent));
    font-size: 1.3rem;
    line-height: 1;
}

.contact-email:hover,
.contact-email:focus-visible {
    border-color: hsl(var(--clr-accent) / 0.85);
    background: hsl(var(--clr-accent) / 0.2);
    transform: translateY(-3px);
    outline: none;
}

.contact-network {
    min-width: 0;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid hsl(var(--clr-text) / 0.15);
    border-radius: 24px;
    background: hsl(var(--clr-surface) / 0.48);
    box-shadow: 0 18px 42px hsl(var(--clr-bg-start) / 0.22);
    backdrop-filter: blur(10px);
}

.contact-network-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid hsl(var(--clr-text) / 0.14);
}

.contact-network-heading span:first-child {
    color: hsl(var(--clr-heading));
    font-family: var(--font-family-display);
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.contact-network-heading span + span {
    color: hsl(var(--clr-muted));
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.contact-links-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.contact-link {
    position: relative;
    display: flex;
    min-height: 106px;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    overflow: hidden;
    border: 1px solid hsl(var(--clr-text) / 0.13);
    border-radius: 14px;
    background: hsl(var(--clr-bg-end) / 0.48);
    color: hsl(var(--clr-text));
    text-decoration: none;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.contact-link::before {
    position: absolute;
    top: -2rem;
    right: -1.5rem;
    width: 5rem;
    height: 5rem;
    border: 1px solid hsl(var(--clr-accent) / 0.16);
    border-radius: 50%;
    content: "";
}

.contact-link:hover,
.contact-link:focus-visible {
    border-color: hsl(var(--clr-accent) / 0.6);
    background: hsl(var(--clr-accent) / 0.16);
    transform: translateY(-3px);
    outline: none;
}

.contact-link-type {
    position: relative;
    z-index: 1;
    margin-bottom: 0.45rem;
    color: hsl(var(--clr-accent));
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.contact-link strong {
    position: relative;
    z-index: 1;
    padding-right: 1rem;
    font-size: 0.9rem;
    line-height: 1.2;
}

.contact-link-arrow {
    position: absolute;
    right: 0.8rem;
    bottom: 0.8rem;
    color: hsl(var(--clr-accent));
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.contact-link:hover .contact-link-arrow,
.contact-link:focus-visible .contact-link-arrow {
    transform: translate(2px, -2px);
}

.contact-closing-note {
    width: min(100%, 1120px);
    margin: 1.25rem auto 0;
    color: hsl(var(--clr-muted));
    font-size: 0.8rem;
    text-align: right;
}

@media (max-width: 900px) {
    .contact-shell {
        grid-template-columns: 1fr;
    }

    .contact-primary {
        min-height: 400px;
    }
}

@media (max-width: 640px) {
    #contact {
        padding-inline: 4.5%;
    }

    .contact-primary {
        min-height: 420px;
        padding: 1.5rem;
    }

    .contact-links-grid {
        grid-template-columns: 1fr;
    }

    .contact-closing-note {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact-email,
    .contact-link,
    .contact-link-arrow {
        transition: none !important;
    }
}


/* ===== sectionTransitions.css ===== */

/* css/sectionTransitions.css */

/* Give each major section breathing room while preserving the page gradient. */
main {
    position: relative;
    isolation: isolate;
}

main > section {
    z-index: 1;
}

body.is-scrolling nav,
body.is-scrolling .welcome-blur-box,
body.is-scrolling .timeline-state-content,
body.is-scrolling .timeline-accomplish-toggle,
body.is-scrolling .timeline-accomplish-panel,
body.is-scrolling .updates-archive,
body.is-scrolling .contact-network {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

main > section:not(#home) {
    min-height: auto;
    margin-top: clamp(1.5rem, 3vw, 3rem);
    padding-block: clamp(2.75rem, 5vw, 4.75rem);
}

main > section:not(#home) + section:not(#home) {
    margin-top: clamp(2rem, 4vw, 4rem);
}

@media (max-width: 768px) {
    main > section:not(#home) {
        margin-top: 1.5rem;
        padding-block: 3.25rem;
    }

    main > section:not(#home) + section:not(#home) {
        margin-top: 2.5rem;
    }
}
