/* ==========================================================================
   PORTFOLIO STYLING SYSTEM
   ========================================================================== */

:root {
    --bg: #000000;
    --text: #ffffff;
    --text-muted: #7e8085;
    --border: rgba(255, 255, 255, 0.08);
    --accent: #e8a23d;
    --accent-dim: rgba(232, 162, 61, 0.15);
    --on-accent: #000000;

    /* Surfaces & fills (dark defaults) */
    --surface: rgba(255, 255, 255, 0.015);
    --chip-bg: rgba(255, 255, 255, 0.03);
    --kbd-bg: rgba(255, 255, 255, 0.04);

    /* GitHub contribution heatmap intensity ramp (level 0-4) */
    --gh-l0: rgba(255, 255, 255, 0.06);
    --gh-l1: rgba(232, 162, 61, 0.25);
    --gh-l2: rgba(232, 162, 61, 0.45);
    --gh-l3: rgba(232, 162, 61, 0.7);
    --gh-l4: #e8a23d;
    --header-bg: rgba(0, 0, 0, 0.85);
    --shadow: rgba(0, 0, 0, 0.35);
    --panel-bg: #111112;
    --panel-border: rgba(255, 255, 255, 0.06);
    --panel-hover: rgba(255, 255, 255, 0.04);

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.3s ease;

    --radius: 10px;
    --radius-pill: 999px;
    --column-width: 920px;

    /* Closing "SKY" watermark strength — light theme overrides this higher,
       since dark ink on paper needs more opacity than white on black. */
    --wordmark-opacity: 0.06;

    --mono: 'JetBrains Mono', monospace;
}

/* Light theme — warm paper rather than sterile white, so the amber accent
   still reads as the same brand. Toggled by adding .theme-light to <html>;
   everything downstream is driven by these tokens. */
html.theme-light {
    --bg: #f4f2ed;
    --text: #16130d;
    --text-muted: #6d675c;
    --border: rgba(22, 19, 13, 0.12);
    --accent: #b06e10;
    --accent-dim: rgba(176, 110, 16, 0.15);
    --on-accent: #ffffff;

    --surface: rgba(22, 19, 13, 0.02);
    --chip-bg: rgba(22, 19, 13, 0.04);
    --kbd-bg: rgba(22, 19, 13, 0.05);

    --gh-l0: rgba(22, 19, 13, 0.07);
    --gh-l1: rgba(176, 110, 16, 0.25);
    --gh-l2: rgba(176, 110, 16, 0.45);
    --gh-l3: rgba(176, 110, 16, 0.7);
    --gh-l4: #b06e10;
    --header-bg: rgba(244, 242, 237, 0.85);
    --shadow: rgba(30, 20, 5, 0.12);
    --panel-bg: #ffffff;
    --panel-border: rgba(22, 19, 13, 0.08);
    --panel-hover: rgba(22, 19, 13, 0.04);

    --wordmark-opacity: 0.13;
}

/* ==========================================================================
   BASE STYLE SETTINGS
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg);
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Theme-flip smoothing on the big surfaces. Transitions only animate on
   change, so this is inert at load time. */
html, body, .site-header, .hero-card, .project-card, .cap-item,
.contact-card, .contact-calendar, .site-footer, .section {
    transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

body {
    min-height: 100dvh;
    overflow-x: hidden;
    background-color: var(--bg);
    cursor: none; /* Hide default cursor — custom dot/ring replaces it */
}

/* Themed scrollbars — the OS-default white track glares on the dark canvas.
   (The Calendly iframe's internal scrollbar is cross-origin and out of
   reach; it's avoided instead by sizing the embed to fit — see CONTACT.) */
html {
    scrollbar-color: rgba(126, 128, 133, 0.5) transparent;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(126, 128, 133, 0.4);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(126, 128, 133, 0.65);
    border: 2px solid transparent;
    background-clip: content-box;
}

/* ── CAT ZONE ──────────────────────────────────────────────────────────────
   When the cursor approaches a cat, restore natural interaction:
   – Custom dot/ring fade out
   – Cursor becomes the system default (so petting feels real)
   – The cat itself shows grab/grabbing as appropriate
   ─────────────────────────────────────────────────────────────────────── */
body.cat-zone {
    cursor: default !important;
}

body.cat-zone a,
body.cat-zone button,
body.cat-zone input,
body.cat-zone textarea,
body.cat-zone select,
body.cat-zone label,
body.cat-zone .nav-link,
body.cat-zone .logo {
    cursor: default !important;
}

/* The cat itself always shows grab/grabbing regardless of zone */
body.cat-zone .cat {
    cursor: grab !important;
}

body.cat-zone .cat.is-dragging {
    cursor: grabbing !important;
}

/* Fade + scale the custom cursors when in cat zone */
body.cat-zone .cursor-dot,
body.cat-zone .cursor-ring {
    opacity: 0 !important;
    transform: translate3d(var(--cdx, 0px), var(--cdy, 0px), 0) translate(-50%, -50%) scale(0.4);
    transition: opacity 0.25s ease, transform 0.25s var(--ease-out-expo);
    pointer-events: none;
}

/* Hide default cursor on ALL interactive elements too */
a, button, input, textarea, select, label,
.nav-link, .logo {
    cursor: none;
}

/* ==========================================================================
   DOUBLE CURSOR TRAIL (DOT + RING)
   ========================================================================== */
/* Theme-aware cursor: the dot and ring wear the theme's text color
   (white on the dark theme, near-black on the light one) — no blend
   modes, no color inversion of whatever sits underneath. */
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--text);
    border-radius: 50% !important;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10000;
    will-change: transform;
    transition: opacity 0.3s ease, width 0.2s var(--ease-out-expo), height 0.2s var(--ease-out-expo);
    opacity: 0; /* Hidden on load */
}

/* Show when active */
.cursor-active .cursor-dot {
    opacity: 1;
}

.cursor-ring {
    width: 100px;
    height: 100px;
    /* The idle/interactive ring is invisible — just the dot leads. The ring
       element stays alive purely to morph into the labeled pill on hover
       (border + fill appear only in the .is-labeled state below). */
    background-color: transparent;
    border: 1.5px solid transparent;
    /* 999px is simply the pill radius: it clamps to a full circle/pill
       regardless of aspect ratio, so one rule covers the invisible idle
       ring and the labeled pill — no state-specific radius logic in JS. */
    border-radius: 999px !important;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    will-change: transform;
    transition: opacity 0.3s ease, width 0.3s var(--ease-out-expo), height 0.3s var(--ease-out-expo), background-color 0.2s ease, border-color 0.2s ease;
    opacity: 0; /* Hidden on load */
}

.cursor-active .cursor-ring {
    opacity: 1;
}

/* Pill state — ring morphs to fit a label: solid text-color pill with
   the background color punching through as the label. */
.cursor-ring {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cursor-ring.is-labeled {
    background-color: var(--text);
    border-color: var(--text);
}

.cursor-label {
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--bg);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.12s ease;
    pointer-events: none;
}

.cursor-ring.is-labeled .cursor-label {
    opacity: 1;
}

@media (pointer: coarse) {
    .cursor-dot, .cursor-ring {
        display: none;
    }
    /* Restore normal cursor on touch devices */
    body, a, button, input, textarea, select, label,
    .nav-link, .logo {
        cursor: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cursor-label {
        transition: none;
    }
}

/* ==========================================================================
   DUST CURSOR TRAIL
   ========================================================================== */
.dust-particle {
    position: fixed;
    top: 0;
    left: 0;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: var(--radius-pill);
    pointer-events: none;
    z-index: 9998;
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(1);
    transition: opacity 550ms ease-out, transform 550ms ease-out;
    will-change: opacity, transform;
}

.dust-particle--fade {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) translateY(10px);
}

@media (pointer: coarse) {
    .dust-particle {
        display: none;
    }
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1 {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 0.85;
    letter-spacing: -0.05em;
}

h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    line-height: 0.95;
}

h3 {
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    line-height: 1.25;
}

p {
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

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

/* Keyboard focus ring — the custom cursor replaces the mouse affordance,
   so keyboard users get an explicit accent ring instead. */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* Anchored scrolls stop below the fixed 72px header instead of under it */
section[id] {
    scroll-margin-top: 88px;
}

/* ==========================================================================
   SITE HEADER & NAVIGATION
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 72px;
    z-index: 100;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background-color: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header-container {
    max-width: var(--column-width);
    width: 90%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
    color: var(--text);
    text-transform: uppercase;
}

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

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: nowrap;
}

.nav-link {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
}

.nav-link::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border: 1.5px solid var(--text-muted);
    border-radius: var(--radius-pill);
    margin-right: 0.6rem;
    transition: background-color var(--transition-fast), border-color 0.3s ease;
}

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

.nav-link:hover::before, .nav-link.active::before {
    background-color: var(--accent);
    border-color: var(--accent);
}

.cmdk-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.4rem 0.75rem;
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
    transition: color 0.2s var(--ease-out-expo), border-color 0.2s var(--ease-out-expo);
}

.cmdk-trigger:hover {
    color: var(--text);
    border-color: var(--accent);
}

.cmdk-trigger kbd {
    font-family: inherit;
    font-size: 0.65rem;
    line-height: 1;
    padding: 0.15rem 0.3rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: inherit;
    background: var(--kbd-bg);
}

.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
    position: absolute;
    transition: opacity 0.25s ease, transform 0.35s var(--ease-out-expo);
}

.theme-toggle:hover {
    color: var(--text);
    border-color: var(--accent);
}

/* Dark theme shows the moon; light theme swaps to the sun. */
.theme-toggle .icon-sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.6);
}

html.theme-light .theme-toggle .icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

html.theme-light .theme-toggle .icon-moon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.6);
}

.nav-cta {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--on-accent);
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.nav-cta:hover {
    opacity: 0.85;
}

/* Tactile press feedback on every small control */
.cmdk-trigger:active,
.theme-toggle:active,
.nav-cta:active,
.hero-social-link:active,
.cf-submit:active {
    transform: translateY(1px);
}

/* ==========================================================================
   PAGE GRID LAYOUT
   ========================================================================== */
.main-layout {
    position: relative;
    z-index: 5;
    width: 100%;
}

.content-container {
    max-width: var(--column-width);
    width: 90%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

section {
    display: block;
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
    /* Per-element stagger — JS assigns --reveal-delay (e.g. project-card columns) */
    transition-delay: var(--reveal-delay, 0ms);
}

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

/* Staged hero boot-in — fires when the preloader lifts (body.is-loaded).
   Elements sit behind the preloader until then, so nothing flashes. */
@keyframes rise-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
    body.is-loaded .site-header    { animation: rise-in 0.6s var(--ease-out-expo) both; }
    body.is-loaded .hero-card__top { animation: rise-in 0.6s var(--ease-out-expo) 0.05s both; }
    body.is-loaded .hero-headline  { animation: rise-in 0.7s var(--ease-out-expo) 0.15s both; }
    body.is-loaded .hero-tagline   { animation: rise-in 0.7s var(--ease-out-expo) 0.22s both; }
    body.is-loaded .hero-bio       { animation: rise-in 0.7s var(--ease-out-expo) 0.26s both; }
    body.is-loaded .hero-socials   { animation: rise-in 0.7s var(--ease-out-expo) 0.36s both; }
    body.is-loaded .hero-photo     { animation: rise-in 0.7s var(--ease-out-expo) 0.2s both; }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .status-dot,
    .preloader-title {
        animation: none;
    }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    padding-top: 120px;
    /* Matches .section's 4.5rem so the vertical rhythm is uniform page-wide */
    padding-bottom: 4.5rem;
}

.hero-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    background: var(--surface);
}

.hero-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 0.4rem 0.85rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-pill);
    background: var(--accent);
    box-shadow: 0 0 0 0 var(--accent-dim);
    animation: status-pulse 2.4s ease-in-out infinite;
}

@keyframes status-pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--accent-dim); }
    50%      { box-shadow: 0 0 0 5px var(--accent-dim); }
}

.hero-headline {
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    color: var(--text);
    /* Devanagari carries marks above the base glyphs — the global 0.85
       display line-height would collide them with the line above. */
    line-height: 1;
    margin-bottom: 0.9rem;
}

/* The name in Devanagari, matching the headline's weight */
.hero-headline__hi {
    font-family: 'Noto Sans Devanagari', 'Outfit', sans-serif;
    font-weight: 900;
    letter-spacing: 0;
}

/* Old headline, demoted to a mono tagline under the greeting */
.hero-tagline {
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.1rem;
    /* Reserve the line height so the row doesn't jump while it types in */
    min-height: 1.2em;
}

/* Typewriter caret — solid while typing, blinking once finished
   (see initTypewriter). */
.hero-tagline.is-typing::after,
.hero-tagline.is-typed::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: 0.95em;
    margin-left: 4px;
    vertical-align: -0.08em;
    background: var(--accent);
}

.hero-tagline.is-typed::after {
    animation: caret-blink 1.05s steps(1) infinite;
}

@keyframes caret-blink {
    0%, 50%      { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}

.hero-bio {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 56ch;
    margin-bottom: 1.75rem;
}

.hero-socials {
    display: flex;
    gap: 0.75rem;
}

/* Text column left, portrait right (reference: vandit.dev hero) */
.hero-card__grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2.5rem;
    align-items: center;
}

.hero-photo {
    margin: 0;
    width: clamp(180px, 24vw, 250px);
}

.hero-photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

@media (max-width: 700px) {
    /* Mirror the desktop split — headline left, photo right — rather than
       stacking, so the photo isn't a lone right-aligned block with an empty
       gap beside it. Top-aligned so the photo sits next to the name. */
    .hero-card__grid {
        grid-template-columns: 1fr auto;
        gap: 1.25rem;
        align-items: start;
    }
    .hero-photo {
        width: clamp(110px, 30vw, 165px);
    }
    /* The closing SKY watermark is bigger on mobile so it still fills the
       footer at phone widths. */
    .footer-wordmark {
        font-size: clamp(6rem, 42vw, 15rem);
    }
}

.hero-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.hero-social-link svg {
    width: 16px;
    height: 16px;
}

.hero-social-link:hover {
    color: var(--text);
    border-color: var(--accent);
}

@media (max-width: 600px) {
    .hero-card {
        /* Extra bottom room so the corner jellyfish never sits on the socials row */
        padding: 1.5rem 1.5rem 3.5rem;
    }
}

/* ==========================================================================
   GITHUB ACTIVITY HEATMAP
   JS builds the grid: 7 rows (days), one column per week, month labels
   above. Colors come from the --gh-l0..4 ramp so both themes just work.
   ========================================================================== */
/* Heading row: section label left, profile handle right */
.section-heading-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.section-heading-row .section-heading {
    margin-bottom: 0;
}

.gh-profile {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.gh-profile:hover {
    color: var(--accent);
}

.gh-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    background: var(--surface);
}

/* The section unhides only once the API answers — ease it in rather than
   popping a full-width card into the page. */
@media (prefers-reduced-motion: no-preference) {
    #activity:not([hidden]) .content-container {
        animation: rise-in 0.7s var(--ease-out-expo) both;
    }
}

.gh-scroll {
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

/* The grid stretches to the card's full width — 53 equal week columns,
   square cells. Below ~680px it keeps a readable minimum and scrolls. */
.gh-graph {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(7, auto);
    grid-auto-columns: minmax(0, 1fr);
    gap: 3px;
    width: 100%;
    min-width: 640px;
}

.gh-graph .gh-cell {
    width: 100%;
    aspect-ratio: 1;
    height: auto;
}

.gh-cell {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: var(--gh-l0);
}

.gh-cell[data-level="1"] { background: var(--gh-l1); }
.gh-cell[data-level="2"] { background: var(--gh-l2); }
.gh-cell[data-level="3"] { background: var(--gh-l3); }
.gh-cell[data-level="4"] { background: var(--gh-l4); }

.gh-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.gh-total {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.gh-total strong {
    color: var(--text);
    font-weight: 700;
}

.gh-legend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.gh-legend .gh-cell {
    margin: 0 1px;
}

/* ==========================================================================
   PROJECTS GRID
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text);
    background: transparent;
    transition: border-color 0.25s var(--ease-out-expo), transform 0.25s var(--ease-out-expo), box-shadow 0.25s var(--ease-out-expo);
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--shadow);
}

/* Tactile press: the card physically gives under the click */
.project-card:active {
    transform: translateY(-1px) scale(0.99);
}

.project-card__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.project-card__title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    color: var(--text);
}

.project-card__status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    white-space: nowrap;
}

.project-card__narrative {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.project-card__tags span {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--chip-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 0.25rem 0.6rem;
}

.project-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.5rem;
}

.project-card__year {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.project-card__link {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.2s ease, transform 0.2s ease;
}

.project-card:hover .project-card__link {
    color: var(--accent);
    transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
    .project-card {
        transition: border-color 0.25s ease;
    }
    .project-card:hover,
    .project-card:active,
    .contact-card:active {
        transform: none;
        box-shadow: none;
    }
}

/* ==========================================================================
   SECTION RHYTHM
   Sections separate by whitespace alone — no divider hairlines.
   ========================================================================== */
.section {
    padding: 4.5rem 0;
}

.section-heading {
    font-family: var(--mono);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

/* ==========================================================================
   STACK & CAPABILITIES
   ========================================================================== */
.capabilities-block {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cap-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.cap-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color 0.3s ease;
}

.cap-category {
    font-family: var(--mono);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

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

.cap-tags span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--chip-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 0.3rem 0.7rem;
    transition: all 0.2s ease;
}

/* Brand logo injected by initStackLogos() — see script.js */
.cap-logo {
    width: 14px;
    height: 14px;
    display: block;
    flex: none;
}

.cap-item:hover {
    border-color: var(--accent);
}

.cap-tags span:hover {
    background: var(--accent);
    color: var(--on-accent);
    border-color: var(--accent);
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact-intro {
    font-size: 1rem;
    color: var(--text-muted);
    /* Pulls up against its section heading — the intro belongs to the
       heading, not floating between it and the columns. */
    margin-top: -1.75rem;
    margin-bottom: 2.5rem;
    max-width: 50ch;
}

.contact-columns {
    display: grid;
    grid-template-columns: 1fr;
    /* Same 1rem gap as .projects-grid and .contact-grid — one rhythm */
    gap: 1rem;
    /* No trailing margin: the contact form beneath is hidden, so this
       would just be dead space before the footer. */
    margin-bottom: 0;
}

/* Contact is the last section, so its bottom padding is dead space ahead
   of the footer — trim it so the closing wordmark sits close to the cards. */
#contact {
    padding-bottom: 1rem;
}

@media (min-width: 900px) {
    .contact-columns {
        grid-template-columns: 3fr 2fr;
        /* Default stretch: the calendar column grows to match the card
           column's height, so the two columns share a bottom edge. */
    }
}

.contact-calendar {
    min-height: 320px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
}

.contact-calendar__fallback {
    font-family: var(--mono);
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-muted);
    text-align: center;
    max-width: 32ch;
}

/* Height contract with the card column: the tiles' 260px minimum makes the
   card column ~626px tall, and the calendar panel stretches to exactly that
   (its own floor only matters when the columns stack). 626px comfortably
   fits Calendly's detail-less month view (~600px), so there's no internal
   scrollbar and no dead band — both columns end on the same line. */
.contact-calendar--embedded {
    padding: 0;
    min-height: 0;
}

.contact-calendar--embedded iframe {
    width: 100%;
    height: 100%;
    min-height: 620px;
    border: 0;
}

/* Tall 2x2 tile grid (reference: vandit.dev's Let's Connect) — Email spans
   the top as a wide bar, then GitHub|X / LinkedIn|Résumé as square-ish
   tiles: bare icon top-left, label + handle pinned to the bottom, arrow in
   the bottom-right corner. The 1fr rows stretch so the card column shares
   its bottom edge with the calendar. */
.contact-grid {
    display: grid;
    /* minmax(0, 1fr), not 1fr: a plain 1fr floors at the column's
       min-content, so LinkedIn's long "/in/sarveshkyadav" handle would
       push the left column wider than the right. The 0 floor keeps both
       tile columns exactly equal. */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr 1fr;
    gap: 1rem;
}

.contact-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    /* 260px × 2 rows (+ the Email bar and gaps) sets the ~626px column
       height the calendar stretches to — see the calendar comment above. */
    min-height: 260px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.25s var(--ease-out-expo), transform 0.25s var(--ease-out-expo);
}

.contact-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.contact-card:active {
    transform: translateY(0) scale(0.99);
}

.contact-card--wide {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    min-height: 0;
}

.contact-card__icon {
    display: inline-flex;
    flex: none;
    color: var(--text);
}

.contact-card__icon svg {
    width: 26px;
    height: 26px;
}

.contact-card--wide .contact-card__icon svg {
    width: 20px;
    height: 20px;
}

.contact-card:hover .contact-card__icon {
    color: var(--accent);
}

.contact-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: auto;
    min-width: 0;
    padding-right: 1.75rem;
}

.contact-card--wide .contact-card__body {
    margin-top: 0;
    padding-right: 0;
    flex: 1;
}

.contact-card__label {
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}

.contact-card__handle {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-card__arrow {
    position: absolute;
    right: 1.5rem;
    bottom: 1.25rem;
    font-family: var(--mono);
    color: var(--text-muted);
    transition: color 0.2s ease, transform 0.2s ease;
}

.contact-card--wide .contact-card__arrow {
    position: static;
    margin-left: auto;
}

.contact-card:hover .contact-card__arrow {
    color: var(--accent);
    transform: translateX(3px);
}

/* Narrow screens: every card flattens back into a compact row. */
@media (max-width: 479px) {
    .contact-grid {
        grid-template-columns: 1fr;
        grid-template-rows: none;
    }
    .contact-card {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        min-height: 0;
    }
    .contact-card__icon svg {
        width: 20px;
        height: 20px;
    }
    .contact-card__body {
        margin-top: 0;
        padding-right: 0;
        flex: 1;
    }
    .contact-card__arrow {
        position: static;
        margin-left: auto;
    }
}

/* Visually hidden, still announced. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 34rem;
}

.contact-form[hidden] {
    display: none;
}

.cf-input {
    font-family: var(--mono);
    font-size: 0.9rem;
    padding: 0.9rem 1rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    resize: vertical;
}

.cf-input::placeholder {
    color: var(--text-muted);
}

.cf-input:focus {
    outline: none;
    border-color: var(--accent);
}

.cf-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.cf-feedback {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    min-height: 1.2em;
}

.cf-feedback.is-error {
    color: #e5647f;
}

.cf-submit {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.8rem 1.25rem;
    align-self: flex-start;
    background: var(--accent);
    color: var(--on-accent);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    transition: background-color 0.2s var(--ease-out-expo), color 0.2s var(--ease-out-expo);
}

.cf-submit:hover {
    background: transparent;
    color: var(--accent);
}

/* ==========================================================================
   SITE FOOTER
   ========================================================================== */
/* The footer stacks the copyright row and the giant wordmark in a single
   grid cell so the text overlays the watermark (reference: ThreadCite). */
.site-footer {
    position: relative;
    display: grid;
    padding: 0 0 1.75rem;
    overflow: hidden;
}

.site-footer > .footer-inner {
    grid-area: 1 / 1;
    align-self: end;
    z-index: 1;
    margin-bottom: 2.25rem;
}

/* Closing brand watermark, sitting behind the copyright row. Faint by
   design (var(--text) at a theme-driven opacity), with the top edge masked
   to transparent so it fades upward. It rises and fades in as it scrolls
   into view via a view()-timeline animation. */
.footer-wordmark {
    grid-area: 1 / 1;
    align-self: end;
    z-index: 0;
    max-width: var(--column-width);
    width: 90%;
    margin: 0 auto -0.12em;
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: clamp(5rem, 24vw, 18rem);
    line-height: 0.8;
    letter-spacing: -0.04em;
    text-align: center;
    text-transform: uppercase;
    color: var(--text);
    opacity: var(--wordmark-opacity);
    white-space: nowrap;
    user-select: none;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to top, #000 34%, transparent 98%);
    mask-image: linear-gradient(to top, #000 34%, transparent 98%);
    animation: wordmark-rise linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
}

@keyframes wordmark-rise {
    from { opacity: 0; transform: translateY(70px); }
    to   { opacity: var(--wordmark-opacity); transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .footer-wordmark {
        animation: none;
        opacity: var(--wordmark-opacity);
        transform: none;
    }
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: space-between;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (min-width: 640px) {
    .footer-inner {
        flex-direction: row;
        align-items: center;
    }
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    transition: color 0.2s ease;
}

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

/* ==========================================================================
   PRELOADER SYSTEM
   ========================================================================== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.8s var(--ease-out-expo), visibility 0.8s var(--ease-out-expo);
}

.preloader-content {
    text-align: left;
    max-width: 380px;
    width: 90%;
}

.preloader-title {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: var(--text);
    margin-bottom: 2rem;
    display: inline-block;
    border-right: 2px solid var(--text);
    animation: typing-blink 0.8s infinite step-end;
}

@keyframes typing-blink {
    from, to { border-color: transparent }
    50% { border-color: var(--text); }
}

.progress-bar-container {
    width: 100%;
    height: 2px;
    background-color: var(--border);
    margin-bottom: 1rem;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background-color: var(--accent);
    transition: width 0.15s cubic-bezier(0.1, 0.8, 0.1, 1);
}

.preloader-status-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.loading-label {
    color: var(--text-muted);
    text-transform: uppercase;
}

.progress-text {
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

body.loading-active {
    overflow: hidden !important;
    height: 100vh !important;
}


/* ==========================================================================
   RESPONSIVE MOBILE FIXES
   ========================================================================== */

/* Medium screens — reduce nav gap */
@media (max-width: 1024px) {
    .main-nav {
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .main-nav {
        gap: 0.75rem;
    }

    /* Hide text nav links on mobile, keep controls */
    .nav-link {
        display: none;
    }

    .cmdk-trigger {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        width: 95%;
    }

    .logo {
        font-size: 1.2rem;
    }
}

/* ==========================================================================
   CREATURE FIELD — page-wide ambient background
   ========================================================================== */
:root {
    --ease-apple-out: cubic-bezier(0.25, 1, 0.5, 1);
    /* Jellyfish colour: a light pink on the dark canvas. */
    --creature: #ffb3d1;
    --creature-strength: 1;
}

/* Pink on pale paper has far less contrast than pink on black, so the light
   theme uses a much deeper rose and draws it at well over double the
   opacity. */
html.theme-light {
    --creature: #a3195b;
    --creature-strength: 2.4;
}

/* One fixed canvas behind all content: jellyfish built from pixel cells and
   keyboard characters drift across it (initCreatureField). It is texture,
   not a control — it never takes pointer events and keeps its own pace
   regardless of scroll. */
.creature-field {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

/* ==========================================================================
   SVG CAT MASCOT STYLING
   ========================================================================== */
.cat {
    position: absolute;
    width: 54px;
    z-index: 2;
    cursor: grab;
    touch-action: none;
    opacity: 0;
    transform: scale(0.7) translateY(6px);
    animation: cat-entrance 0.6s 0.8s var(--ease-out-expo) forwards;
}

/* Fade-in entrance after page loads */
@keyframes cat-entrance {
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.cat.is-dragging {
    cursor: grabbing;
    z-index: 80;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
    transform: scale(1.08);
    transition: transform 0.15s var(--ease-out-expo), filter 0.15s ease;
}

.cat--hero {
    width: 60px;
    right: 10px;
    bottom: 10px;
}

/* Once the cursor moves, initJellyMascot moves the mascot to <body> and
   swims it after the pointer, setting left/top every frame. It floats over
   the page content but under the header and the command menu. */
.cat.cat--free {
    position: fixed;
    right: auto;
    bottom: auto;
    z-index: 40;
}

/* On touch screens it roams over the content and can't be dragged, so it
   must never catch a tap or block a scroll that starts on top of it. */
@media (pointer: coarse) {
    .cat.cat--free {
        pointer-events: none;
    }
}

/* On small screens the jellyfish stays — smaller and tucked into the corner.
   Touch devices get the sleeping/breathing idle only (pointer tracking is
   gated on fine pointers in JS), which is exactly the right energy there. */
@media (max-width: 768px) {
    .cat {
        width: 52px;
    }
    .cat--hero {
        right: 8px;
        bottom: 8px;
    }
}

/* ── CAT AURA GLOW ──────────────────────────────────────────────────────────
   A soft proximity ring that pulses around the cat as you approach.
   JS sets --cat-aura-opacity (0→1) and --cat-aura-scale (0.6→1) based
   on how close the cursor is.
   ─────────────────────────────────────────────────────────────────────── */
.cat__aura {
    position: absolute;
    /* Center the aura over the cat body */
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    /* Warm, creamy glow in dark mode */
    background: radial-gradient(
        circle,
        rgba(247, 235, 210, 0.28) 0%,
        rgba(247, 235, 210, 0.10) 50%,
        transparent 72%
    );
    pointer-events: none;
    z-index: 0;
    opacity: var(--cat-aura-opacity, 0);
    transform: scale(var(--cat-aura-scale, 0.6));
    transition: opacity 0.35s ease, transform 0.35s var(--ease-out-expo);
    animation: cat-aura-pulse 2.8s ease-in-out infinite;
}

/* Heartbeat glow — scale breathes subtly */
@keyframes cat-aura-pulse {
    0%, 100% { box-shadow: 0 0 0 0px rgba(247, 235, 210, 0); }
    50%       { box-shadow: 0 0 0 8px rgba(247, 235, 210, 0.07); }
}

/* While dragging: aura expands and turns peach-pink */
.cat.is-dragging .cat__aura {
    background: radial-gradient(
        circle,
        rgba(255, 200, 160, 0.35) 0%,
        rgba(255, 200, 160, 0.12) 50%,
        transparent 72%
    );
    width: 110px;
    height: 110px;
    animation: cat-aura-drag 0.6s ease-in-out infinite alternate;
}

@keyframes cat-aura-drag {
    from { opacity: 0.7; transform: scale(1); }
    to   { opacity: 1;   transform: scale(1.08); }
}



/* The jellyfish is painted on this canvas (initJellyMascot). It is much
   larger than the mascot's hit box and centred on it, so the tentacles can
   trail in any direction; it never takes pointer events itself. */
.cat__canvas {
    position: absolute;
    top: 45%;
    left: 50%;
    width: 280px;
    height: 280px;
    translate: -50% -50%;
    pointer-events: none;
}

.cat__svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2))
            drop-shadow(0 0 1px rgba(0, 0, 0, 0.35));
    transition: filter 0.3s ease;
}

.cat:hover .cat__svg {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.28))
            drop-shadow(0 0 1px rgba(0, 0, 0, 0.4));
}

.cat__svg * {
    transform-box: view-box;
}

.cat__heart {
    transform-origin: 24px 7px;
    opacity: 0;
    transform: scale(0);
}

/* ── HAPPY ──────────────────────────────────────── */
.cat.is-happy .cat__heart {
    animation: cat-heart 1s ease-out forwards;
}

/* ── KEYFRAMES ──────────────────────────────────── */

/* Heart pops up and floats away */
@keyframes cat-heart {
    0% {
        opacity: 0;
        transform: translateY(4px) scale(0) rotate(-10deg);
    }
    20% {
        opacity: 1;
        transform: translateY(-3px) scale(1.2) rotate(5deg);
    }
    55% {
        opacity: 1;
        transform: translateY(-8px) scale(1) rotate(-3deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-18px) scale(0.85) rotate(4deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cat__heart {
        animation: none !important;
    }
    .cat {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

/* ==========================================================================
   COMMAND PALETTE (CMDK) STYLING
   ========================================================================== */

/* Backdrop overlay */
.cmdk-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.2s var(--ease-out-expo);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 1rem 1rem;
    pointer-events: auto;
}

.cmdk-backdrop.open {
    opacity: 1;
}

.cmdk-panel {
    width: 100%;
    max-width: 40rem;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    /* Same corner system as every other surface on the page */
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 30px 70px var(--shadow);
    transform: translateY(-12px) scale(0.98);
    opacity: 0;
    transition: transform 0.25s var(--ease-out-expo), opacity 0.25s var(--ease-out-expo);
    display: flex;
    flex-direction: column;
    max-height: 66vh;
}

.cmdk-backdrop.open .cmdk-panel {
    transform: none;
    opacity: 1;
}

/* Search input bar */
.cmdk-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--panel-border);
}

.cmdk-search svg {
    width: 1.1rem;
    height: 1.1rem;
    flex: none;
    color: var(--text-muted);
}

.cmdk-search input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    color: var(--text);
}

.cmdk-search input::placeholder {
    color: var(--text-muted);
}

.cmdk-search .cmdk-esc {
    font-family: 'Manrope', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    border: 1px solid var(--panel-border);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

/* Results list */
.cmdk-results {
    overflow-y: auto;
    padding: 0.5rem;
}

.cmdk-group-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.75rem 0.75rem 0.35rem;
}

.cmdk-item {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 6px;
    transition: background-color 0.15s var(--ease-out-expo);
}

.cmdk-item[aria-selected="true"] {
    background: var(--panel-hover);
    border-color: var(--panel-border);
}

.cmdk-item-title {
    font-family: 'Manrope', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cmdk-item-desc {
    font-family: 'Manrope', sans-serif;
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.cmdk-item-ext {
    font-size: 0.7rem;
    color: var(--text-muted);
    flex: none;
}

.cmdk-empty {
    padding: 3rem 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==========================================================================
   VIEWS COUNTER
   ========================================================================== */
.nav-views {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
}

.nav-views .eye-icon {
    width: 0.85rem;
    height: 0.85rem;
    flex: none;
    color: inherit;
    stroke-width: 2.2;
}

/* Restore cursor: text on the CMDK search input (global cursor:none kills it) */
.cmdk-search input {
    cursor: text;
}
