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

/*
   Design system – structure for multi-team use
   --------------------------------------------
   1. Tokens ( :root )     – spacing scale, motion, bento/layout vars
   2. Base                 – body, main, section spacing
   3. Component: Name logo – .name-logo, .name-logo--*
   4. Layout               – main:has(.site-nav), grid
   5. Component: Nav       – .main-nav, .nav-*, .site-nav, .site-nav__*
   6. Component: Bento     – .bento-header, .bento-grid, .bento-card*
   7. Component: Theme toggle – .theme-toggle
   8. Component: Footer    – .footer, .footer-*
   9. Page sections        – .index-*, .about-*, .contact-*, .blog-*, .work-*
   Naming: BEM (block__element--modifier) for components; tokens for spacing/motion.
*/

/* ==========================================================================
   Design system tokens – shared across components and pages
   ========================================================================== */

:root {
    /* Layout */
    --content-padding: 40px;
    --section-spacing: 80px;
    --content-max-width: 1600px;
    /* Non-home pages max width (overridden below) */
    --page-max-width: var(--content-max-width);

    /* Spacing scale (4px base) – use for margin, padding, gap */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    /* Circular bento / work-list CTA hit target (70% of --space-10) */
    --bento-cta-size: calc(var(--space-10) * 0.7);
    --bento-cta-icon: calc(18px * 0.7);
    --space-12: 48px;
    --space-14: 56px;
    --space-20: 80px;

    /* Motion – duration and easing */
    --duration-instant: 0.15s;
    --duration-fast: 0.2s;
    --duration-normal: 0.25s;
    --duration-slow: 0.35s;
    --duration-slower: 0.4s;
    --ease-default: ease;
    --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

    /* Bento grid – layout */
    --bento-gap: var(--space-5);
    --bento-radius: var(--space-6);
    --bento-row-height: 200px;
    --bento-card-padding: 28px;

    /* Bento colors (dark default); light overrides below */
    --bento-bg: #040404;
    --bento-text: #fff;
    --bento-text-muted: rgba(255, 255, 255, 0.75);
    --bento-card-bg: rgba(255, 255, 255, 0.06);
    --bento-card-border: rgba(255, 255, 255, 0.12);
    --bento-card-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    --bento-card-hover-bg: rgba(255, 255, 255, 0.1);
    --bento-card-hover-border: rgba(255, 255, 255, 0.18);
    --bento-accent: rgba(255, 255, 255, 0.08);
    --bento-glass-blur: 12px;
    --bento-glass-saturate: 180%;

    /* Page background + subtle dot grid (dark default) */
    --page-bg-base: #040404;
    --dot-grid-size: 22px;
    --dot-grid-color: rgba(255, 255, 255, 0.072);
}

/* Non-home pages: keep content column to 700px */
body:not(:has(.bento-grid)) {
    --page-max-width: 800px;
}

@media (max-width: 968px) {
    :root {
        --content-padding: 24px;
        --section-spacing: 72px;
    }
}

@media (max-width: 640px) {
    :root {
        --content-padding: 16px;
        --section-spacing: 56px;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    background-color: var(--page-bg-base);
    background-image: radial-gradient(circle, var(--dot-grid-color) 1px, transparent 1.25px);
    background-size: var(--dot-grid-size) var(--dot-grid-size);
    background-position: 0 0;
    color: #fff;
    line-height: 1.5;
    padding: var(--content-padding);
    max-width: var(--content-max-width);
    margin: 0 auto;
    position: relative;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--duration-slow) var(--ease-default), color var(--duration-slow) var(--ease-default);
}

/* Apply page max width to main content on non-home pages (exclude header/footer) */
body:not(:has(.bento-grid)) main > section:not(.footer) {
    max-width: var(--page-max-width);
    margin-left: auto;
    margin-right: auto;
}

/* Header + footer should match homepage width */
body:not(:has(.bento-grid)) .bento-header,
body:not(:has(.bento-grid)) .footer {
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
}

/* Work detail modal should remain full-bleed */
body:not(:has(.bento-grid)) .work-detail-overlay {
    max-width: none;
}

body:not(:has(.bento-grid)) .bento-header {
    padding-left: 0;
    padding-right: 0;
}

/* Non-home pages: remove extra section side padding (container already constrained) */
body:not(:has(.bento-grid)) .about,
body:not(:has(.bento-grid)) .experience,
body:not(:has(.bento-grid)) .contact,
body:not(:has(.bento-grid)) .blog-page,
body:not(:has(.bento-grid)) .work-page,
body:not(:has(.bento-grid)) .sitemap-section {
    padding-left: 0;
    padding-right: 0;
}

/* Keep Experience content aligned with the 800px container */
body:not(:has(.bento-grid)) .experience-list {
    max-width: var(--page-max-width);
}

/* Keep About content aligned with the 800px container */
body:not(:has(.bento-grid)) .about-content {
    max-width: var(--page-max-width);
}

/* DarkVeil only inside intro card (not full-page) */
.bento-card--intro {
    position: relative;
    overflow: hidden;
}

.bento-card--intro .darkveil-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    z-index: 0;
    pointer-events: none;
    display: block;
}

.bento-card--intro .bento-card__intro-content {
    position: relative;
    z-index: 1;
}

/* ========== Component: Name logo (circular label) ========== */
.name-logo {
    margin: 0;
    border-radius: 50%;
    font-weight: 900;
    color: #fff;
    text-align: center;
    cursor: pointer;
    transform-origin: 50% 50%;
    opacity: 0.6;
    transition: opacity var(--duration-slow) var(--ease-default);
}

.name-logo:hover {
    opacity: 1;
}

.name-logo span {
    position: absolute;
    display: inline-block;
    left: 50%;
    top: 50%;
    letter-spacing: 0.02em;
    transform-origin: 50% 50%;
}

.name-logo--footer {
    position: relative;
    width: 100px;
    height: 100px;
    grid-column: 1;
    flex-shrink: 0;
    align-self: start;
}

.name-logo--footer span {
    font-size: 9px;
}

main > section {
    visibility: hidden;
    margin-bottom: var(--section-spacing);
}

main > section.bento-grid,
main > section.footer {
    visibility: visible;
}

main > section:last-child {
    margin-bottom: 0;
}

main {
    position: relative;
    z-index: 1;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* All pages: site-nav left, content right – placement per natnu.design */
main:has(.site-nav) {
    display: grid;
    grid-template-columns: minmax(100px, auto) 1fr;
    gap: 0 var(--space-14);
    align-items: start;
    max-width: 100%;
}

main:has(.site-nav) > .site-nav {
    grid-column: 1;
    grid-row: 1;
    padding: 0 var(--content-padding) var(--space-6) 0;
    margin: 0;
}

main:has(.site-nav) > section:not(.footer) {
    grid-column: 2;
    min-width: 0;
    padding-left: 0;
}

main:has(.site-nav) > .footer {
    grid-column: 1 / -1;
}

/* Navigation */
.main-nav {
    position: relative;
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: var(--content-padding) var(--content-padding) 0;
    z-index: 100;
}

.nav-inner {
    display: flex;
    gap: var(--space-8);
    align-items: center;
    justify-content: space-between;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: opacity var(--duration-slow) var(--ease-default);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

.nav-link:hover {
    opacity: 0.6;
}

.nav-link--active {
    opacity: 1;
}

.nav-link--profile {
    padding: 0;
    display: flex;
    align-items: center;
}

.nav-profile-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    transition: opacity var(--duration-slow) var(--ease-default);
}

.nav-link--profile:hover .nav-profile-image {
    opacity: 0.7;
}

/* ========== Component: Site nav ========== */
/* Work, About, Blog, Contact – vertical list in content column */
.site-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    padding: 0 var(--content-padding) var(--space-6) 0;
    max-width: var(--content-max-width);
    margin: 0 auto;
}

.site-nav__link {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: opacity var(--duration-slow) var(--ease-default);
}

.site-nav__link:hover {
    opacity: 0.6;
}

.site-nav__link--active {
    opacity: 1;
}

/* ========== Component: Bento layout (homepage) ========== */
.bento-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    padding: var(--content-padding) 0 var(--space-8);
    margin: 0 auto;
    max-width: var(--content-max-width);
}

.bento-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 9999px;
    background: var(--bento-card-bg);
    border: 1px solid var(--bento-card-border);
    color: var(--bento-text);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
    transition: background var(--duration-fast) var(--ease-default), border-color var(--duration-fast) var(--ease-default);
}

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

.bento-logo__img {
    display: block;
    height: 24px;
    width: auto;
    object-fit: contain;
}

.bento-nav {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.bento-nav__link {
    padding: var(--space-2) 14px;
    border-radius: 9999px;
    color: var(--bento-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: background var(--duration-fast) var(--ease-default), color var(--duration-fast) var(--ease-default);
}

.bento-nav__link:hover {
    background: var(--bento-accent);
    color: var(--bento-text);
}

.bento-nav__link--active {
    background: var(--bento-accent);
    color: var(--bento-text);
}

.bento-header-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.bento-header-right .theme-toggle {
    margin-left: 0;
}

.bento-contact-link {
    color: var(--bento-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: var(--space-2) 14px;
    border-radius: 9999px;
    transition: background var(--duration-fast) var(--ease-default), opacity var(--duration-fast) var(--ease-default);
}

.bento-contact-link:hover {
    background: var(--bento-accent);
}

/* Bento grid – inspired by janelleamores.design + bento reference */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: var(--bento-row-height);
    gap: var(--bento-gap);
    margin: 0 auto;
    max-width: var(--content-max-width);
}

.bento-card {
    position: relative;
    overflow: visible;
    background: var(--bento-card-bg);
    -webkit-backdrop-filter: blur(var(--bento-glass-blur)) saturate(var(--bento-glass-saturate));
    backdrop-filter: blur(var(--bento-glass-blur)) saturate(var(--bento-glass-saturate));
    border: 1px solid var(--bento-card-border);
    border-radius: var(--bento-radius);
    padding: var(--bento-card-padding);
    box-shadow: var(--bento-card-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform var(--duration-normal) var(--ease-default), box-shadow var(--duration-normal) var(--ease-default), background var(--duration-fast) var(--ease-default), border-color var(--duration-fast) var(--ease-default), backdrop-filter var(--duration-normal) var(--ease-default);
    display: flex;
    flex-direction: column;
    min-height: 0;
    /* Glowing edge effect defaults */
    --glow-start: 0;
    --glow-spread: 40;
    --glow-active: 0;
}

.bento-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    background: var(--bento-card-hover-bg);
    border-color: var(--bento-card-hover-border);
}

/* Glowing edge effect – driven by JS via --glow-* variables */
.bento-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    pointer-events: none;
    border: 1px solid transparent;
    background:
        radial-gradient(circle, #dd7bbb 10%, #dd7bbb00 20%),
        radial-gradient(circle at 40% 40%, #d79f1e 5%, #d79f1e00 15%),
        radial-gradient(circle at 60% 60%, #5a922c 10%, #5a922c00 20%),
        radial-gradient(circle at 40% 60%, #4c7894 10%, #4c789400 20%),
        conic-gradient(
            from 236.84deg at 50% 50%,
            #dd7bbb 0deg,
            #d79f1e 90deg,
            #5a922c 180deg,
            #4c7894 270deg,
            #dd7bbb 360deg
        );
    background-attachment: fixed;
    opacity: var(--glow-active);
    transition: opacity var(--duration-normal) var(--ease-out);
    /* Reveal only a moving arc around the card border */
    mask-image:
        linear-gradient(#0000, #0000),
        conic-gradient(
            from calc((var(--glow-start) - var(--glow-spread)) * 1deg),
            #0000 0deg,
            #ffffff,
            #0000 calc(var(--glow-spread) * 2deg)
        );
    mask-clip: padding-box, border-box;
    mask-composite: intersect;
    -webkit-mask-image:
        linear-gradient(#0000, #0000),
        conic-gradient(
            from calc((var(--glow-start) - var(--glow-spread)) * 1deg),
            #0000 0deg,
            #ffffff,
            #0000 calc(var(--glow-spread) * 2deg)
        );
    -webkit-mask-clip: padding-box, border-box;
}

body[data-theme="light"] .bento-card {
    box-shadow: var(--bento-card-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body[data-theme="light"] .bento-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Bento card spans */
.bento-card--intro {
    grid-column: span 2;
    grid-row: span 2;
}

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

/* Weather (Now) card: single row, column 4; Focus card: directly below it */
/* Now (weather/location) card – grid placement; id="weather-card" kept for JS */
.bento-card--now {
    grid-column: 4;
    grid-row: 1;
}

.bento-card--focus {
    grid-column: 4;
    grid-row: 2;
}

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

/* Live Commit Graph – tall, spans two columns */
.bento-card--commit-graph {
    grid-column: span 2;
    grid-row: span 2;
}

/* GitHub contribution graph – same background as github.com profile */
.bento-card__commit-graph-wrap {
    flex: 1;
    min-height: 0;
    margin-top: var(--space-3);
    border-radius: 10px;
    overflow: hidden;
    background: #0d1117;
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* Commit graph layout: months row, then body (day labels + grid) */
.commit-graph {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    min-height: 0;
}

.commit-graph__months {
    display: grid;
    grid-template-columns: repeat(53, 1fr);
    gap: 2px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1;
}

.commit-graph__month {
    grid-row: 1;
}

.commit-graph__body {
    display: flex;
    gap: var(--space-2);
    min-width: 0;
}

.commit-graph__day-labels {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
    line-height: 1;
}

.commit-graph__day-labels span {
    height: 12px;
    display: block;
}

.commit-graph__grid {
    display: grid;
    grid-template-rows: repeat(7, 1fr);
    gap: 2px;
    flex: 1;
    min-width: 0;
    background: #0d1117;
}

.commit-graph__cell {
    width: 100%;
    aspect-ratio: 1;
    max-width: 14px;
    max-height: 14px;
    border-radius: 2px;
    min-width: 8px;
    min-height: 8px;
}

/* Grid cell levels – GitHub contribution graph colors (dark) */
.commit-graph__cell[data-level="0"] { background-color: #161b22; }
.commit-graph__cell[data-level="1"] { background-color: #0e4429; }
.commit-graph__cell[data-level="2"] { background-color: #006d32; }
.commit-graph__cell[data-level="3"] { background-color: #26a641; }
.commit-graph__cell[data-level="4"] { background-color: #39d353; }

.commit-graph__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-2);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.commit-graph__learn-link {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

.commit-graph__learn-link:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
}

.commit-graph__legend {
    display: flex;
    align-items: center;
    gap: 4px;
}

.commit-graph__legend-text {
    margin: 0 2px 0 0;
}

.commit-graph__legend-cell {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

/* Legend – same GitHub contribution levels */
.commit-graph__legend-cell[data-level="0"] { background-color: #161b22; }
.commit-graph__legend-cell[data-level="1"] { background-color: #0e4429; }
.commit-graph__legend-cell[data-level="2"] { background-color: #006d32; }
.commit-graph__legend-cell[data-level="3"] { background-color: #26a641; }
.commit-graph__legend-cell[data-level="4"] { background-color: #39d353; }

.commit-graph__error {
    font-size: 12px;
    color: var(--bento-text-muted);
    padding: var(--space-4);
}

.commit-graph__fallback-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Vibe Coding graph – light theme */
body[data-theme="light"] .bento-card__commit-graph-wrap {
    background: #f6f8fa;
}

body[data-theme="light"] .commit-graph__months {
    color: rgba(0, 0, 0, 0.6);
}

body[data-theme="light"] .commit-graph__day-labels {
    color: rgba(0, 0, 0, 0.5);
}

body[data-theme="light"] .commit-graph__footer {
    color: rgba(0, 0, 0, 0.5);
}

body[data-theme="light"] .commit-graph__learn-link {
    color: rgba(0, 0, 0, 0.5);
}

body[data-theme="light"] .commit-graph__learn-link:hover {
    color: rgba(0, 0, 0, 0.8);
}

body[data-theme="light"] .commit-graph__cell[data-level="0"] { background-color: #ebedf0; }
body[data-theme="light"] .commit-graph__cell[data-level="1"] { background-color: #9be9a8; }
body[data-theme="light"] .commit-graph__cell[data-level="2"] { background-color: #40c463; }
body[data-theme="light"] .commit-graph__cell[data-level="3"] { background-color: #30a14e; }
body[data-theme="light"] .commit-graph__cell[data-level="4"] { background-color: #216e39; }

body[data-theme="light"] .commit-graph__legend-cell[data-level="0"] { background-color: #ebedf0; }
body[data-theme="light"] .commit-graph__legend-cell[data-level="1"] { background-color: #9be9a8; }
body[data-theme="light"] .commit-graph__legend-cell[data-level="2"] { background-color: #40c463; }
body[data-theme="light"] .commit-graph__legend-cell[data-level="3"] { background-color: #30a14e; }
body[data-theme="light"] .commit-graph__legend-cell[data-level="4"] { background-color: #216e39; }

.bento-card--article {
    grid-column: span 2;
}

.bento-card--project {
    grid-column: span 2;
}

.bento-card--newsletter {
    grid-column: span 2;
    grid-row: span 2;
}

/* Bento card content */
.bento-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--bento-text);
    margin: 0 0 var(--space-2);
    letter-spacing: -0.02em;
}

.bento-card__desc {
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--bento-text-muted);
    margin: 0 0 var(--space-4);
}

.bento-card__meta {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bento-text-muted);
    margin-top: auto;
}

.bento-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px; /* 6px off-scale for tight link icon spacing */
    color: var(--bento-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-top: auto;
    transition: opacity var(--duration-fast) var(--ease-default);
}

.bento-card__link:hover {
    opacity: 0.8;
}

.bento-card__thumb {
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bento-accent);
}

.bento-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--ease-default);
}

.bento-card:hover .bento-card__thumb img {
    transform: scale(1.04);
}

.bento-card__cta {
    position: absolute;
    top: var(--space-5);
    right: var(--space-5);
    bottom: auto;
    z-index: 2;
    width: var(--bento-cta-size);
    height: var(--bento-cta-size);
    border-radius: 50%;
    background: var(--bento-card-bg);
    border: 1px solid var(--bento-card-border);
    color: var(--bento-text);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background var(--duration-fast) var(--ease-default), border-color var(--duration-fast) var(--ease-default);
}

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

.bento-card__cta svg {
    width: var(--bento-cta-icon);
    height: var(--bento-cta-icon);
    flex-shrink: 0;
}

.bento-card--has-thumb {
    padding: 0;
    position: relative;
}

.bento-card--has-thumb .bento-card__thumb {
    position: absolute;
    inset: 0;
    border-radius: var(--bento-radius);
}

.bento-card--has-thumb .bento-card__content {
    position: relative;
    z-index: 1;
    padding: var(--space-5);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(4, 4, 4, 0.75) 0%, rgba(4, 4, 4, 0.2) 70%, transparent 100%);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-radius: var(--bento-radius);
}

body[data-theme="light"] .bento-card--has-thumb .bento-card__content {
    background: linear-gradient(to top, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.3) 70%, transparent 100%);
}

/* Pune weather card (standalone – kept for any reuse) */
.bento-card--weather {
    position: relative;
    overflow: hidden;
    padding: 0;
}

.bento-card--weather .bento-card__weather-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(160deg, rgba(30, 58, 138, 0.4) 0%, rgba(15, 23, 42, 0.6) 50%, rgba(4, 4, 4, 0.5) 100%);
    border-radius: inherit;
}

body[data-theme="light"] .bento-card--weather .bento-card__weather-bg {
    background: linear-gradient(160deg, rgba(147, 197, 253, 0.5) 0%, rgba(226, 232, 240, 0.7) 50%, rgba(255, 255, 255, 0.6) 100%);
}

.bento-card--weather .bento-card__weather-content {
    position: relative;
    z-index: 1;
    padding: var(--space-6);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 0;
    background: linear-gradient(to top, rgba(4, 4, 4, 0.7) 0%, rgba(4, 4, 4, 0.2) 45%, transparent 100%);
    border-radius: inherit;
}

body[data-theme="light"] .bento-card--weather .bento-card__weather-content {
    background: linear-gradient(to top, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.3) 45%, transparent 100%);
}

.bento-card--weather .bento-card__weather-main {
    margin-bottom: var(--space-4);
}

.bento-card--weather .bento-card__weather-temp {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--bento-text);
    letter-spacing: -0.03em;
    line-height: 1;
}

.bento-card--weather .bento-card__weather-unit {
    font-size: 1rem;
    font-weight: 500;
    color: var(--bento-text-muted);
    margin-left: 2px;
}

.bento-card--weather .bento-card__weather-desc {
    display: block;
    font-size: 0.875rem;
    color: var(--bento-text-muted);
    margin-top: 4px;
    text-transform: capitalize;
}

.bento-card--weather .bento-card__weather-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.bento-card--weather .bento-card__weather-row {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    font-size: 0.8125rem;
    color: var(--bento-text-muted);
}

.bento-card--weather .bento-card__weather-label {
    min-width: 64px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

.bento-card--weather .bento-card__weather-value {
    font-weight: 600;
    color: var(--bento-text);
}

.bento-card--weather .bento-card__weather-aqi-label {
    margin-left: 4px;
    font-weight: 500;
    text-transform: capitalize;
}

.bento-card--medium {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
}

.bento-card--medium .bento-card__medium-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bento-text);
    opacity: 0.9;
}

.bento-card--medium .bento-card__medium-brand {
    flex-shrink: 0;
    margin-bottom: 4px;
}

.bento-card--medium .bento-card__title {
    margin-top: 0;
}

.bento-card__title-link {
    color: inherit;
    text-decoration: none;
}

.bento-card__title-link:hover {
    text-decoration: underline;
}

.bento-card--medium .bento-card__cta--link {
    color: var(--bento-text);
    opacity: 0.8;
    text-decoration: none;
}

.bento-card--medium .bento-card__cta--link:hover {
    opacity: 1;
}

/* Now card – location time */
.bento-card--now .bento-card__now-time {
    margin: var(--space-2) 0 0;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--bento-text);
    opacity: 0.95;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Now card – location temperature */
.bento-card--now .bento-card__now-temp {
    margin: var(--space-3) 0 0;
    font-size: 30px;
    line-height: 1.4;
    color: var(--bento-text);
    opacity: 0.9;
}

.bento-card--now .bento-card__now-unit {
    margin-left: 2px;
    font-weight: 500;
    font-size: 30px;
}

.bento-card--now .bento-card__now-desc {
    display: inline-block;
    margin-left: var(--space-2);
    font-size: 0.875rem;
    text-transform: capitalize;
    opacity: 0.85;
}

/* Now card – time-of-day gradient backgrounds (dark theme) */
.bento-card--now[data-time-of-day="night"] {
    background: linear-gradient(165deg, #1e1b2e 0%, #16213e 40%, #0f0f1a 100%);
    border-color: rgba(255, 255, 255, 0.06);
}

.bento-card--now[data-time-of-day="dawn"] {
    background: linear-gradient(165deg, #2d1f3d 0%, #1a1a2e 50%, #0f0f1a 100%);
    border-color: rgba(255, 255, 255, 0.07);
}

.bento-card--now[data-time-of-day="morning"] {
    background: linear-gradient(165deg, #2c2416 0%, #1e2a1e 45%, #14181c 100%);
    border-color: rgba(255, 255, 255, 0.08);
}

.bento-card--now[data-time-of-day="noon"] {
    background: linear-gradient(165deg, #1a2a3a 0%, #1e2d3d 50%, #15202b 100%);
    border-color: rgba(255, 255, 255, 0.08);
}

.bento-card--now[data-time-of-day="afternoon"] {
    background: linear-gradient(165deg, #2a2418 0%, #1e2a20 50%, #141a18 100%);
    border-color: rgba(255, 255, 255, 0.07);
}

.bento-card--now[data-time-of-day="evening"] {
    background: linear-gradient(165deg, #2e1f2a 0%, #1e1a2e 50%, #151520 100%);
    border-color: rgba(255, 255, 255, 0.07);
}

.bento-card--now[data-time-of-day="dusk"] {
    background: linear-gradient(165deg, #251a1e 0%, #1a1525 45%, #0f0f18 100%);
    border-color: rgba(255, 255, 255, 0.06);
}

/* Now card – time-of-day gradients (light theme) */
body[data-theme="light"] .bento-card--now[data-time-of-day="night"] {
    background: linear-gradient(165deg, #2a2740 0%, #1e2a45 50%, #161b2e 100%);
    border-color: rgba(0, 0, 0, 0.08);
}

body[data-theme="light"] .bento-card--now[data-time-of-day="dawn"] {
    background: linear-gradient(165deg, #4a3a5c 0%, #3d3d5c 50%, #2a2a40 100%);
    border-color: rgba(0, 0, 0, 0.08);
}

body[data-theme="light"] .bento-card--now[data-time-of-day="morning"] {
    background: linear-gradient(165deg, #e8dcc4 0%, #c9d4b8 50%, #a8b8b0 100%);
    border-color: rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] .bento-card--now[data-time-of-day="noon"] {
    background: linear-gradient(165deg, #b8d4e8 0%, #a8c8dc 50%, #90b0c8 100%);
    border-color: rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] .bento-card--now[data-time-of-day="afternoon"] {
    background: linear-gradient(165deg, #e0d4a8 0%, #d0c898 50%, #b8b088 100%);
    border-color: rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] .bento-card--now[data-time-of-day="evening"] {
    background: linear-gradient(165deg, #d8b8a8 0%, #c8a8b8 50%, #a890a8 100%);
    border-color: rgba(0, 0, 0, 0.08);
}

body[data-theme="light"] .bento-card--now[data-time-of-day="dusk"] {
    background: linear-gradient(165deg, #906868 0%, #685878 50%, #404058 100%);
    border-color: rgba(0, 0, 0, 0.08);
}

body[data-theme="light"] .bento-card--now[data-time-of-day="night"] .bento-card__meta,
body[data-theme="light"] .bento-card--now[data-time-of-day="night"] .bento-card__title,
body[data-theme="light"] .bento-card--now[data-time-of-day="night"] .bento-card__now-time,
body[data-theme="light"] .bento-card--now[data-time-of-day="night"] .bento-card__now-temp,
body[data-theme="light"] .bento-card--now[data-time-of-day="night"] .bento-card__desc,
body[data-theme="light"] .bento-card--now[data-time-of-day="dawn"] .bento-card__meta,
body[data-theme="light"] .bento-card--now[data-time-of-day="dawn"] .bento-card__title,
body[data-theme="light"] .bento-card--now[data-time-of-day="dawn"] .bento-card__now-time,
body[data-theme="light"] .bento-card--now[data-time-of-day="dawn"] .bento-card__now-temp,
body[data-theme="light"] .bento-card--now[data-time-of-day="dawn"] .bento-card__desc,
body[data-theme="light"] .bento-card--now[data-time-of-day="dusk"] .bento-card__meta,
body[data-theme="light"] .bento-card--now[data-time-of-day="dusk"] .bento-card__title,
body[data-theme="light"] .bento-card--now[data-time-of-day="dusk"] .bento-card__now-time,
body[data-theme="light"] .bento-card--now[data-time-of-day="dusk"] .bento-card__now-temp,
body[data-theme="light"] .bento-card--now[data-time-of-day="dusk"] .bento-card__desc {
    color: rgba(255, 255, 255, 0.95);
}

/* Social hub: one card with 4 small cells inside (single grid cell) */
.bento-card--social-hub {
    padding: 0;
    display: flex;
    min-height: 0;
    overflow: visible;
    background: unset;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    box-sizing: content-box;
}

.bento-card--social-hub:hover {
    transform: none;
    background: unset;
    border: none;
    box-shadow: none;
}

body[data-theme="light"] .bento-card--social-hub,
body[data-theme="light"] .bento-card--social-hub:hover {
    box-shadow: none;
}

.bento-card__social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: var(--space-5);
    flex: 1;
    min-height: 0;
    padding: 0;
    box-sizing: content-box;
    color: rgba(255, 255, 255, 0.5);
}

/* Icons only: full grid cell stays the hit target, no visible chrome */
.bento-card__social-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    min-height: 44px;
    transition: opacity var(--duration-fast) var(--ease-default);
}

.bento-card__social-cell:hover {
    opacity: 1;
}

.bento-card__social-cell:focus-visible {
    outline: 2px solid var(--bento-text);
    outline-offset: 4px;
    border-radius: 4px;
}

.bento-card__social-cell--linkedin,
.bento-card__social-cell--behance,
.bento-card__social-cell--dribbble,
.bento-card__social-cell--instagram {
    background: transparent;
}

/* Social hub icons: white in dark mode, dark in light mode */
.bento-card__social-hub .bento-card__social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: transform var(--duration-fast) var(--ease-default), opacity var(--duration-fast) var(--ease-default);
}

.bento-card__social-cell:hover .bento-card__social-icon {
    transform: scale(1.08);
    opacity: 1;
}

.bento-card__social-hub .bento-card__social-icon svg,
.bento-card__social-hub .bento-card__social-icon svg path {
    fill: currentColor;
}

.bento-card__social-hub .bento-card__social-cell .bento-card__social-icon svg {
    width: 22px;
    height: 22px;
}

body[data-theme="light"] .bento-card__social-hub .bento-card__social-icon {
    color: #040404;
}

body[data-theme="light"] .bento-card__social-hub .bento-card__social-icon svg,
body[data-theme="light"] .bento-card__social-hub .bento-card__social-icon svg path {
    fill: currentColor;
}

.bento-card__social-hub .bento-card__social-label {
    display: none;
}

/* Let's Connect – icon + link rows (replaces standalone social hub) */
.bento-card__connect-list {
    display: flex;
    flex-direction: column;
    gap: 0px;
    margin-top: var(--space-4);
}

.bento-card__connect-item {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: var(--bento-text);
    padding: 6px 4px;
    border-radius: 12px;
    transition: opacity var(--duration-fast) var(--ease-default), background var(--duration-fast) var(--ease-default);
}

.bento-card__connect-item:hover {
    opacity: 0.92;
    background: rgba(255, 255, 255, 0.04);
}

body[data-theme="light"] .bento-card__connect-item:hover {
    background: rgba(4, 4, 4, 0.04);
}

.bento-card__connect-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 12px;
}

.bento-card__connect-text {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.bento-card__connect-label {
    display: none;
}

body[data-theme="light"] .bento-card__connect-label {
    color: rgba(4, 4, 4, 0.85);
}

.bento-card__connect-url {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.95);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-theme="light"] .bento-card__connect-url {
    color: rgba(4, 4, 4, 0.9);
}

.bento-card__connect-icon--email {
    color: #ffffff;
}

.bento-card__connect-icon--linkedin {
    color: #0A66C2;
}

.bento-card__connect-icon--medium {
    color: #ffffff;
}

.bento-card__connect-icon--dribbble {
    color: #ea4c89;
}

body[data-theme="light"] .bento-card__connect-icon--email,
body[data-theme="light"] .bento-card__connect-icon--medium {
    color: #040404;
}

/* Standalone social link cards (kept for any reuse) */
.bento-card--social {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.bento-card--social .bento-card__social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bento-text);
    opacity: 0.9;
}

.bento-card--social .bento-card__social-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--bento-text);
    margin-top: 8px;
    letter-spacing: -0.02em;
}

.bento-card--theme {
    justify-content: center;
    align-items: center;
}

/* Name logo grid cell: no box, no shadow, no hover */
.bento-card--logo {
    display: flex;
    justify-content: center;
    align-items: center;
    place-content: center;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    min-height: 100%;
    transition: none;
}

.bento-card--logo:hover {
    background: transparent;
    border: none;
    box-shadow: none !important;
    transform: none;
    border-color: transparent;
}

.bento-card--logo .name-logo--bento {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    margin: auto;
    display: block;
}

.bento-card--logo .name-logo span {
    font-size: 13px;
}

@media (max-width: 968px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }
    .bento-card--intro {
        grid-column: span 2;
        grid-row: span 2;
    }
    .bento-card--tall {
        grid-row: span 2;
    }
    .bento-card--now,
    .bento-card--focus {
        grid-column: auto;
        grid-row: auto;
    }
    .bento-card--wide,
    .bento-card--article,
    .bento-card--project,
    .bento-card--commit-graph {
        grid-row: span 2;
    }
    .bento-card--newsletter {
        grid-row: span 2;
    }
    .bento-nav {
        gap: var(--space-1);
    }
    .bento-nav__link {
        padding: 6px 10px; /* 6px/10px off-scale for compact nav */
        font-size: 12px;
    }
}

@media (max-width: 640px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: var(--space-4);
    }
    .bento-card,
    .bento-card--intro,
    .bento-card--tall,
    .bento-card--wide,
    .bento-card--article,
    .bento-card--project,
    .bento-card--commit-graph,
    .bento-card--newsletter,
    .bento-card--now,
    .bento-card--focus {
        grid-column: auto;
        grid-row: auto;
        min-height: 180px;
    }
    .bento-header {
        flex-wrap: wrap;
        padding-bottom: var(--space-6);
    }
    .bento-nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }
}

/* Page with bento: full-width main, no side nav */
main:has(.bento-grid) {
    display: block;
    grid-template-columns: unset;
    padding-top: 0;
}

main:has(.bento-grid) .site-nav {
    display: none;
}

/* Any page with bento header: use same header, hide side nav, no extra top padding */
main:has(.bento-header) {
    display: block;
    grid-template-columns: unset;
    padding-top: 0;
}

main:has(.bento-header) > .site-nav {
    display: none;
}

/* ========== Component: Theme toggle ========== */
.theme-toggle {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: var(--space-2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity var(--duration-slow) var(--ease-default);
    margin-left: auto;
}

.theme-toggle:hover {
    opacity: 0.6;
}

.theme-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    transition: opacity var(--duration-slow) var(--ease-default), transform var(--duration-slow) var(--ease-default);
}

.theme-icon--sun {
    display: none;
}

.theme-icon--moon {
    display: block;
}

/* Light Mode Styles */
body[data-theme="light"] {
    --page-bg-base: #fafaf9;
    --dot-grid-color: rgba(4, 4, 4, 0.1);
    background-color: var(--page-bg-base);
    color: #0a0a0a;
    border-left-color: rgba(4, 4, 4, 0.08);
}

body[data-theme="light"] .nav-link,
body[data-theme="light"] .index-greeting,
body[data-theme="light"] .index-name,
body[data-theme="light"] .index-current,
body[data-theme="light"] .index-location,
body[data-theme="light"] .index-connect,
body[data-theme="light"] .index-social-link,
body[data-theme="light"] .index-link,
body[data-theme="light"] .section-label,
body[data-theme="light"] .about-headline {
    color: #040404;
}

body[data-theme="light"] .about-text,
body[data-theme="light"] .about-connect,
body[data-theme="light"] .about-link,
body[data-theme="light"] .experience-role:not(.experience-role--badge),
body[data-theme="light"] .experience-company,
body[data-theme="light"] .experience-company-name,
body[data-theme="light"] .experience-dates,
body[data-theme="light"] .contact-text,
body[data-theme="light"] .contact-email,
body[data-theme="light"] .work-list-item-title,
body[data-theme="light"] .work-list-item-meta,
body[data-theme="light"] .work-list-item-category,
body[data-theme="light"] .work-carousel__title,
body[data-theme="light"] .work-carousel__meta,
body[data-theme="light"] .footer-label,
body[data-theme="light"] .footer-link {
    color: #040404;
}

body[data-theme="light"] .index-current,
body[data-theme="light"] .index-location,
body[data-theme="light"] .index-connect,
body[data-theme="light"] .about-text,
body[data-theme="light"] .contact-text,
body[data-theme="light"] .experience-company,
body[data-theme="light"] .experience-dates,
body[data-theme="light"] .work-list-item-meta,
body[data-theme="light"] .work-carousel__meta {
    color: rgba(4, 4, 4, 0.7);
}

body[data-theme="light"] .section-label {
    color: rgba(4, 4, 4, 0.5);
}

body[data-theme="light"] .about .section-label,
body[data-theme="light"] .experience .section-label,
body[data-theme="light"] .contact .section-label,
body[data-theme="light"] .work-page .section-label {
    color: #040404;
}

body[data-theme="light"] .footer-label {
    opacity: 0.5;
    color: #040404;
}

body[data-theme="light"] .work-carousel__thumbnail,
body[data-theme="light"] .work-detail-overlay {
    background: rgba(4, 4, 4, 0.05);
    border-color: rgba(4, 4, 4, 0.1);
}

body[data-theme="light"] .index-work-button,
body[data-theme="light"] .experience-cv-button {
    border-color: rgba(4, 4, 4, 0.2);
    color: #040404;
}

body[data-theme="light"] .index-work-button:hover,
body[data-theme="light"] .experience-cv-button:hover {
    background: rgba(4, 4, 4, 0.1);
    border-color: rgba(4, 4, 4, 0.4);
}

body[data-theme="light"] .experience {
    --timeline-ruler-line: rgba(4, 4, 4, 0.14);
    --timeline-ruler-tick: rgba(4, 4, 4, 0.38);
}

body[data-theme="light"] .index-intro {
    color: rgba(4, 4, 4, 0.75);
}

body[data-theme="light"] .footer-bottom {
    border-top-color: rgba(4, 4, 4, 0.08);
}


body[data-theme="light"] .footer-copyright {
    color: rgba(4, 4, 4, 0.45);
}

body[data-theme="light"] .site-nav__link {
    color: #040404;
}

body[data-theme="light"] .work-page-headline {
    color: #040404;
}

body[data-theme="light"] .work-list-item {
    background: rgba(4, 4, 4, 0.03);
    border-color: rgba(4, 4, 4, 0.08);
}

body[data-theme="light"] .work-list-item:hover {
    background: rgba(4, 4, 4, 0.06);
    border-color: rgba(4, 4, 4, 0.15);
}

body[data-theme="light"] .work-list-item-thumb {
    background: rgba(4, 4, 4, 0.04);
}

body[data-theme="light"] .work-list-item-title {
    color: #040404;
}

body[data-theme="light"] .work-list-item-category {
    color: rgba(4, 4, 4, 0.55);
}

body[data-theme="light"] .work-list-item-cta {
    border-color: rgba(4, 4, 4, 0.2);
    color: #040404;
}

body[data-theme="light"] .work-list-item:hover .work-list-item-cta {
    background: rgba(4, 4, 4, 0.1);
    border-color: rgba(4, 4, 4, 0.4);
}

body[data-theme="light"] .work-detail-content {
}

body[data-theme="light"] .theme-icon--moon {
    display: none;
}

body[data-theme="light"] .theme-icon--sun {
    display: block;
    color: #040404;
}

body[data-theme="light"] .theme-toggle {
    color: #040404;
}

/* Bento – light mode (keep same color style as rest of site) */
body[data-theme="light"] {
    --bento-bg: #fafaf9;
    --bento-text: #0a0a0a;
    --bento-text-muted: rgba(4, 4, 4, 0.7);
    --bento-card-bg: rgba(255, 255, 255, 0.5);
    --bento-card-border: rgba(4, 4, 4, 0.1);
    --bento-card-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --bento-card-hover-bg: rgba(255, 255, 255, 0.7);
    --bento-card-hover-border: rgba(4, 4, 4, 0.15);
    --bento-accent: rgba(4, 4, 4, 0.06);
    --bento-glass-blur: 16px;
    --bento-glass-saturate: 180%;
}

body[data-theme="light"] .name-logo {
    color: #040404;
}

body[data-theme="light"] .work-detail-title,
body[data-theme="light"] .work-detail-section-title {
    color: #040404;
}

body[data-theme="light"] .work-detail-description,
body[data-theme="light"] .work-detail-section-content {
    color: rgba(4, 4, 4, 0.7);
}

body[data-theme="light"] .work-detail-tag {
    color: rgba(4, 4, 4, 0.7);
}

body[data-theme="light"] .work-detail-close {
    color: #040404;
}

body[data-theme="light"] .work-detail-next {
    border-color: rgba(4, 4, 4, 0.2);
    color: #040404;
}

body[data-theme="light"] .work-detail-next:hover {
    background: rgba(4, 4, 4, 0.1);
    border-color: rgba(4, 4, 4, 0.4);
}

body[data-theme="light"] .work-detail-navigation {
    border-top-color: rgba(4, 4, 4, 0.1);
}

body[data-theme="light"] .work-detail-toc__link {
    color: rgba(4, 4, 4, 0.44);
}

body[data-theme="light"] .work-detail-toc__link:hover {
    color: rgba(4, 4, 4, 0.7);
}

body[data-theme="light"] .work-detail-toc__link::before {
    background: rgba(4, 4, 4, 0.12);
}

body[data-theme="light"] .work-detail-toc__link--active {
    color: rgba(4, 4, 4, 0.92);
}

body[data-theme="light"] .work-detail-toc__link--active::after {
    background: rgba(4, 4, 4, 0.92);
}

body[data-theme="light"] .work-impact__metric {
    border-color: rgba(4, 4, 4, 0.12);
    background: rgba(4, 4, 4, 0.03);
}

body[data-theme="light"] .work-impact__value {
    color: rgba(4, 4, 4, 0.92);
}

body[data-theme="light"] .work-impact__label {
    color: rgba(4, 4, 4, 0.6);
}

body[data-theme="light"] .bento-logo,
body[data-theme="light"] .bento-nav__link,
body[data-theme="light"] .bento-contact-link {
    color: #040404;
}

body[data-theme="light"] .bento-logo:hover,
body[data-theme="light"] .bento-nav__link:hover,
body[data-theme="light"] .bento-contact-link:hover {
    color: #040404;
}

.nav-link--work {
    /* Same as nav-link */
}

/* Index Section (Homepage) – left-aligned in content column (Nat-style) */
.index {
    display: block;
    padding: 0 var(--content-padding) 0 0;
    max-width: 720px;
}

.index-content {
    min-width: 0;
}

.index-greeting {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 700;
    line-height: 1.15;
    color: #fff;
    margin: 0 0 var(--space-6);
    letter-spacing: -0.03em;
}

.index-name {
    font-weight: 700;
}

.index-intro {
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 var(--space-8);
    letter-spacing: -0.01em;
    max-width: 52ch;
}

.index-info {
    margin-bottom: var(--space-6);
}

.index-current,
.index-location {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}

.index-link {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 0.2em;
    transition: opacity var(--duration-fast) var(--ease-default);
}

.index-link:hover {
    opacity: 0.7;
}

.index-connect {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 28px;
    letter-spacing: -0.01em;
}

.index-social {
    display: flex;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.index-social--home {
    gap: var(--space-5);
}

.index-social--home .footer-links {
    margin-left: 0;
}

.index-social-link {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.2s ease;
    letter-spacing: -0.01em;
    opacity: 0.85;
}

.index-social-link:hover {
    opacity: 1;
}

.index-work-button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 12px 24px;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: all 0.3s ease;
    font-family: inherit;
    margin-bottom: 24px;
    display: inline-block;
    text-decoration: none;
    border-radius: 9999px;
}

.index-work-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Work Carousel */
.index-work-carousel {
    margin: 0 0 40px;
    width: 100%;
    overflow: hidden;
    position: relative;
    height: 403px;
}

.work-carousel__track {
    display: flex;
    width: max-content;
    will-change: transform;
    user-select: none;
    gap: 32px;
    height: 100%;
    position: relative;
}

.work-carousel__item {
    flex: 0 0 auto;
    width: 403px;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-carousel__item:hover {
    transform: translateY(-4px);
}

.work-carousel__thumbnail {
    width: 100%;
    height: 288px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.work-carousel__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-carousel__item:hover .work-carousel__thumbnail img {
    transform: scale(1.05);
}

.work-carousel__info {
    padding: 0 4px;
}

.work-carousel__title {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
    color: #fff;
}

.work-carousel__meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
}

@media (max-width: 968px) {
    .index-work-carousel {
        height: 345px;
    }

    .work-carousel__item {
        width: 345px;
    }

    .work-carousel__thumbnail {
        height: 230px;
    }
}

@media (max-width: 640px) {
    .index-work-carousel {
        height: 288px;
    }

    .work-carousel__item {
        width: 288px;
    }

    .work-carousel__thumbnail {
        height: 201px;
    }

    .work-carousel__title {
        font-size: 16px;
    }

    .work-carousel__meta {
        font-size: 11px;
    }
}

.intro-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.intro-name-group {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-image-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.profile-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 
        0 8px 32px rgba(4, 4, 4, 0.3),
        0 0 40px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.name-title {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin: 0;
}

.name-designation {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.02em;
    margin: 4px 0 0;
}

.hero {
    margin-top: 0;
    grid-column: 2 / 5;
}

.hero-text {
    font-size: 80px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 2px;
    margin: 0;
    max-width: 900px;
}

.about {
    padding: 0 var(--content-padding);
    display: block;
}

.about .section-label {
    writing-mode: horizontal-tb;
    text-orientation: unset;
    transform: none;
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 0;
}

.about-content {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.about-intro {
    overflow: hidden;
}

.about-photo-wrap {
    float: left;
    margin: 0 32px 24px 0;
    shape-margin: 24px;
}

.about-photo {
    display: block;
    width: 280px;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    border-radius: 8px;
}

.about-photo-note {
    margin-top: 10px;
    font-size: 10px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.65);
    max-width: 280px;
}

body[data-theme="light"] .about-photo-note {
    color: rgba(4, 4, 4, 0.55);
}

.about-body {
    overflow: hidden;
}

.about-headline {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0 0 1em;
}

.about-text {
    font-size: 24px;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 1.5em;
    letter-spacing: -0.01em;
}

.about-text:last-of-type {
    margin-bottom: 1.25em;
}

.about-content p.about-text:first-of-type {
    text-indent: 0;
}

.about-content p.about-text:nth-of-type(2),
.about-content p.about-text:nth-of-type(3) {
    font-size: 16px;
}

.about-list {
    font-size: 16px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 1em;
    padding-left: 1.25em;
    list-style-type: disc;
}

.about-list li {
    margin-bottom: 0.5em;
}

.about-list li:last-child {
    margin-bottom: 0;
}

.about-link {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 0.2em;
    transition: opacity 0.2s ease;
}

.about-link:hover {
    opacity: 0.7;
}

.about-connect {
    display: inline-block;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.about-connect:hover {
    opacity: 0.7;
}

.featured-projects {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    align-items: start;
}

.featured-projects .section-label {
    grid-column: 1;
}

.featured-projects .projects-list {
    grid-column: 2 / 5;
}

.section-label {
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    padding: 0;
}

.section-label.emoji {
    writing-mode: initial;
    text-orientation: initial;
    transform: none;
    font-size: 24px;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1;
}

.project-item {
    margin: 0;
}

.project-link {
    color: #fff;
    text-decoration: none;
    display: block;
    transition: opacity 0.2s ease;
}

.project-link:hover {
    opacity: 0.6;
}

.project-link h3 {
    font-size: 24px;
    font-weight: 400;
    letter-spacing: -0.01em;
    margin: 0;
}

.experience {
    --timeline-ruler-line: rgba(255, 255, 255, 0.22);
    --timeline-ruler-tick: rgba(255, 255, 255, 0.5);
    padding: 0 var(--content-padding);
    display: block;
}

.experience .section-label {
    writing-mode: horizontal-tb;
    text-orientation: unset;
    transform: none;
    text-transform: none;
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: var(--space-8);
}

/* Beats global .section-label { text-transform: uppercase } when specificity ties */
.section-label.section-label--plain {
    text-transform: none;
}

.experience .experience-list {
    max-width: var(--page-max-width);
    margin-left: auto;
    margin-right: auto;
}

.experience-timeline {
    max-width: var(--page-max-width);
    margin-left: auto;
    margin-right: auto;
}

.experience-timeline__scroll {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    margin-left: calc(-1 * var(--content-padding));
    margin-right: calc(-1 * var(--content-padding));
    padding-left: var(--content-padding);
    padding-right: var(--content-padding);
    scrollbar-gutter: stable;
}

.experience-timeline__inner {
    width: max(100%, 680px);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.experience-timeline-ruler {
    display: block;
}

.experience-timeline-ruler__ticks {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-4);
    min-height: 16px;
    border-bottom: 1px solid var(--timeline-ruler-line);
    align-items: end;
    box-sizing: border-box;
}

.experience-timeline-ruler__tick {
    display: block;
    width: 1px;
    height: 14px;
    background: var(--timeline-ruler-tick);
    justify-self: start;
    align-self: end;
    margin-bottom: -1px;
}

.experience-cv-button {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    padding: 12px 24px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: all 0.3s ease;
    font-family: inherit;
    margin-top: 32px;
    display: inline-block;
    text-decoration: none;
}

.experience-cv-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.experience .name-logo--footer {
    margin-top: 32px;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.experience-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
    flex: 1;
}

.experience-list--timeline {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-4);
    flex: unset;
}

.experience-item--timeline {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    min-width: 0;
}

.experience-dates {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.3;
}

.experience-brand {
    display: flex;
    align-items: center;
    min-width: 0;
}

.experience-company-name {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--bento-text);
    line-height: 1.25;
}

.experience-role {
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin: 0;
    color: #fff;
}

.experience-role--badge {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.35;
    padding: 6px 10px;
    border-radius: 8px;
    max-width: 100%;
    box-sizing: border-box;
}

.experience-role--badge-muted {
    background: var(--bento-card-bg);
    border: 1px solid var(--bento-card-border);
    color: var(--bento-text-muted);
}

.experience-role--badge-accent {
    background: var(--bento-card-hover-bg);
    border: 1px solid var(--bento-card-hover-border);
    color: var(--bento-text);
}

.experience-detail {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.35em;
    max-width: 90%;
}

.experience-company {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
    letter-spacing: -0.01em;
}

.experience-desc {
    flex-basis: 100%;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    margin: 0.75em 0 0;
}

.contact {
    padding: 0 var(--content-padding);
    display: block;
}

.contact .section-label {
    writing-mode: horizontal-tb;
    text-orientation: unset;
    transform: none;
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 0;
}

.contact-content {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Sitemap Page */
.sitemap-section {
    padding: var(--section-spacing) var(--content-padding) 0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.sitemap-title {
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--bento-text);
    margin-bottom: var(--space-2);
}

.sitemap-desc {
    font-size: 16px;
    color: var(--bento-text-muted);
    margin-bottom: var(--space-6);
}

.sitemap-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.sitemap-list a {
    color: var(--bento-text);
    text-decoration: none;
    font-size: 18px;
    transition: color var(--duration-fast) var(--ease-default);
}

.sitemap-list a:hover {
    color: var(--bento-text-muted);
}

.sitemap-meta {
    margin-top: var(--space-8);
    font-size: 14px;
    color: var(--bento-text-muted);
}

.sitemap-meta a {
    color: var(--bento-text);
    text-decoration: underline;
}

.sitemap-meta a:hover {
    color: var(--bento-text-muted);
}

/* Blog Page */
.blog-page {
    padding: 0 var(--content-padding);
    display: block;
}

.blog-intro {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.blog-intro p.about-text:first-of-type {
    text-indent: 0;
}

.blog-posts {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* Non-home pages: blog fits container column width */
body:not(:has(.bento-grid)) .blog-posts {
    max-width: var(--page-max-width);
}

.blog-loading,
.blog-error {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.blog-error {
    margin-top: 16px;
}

.blog-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 48px;
}

.blog-card {
    display: flex;
    flex-direction: row;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    align-items: center;
    min-height: 200px;
}

.blog-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
}

/* No thumbnail: expand text area to full card width */
.blog-card--no-thumb .blog-card__thumb {
    display: none;
}

.blog-card--no-thumb .blog-card__body {
    width: 100%;
    padding: 28px 32px;
}

.blog-card__body {
    flex: 1;
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.blog-card__title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0;
    color: #fff;
    line-height: 1.3;
}

.blog-card__desc {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
}

.blog-card__thumb {
    display: block;
    flex-shrink: 0;
    width: 320px;
    height: 200px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    margin-right: 40px;
}

.blog-card__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card__thumb img {
    transform: scale(1.05);
}

.blog-card__thumb--placeholder {
    background: rgba(255, 255, 255, 0.06);
}

body[data-theme="light"] .blog-card {
    background: rgba(4, 4, 4, 0.03);
    border-color: rgba(4, 4, 4, 0.08);
}

body[data-theme="light"] .blog-card:hover {
    background: rgba(4, 4, 4, 0.06);
    border-color: rgba(4, 4, 4, 0.15);
}

body[data-theme="light"] .blog-card__title {
    color: #040404;
}

body[data-theme="light"] .blog-card__desc {
    color: rgba(4, 4, 4, 0.6);
}

/* Work Page - Showcasy-style card grid */
.work-page {
    padding: 0 var(--content-padding);
    display: block;
}

.work-page .section-label {
    writing-mode: horizontal-tb;
    text-orientation: unset;
    transform: none;
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 0;
}

.work-page-header {
    margin-bottom: 48px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.work-page-headline {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #fff;
    margin: 0;
}

.work-list {
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 40px;
}

.work-list-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.work-list-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.work-list-item-thumb {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    position: relative;
}

.work-list-item-thumb::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.15), transparent);
    pointer-events: none;
}

.work-list-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.work-list-item:hover .work-list-item-thumb img {
    transform: scale(1.04);
}

.work-list-item-thumb--placeholder {
    background: rgba(255, 255, 255, 0.06);
}

.work-list-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
}

.work-list-item-info {
    min-width: 0;
}

.work-list-item-title {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 4px;
    color: #fff;
    line-height: 1.2;
}

.work-list-item-category {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0;
}

.work-list-item-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--bento-cta-size);
    height: var(--bento-cta-size);
    border-radius: 50%;
    background: var(--bento-card-bg);
    border: 1px solid var(--bento-card-border);
    color: var(--bento-text);
    text-decoration: none;
    transition: background var(--duration-fast) var(--ease-default), border-color var(--duration-fast) var(--ease-default);
}

.work-list-item:hover .work-list-item-cta {
    background: var(--bento-card-hover-bg);
    border-color: var(--bento-card-hover-border);
}

.work-list-item-cta svg {
    width: var(--bento-cta-icon);
    height: var(--bento-cta-icon);
    flex-shrink: 0;
}

.work-list-item-cta-arrow {
    display: none;
}

.work-list-item-meta {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
}

.contact-text {
    font-size: 24px;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 16px;
    letter-spacing: -0.01em;
}

.contact-email {
    color: #fff;
    text-decoration: none;
    font-size: 24px;
    font-weight: 500;
    transition: opacity 0.2s ease;
    display: inline-block;
    letter-spacing: -0.01em;
}

.contact-email:hover {
    opacity: 0.7;
}

.social-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.social-link {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    transition: opacity 0.2s ease;
}

.social-link:hover {
    opacity: 0.6;
}

/* Case studies */
.case-studies {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    margin-top: 0;
}

.case-studies .case-studies-header {
    grid-column: 2 / -1;
    margin-bottom: 40px;
    max-width: 520px;
}

.case-studies .case-grid {
    grid-column: 2 / -1;
}

.case-title {
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.case-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: 120px;
    gap: 16px;
}

.case-item {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: #040404;
}

.case-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.case-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.3s ease;
    opacity: 0.85;
}

.case-item:hover .case-image {
    transform: scale(1.05);
    opacity: 1;
}

.case-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(4, 4, 4, 0.85) 0%, rgba(4, 4, 4, 0.5) 50%, transparent 100%);
    transform: translateY(0);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Bento-style spans */
.case-item--wide {
    grid-column: span 4;
    grid-row: span 2;
}

.case-item--tall {
    grid-column: span 2;
    grid-row: span 3;
}

.case-item--square {
    grid-column: span 2;
    grid-row: span 2;
}

.case-item--small {
    grid-column: span 2;
    grid-row: span 1;
}

.case-item:hover .case-overlay {
    transform: translateY(0);
}

.case-overlay .case-name {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
    color: #fff;
}

.case-overlay .case-meta {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
}

/* ========== Component: Footer ========== */
/* Nat-style: top row (logo + links), bottom row (tagline left, copyright right) */
.footer {
    margin-bottom: 0;
    padding: var(--space-8) var(--content-padding) var(--space-10);
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.footer .name-logo--footer {
    flex-shrink: 0;
}

.footer-bottom {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom .footer-label {
    justify-self: start;
    text-align: left;
}

.footer-bottom .footer-copyright {
    justify-self: end;
    text-align: right;
}

.footer-copyright {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.02em;
}

.footer-link {
    color: inherit;
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

.footer-label {
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.5;
    white-space: nowrap;
}

.footer-links {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-left: auto;
}

.footer-link {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity var(--duration-fast) var(--ease-default);
}

.footer-link:hover {
    opacity: 1;
}

.footer-link--icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.footer-icon {
    width: 22px;
    height: 22px;
}

@media (max-width: 968px) {
    body {
        border-left-color: rgba(255, 255, 255, 0.04);
    }

    body[data-theme="light"] body {
        border-left-color: rgba(4, 4, 4, 0.08);
    }

    .name-logo--footer {
        width: 100px;
        height: 100px;
    }

    .name-logo--footer span {
        font-size: 9px;
    }

    main {
        padding-top: 0;
    }

    .site-nav {
        padding-right: var(--content-padding);
        gap: 24px;
    }

    main:has(.site-nav) {
        grid-template-columns: 1fr;
    }

    main:has(.site-nav) > .site-nav,
    main:has(.site-nav) > section:not(.footer) {
        grid-column: auto;
        grid-row: auto;
    }

    .footer-bottom {
        padding-top: 20px;
        gap: 16px;
    }

    .footer-bottom .footer-label {
        max-width: 200px;
        white-space: normal;
    }

    .blog-card {
        flex-direction: column;
        min-height: auto;
    }

    .blog-card__body {
        padding: 24px;
    }

    .blog-card__thumb {
        width: 100%;
        height: 200px;
        margin-right: 0;
        margin-bottom: 0;
        border-radius: 0;
    }

    .blog-grid {
        margin-top: 32px;
    }

    .work-list {
        grid-template-columns: 1fr;
    }

    .nav-inner {
        gap: 24px;
    }

    .theme-toggle {
        padding: 6px;
    }

    .theme-icon {
        width: 18px;
        height: 18px;
    }

    .intro-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .intro-name-group {
        gap: 16px;
    }

    .profile-image {
        width: 60px;
        height: 60px;
    }

    .profile-image-wrapper {
        width: 60px;
        height: 60px;
    }

    .index-greeting {
        font-size: 36px;
    }

    .footer {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 24px;
    }

    .footer .name-logo--footer {
        flex-shrink: 0;
    }

    .footer .footer-links {
        align-self: flex-end;
        margin-left: 0;
    }

    .footer-label {
        white-space: normal;
        line-height: 1.4;
    }

    .about .section-label,
    .experience .section-label,
    .contact .section-label,
    .work-page .section-label {
        font-size: 24px;
    }

    .main-nav {
        padding: var(--content-padding) var(--content-padding) 0;
    }

    .nav-inner {
        gap: 16px;
        flex-wrap: wrap;
    }

    .nav-link {
        font-size: 12px;
    }

    .theme-toggle {
        padding: 4px;
    }

    .theme-icon {
        width: 16px;
        height: 16px;
    }

    main {
        padding-top: 0;
    }

    main > section {
        margin-bottom: 60px;
    }

    .blog-card {
        flex-direction: column;
        min-height: auto;
    }

    .blog-card__body {
        padding: 20px;
    }

    .blog-card__title {
        font-size: 24px;
    }

    .blog-card__thumb {
        width: 100%;
        height: 180px;
        margin-right: 0;
        border-radius: 0;
    }

    .blog-grid {
        gap: 20px;
        margin-top: 24px;
    }

    .work-list {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .about .section-label,
    .experience .section-label,
    .contact .section-label,
    .work-page .section-label {
        font-size: 22px;
    }

    .footer {
        flex-direction: row;
        align-items: flex-start;
    }

    .footer .name-logo--footer {
        flex-shrink: 0;
    }

    .footer .footer-links {
        align-self: flex-end;
        margin-left: 0;
    }

    .footer-label {
        white-space: normal;
        line-height: 1.4;
        max-width: 200px;
    }

    .about-content {
        max-width: none;
    }

    .about-photo-wrap {
        float: none;
        margin: 0 auto 24px;
    }

    .about-photo {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .about-headline {
        font-size: 22px;
    }

    .case-studies {
        display: block;
    }

    .case-studies .case-studies-header,
    .case-studies .case-grid {
        grid-column: unset;
    }

    .case-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 140px;
        gap: 12px;
    }

    .case-studies .case-studies-header {
        margin-bottom: 24px;
    }


    .experience-list:not(.experience-list--timeline) .experience-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (max-width: 640px) {

    body {
        border-left-color: rgba(255, 255, 255, 0.03);
    }

    main {
        column-gap: 0;
    }

    .index,
    .about,
    .experience,
    .contact,
    .blog-page,
    .work-page {
        padding: 0 var(--content-padding);
    }

    .index-greeting {
        font-size: 28px;
    }

    .index-work-button {
        width: 100%;
        text-align: center;
    }

    .name-title {
        font-size: 20px;
    }

    .name-designation {
        font-size: 13px;
    }

    .intro-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .work-button {
        align-self: flex-end;
        margin-top: 16px;
    }

    .project-link h3 {
        font-size: 20px;
    }

    .footer-bottom {
        grid-template-columns: 1fr;
        gap: 16px;
        text-align: center;
    }

    .footer-bottom .footer-label,
    .footer-bottom .footer-copyright {
        justify-self: center;
    }

    .footer-bottom .footer-label {
        max-width: none;
    }
}

/* Work Button */
.work-button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    padding: 12px 24px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    font-family: inherit;
}

.work-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Work Modal */
.work-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
    will-change: opacity;
}

.work-modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.work-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(4, 4, 4, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    will-change: backdrop-filter;
}

.work-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 80px 20px;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.work-modal[aria-hidden="false"] .work-modal-content {
    transform: translateY(0);
    opacity: 1;
}

.work-modal-close {
    position: fixed;
    top: 40px;
    right: 40px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 32px;
    width: 48px;
    height: 48px;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.work-modal-close:hover {
    opacity: 0.6;
}

/* Work Grid - Bento Style */
.work-grid {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
    grid-auto-rows: 200px;
}

.work-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, background, border-color;
    transform: translateZ(0);
}

.work-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.work-item--wide {
    grid-column: span 6;
}

.work-item--tall {
    grid-row: span 2;
}

.work-item--large {
    grid-column: span 6;
    grid-row: span 2;
}

.work-item--small {
    grid-column: span 3;
}

.work-item-content {
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.work-item-title {
    font-size: 24px;
    font-weight: 500;
    color: #fff;
    margin: 0 0 8px;
}

.work-item-meta {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Work Detail Page */
.work-detail {
    position: fixed;
    inset: 0;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
    will-change: opacity;
}

.work-detail[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.work-detail-overlay {
    position: absolute;
    inset: 0;
    background: #040404;
    transition: background-color 0.3s ease;
}

body[data-theme="light"] .work-detail-overlay {
    background: #ffffff;
}

.work-detail-content {
    position: relative;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 0 40px;
    max-width: 880px;
    margin: 0 auto;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
    -webkit-transform: translateZ(0);
    border-left-width: 0px;
    border-left-style: none;
    border-image: none;
}

.work-detail[aria-hidden="false"] .work-detail-content {
    transform: translateY(0);
    opacity: 1;
}

.work-detail-close {
    position: fixed;
    top: 40px;
    right: 40px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 32px;
    width: 48px;
    height: 48px;
    cursor: pointer;
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.work-detail-close:hover {
    opacity: 0.6;
}

.work-detail-inner {
    padding: 80px 0;
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 40px;
    align-items: start;
    max-width: 800px;
    margin: 0 auto;
}

.work-detail-header {
    grid-column: 2;
    margin-bottom: 0;
    max-width: 700px;
}

.work-detail-title {
    font-size: 64px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 24px;
    line-height: 1.1;
}

.work-detail-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.work-detail-tag {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.7);
}

.work-detail-description {
    font-size: 18px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    max-width: none;
}

/* Work detail table of contents (matches case study section rhythm) */
.work-detail-toc {
    grid-column: 1;
    margin: 0;
    padding: 8px 0 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-self: start;
    justify-self: start;
    position: sticky;
    top: 120px;
}

.work-detail-toc__link {
    position: relative;
    display: block;
    padding: 4px 0 4px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 12px;
    line-height: 1.15;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.44);
    transition: color var(--duration-fast) var(--ease-default), opacity var(--duration-fast) var(--ease-default);
}

.work-detail-toc__link:hover {
    color: rgba(255, 255, 255, 0.7);
}

.work-detail-toc__link::before {
    content: "";
    position: absolute;
    left: 0;
    top: -10px;
    bottom: -10px;
    width: 1px;
    background: rgba(255, 255, 255, 0.09);
}

.work-detail-toc__link--active {
    color: rgba(255, 255, 255, 0.92);
}

.work-detail-toc__link--active::after {
    content: "";
    position: absolute;
    left: -1px;
    top: 50%;
    width: 3px;
    height: 34px;
    transform: translateY(-50%);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.92);
}

.work-detail-section-content p {
    margin: 0 0 18px;
}

.work-detail-section-content p:last-child {
    margin-bottom: 0;
}

/* Impact metrics block (dummy placeholders now, real metrics later) */
.work-impact {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}

.work-impact__metric {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 14px 14px 12px;
}

.work-impact__value {
    font-size: 26px;
    line-height: 1.1;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.work-impact__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.65);
}

.work-detail-section {
    grid-column: 2;
    margin-bottom: 0;
    max-width: 700px;
}

.work-detail-section-title {
    font-size: 32px;
    font-weight: 500;
    color: #fff;
    margin: 0 0 40px;
}

.work-detail-section-content {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

.work-detail-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 0;
    display: block;
}

.work-detail-image-wrapper {
    grid-column: 2;
    margin-bottom: 0;
    max-width: 700px;
}

.work-detail-navigation {
    grid-column: 2;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 700px;
}

.work-detail-next {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    padding: 12px 24px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.work-detail-next:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 968px) {
    .work-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .work-item--wide {
        grid-column: span 6;
    }

    .work-item--small {
        grid-column: span 3;
    }

    .work-detail-content {
        padding: 0 var(--content-padding);
    }

    .work-detail-inner {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 60px 0;
    }

    .work-detail-header,
    .work-detail-toc,
    .work-detail-section,
    .work-detail-navigation {
        grid-column: 1;
    }

    .work-impact {
        grid-template-columns: 1fr;
    }

    .work-detail-image-wrapper {
        grid-column: 1;
    }

    .work-detail-content {
    }

    .work-detail-title {
        font-size: 48px;
    }
}

@media (max-width: 640px) {
    .work-button {
        font-size: 12px;
        padding: 10px 20px;
        align-self: stretch;
        text-align: center;
    }

    .work-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .work-item--wide,
    .work-item--small {
        grid-column: span 2;
    }

    .work-item--large {
        grid-column: span 2;
        grid-row: span 1;
    }

    .work-detail-title {
        font-size: 36px;
    }

    .work-modal-content {
        padding: 60px var(--content-padding);
    }

    .work-detail-content {
        padding: 0 var(--content-padding);
    }

    .work-detail-inner {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 40px 0;
    }

    .work-detail-header,
    .work-detail-section,
    .work-detail-image-wrapper,
    .work-detail-navigation {
        grid-column: 1;
    }

    .work-modal-close,
    .work-detail-close {
        top: 20px;
        right: 20px;
    }
}