/* ==========================================================================
   Siam.Dev — Premium Portfolio
   Architecture: tokens -> base -> layout -> components -> utilities
   No frameworks. Pure CSS3.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS (reused everywhere via CSS variables)
   -------------------------------------------------------------------------- */
:root {
    /* Surfaces */
    --bg: #080F14;            /* page background */
    --surface: #0D181F;       /* cards / panels */
    --surface-2: #112027;     /* raised surfaces, tracks, nav buttons */
    --surface-glass: rgba(8, 15, 20, 0.9);

    /* Text */
    --text: #FFFFFF;          /* primary text (white) */
    --text-muted: #94A3B8;    /* secondary text (slate-400) */
    --text-faint: #64748B;    /* captions / placeholder */

    /* Lines */
    --border: rgba(148, 163, 184, 0.15);
    --border-soft: rgba(148, 163, 184, 0.10);

    /* Brand accent (teal) */
    --accent: #00E5B7;
    --accent-hover: #2EEBC6;  /* slightly brighter teal */
    --accent-light: #A7F3D0;  /* light accent teal */
    --accent-glow: rgba(0, 229, 183, 0.35);
    --accent-soft: rgba(0, 229, 183, 0.10);
    --accent-mid: rgba(0, 229, 183, 0.18);
    --accent-border: rgba(0, 229, 183, 0.35);
    --accent-border-strong: rgba(0, 229, 183, 0.60);
    --on-accent: #080F14;     /* text on teal fills (dark text on bright teal) */
    --ghost-text: #FFFFFF;    /* secondary / outline button text */

    /* Status */
    --success: #22c55e;
    --danger: #ef4444;
    --live: #4ade80;

    /* Shape */
    --radius: 12px;
    --radius-sm: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 999px;

    /* Shadows */
    --shadow-card: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
    --shadow-lift: 0 24px 48px -16px rgba(0, 0, 0, 0.75);
    --glow: 0 0 40px -10px var(--accent-glow);

    /* Type */
    --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    /* Layout */
    --container: clamp(1200px, 86vw, 1560px);
    --gutter: 24px;
    --nav-h: 76px;

    /* Motion */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --dur: 0.22s;

    /* Themed auxiliaries (dark defaults — light theme overrides them below) */
    --alt-bg: #0B141A;                 /* alternate section band */
    --footer-bg: #080F14;              /* footer surface */
    --grid-line: rgba(255, 255, 255, 0.035);  /* hero grid strokes */
    --hero-wash: rgba(0, 229, 183, 0.12);     /* hero radial wash */
    --hover-bg: rgba(255, 255, 255, 0.04);    /* subtle hover fill */
    --tag-bg: rgba(255, 255, 255, 0.05);      /* tech tag fill */
    --code-bg: #0D181F;                /* browser mock + form inputs */
    --code-bg-2: #13222A;              /* browser bar + tiles */
    --code-line: #22303B;              /* skeleton lines + placeholder dots */
    --thumb-grad: linear-gradient(135deg, #0E1B23, #0D181F); /* product thumb */
    --badge-bg: rgba(8, 15, 20, 0.72);         /* project category chip */
    --scroll-thumb: #22303B;           /* scrollbar thumb */
    --danger-text: #f87171;            /* form error text (light red on dark) */
    --photo-bg: radial-gradient(120% 90% at 30% 5%, rgba(0, 229, 183, 0.16), transparent 55%), #0D181F; /* hero photo backdrop */
}

/* --------------------------------------------------------------------------
   1b. LIGHT THEME — same tokens, light palette.
       Applied by setting data-theme="light" on <html>.
   -------------------------------------------------------------------------- */
:root[data-theme="light"] {
    --bg: #F8FAFC;                    /* cool off-white page */
    --surface: #ffffff;               /* white cards */
    --surface-2: #EEF2F7;             /* tracks / raised surfaces */
    --surface-glass: rgba(255, 255, 255, 0.88);

    --text: #0F172A;                  /* slate-900 text */
    --text-muted: #64748B;            /* slate-500 secondary */
    --text-faint: #94A3B8;            /* captions / placeholders */

    --border: #E2E8F0;
    --border-soft: #F1F5F9;

    --accent: #00A88A;
    --accent-hover: #008F78;
    --accent-light: #008F78;          /* accent text — darker for contrast on white */
    --accent-glow: rgba(0, 168, 138, 0.22);
    --accent-soft: rgba(0, 168, 138, 0.09);
    --accent-mid: rgba(0, 168, 138, 0.13);
    --accent-border: rgba(0, 168, 138, 0.25);
    --accent-border-strong: rgba(0, 168, 138, 0.45);
    --on-accent: #FFFFFF;             /* text on teal fills (white on teal) */
    --ghost-text: #008F78;            /* secondary / outline button text (teal) */

    /* softer shadows for the light surface */
    --shadow-card: 0 10px 30px -14px rgba(15, 23, 42, 0.14);
    --shadow-lift: 0 24px 48px -24px rgba(15, 23, 42, 0.22);

    --alt-bg: #ffffff;
    --footer-bg: #ffffff;
    --grid-line: rgba(15, 23, 42, 0.055);
    --hero-wash: rgba(0, 168, 138, 0.07);
    --hover-bg: rgba(0, 0, 0, 0.04);
    --tag-bg: rgba(15, 23, 42, 0.055);
    --code-bg: #ffffff;
    --code-bg-2: #F1F5F9;
    --code-line: #E2E8F0;
    --thumb-grad: linear-gradient(135deg, #DEE5EE, #F1F5F9);
    --badge-bg: rgba(15, 23, 42, 0.72);  /* dark chip stays legible on light */
    --scroll-thumb: #CBD5E1;
    --danger-text: #dc2626;
    --photo-bg: radial-gradient(120% 90% at 30% 5%, rgba(0, 168, 138, 0.10), transparent 55%), #ffffff;
}

/* --------------------------------------------------------------------------
   1b. RESPONSIVE CONTAINER — LARGE DESKTOPS (≥ 2240px)
   Widens the fluid container further so content doesn't get lost on
   ultra-wide monitors. Kept in sync with the base clamp() above.
   -------------------------------------------------------------------------- */
@media (min-width: 2240px) {
    :root {
        --container: 1760px;
    }
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 8px);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    overflow-x: hidden;
    transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}

/* theme surfaces without their own transitions — cross-fade on switch */
.section-alt,
.site-footer,
.tabs,
.skills-panel,
.contact-info,
.contact-form,
.browser-card,
.browser-bar,
.b-tile,
.browser-dot,
.float-card,
.form-success {
    transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease),
                color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

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

/* keep the hidden attribute authoritative even on grid/flex elements */
[hidden] {
    display: none !important;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

button {
    font: inherit;
    border: 0;
    background: none;
    cursor: pointer;
    color: inherit;
}

input,
select,
textarea {
    font: inherit;
    color: inherit;
}

/* Selection + scrollbar (mockup detail) */
::selection {
    background: var(--accent-border);
    color: var(--on-accent);
}

::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* --------------------------------------------------------------------------
   3. LAYOUT PRIMITIVES
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section {
    position: relative;
    padding: 96px 0;
}

/* subtle alternate band used on alternating sections */
.section-alt {
    background: var(--alt-bg);
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
}

/* Section headers */
.section-head {
    max-width: 640px;
    margin-bottom: 56px;
}

.section-head .section-sub {
    margin-top: 14px;
}

.section-title {
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.section-sub {
    color: var(--text-muted);
    font-size: 1.02rem;
}

/* Eyebrow labels (uppercase, wide tracking) */
.eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

/* --------------------------------------------------------------------------
   4. UI COMPONENTS
   -------------------------------------------------------------------------- */

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 0.925rem;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-sm);
    padding: 13px 22px;
    transition: background-color var(--dur) var(--ease),
                border-color var(--dur) var(--ease),
                color var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease),
                transform var(--dur) var(--ease);
    white-space: nowrap;
}

.btn svg {
    transition: transform var(--dur) var(--ease);
}

.btn:hover svg {
    transform: translateX(3px);
}

.btn-primary {
    background: var(--accent);
    color: var(--on-accent);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: var(--glow);
}

.btn-ghost {
    background: transparent;
    color: var(--ghost-text);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    color: var(--text);
    border-color: var(--accent-border);
    background: var(--hover-bg);
}

.btn-link {
    background: transparent;
    color: var(--text-muted);
    padding-inline: 6px;
}
.btn-link:hover {
    color: var(--accent-light);
}

.btn-lg {
    padding: 16px 26px;
    font-size: 0.98rem;
}
.btn-sm {
    padding: 10px 15px;
    font-size: 0.86rem;
    gap: 7px;
}
.btn-block {
    width: 100%;
}

/* --- Pills & chips --- */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 14px;
    border: 1px solid var(--accent-border);
    background: var(--accent-soft);
    color: var(--accent-light);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--live);
    position: relative;
}
.pulse-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--live);
    animation: ping 1.6s var(--ease) infinite;
}

/* --- Brand --- */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    justify-self: start;
}
.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: var(--on-accent);
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent-light), var(--accent-hover));
    box-shadow: 0 4px 14px -6px var(--accent-glow);
}
.brand-name {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}
.brand-name em {
    font-style: normal;
    color: var(--accent);
}
.brand-name small {
    font-size: 0.72em;
    font-weight: 500;
    color: var(--text-muted);
}

/* --- Gradient text --- */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 55%, var(--accent-hover) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* --------------------------------------------------------------------------
   5. SCROLL REVEAL
   -------------------------------------------------------------------------- */
/* Only animate when JS is present, so content is never hidden without JS. */
html.js .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    transition-delay: var(--d, 0s);
    will-change: opacity, transform;
}

html.js .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

html.js .reveal.is-visible:hover {
    transform: translateY(-3px);
    transition-delay: 0s;
}

/* --------------------------------------------------------------------------
   6. NAVBAR
   -------------------------------------------------------------------------- */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    /* above everything incl. the mobile menu overlay so the slide-in
       drawer (a child of this context) paints on top of it */
    z-index: 100;
    transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

/* glass effect after scroll */
.site-header.scrolled {
    background: var(--surface-glass);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 8px 24px -16px rgba(0, 0, 0, 0.7);
}

.navbar {
    height: var(--nav-h);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
}

/* right-side cluster (Let's Talk + theme switch + hamburger) stays grouped */
.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-self: end;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* drawer-only: link icons are hidden on desktop */
.nav-link svg {
    display: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-self: center;
}

.nav-link {
    position: relative;
    display: inline-block;
    padding: 8px 13px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: 8px;
    transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    right: 50%;
    bottom: 5px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    opacity: 0;
    transition: left var(--dur) var(--ease), right var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-link:hover {
    color: var(--accent);
    background: var(--hover-bg);
}
.nav-link:hover::after {
    left: 12px;
    right: 12px;
    opacity: 1;
}
.nav-link.active,
.nav-link.active:hover {
    color: var(--accent);
    background: var(--accent-soft);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    align-items: center;
    justify-content: center;
}
.nav-toggle .icon-close {
    display: none;
}
.nav-toggle[aria-expanded="true"] .icon-menu {
    display: none;
}
.nav-toggle[aria-expanded="true"] .icon-close {
    display: block;
}

/* --- theme switcher --- */
.theme-toggle {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent-border);
    box-shadow: var(--glow);
}
.theme-toggle .icon-sun {
    display: none;
}
.theme-toggle .icon-moon {
    display: block;
}
:root[data-theme="light"] .theme-toggle .icon-sun {
    display: block;
}
:root[data-theme="light"] .theme-toggle .icon-moon {
    display: none;
}

/* --- mobile drawer extras (hidden on desktop) --- */
.nav-drawer-head {
    display: none;
}
.menu-overlay {
    display: none;
}

/* --------------------------------------------------------------------------
   7. HERO
   -------------------------------------------------------------------------- */
.hero {
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-h) + 56px) 0 72px;
    overflow: hidden;
}

/* background stack: radial wash + grid + blurred orbs */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
.hero-radial {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, var(--hero-wash), transparent 68%);
}
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse 80% 72% at 50% 0%, #000 28%, transparent 78%);
    mask-image: radial-gradient(ellipse 80% 72% at 50% 0%, #000 28%, transparent 78%);
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.5;
}
.orb-1 {
    width: 420px;
    height: 420px;
    top: -80px;
    left: -120px;
    background: var(--accent-mid);
}
.orb-2 {
    width: 360px;
    height: 360px;
    top: 30%;
    right: -140px;
    background: var(--accent-soft);
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 108px;
    align-items: center;
}

.hero-content .pill {
    margin-bottom: 28px;
}

.hero-title {
    font-size: clamp(2.5rem, 5.4vw, 4.25rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.06;
    margin-bottom: 22px;
}

/* --- Rotating role typewriter --- */
.type-line {
    display: flex;
    align-items: baseline;
    font-size: clamp(1.3rem, 3.4vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    min-height: 1.3em;               /* avoid layout shift while typing */
    margin-bottom: 22px;
}
.type-role {
    white-space: nowrap;
}
.type-caret {
    display: inline-block;
    width: 3px;
    height: 0.85em;
    margin-left: 4px;
    align-self: center;
    border-radius: 2px;
    background: var(--accent);
    animation: caret-blink 0.9s steps(2, start) infinite;
}
@keyframes caret-blink {
    50% {
        opacity: 0;
    }
}

/* --- Screen-reader-only utility --- */
.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;
}

.hero-sub {
    max-width: 540px;
    color: var(--text-muted);
    font-size: 1.08rem;
    line-height: 1.7;
    margin-bottom: 34px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

/* Stats row (bordered divider like mockup) */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    padding-top: 26px;
    border-top: 1px solid var(--border-soft);
}
.stat-value {
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}
.stat-value--accent {
    color: var(--accent);
}
.stat-label {
    margin-top: 4px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* --- Decorative visual (frame box doubles as the card anchor) --- */
.hero-visual {
    position: relative;
    width: min(100%, 400px);
    margin-inline: auto;
    padding: 0;
}

/* --- banner photo in a rounded glass frame (portrait centered) --- */
.hero-photo {
    position: relative;
    z-index: 1;
    width: min(100%, 400px);
    margin-inline: auto;
    border: 1px solid var(--accent-border-strong);
    border-radius: var(--radius-xl);
    line-height: 0;
    background: var(--photo-bg);
    box-shadow: var(--shadow-lift), var(--glow);
}
.hero-photo img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center top;
    border-radius: calc(var(--radius-xl) - 1px);
}
.hero-photo::before {
    content: "";
    position: absolute;
    inset: -14px;
    border-radius: calc(var(--radius-xl) + 14px);
    border: 1px solid var(--accent-border);
    background: var(--surface-glass);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: 0 0 70px -18px var(--accent-glow);
    z-index: -1;
}
.hero-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, transparent 55%, var(--accent-mid));
    pointer-events: none;
}

/* --- concentric orbit rings + glowing particles behind the portrait --- */
.hero-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    aspect-ratio: 1 / 1;
    transform: translate(-50%, -50%);
    z-index: -1;
    pointer-events: none;
}
.orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    aspect-ratio: 1 / 1;
    margin-left: -75%;
    margin-top: -75%;
    border-radius: 50%;
    border: 1px solid var(--accent-border);
    opacity: 0.5;
    animation: orbit-rot 28s linear infinite;
}
.orbit-ring--o2 {
    width: 135%;
    margin-left: -67.5%;
    margin-top: -67.5%;
    opacity: 0.42;
    animation-duration: 22s;
    animation-direction: reverse;
}
.orbit-ring--m {
    width: 118%;
    margin-left: -59%;
    margin-top: -59%;
    border-style: dashed;
    opacity: 0.32;
    animation-duration: 16s;
}
.orbit-ring--i {
    width: 96%;
    margin-left: -48%;
    margin-top: -48%;
    border-color: var(--accent-border-strong);
    opacity: 0.5;
    animation-duration: 12s;
    animation-direction: reverse;
}
@keyframes orbit-rot {
    to {
        transform: rotate(360deg);
    }
}
/* orbiting glow particles — all track the two outer rings so they
   travel around the portrait, not across it */
.orbit-p {
    position: absolute;
    top: -3px;
    left: 50%;
    width: 6px;
    height: 6px;
    margin-left: -3px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px 2px var(--accent-glow);
}
.orbit-p--opp {
    top: auto;
    bottom: -3px;
}
.orbit-p--big {
    width: 8px;
    height: 8px;
    margin-left: -4px;
    top: -4px;
}
.orbit-p--left {
    top: 50%;
    left: -3px;
    margin-left: 0;
    margin-top: -3px;
}
.orbit-p--right {
    top: 50%;
    left: auto;
    right: -3px;
    margin-left: 0;
    margin-top: -3px;
}

/* --- live "signal" dot on the photo corner --- */
.hero-signal {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--live);
    box-shadow: 0 0 9px var(--live);
    z-index: 2;
    pointer-events: none;
}
.hero-signal::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1px solid var(--live);
    animation: ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/*
   6c. NATIVE CUSTOM POINTER (neon cyan/teal arrow + pointing hand)
   Pure CSS — no JS cursor layer, so it can never block clicks/scrolling/text.
   Default state: standard arrow (tip hotspot 6 5). Interactive state: upright
   pointing hand PNG (fingertip hotspot 13 0). Both 0deg, teal/cyan — no
   rotation is ever applied; the artwork itself is oriented correctly.
   Editable text keeps the native I-beam. Touch/coarse/hover-less devices
   keep their normal interaction (media query off -> fallback keywords).
   -------------------------------------------------------------------------- */
@media (pointer: fine) and (hover: hover) {
    html {
        cursor: url("/public/cursor/neon-arrow.svg") 6 5,
                url("/public/cursor/neon-arrow.png") 6 5,
                auto;
    }

    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
    textarea,
    [contenteditable] {
        cursor: text;
    }

    a,
    button,
    [role="button"],
    [href],
    select,
    summary,
    input[type="submit"],
    input[type="button"],
    input[type="reset"],
    .btn,
    .tab-btn,
    .chip,
    .nav-link,
    input[type="checkbox"],
    input[type="radio"],
    input[type="range"],
    input[type="color"],
    [data-cursor],
    .clickable {
        cursor: url("/public/cursor/neon-hand.png") 13 0,
                pointer;
    }
}

/* 6d. SMOOTH NEON CURSOR OVERLAY (progressive enhancement over 6c above)
   Only active when js/script.js adds html.neon-cursor-on (fine-pointer +
   hover, motion not reduced). A single pure-visual layer (pointer-events:
   none, z-index 9999) holds the same teal arrow/hand PNGs and cross-fades
   them (180ms opacity) so the arrow -> hand swap is smooth. The native
   cursor is hidden only under html.neon-cursor-on; text fields keep the
   I-beam and the layer fades out over them. No JS / reduced-motion /
   coarse-touch -> the static 6c cursors remain untouched.
   ---------------------------------------------------------------------- */
.neon-cursor {
    position: fixed;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 9999;
    will-change: transform;
}

.neon-cursor__arrow,
.neon-cursor__hand {
    position: absolute;
    width: 32px;
    height: 32px;
    background-repeat: no-repeat;
    background-size: 32px 32px;
    transition: opacity 0.18s ease-out;
    will-change: opacity;
}

.neon-cursor__arrow {
    background-image: url("/public/cursor/neon-arrow.png");
    transform: translate(-6px, -5px);
}

.neon-cursor__hand {
    background-image: url("/public/cursor/neon-hand.png");
    transform: translate(-13px, 0);
    opacity: 0;
}

html.neon-cursor-on .neon-cursor.is-hand .neon-cursor__hand {
    opacity: 1;
}

html.neon-cursor-on .neon-cursor.is-hand .neon-cursor__arrow {
    opacity: 0;
}

html.neon-cursor-on,
html.neon-cursor-on * {
    cursor: none !important;
}

html.neon-cursor-on input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
html.neon-cursor-on textarea,
html.neon-cursor-on [contenteditable] {
    cursor: text !important;
}

html.neon-cursor-on .neon-cursor.is-text {
    opacity: 0;
}

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

/* 6e. INTERACTIVE BACKGROUND PARTICLES (canvas layer behind all content)
   Pure visual layer — z-index -1 keeps it above the page background but
   below every section/card; pointer-events: none means it never blocks
   clicks or scrolling. Disabled for reduced-motion and touch/coarse.
   -------------------------------------------------------------------------- */
#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}
@media (prefers-reduced-motion: reduce) {
    #bg-canvas {
        display: none;
    }
}
@media (pointer: coarse) {
    #bg-canvas {
        display: none;
    }
}

@media (max-width: 640px) {
    .hero-orbit {
        width: calc(100% * 1.15);
    }
}

.browser-card {
    position: relative;
    z-index: 1;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--code-bg);
    overflow: hidden;
    box-shadow: var(--shadow-lift), var(--glow);
}
.browser-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 13px 16px;
    background: var(--code-bg-2);
    border-bottom: 1px solid var(--border-soft);
}
.browser-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.browser-dot--r { background: #ff5f57; }
.browser-dot--y { background: #febc2e; }
.browser-dot--g { background: #28c840; }

.browser-body {
    padding: 18px 18px 20px;
}
.browser-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.browser-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--accent-light);
}
.browser-title {
    font-weight: 600;
    font-size: 0.92rem;
}

.browser-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.b-tile {
    background: var(--code-bg-2);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 10px;
}
.tile-thumb {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 7px;
    margin-bottom: 9px;
    background: var(--thumb-grad);
}
.tile-line {
    display: block;
    height: 7px;
    width: 78%;
    border-radius: 4px;
    background: var(--code-line);
    margin-bottom: 6px;
}
.tile-line.short {
    width: 52%;
    margin-bottom: 0;
}

.browser-btn {
    text-align: center;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 11px;
    border-radius: 9px;
    color: var(--on-accent);
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
}

/* floating role cards */
.float-card {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 16px;
    border-radius: var(--radius);
    background: var(--surface-glass);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    animation: float 6s ease-in-out infinite alternate;
}
.float-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--accent-light);
}
.float-body { display: flex; flex-direction: column; gap: 2px; }
.float-title { font-size: 0.82rem; font-weight: 700; line-height: 1.3; color: var(--text); }
.float-sub  { font-size: 0.7rem; font-weight: 500; color: var(--text-muted); }
.float-card--shopify { top: 40%; left: -140px; animation-delay: -2s; }
.float-card--frontend { bottom: 8%; left: -134px; animation-delay: -4s; }
.float-card--mern {
    top: -6%;
    right: -92px;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    animation-delay: -1s;
}
.mern-icons { display: flex; align-items: center; gap: 8px; }
.mern-icons svg { flex-shrink: 0; }
.ic-mongo   { color: #47a248; }
.ic-express { color: var(--text-muted); }
.ic-react   { color: #61dafb; }
.ic-node    { color: #8bc149; }

.hero-note {
    position: absolute;
    right: 4%;
    bottom: -58px;
    z-index: 3;
    margin: 0;
    font-family: inherit;
    font-size: 0.78rem;
    font-style: italic;
    font-weight: 600;
    line-height: 1.35;
    color: var(--accent);
    text-align: right;
    white-space: pre-line;
    transform: rotate(-3deg);
    pointer-events: none;
}
.hero-note-underline {
    display: block;
    width: 150px;
    height: 10px;
    margin: -2px 0 0 auto;
    color: var(--accent);
    opacity: 0.8;
}

/* light mode: same composition, only boosted visibility for the rings */
:root[data-theme="light"] .orbit-ring { opacity: 0.7; }
:root[data-theme="light"] .orbit-ring--o2 { opacity: 0.6; }
:root[data-theme="light"] .orbit-ring--m { opacity: 0.5; }
:root[data-theme="light"] .orbit-ring--i { opacity: 0.7; }

/* --------------------------------------------------------------------------
   8. ABOUT
   -------------------------------------------------------------------------- */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 64px;
    align-items: start;
}

.about-copy .lead {
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 18px;
}
.about-copy > p:not(.eyebrow):not(.lead) {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 26px;
}

.skill-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}
.skill-pills li {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.skill-pills li:hover {
    border-color: var(--accent-border);
    color: var(--accent-light);
}

/* skills panel (folded-in Skills section) */
.skills-panel {
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}
.skills-heading {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 24px;
}

.skill-bars {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.skill-bar-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}
.skill-bar-name {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
}
.skill-bar-pct {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-light);
    font-family: var(--font-mono);
}
.skill-bar-track {
    height: 7px;
    border-radius: var(--radius-full);
    background: var(--surface-2);
    overflow: hidden;
}
.skill-bar-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    transition: width 1.1s var(--ease);
}

/* --------------------------------------------------------------------------
   9. SERVICES
   -------------------------------------------------------------------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.service-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    transition: transform var(--dur) var(--ease),
                border-color var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease),
                background-color 0.35s var(--ease), color 0.35s var(--ease);
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-border);
    box-shadow: var(--shadow-lift), var(--glow);
}

.service-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent-light);
    transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.service-card:hover .service-icon {
    background: var(--accent);
    color: var(--on-accent);
    transform: scale(1.05);
}

.service-title {
    font-size: 1.12rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.service-desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

/* wide variant (mobile app) spanning the full row */
.service-card--wide {
    display: flex;
    flex-direction: row;
    align-items: center;
    grid-column: 1 / -1;
}
.service-wide-body {
    flex: 1;
}
.service-wide-body .service-desc {
    margin-top: 6px;
}

/* full-width CTA banner */
.cta-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    grid-column: 1 / -1;
    padding: 30px 32px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--accent-mid), transparent);
    border: 1px solid var(--accent-border);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.cta-banner:hover {
    border-color: var(--accent-border-strong);
    box-shadow: 0 0 60px -24px var(--accent-glow);
    transform: translateY(-3px);
}
.cta-banner-title {
    font-size: 1.18rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.cta-banner-text {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* --------------------------------------------------------------------------
   9b. SKILLS — Technologies & Tools
   Cards render from the `skills` array in script.js into `.skills-grid`.
   Progress tracks reuse the About skill-bar-fill animation pattern.
   -------------------------------------------------------------------------- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.skill-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(13, 24, 31, 0.78);
    box-shadow: var(--shadow-card);
    transition: transform var(--dur) var(--ease),
                border-color var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease),
                background-color 0.35s var(--ease);
}

/* featured skills (React, Shopify): subtle teal accent */
.skill-card--featured {
    border-color: var(--accent-border);
    box-shadow: inset 0 0 0 1px var(--accent-soft), var(--shadow-card);
}

.skill-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.skill-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--text);
    transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.skill-icon svg {
    width: 24px;
    height: 24px;
}

.skill-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.skill-pct {
    flex: 0 0 auto;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
}

.skill-card .skill-bar-track {
    margin-top: auto;
    flex-shrink: 0;
    height: 6px;
    background: rgba(148, 163, 184, 0.15);
}
.skill-card .skill-bar-fill {
    background: var(--accent);
}

.skill-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-border);
    box-shadow: var(--shadow-lift), 0 0 24px -12px var(--accent-glow);
}
.skill-card:hover .skill-icon {
    background: rgba(255, 255, 255, 0.06);
    transform: scale(1.05);
}

/* light theme: white cards, softer borders, teal pct for contrast */
:root[data-theme="light"] .skill-card {
    background: #ffffff;
    box-shadow: var(--shadow-card);
}
:root[data-theme="light"] .skill-card--featured {
    border-color: var(--accent-border);
    box-shadow: inset 0 0 0 1px var(--accent-soft), var(--shadow-card);
}
:root[data-theme="light"] .skill-card .skill-bar-track {
    background: #E2E8F0;
}
:root[data-theme="light"] .skill-card:hover .skill-icon {
    background: rgba(15, 23, 42, 0.06);
}
:root[data-theme="light"] .skill-pct {
    color: var(--accent-light);
}

@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 767px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   10. PORTFOLIO
   -------------------------------------------------------------------------- */

/* segmented tabs */
.tabs {
    display: inline-flex;
    padding: 5px;
    gap: 4px;
    border-radius: var(--radius-full);
    background: var(--surface);
    border: 1px solid var(--border);
    margin-bottom: 36px;
}
.tab-btn {
    padding: 9px 20px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-full);
    transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.tab-btn:hover {
    color: var(--text);
}
.tab-btn.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: var(--on-accent);
    box-shadow: 0 4px 14px -6px var(--accent-glow);
}

/* projects section header (title on the left, All Projects action on the right) */
.projects-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.projects-head .section-head {
    margin-bottom: 0;
    margin-right: auto;
}
.projects-all-btn {
    margin-top: 10px;
    align-self: flex-start;
    flex-shrink: 0;
}

/* subtle entry animation when a project tab becomes active */
.projects-grid.is-active {
    animation: panel-in 0.3s var(--ease-out) both;
}
@keyframes panel-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* outgoing panel animation (fade + slight drop, used by the tab switch) */
.projects-grid.is-leaving {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

/* height-morph wrapper used while switching project tabs */
.projects-swap {
    position: relative;
    transition: height 0.3s var(--ease-out);
    overflow: visible;
}
.projects-swap.is-swapping {
    overflow: hidden;
}

/* sliding active-tab indicator (teal pill that glides behind the tabs) */
.tabs {
    position: relative;
}
.tab-indicator {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 0;
    width: 48px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    box-shadow: 0 4px 14px -6px var(--accent-glow);
    transition: left 0.3s var(--ease), width 0.3s var(--ease);
    pointer-events: none;
    z-index: 0;
}
.tab-btn {
    position: relative;
    z-index: 1;
}
.tab-btn.active {
    background: transparent;
    box-shadow: none;
    color: var(--on-accent);
}

/* All Projects page hero (compact, reference-inspired header) */
.projects-hero {
    padding: calc(var(--nav-h) + 44px) 0 76px;
    text-align: center;
}
.projects-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(640px 360px at 50% -60px, var(--hero-wash), transparent 70%),
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: auto, 56px 56px, 56px 56px;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 85%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 85%);
    pointer-events: none;
}
.projects-hero .container {
    position: relative;
    z-index: 1;
}
.projects-hero-inner {
    max-width: 840px;
    margin: 0 auto;
}
.projects-hero .section-sub {
    max-width: 660px;
    margin: 18px auto 0;
    font-size: 1.05rem;
}
.projects-hero-title {
    font-size: clamp(2rem, 4.6vw, 3.4rem);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

/* --- All Projects page: scoped refinements (homepage is untouched) --- */

/* project collection: cards breathe in a slightly richer surface */
#collection .project-card {
    border-color: var(--border-soft);
    background: var(--surface-glass);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
#collection .project-card:hover {
    border-color: var(--accent-border);
    background: var(--surface);
    box-shadow: var(--shadow-lift), var(--glow);
}
#collection .project-media {
    border-bottom: 1px solid var(--border-soft);
}

/* filter tabs: a touch more air + teal glow behind the active pill */
body[data-page="projects"] .tabs {
    padding: 6px;
    gap: 5px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    box-shadow: 0 8px 22px -18px rgba(0, 0, 0, 0.4);
}
body[data-page="projects"] .tab-btn {
    padding: 10px 22px;
    font-size: 0.9rem;
}
body[data-page="projects"] .tab-indicator {
    box-shadow: 0 4px 16px -6px var(--accent-glow);
}

@media (max-width: 767px) {
    .projects-hero {
        padding: calc(var(--nav-h) + 26px) 0 56px;
    }
    .projects-hero-title {
        font-size: clamp(1.7rem, 7vw, 2.4rem);
    }
    /* tabs scroll horizontally instead of wrapping so the page never overflows */
    .tabs {
        max-width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .tabs::-webkit-scrollbar {
        display: none;
    }
    .tab-btn {
        flex-shrink: 0;
        white-space: nowrap;
    }
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.project-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
                background-color 0.35s var(--ease), color 0.35s var(--ease);
}
.project-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-border);
    box-shadow: var(--shadow-lift), var(--glow);
}

.project-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--surface-2);
}
.project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}
.project-card:hover .project-media img {
    transform: scale(1.05);
}

.project-cat {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 5px 12px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #fff;
    background: var(--badge-bg);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
}

/* live status badge (positioned opposite corner) */
.project-cat--live {
    left: auto;
    right: 14px;
    color: var(--success);
    border-color: rgba(74, 222, 128, 0.35);
}
.project-cat--live::before {
    content: "";
    width: 6px;
    height: 6px;
    display: inline-block;
    margin-right: 6px;
    vertical-align: 1px;
    border-radius: 50%;
    background: var(--live);
    box-shadow: 0 0 8px var(--live);
}

.project-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px 22px 24px;
}
.project-title {
    font-size: 1.12rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}
.project-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.65;
    min-height: calc(1.65em * 5);
    margin-bottom: 16px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 7px;
    min-height: calc(2 * (0.7rem * 1.5) + 7px + 16px + 4px);
    margin-bottom: 20px;
}
.tags li {
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font-mono);
    padding: 4px 9px;
    border-radius: 6px;
    background: var(--tag-bg);
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
}

.project-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

/* featured (full-width) project card */
.project-card--featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
}
.project-card--featured .project-body {
    padding: 32px 34px;
}
.project-card--featured .project-title {
    font-size: 1.35rem;
    margin-bottom: 10px;
}
.project-card--featured .project-desc {
    font-size: 0.96rem;
    max-width: 540px;
}
.project-card--featured .tags {
    margin-bottom: 24px;
}

/* --------------------------------------------------------------------------
   11. PROCESS
   -------------------------------------------------------------------------- */
.process-timeline {
    position: relative;
    max-width: 760px;
    margin-inline: auto;
}

/* vertical connector line — always present and continuous, softly tinted */
.process-timeline::before {
    content: "";
    position: absolute;
    top: 34px;
    bottom: 34px;
    left: 32px;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-border-strong), var(--accent-soft));
}

/* per-step luminous segment — fades smoothly over the connector near this
   step (and the next) on hover; opacity-only, so it never jumps or snaps */
.process-step::before {
    content: "";
    position: absolute;
    top: 34px;
    bottom: -34px;
    left: 32px;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), var(--accent-hover));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                background-color 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.process-step:last-child::before {
    display: none;
}
.process-step:hover::before,
.process-step:hover + .process-step::before {
    opacity: 0.85;
}

.process-step {
    position: relative;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 26px;
    padding-bottom: 44px;
}
.process-step:last-child {
    padding-bottom: 0;
}

.process-marker {
    position: relative;
    width: 64px;
    height: 64px;
}
.process-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--accent);
    box-shadow: 0 0 0 6px var(--bg), var(--shadow-card);
    transition: border-color 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                background-color 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                color 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.process-step:hover .process-icon {
    border-color: var(--accent-border-strong);
    background: var(--accent-soft);
    box-shadow: 0 0 0 6px var(--bg), 0 0 22px -6px var(--accent-glow);
    transform: scale(1.045);
}
.process-num {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    font-size: 0.62rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--on-accent);
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border-radius: 50%;
    border: 2px solid var(--bg);
}

.process-title {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
    transition: color 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.process-step:hover .process-title {
    color: var(--accent-light);
}
.process-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
    transition: color 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.process-step:hover .process-desc {
    color: var(--text);
}

/* staggered reveal — premium ease-out, one-shot (observer unobserves) */
html.js .process-step.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--d, 0s);
}
html.js .process-step.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
/* cancel the global .reveal -3px hover lift for steps so the luminous
   line segment stays perfectly aligned with the static connector */
html.js .process-step.reveal.is-visible:hover {
    transform: translateY(0);
    transition-delay: 0s;
}

/* per-step stagger: revealStagger() sets --d from a page-wide flat index, so
   late sections all land on 540ms — override with true 60ms-cascade delays */
html.js .process-step.reveal {
    --d: 0ms !important;
}
html.js .process-step.reveal:nth-child(2) {
    --d: 60ms !important;
}
html.js .process-step.reveal:nth-child(3) {
    --d: 120ms !important;
}
html.js .process-step.reveal:nth-child(4) {
    --d: 180ms !important;
}
html.js .process-step.reveal:nth-child(5) {
    --d: 240ms !important;
}

/* --------------------------------------------------------------------------
   13. CONTACT
   -------------------------------------------------------------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 48px;
    align-items: stretch;
}

.contact-info {
    display: flex;
    flex-direction: column;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}
html.js .contact-info.reveal,
html.js .contact-form.reveal {
    transition: background-color 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                color 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.contact-info:hover,
.contact-form:hover {
    border-color: var(--accent-border-strong);
    box-shadow: var(--shadow-card), 0 0 24px -12px var(--accent-glow);
}
/* cancel the global .reveal -3px hover lift so the cards stay steady */
html.js .contact-info.reveal.is-visible:hover,
html.js .contact-form.reveal.is-visible:hover {
    transform: translateY(0);
}
.contact-info-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.contact-info-text {
    color: var(--text-muted);
    font-size: 0.94rem;
    line-height: 1.7;
    margin-bottom: 28px;
}

.contact-rows {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 0;
}
.contact-row {
    display: flex;
    align-items: center;
    gap: 14px;
}
.contact-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 11px;
    background: var(--accent-soft);
    color: var(--accent-light);
}
.contact-row-label {
    display: block;
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    margin-bottom: 2px;
}
.contact-row-value {
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
}
a.contact-row-value:hover {
    color: var(--accent-light);
}

.contact-socials {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 30px;
}
.social-btn {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: color 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                background-color 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.social-btn:hover {
    color: var(--accent-light);
    border-color: var(--accent-border);
    background: var(--accent-soft);
    transform: translateY(-1px);
    box-shadow: 0 0 18px -8px var(--accent-glow);
}

/* --- Form --- */
.contact-form {
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 15px;
    font-size: 0.93rem;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    transition: border-color 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                background-color 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-faint);
}
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2397a3b4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    cursor: url("/public/cursor/neon-hand.png") 13 0,
            pointer;
}
.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-mid), 0 0 18px -6px var(--accent-glow);
}

/* --- Custom Project Type dropdown (combobox) --- */
/* Native select stays the form's real control (validation + submit) but is
   visually hidden under JS; without JS it remains the visible control. */
html.js .project-type__native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
html:not(.js) .project-type__trigger,
html:not(.js) .project-type__list {
    display: none;
}

.project-type {
    position: relative;
}
.project-type__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 13px 15px;
    font: inherit;
    font-size: 0.93rem;
    color: var(--text);
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: url("/public/cursor/neon-hand.png") 13 0,
            pointer;
    text-align: left;
    transition: border-color 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                background-color 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.project-type__value.is-empty {
    color: var(--text-faint);
}
.project-type__trigger svg {
    flex: none;
    width: 16px;
    height: 16px;
    stroke: var(--text-faint);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                stroke 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.project-type__trigger:hover {
    border-color: var(--accent-border);
}
.project-type__trigger:focus-visible,
.project-type__trigger.is-open {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-mid), 0 0 18px -6px var(--accent-glow);
}
.project-type__trigger.is-open svg {
    transform: rotate(180deg);
    stroke: var(--accent-light);
}

.project-type__list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 60;
    margin: 0;
    padding: 6px;
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card), 0 0 24px -12px var(--accent-glow);
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}
.project-type__list.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.project-type__option {
    display: block;
    padding: 10px 13px;
    font-size: 0.93rem;
    line-height: 1.45;
    color: var(--text);
    cursor: url("/public/cursor/neon-hand.png") 13 0,
            pointer;
    text-align: left;
    border-radius: calc(var(--radius-sm) - 2px);
    transition: background-color 0.16s cubic-bezier(0.22, 1, 0.36, 1),
                color 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}
.project-type__option:hover,
.project-type__option.is-active {
    background: var(--accent-soft);
    color: var(--accent-light);
}
.project-type__option.is-selected {
    color: var(--accent-light);
    background: var(--accent-soft);
}
.project-type__option.is-selected::after {
    content: "\2713";
    float: right;
    font-weight: 600;
    color: var(--accent);
}

/* submit — scoped to the contact form so other .btn-primary stay untouched */
#contact-form .btn-primary {
    transition: background-color 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                color 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                filter 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
#contact-form .btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: var(--glow);
}

/* validation states */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
}
.form-group.has-error .project-type__trigger {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
}
.form-error {
    display: block;
    margin-top: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--danger-text);
}

/* Honeypot: invisible to humans, auto-hidden off-screen, never rendered/laid out. */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    border: 0;
    padding: 0;
    margin: 0;
}

.form-success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 16px;
    padding: 13px;
    border-radius: var(--radius-sm);
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: var(--success);
    font-weight: 600;
    font-size: 0.92rem;
}

.form-error-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 16px;
    padding: 13px;
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: var(--danger-text);
    font-weight: 600;
    font-size: 0.92rem;
}

/* --------------------------------------------------------------------------
   14. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
    border-top: 1px solid var(--border-soft);
    padding: 56px 0 0;
    background: var(--footer-bg);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 32px;
    padding-bottom: 40px;
}

.footer-tagline {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}
.footer-nav a {
    padding: 7px 12px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: 8px;
    transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.footer-nav a:hover {
    color: var(--text);
    background: var(--hover-bg);
}

.footer-socials {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.footer-socials a {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.footer-socials a:hover {
    color: var(--accent-light);
    border-color: var(--accent-border);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid var(--border-soft);
    padding: 20px 0;
    text-align: center;
}
.copyright {
    font-size: 0.8rem;
    color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   15. BACK TO TOP
   -------------------------------------------------------------------------- */
.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 40;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-glass);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--text-muted);
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
                color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
                background-color 0.35s var(--ease);
}
.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.back-to-top:hover {
    color: var(--on-accent);
    background: var(--accent);
    box-shadow: var(--glow);
}

/* --------------------------------------------------------------------------
   16. ANIMATIONS
   -------------------------------------------------------------------------- */
@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes float {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-12px);
    }
}

/* --------------------------------------------------------------------------
   17. RESPONSIVE — TABLET (768px – 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .section {
        padding: 76px 0;
    }

    .nav-links {
        gap: 0;
    }
    .nav-link {
        padding: 7px 9px;
        font-size: 0.85rem;
    }
    .nav-right {
        gap: 8px;
    }

    .hero {
        padding-top: calc(var(--nav-h) + 40px);
    }
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 72px;
    }
    .hero-content {
        max-width: 640px;
    }
    .hero-photo::before { inset: -12px; }
    .float-card--shopify { top: 42%; left: -140px; }
    .float-card--frontend { bottom: 5%; left: -130px; }
    .float-card--mern { top: -5%; right: -90px; }
    .hero-note { bottom: -54px; }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

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

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

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 28px;
    }
    .footer-socials {
        justify-content: center;
    }
}

/* --------------------------------------------------------------------------
   18. RESPONSIVE — MOBILE (≤ 767px)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
    :root {
        --gutter: 20px;
        --nav-h: 68px;
    }

    .section {
        padding: 64px 0;
    }
    .section-head {
        margin-bottom: 40px;
    }

    /* navigation drawer moved to its own ≤900px media block below */

    /* --- hero --- */
    .hero {
        padding: calc(var(--nav-h) + 40px) 0 56px;
    }
    .hero-title {
        font-size: clamp(2.1rem, 9vw, 3rem);
    }
    .hero-sub {
        font-size: 1rem;
    }
    .hero-actions .btn {
        width: 100%;
    }
    .hero-actions {
        gap: 12px;
    }
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }

    .hero-visual {
        padding: 20px 4px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 14px;
    }
    .hero-photo { order: 2; width: 100%; }
    .hero-photo::before { inset: -10px; }
    .hero-orbit { width: 90%; }
    .orbit-ring--o {
        width: 165%;
        margin-left: -82.5%;
        margin-top: -82.5%;
    }
    .orbit-ring--o2 {
        width: 150%;
        margin-left: -75%;
        margin-top: -75%;
    }
    .float-card { position: static; padding: 10px 12px; }
    .float-card--shopify { order: 3; }
    .float-card--frontend { order: 4; }
    .float-card--shopify,
    .float-card--frontend {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
    }
    .float-card--mern { order: 1; }
    .float-icon { width: 30px; height: 30px; }
    .float-title { font-size: 0.76rem; }
    .float-sub { font-size: 0.64rem; }
    .hero-note { order: 5; position: static; transform: none; text-align: center; flex-basis: 100%; }
    .hero-note-underline { margin: -2px auto 0; }

    /* --- services --- */
    .services-grid {
        grid-template-columns: 1fr;
    }
    .service-card--wide {
        flex-direction: column;
        align-items: flex-start;
    }
    .cta-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    /* --- portfolio --- */
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .project-card--featured {
        grid-template-columns: 1fr;
    }
    .project-card--featured .project-body {
        padding: 22px 22px 24px;
    }
    .tabs {
        display: flex;
        width: 100%;
    }
    .tab-btn {
        flex: 1;
        text-align: center;
    }

    /* --- contact --- */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .contact-info,
    .contact-form {
        padding: 24px;
    }
}

/* --------------------------------------------------------------------------
   18b. RESPONSIVE — TABLET & MOBILE NAV (≤ 900px)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    /* full horizontal nav collapses to a left slide-in drawer;
       logo + Let's Talk + theme toggle + hamburger stay in the bar.
       Switch to simple flex since the center nav-links leaves the grid. */
    .navbar {
        display: flex;
        justify-content: space-between;
    }

    .nav-toggle {
        display: inline-flex;
    }

    body.menu-open {
        overflow: hidden;
    }

    /* dim + blur everything behind the drawer (incl. header) */
    .menu-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 55;
        background: rgba(2, 4, 8, 0.6);
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
    }
    .menu-overlay.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-links {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(75vw, 320px);
        height: 100dvh;
        z-index: 60;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 4px;
        padding: calc(var(--gutter) * 0.5) var(--gutter) 32px;
        background: var(--surface);
        border-right: 1px solid var(--border-soft);
        border-radius: 0 22px 22px 0;
        box-shadow: var(--shadow-lift);
        overflow-y: auto;
        transform: translateX(-102%);
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.34s var(--ease), visibility 0.34s var(--ease);
    }
    /* low-opacity decorative depth shapes in the drawer */
    .nav-links::before,
    .nav-links::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        background: radial-gradient(circle, var(--accent-soft), transparent 70%);
        pointer-events: none;
        z-index: -1;
    }
    .nav-links::before {
        width: 280px;
        height: 280px;
        top: -90px;
        right: -110px;
    }
    .nav-links::after {
        width: 220px;
        height: 220px;
        bottom: -70px;
        left: -80px;
    }
    .nav-links.open {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    /* profile header */
    .nav-drawer-head {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 6px 18px;
        margin-bottom: 14px;
        border-bottom: 1px solid var(--border-soft);
    }
    .drawer-avatar {
        flex-shrink: 0;
        width: 46px;
        height: 46px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-size: 1.15rem;
        font-weight: 700;
        color: var(--on-accent);
        background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
        box-shadow: var(--glow);
    }
    .drawer-user {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }
    .drawer-user strong {
        font-size: 1rem;
        font-weight: 700;
        letter-spacing: -0.01em;
    }
    .drawer-user small {
        font-size: 0.76rem;
        color: var(--text-muted);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .drawer-close {
        margin-left: auto;
        width: 38px;
        height: 38px;
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        border: 1px solid var(--border);
        background: transparent;
        color: var(--text-muted);
        transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
    }
    .drawer-close:hover {
        color: var(--accent);
        border-color: var(--accent-border);
        background: var(--accent-soft);
    }

    /* full-width rows with icon + active accent bar */
    .nav-link {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 13px 14px;
        border-radius: 10px;
        font-size: 0.92rem;
        position: relative;
    }
    .nav-link::after {
        display: none;
    }
    .nav-link svg {
        display: block;
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }
    .nav-link.active {
        color: var(--accent);
        background: var(--accent-soft);
    }
    .nav-link.active::before {
        content: "";
        position: absolute;
        left: 0;
        top: 14px;
        bottom: 14px;
        width: 3px;
        border-radius: 3px;
        background: var(--accent);
    }
}

/* --------------------------------------------------------------------------
   18c. RESPONSIVE — COMPACT (≤ 380px)
   -------------------------------------------------------------------------- */
@media (max-width: 380px) {
    .brand {
        gap: 8px;
    }
    .brand-name small {
        display: none;
    }
    .nav-right {
        gap: 6px;
    }
    .nav-actions {
        gap: 6px;
    }
    .nav-cta {
        padding-inline: 12px;
    }
    .theme-toggle,
    .nav-toggle {
        width: 38px;
        height: 38px;
    }

    .hero-visual { gap: 12px; }
    .hero-orbit { width: 82%; }
    .orbit-ring--o {
        width: 172%;
        margin-left: -86%;
        margin-top: -86%;
    }
    .orbit-ring--o2 {
        width: 156%;
        margin-left: -78%;
        margin-top: -78%;
    }
    .orbit-ring--o2,
    .orbit-ring--m { opacity: 0.3; }
    .orbit-ring--i { opacity: 0.4; }
    .float-card { padding: 8px 10px; }
    .float-title { font-size: 0.72rem; }
    .hero-note { font-size: 0.7rem; }
}

/* --------------------------------------------------------------------------
   19. REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html.js .reveal {
        opacity: 1;
        transform: none;
    }
    /* process reveal override has higher specificity than the rule above,
       so re-force visibility + drop its stagger delay under reduced motion */
    html.js .process-step.reveal,
    html.js .process-step.reveal.is-visible {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* --------------------------------------------------------------------------
   20. PAGE TRANSITION (soft theme-fade between internal pages)
   <html class="page-enter"> is set inline in each page's <head>; it fades an
   opaque theme-colored veil away over the content from first paint. The
   <html class="page-leave"> state (added by js/script.js when an internal
   .html link is clicked) fades the veil back in, then the browser navigates
   as soon as the animation ends. Uses var(--bg) so it always matches the
   active dark/light theme — no white/blank flash, no loaders.
   -------------------------------------------------------------------------- */
html.page-enter body::after,
html.page-leave body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9997; /* above content & navbar, below back-to-top (9998) and cursor (9999) */
    background: var(--bg);
    pointer-events: none;
}
html.page-enter body::after {
    animation: veil-in 0.3s var(--ease-out) both;
}
html.page-leave body::after {
    animation: veil-out 0.26s var(--ease-out) both;
}
@keyframes veil-in {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}
@keyframes veil-out {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}