/* === Design Tokens - Clean Luxury (Light-first) === */
:root {
    /* Surfaces (Charcoal + Cream) */
    --bg: #fbfaf7;
    --surface: #ffffff;
    --surface-2: #f5f2ec;
    --border: rgba(17, 24, 39, 0.12);

    /* Ink */
    --text: #111827; /* charcoal */
    --text-muted: rgba(17, 24, 39, 0.7);
    --text-soft: rgba(17, 24, 39, 0.55);

    /* Accent (subtle) */
    --accent: #111827;
    --accent-soft: rgba(17, 24, 39, 0.1);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
    --shadow-md: 0 12px 32px rgba(17, 24, 39, 0.1);
    --ring: 0 0 0 3px rgba(17, 24, 39, 0.14);

    /* Compatibility vars (legacy pages/classes) */
    --bg-dark: var(--bg);
    --bg-surface: var(--surface);
    --text-main: var(--text);

    --glass-bg: var(--surface);
    --glass-border: var(--border);
    --glass-blur: blur(0px);
}

html,
body {
    cursor: auto;
}

a,
button,
summary,
[role="button"],
input,
textarea,
select,
label {
    cursor: revert;
}

/* Global Reset & Base */
body {
    background-color: var(--bg) !important;
    color: var(--text) !important;
    font-family: "Sarabun", sans-serif;
    overflow-x: hidden;
    margin: 0;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Space Grotesk", sans-serif;
    color: var(--text);
}

/* Base elements */
a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    text-decoration-color: rgba(17, 24, 39, 0.35);
}

:focus-visible {
    outline: none;
    box-shadow: var(--ring);
    border-radius: 10px;
}

/* === Shared Components / Utilities === */
.container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.surface {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        border-color 160ms ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(17, 24, 39, 0.16);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.2rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    transition:
        transform 160ms ease,
        background 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.btn:hover {
    background: var(--surface-2);
    transform: translateY(-1px);
    border-color: rgba(17, 24, 39, 0.16);
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    border-color: rgba(17, 24, 39, 0.6);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: #0b1220;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Section headings */
.section-kicker {
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-soft);
    font-weight: 700;
}

.section-title {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

.section-subtitle {
    color: var(--text-muted);
    line-height: 1.7;
}

/* Navbar helper */
.lux-navbar {
    background: rgba(251, 250, 247, 0.86);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.glass-nav {
    background: rgba(251, 250, 247, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(17, 24, 39, 0.04);
}

/* Active nav link underline on light bg */
.glass-nav a.border-b-2.border-\[\#00D9FF\] {
    color: var(--text) !important;
}

.lux-link {
    color: var(--text-muted);
    text-decoration: none;
}

.lux-link:hover {
    color: var(--text);
}

/* Legacy class mappings (used by existing pages) */
.gradient-text {
    background: none !important;
    -webkit-text-fill-color: var(--text) !important;
    color: var(--text) !important;
}

.glass-card,
.project-card,
.contact-card {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 20px;
    box-shadow: var(--shadow-sm) !important;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        border-color 160ms ease;
}

.glass-card:hover,
.project-card:hover,
.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(17, 24, 39, 0.16);
}

.nav-link {
    position: relative;
    color: var(--text-muted);
    text-decoration: none;
}

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

.nav-link::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: rgba(17, 24, 39, 0.35) !important;
    transition: width 160ms ease;
}

.nav-link:hover::after {
    width: 100%;
}

.filter-btn,
.focus-btn {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    transition:
        transform 160ms ease,
        background 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.filter-btn:hover,
.focus-btn:hover {
    background: var(--surface-2);
    color: var(--text);
    border-color: rgba(17, 24, 39, 0.16);
}

.filter-btn.active,
.focus-btn.active {
    background: var(--accent);
    color: #ffffff;
    border-color: rgba(17, 24, 39, 0.6);
    box-shadow: var(--shadow-sm);
}

.input-field {
    background: var(--surface);
    border: 1px solid var(--border);
    transition:
        box-shadow 160ms ease,
        border-color 160ms ease,
        background 160ms ease;
}

.input-field:focus {
    outline: none;
    box-shadow: var(--ring);
    border-color: rgba(17, 24, 39, 0.22);
    background: var(--surface);
}

/* About page legacy classes (neutralized + luxury) */
.glow-border::before {
    content: none !important;
}

.skill-tag:hover {
    transform: translateY(-1px) !important;
    box-shadow: var(--shadow-sm) !important;
}

.floating {
    animation: none !important;
}

.section-reveal {
    opacity: 1 !important;
    transform: none !important;
}

.timeline-line {
    background: rgba(17, 24, 39, 0.12) !important;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.35);
    box-shadow: none !important;
    animation: none !important;
}

.stat-card,
.timeline-card,
.faq-item,
.callout,
.chip,
.hero-portrait {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-sm) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.stat-card:hover,
.timeline-card:hover,
.faq-item:hover,
.chip:hover {
    transform: translateY(-1px) !important;
    box-shadow: var(--shadow-md) !important;
    border-color: rgba(17, 24, 39, 0.16) !important;
    background: var(--surface) !important;
}

.hero-subtitle,
.stat-meta,
.callout p,
.faq-answer {
    color: var(--text-muted) !important;
}

.stat-value,
.callout strong,
.faq-question {
    color: var(--text) !important;
}

/* About hero/profile visuals (de-techno, keep layout) */
.profile-frame {
    position: relative;
    border-radius: 28px;
    padding: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.profile-frame::before {
    content: "";
    position: absolute;
    inset: -12px;
    border-radius: inherit;
    background: radial-gradient(
        circle at 20% 20%,
        rgba(17, 24, 39, 0.1),
        transparent 55%
    );
    filter: blur(18px);
    opacity: 0.7;
    z-index: -1;
}

.profile-shell {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.profile-scanlines,
.profile-vignette {
    display: none !important;
}

.signal-card {
    position: absolute;
    right: -18px;
    bottom: -18px;
    max-width: 260px;
    padding: 16px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.focus-card::before {
    content: none !important;
}

/* Tailwind color overrides (light luxury) */
.text-white {
    color: var(--text) !important;
}

/* Darkened accent variants for stat numbers on light cards —
   the raw neon cyan/green (#00D9FF/#00FF94) was tuned for a dark
   background and fails WCAG AA on the light "clean luxury" cards. */
.stat-cyan-dark {
    color: #0e7490;
}

.stat-green-dark {
    color: #047857;
}

.text-gray-300,
.text-gray-400,
.text-gray-500,
.text-gray-600 {
    color: var(--text-muted) !important;
}

.text-gray-200,
.text-gray-100 {
    color: var(--text) !important;
}

.bg-white\/5,
.bg-white\/10,
.bg-white\/\[0\.02\],
.bg-white\/\[0\.03\],
.bg-white\/\[0\.05\],
.bg-white\/70 {
    background: var(--surface) !important;
}

.border-white\/5,
.border-white\/8,
.border-white\/10,
.border-white\/15,
.border-white\/20 {
    border-color: var(--border) !important;
}

.bg-\[\#0a0a0f\],
.bg-\[\#0a0a0f\]\/80,
.bg-\[\#0a0a0f\]\/85,
.bg-\[\#0a0a0f\]\/95,
.bg-\[\#111827\] {
    background: var(--bg) !important;
}

/* Mobile navigation */
#mobile-menu-btn {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--text-muted) !important;
    transition:
        background 160ms ease,
        color 160ms ease,
        box-shadow 160ms ease;
}

@media (min-width: 768px) {
    #mobile-menu-btn {
        display: none;
    }
}

#mobile-menu-btn:hover {
    background: var(--surface-2);
    color: var(--text) !important;
}

/* Mobile navigation — Floating App Dock (Section 1.5 / 1.6) */
@media (max-width: 767px) {
    #mobile-menu {
        position: fixed !important;
        top: 5.25rem !important;
        left: 1rem !important;
        right: 1rem !important;
        width: calc(100% - 2rem) !important;
        max-width: 440px !important;
        margin: 0 auto !important;
        border-radius: 20px !important;
        border: 1px solid rgba(17, 24, 39, 0.08) !important;
        background: #ffffff !important;
        box-shadow:
            0 24px 50px -12px rgba(17, 24, 39, 0.25),
            0 8px 24px -4px rgba(17, 24, 39, 0.08),
            0 0 0 1px rgba(17, 24, 39, 0.05) !important;
        padding: 0.65rem !important;
        z-index: 50 !important;
        animation: floatingDockIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    #mobile-menu > div,
    #mobile-menu .space-y-2 {
        display: flex;
        flex-direction: column;
        gap: 0.35rem !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #mobile-menu a {
        display: flex !important;
        align-items: center;
        gap: 0.75rem;
        padding: 0.8rem 1.2rem !important;
        border-radius: 14px !important;
        border-left: none !important;
        font-weight: 500;
        font-size: 0.95rem;
        color: #4b5563 !important;
        text-decoration: none;
        transition:
            background 0.2s cubic-bezier(0.16, 1, 0.3, 1),
            color 0.2s ease,
            transform 0.15s ease;
    }

    #mobile-menu a:hover,
    #mobile-menu a:focus-visible {
        background: rgba(17, 24, 39, 0.06) !important;
        color: #111827 !important;
        transform: translateX(4px);
    }

    /* Pill-Wrapped Active Tab */
    #mobile-menu a[aria-current="page"],
    #mobile-menu a.active,
    #mobile-menu a.border-\[\#00D9FF\] {
        background: #111827 !important;
        color: #ffffff !important;
        font-weight: 600 !important;
        box-shadow: 0 4px 14px rgba(17, 24, 39, 0.2) !important;
        transform: none !important;
    }

    @keyframes floatingDockIn {
        from {
            opacity: 0;
            transform: translateY(-8px) scale(0.98);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
}

/* Keep intentionally dark product preview panels readable inside the light site shell. */
.bg-\[\#0b1017\] {
    background: #0f172a !important;
}

.bg-\[\#0d121b\] {
    background: #111827 !important;
}

.bg-\[\#0b1017\] .text-gray-200,
.bg-\[\#0b1017\] .text-gray-300,
.bg-\[\#0d121b\] .text-gray-200,
.bg-\[\#0d121b\] .text-gray-300 {
    color: rgba(255, 255, 255, 0.82) !important;
}

.bg-\[\#0b1017\] .text-gray-400,
.bg-\[\#0b1017\] .text-gray-500,
.bg-\[\#0d121b\] .text-gray-400,
.bg-\[\#0d121b\] .text-gray-500 {
    color: rgba(255, 255, 255, 0.58) !important;
}

/* === Compatibility layer (maps old techno classes to luxury style) === */

/* Glass Cards */
.glass-card-premium {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        border-color 160ms ease;
}

.glass-card-premium:hover {
    transform: translateY(-2px);
    border-color: rgba(17, 24, 39, 0.16);
    box-shadow: var(--shadow-md);
}

/* Gradient Text */
.text-gradient {
    color: var(--text);
    display: inline-block;
}

/* Animations */
@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.animate-float {
    animation: none;
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: rgba(17, 24, 39, 0.18);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(17, 24, 39, 0.3);
}

/* Legacy Support (Optional - keeping some old classes prevents total breakage if linked elsewhere) */
.gradient-text-legacy {
    background: linear-gradient(135deg, #00d9ff 0%, #00ff94 50%, #ffe600 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* === Premium HR Refresh === */
.premium-shell {
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.78),
            rgba(251, 250, 247, 0) 36rem
        ),
        radial-gradient(
            circle at 14% 14%,
            rgba(0, 217, 255, 0.1),
            transparent 28rem
        ),
        radial-gradient(
            circle at 82% 18%,
            rgba(0, 255, 148, 0.1),
            transparent 24rem
        ),
        var(--bg);
}

.premium-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.78);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
}

.premium-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.15);
}

.hero-title {
    letter-spacing: 0;
    text-wrap: balance;
}

.masked-reveal {
    animation: premiumMaskReveal 900ms cubic-bezier(0.19, 1, 0.22, 1) both;
    clip-path: inset(0 0 100% 0);
}

.masked-reveal-delay {
    animation-delay: 120ms;
}

.role-rotator {
    display: inline-grid;
    min-width: min(100%, 22ch);
    min-height: 1.35em;
    color: var(--text);
    vertical-align: bottom;
}

.role-rotator span {
    grid-area: 1 / 1;
    opacity: 0;
    transform: translateY(0.45em);
    animation: roleRotate 9s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.role-rotator span:nth-child(2) {
    animation-delay: 3s;
}

.role-rotator span:nth-child(3) {
    animation-delay: 6s;
}

.lux-underline {
    position: relative;
    display: inline-block;
    white-space: nowrap;
}

.lux-underline::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.04em;
    height: 0.18em;
    z-index: -1;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        rgba(0, 217, 255, 0.32),
        rgba(0, 255, 148, 0.32)
    );
    transform-origin: left;
    animation: underlineSweep 1.1s 450ms cubic-bezier(0.19, 1, 0.22, 1) both;
}

.premium-cta {
    position: relative;
    overflow: hidden;
    background: #111827 !important;
    border-color: rgba(17, 24, 39, 0.72) !important;
    color: #ffffff !important;
}

.premium-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.32) 45%,
        transparent 72%
    );
    transform: translateX(-120%);
    transition: transform 520ms ease;
}

.premium-cta:hover::before {
    transform: translateX(120%);
}

/* Liquid Shimmer Effect (Section 2.5) */
.liquid-shimmer {
    position: relative;
    overflow: hidden;
}

.liquid-shimmer::after {
    content: "";
    position: absolute;
    top: 0;
    left: -130%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.28) 48%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 3;
    transition: left 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.liquid-shimmer:hover::after {
    left: 130%;
}

.premium-card {
    background: rgba(255, 255, 255, 0.82) !important;
    border: 1px solid rgba(17, 24, 39, 0.12) !important;
    box-shadow: var(--shadow-sm) !important;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        border-color 180ms ease;
}

.premium-card:hover {
    transform: translateY(-4px);
    border-color: rgba(17, 24, 39, 0.18) !important;
    box-shadow: var(--shadow-md) !important;
}

/* Cursor-Tracking Spotlight Glow (Section 2.3) */
.spotlight-card,
.project-card,
.project-preview-card {
    position: relative;
    overflow: hidden;
}

.spotlight-card::before,
.project-card::before,
.project-preview-card::before {
    content: "";
    position: absolute;
    top: var(--spotlight-y, -1000px);
    left: var(--spotlight-x, -1000px);
    transform: translate(-50%, -50%);
    width: 480px;
    height: 480px;
    background: radial-gradient(
        circle,
        var(--spotlight-color, rgba(15, 111, 79, 0.14)),
        transparent 65%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 1;
    border-radius: 50%;
}

.spotlight-card:hover::before,
.project-card:hover::before,
.project-preview-card:hover::before {
    opacity: 1;
}

.spotlight-card > *,
.project-card > *,
.project-preview-card > * {
    position: relative;
    z-index: 2;
}

.hero-stat-card {
    min-width: 0;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

.hero-stat-title {
    font-size: clamp(1.125rem, 1.4vw, 1.1875rem);
    line-height: 1.1;
    white-space: nowrap;
}

.premium-reveal {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
    transition:
        opacity 620ms ease,
        transform 620ms cubic-bezier(0.19, 1, 0.22, 1);
}

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

.project-preview-card img {
    transition: transform 520ms cubic-bezier(0.19, 1, 0.22, 1);
}

.project-preview-card:hover img {
    transform: scale(1.035);
}

.project-preview-card .text-white {
    color: #ffffff !important;
}

.project-preview-card .text-white\/70 {
    color: rgba(255, 255, 255, 0.7) !important;
}

.contact-priority-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.contact-action {
    min-height: 124px;
}

@keyframes premiumMaskReveal {
    from {
        clip-path: inset(0 0 100% 0);
        transform: translateY(12px);
    }

    to {
        clip-path: inset(0 0 0 0);
        transform: translateY(0);
    }
}

@keyframes roleRotate {
    0%,
    6% {
        opacity: 0;
        transform: translateY(0.45em);
    }

    10%,
    29% {
        opacity: 1;
        transform: translateY(0);
    }

    34%,
    100% {
        opacity: 0;
        transform: translateY(-0.45em);
    }
}

@keyframes underlineSweep {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

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

@media (max-width: 640px) {
    .premium-shell {
        background:
            linear-gradient(
                180deg,
                rgba(255, 255, 255, 0.82),
                rgba(251, 250, 247, 0) 26rem
            ),
            radial-gradient(
                circle at 16% 10%,
                rgba(0, 217, 255, 0.12),
                transparent 18rem
            ),
            var(--bg);
    }

    .hero-title {
        text-wrap: initial;
    }

    .lux-underline {
        display: inline;
        white-space: normal;
    }

    .role-rotator {
        min-width: 100%;
    }

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

    .contact-action {
        min-height: auto;
    }
}

/* ============================================================
   Page Transition Overlay
   ============================================================ */
#page-transition-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 9990;
    transform: translateY(0%);
    transition: transform 0.42s cubic-bezier(0.76, 0, 0.24, 1);
    pointer-events: none;
}

#page-transition-overlay.is-leaving {
    transform: translateY(-100%);
    pointer-events: none;
}

#page-transition-overlay.is-entering {
    transform: translateY(0%);
    pointer-events: all;
}

/* ============================================================
   Split-text vertical hover  [data-split-hover]
   ============================================================ */
.sh-inner {
    display: inline-flex;
    flex-wrap: wrap;
    letter-spacing: inherit;
}

.sh-char {
    display: inline-block;
    overflow: hidden;
    line-height: inherit;
    height: 1em;
    position: relative;
    letter-spacing: 0;
}

.sh-top,
.sh-btm {
    display: block;
    will-change: transform;
}

.sh-btm {
    position: absolute;
    top: 100%;
    left: 0;
}

/* Hover: top slides up, btm follows */
.sh-active .sh-top {
    transform: translateY(-100%);
}

.sh-active .sh-btm {
    transform: translateY(-100%);
}

/* ============================================================
   Nav rolling hover (Jasmine-style)
   ============================================================ */
.nav-roll-inner {
    display: inline-flex;
    overflow: hidden;
    vertical-align: top;
}

.nav-roll-char {
    display: inline-flex;
    flex-direction: column;
    overflow: hidden;
    line-height: 1.15;
    height: 1.15em;
}

.nav-roll-top,
.nav-roll-btm {
    display: block;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.nav-roll-btm {
    position: relative;
    color: var(--text, #111827);
}

/* On hover: top slides up, btm takes its place */
.nav-roll-active .nav-roll-top {
    transform: translateY(-100%);
}

.nav-roll-active .nav-roll-btm {
    transform: translateY(-100%);
}

/* ============================================================
   Intro Overlay — strips wipe up on load
   ============================================================ */
#intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    pointer-events: none;
}

#intro-overlay .strip {
    flex: 1;
    background: #0a0a0f;
    transform-origin: bottom;
    animation: stripWipe 0.9s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

#intro-overlay .strip:nth-child(1) {
    animation-delay: 0s;
}
#intro-overlay .strip:nth-child(2) {
    animation-delay: 0.07s;
}
#intro-overlay .strip:nth-child(3) {
    animation-delay: 0.14s;
}
#intro-overlay .strip:nth-child(4) {
    animation-delay: 0.21s;
}
#intro-overlay .strip:nth-child(5) {
    animation-delay: 0.28s;
}

@keyframes stripWipe {
    0% {
        transform: scaleY(1);
    }
    100% {
        transform: scaleY(0);
    }
}

/* ============================================================
   Staggered hero load-in
   — Delays set to 3.2s+ as CSS fallback (after curtain finishes ~3s)
   — GSAP triggerHeroReveal() takes over when curtain starts to fade
   ============================================================ */
.hero-stagger > * {
    opacity: 0;
    transform: translateY(28px);
    animation: heroStaggerIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-stagger > *:nth-child(1) {
    animation-delay: 3.2s;
}
.hero-stagger > *:nth-child(2) {
    animation-delay: 3.35s;
}
.hero-stagger > *:nth-child(3) {
    animation-delay: 3.5s;
}
.hero-stagger > *:nth-child(4) {
    animation-delay: 3.65s;
}
.hero-stagger > *:nth-child(5) {
    animation-delay: 3.8s;
}
.hero-stagger > *:nth-child(6) {
    animation-delay: 3.95s;
}

@keyframes heroStaggerIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   Mobile animation enhancements
   ============================================================ */

/* Touch press feedback — visible :active state on touch devices */
@media (hover: none) and (pointer: coarse) {
    .premium-card:active,
    .cert-card:active,
    .glass-card:active,
    .track-card:active {
        transform: scale(0.97) translateY(-1px) !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
        transition:
            transform 0.08s ease,
            box-shadow 0.08s ease !important;
    }

    .premium-cta:active,
    .contact-action:active,
    .filter-btn:active,
    .focus-btn:active {
        transform: scale(0.95) !important;
        opacity: 0.88 !important;
        transition:
            transform 0.08s ease,
            opacity 0.08s ease !important;
    }

    a[href]:active:not(.premium-cta):not(.contact-action) {
        opacity: 0.7;
        transition: opacity 0.08s ease;
    }
}

/* More dramatic scroll reveals on mobile */
@media (max-width: 768px) {
    .premium-reveal {
        transform: translateY(32px) scale(0.97);
        transition:
            opacity 680ms ease,
            transform 680ms cubic-bezier(0.22, 1, 0.36, 1);
    }

    .fade-up {
        transform: translateY(22px);
        transition:
            opacity 0.55s ease,
            transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    }
}

/* Fix lux-underline animation on mobile (absolute ::after breaks on wrapped text) */
@media (max-width: 640px) {
    .lux-underline::after {
        display: none;
    }

    /* Replace with a background highlight that works on wrapped text */
    .lux-underline {
        background-image: linear-gradient(
            transparent 68%,
            rgba(0, 217, 255, 0.22) 68%
        );
        background-size: 0% 100%;
        background-repeat: no-repeat;
        animation: mobileUnderlineSweep 0.85s 0.3s
            cubic-bezier(0.19, 1, 0.22, 1) forwards;
        -webkit-background-clip: initial;
        background-clip: initial;
        -webkit-text-fill-color: initial;
    }

    @keyframes mobileUnderlineSweep {
        to {
            background-size: 100% 100%;
        }
    }
}

/* Role rotator — clearer on small screens */
@media (max-width: 480px) {
    .role-rotator {
        display: block;
        min-height: 1.4em;
    }
    .role-rotator span {
        display: block;
        position: absolute;
    }
}

@media (prefers-reduced-motion: reduce) {
    .masked-reveal,
    .lux-underline::after,
    .role-rotator span,
    .premium-reveal,
    .premium-cta::before,
    .liquid-shimmer::after,
    .spotlight-card::before,
    .project-card::before,
    .project-preview-card::before,
    #mobile-menu,
    .cin-dot,
    .cin-dot-fill,
    .project-preview-card img {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        clip-path: none !important;
    }

    .cin-dot.active .cin-dot-fill {
        width: 100% !important;
    }

    .role-rotator span {
        opacity: 0;
    }

    .role-rotator span:first-child {
        opacity: 1;
    }
}

/* Keep icon footprints stable while the non-critical icon font loads. */
i.fas, i.fab, i.fa-solid, i.fa-brands { display: inline-block; width: 1.25em; text-align: center; }

/* Portfolio home: warm editorial direction based on the approved Stitch screen. */
body.portfolio-home {
    --home-paper: #fbf8f2;
    --home-white: #fffefa;
    --home-ink: #211f1b;
    --home-muted: #6d6861;
    --home-rule: #ded8cf;
    --home-clay: #b9583c;
    --home-clay-dark: #97412c;
    --home-soft: #efe8dc;
    background: var(--home-paper) !important;
    color: var(--home-ink) !important;
    font-family: "Sarabun", sans-serif;
}
body.portfolio-home ::selection { background: #e8b29a; color: #211f1b; }
body.portfolio-home :focus-visible { outline: 2px solid var(--home-clay); outline-offset: 4px; box-shadow: none; }
body.portfolio-home h1,
body.portfolio-home h2,
body.portfolio-home h3 { color: var(--home-ink); }
body.portfolio-home h1,
body.portfolio-home .home-section-head h2,
body.portfolio-home .home-toolkit__intro h2 { font-family: "Space Grotesk", sans-serif; }
body.portfolio-home a { text-decoration: none; }
.home-nav { position: fixed; inset: 0 0 auto; z-index: 50; background: rgba(251,248,242,.94); border-bottom: 1px solid rgba(33,31,27,.09); transition: background .25s ease, box-shadow .25s ease; }
.home-nav__inner { max-width: 1240px; height: 78px; margin: auto; padding: 0 36px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.home-brand { display: inline-flex; align-items: center; gap: 11px; font-size: 14px; font-weight: 700; letter-spacing: -.015em; white-space: nowrap; }
.home-brand__mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--home-ink); border-radius: 50%; font: 600 10px "Space Grotesk",sans-serif; letter-spacing: -.04em; }
.home-brand__surname { font-weight: 400; color: var(--home-muted); }
.home-nav__links { display: flex; align-items: center; gap: clamp(18px,3vw,42px); margin-left: auto; }
.home-nav__links a,.home-nav__cta { font-size: 13px; color: #534f49; transition: color .2s ease; }
.home-nav__links a:hover,.home-footer a:hover { color: var(--home-clay-dark); }
.home-nav__cta { padding: 11px 16px; border: 1px solid var(--home-rule); border-radius: 3px; color: var(--home-ink); }
.home-nav__cta i { margin-left: 8px; font-size: 10px; }
.home-menu-btn { display: none; border: 1px solid var(--home-rule); border-radius: 2px; padding: 10px 12px; background: transparent; color: var(--home-ink); }
.home-mobile-menu { position: absolute; inset: 100% 0 auto; padding: 12px 22px 22px; background: var(--home-paper); border-bottom: 1px solid var(--home-rule); box-shadow: 0 16px 26px rgba(38,32,25,.08); }
.home-mobile-menu a { display: block; padding: 13px 2px; border-bottom: 1px solid var(--home-rule); font-size: 15px; }
.home-hero { position: relative; padding: 150px 36px 74px; min-height: min(850px,100vh); display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.home-hero::before { content: ""; position: absolute; width: 560px; height: 560px; right: -190px; top: 115px; border: 1px solid rgba(185,88,60,.13); border-radius: 50%; pointer-events: none; }
.home-hero__inner { position: relative; z-index: 1; width: min(1168px,100%); margin: 0 auto; display: grid; grid-template-columns: minmax(0,1.02fr) minmax(370px,.78fr); gap: clamp(55px,8vw,130px); align-items: center; }
.home-hero__copy { padding-bottom: 16px; }
.home-hero h1 { max-width: 660px; margin: 0; font-size: clamp(48px,6vw,82px); line-height: .99; letter-spacing: -.052em; font-weight: 500; }
.home-hero h1 em,.home-section-head h2 em,.home-toolkit__intro h2 em { color: var(--home-clay); font-style: normal; }
.home-hero__intro { max-width: 550px; margin: 28px 0 0; color: #5e5952; font-size: 18px; line-height: 1.7; }
.home-hero__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 25px; }
.home-hero__tags span { padding: 7px 11px; border: 1px solid var(--home-rule); border-radius: 2px; color: #575149; font-size: 11px; letter-spacing: .015em; }
.home-hero__actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 30px; }
.home-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; padding: 0 18px; font-size: 13px; font-weight: 600; transition: transform .2s ease,background .2s ease,color .2s ease; }
.home-button:hover { transform: translateY(-2px); }
.home-button--primary { background: var(--home-ink); color: var(--home-white) !important; }
.home-button--primary:hover { background: var(--home-clay-dark); }
.home-button--quiet { border: 1px solid var(--home-rule); color: var(--home-ink); }
.home-button i { font-size: 11px; }
.home-location { margin: 28px 0 0; display: flex; align-items: center; gap: 9px; color: #79736b; font-size: 11px; }
.home-location i { color: var(--home-clay); }
.home-portrait-scene { position: relative; width: min(100%,470px); margin-left: auto; padding: 0 24px 50px 0; }
.home-portrait-scene__index { display: flex; justify-content: space-between; padding: 0 3px 12px; color: #817a70; font: 10px "Space Grotesk",sans-serif; letter-spacing: .13em; }
.home-photo { position: relative; margin: 0; height: clamp(390px,49vw,560px); overflow: hidden; background: #e9e0d4; }
.home-photo img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 38%; filter: saturate(.78); }
.home-photo::after { content: ""; position: absolute; inset: 50% 0 0; background: linear-gradient(transparent,rgba(32,27,22,.32)); }
.home-photo figcaption { position: absolute; z-index: 1; bottom: 18px; left: 20px; color: #fffaf2; font: italic 13px "Sarabun",sans-serif; }
.home-id-card { position: absolute; z-index: 2; right: 0; bottom: 0; width: min(340px,84%); padding: 15px 17px 13px; background: var(--home-white); border: 1px solid rgba(33,31,27,.13); box-shadow: 0 18px 46px rgba(42,34,25,.16); transform: rotate(1.6deg); }
.home-id-card__top,.home-id-card__foot { display: flex; justify-content: space-between; align-items: center; color: #7e766c; font: 9px "Space Grotesk",sans-serif; letter-spacing: .12em; }
.home-id-card__top { padding-bottom: 10px; border-bottom: 1px solid #e4ddd4; }
.home-id-card__top i { font-size: 13px; color: var(--home-clay); }
.home-id-card__body { display: grid; grid-template-columns: 88px 1fr; gap: 15px; align-items: center; padding: 12px 0; }
.home-id-card__body img { display: block; width: 88px; height: 102px; object-fit: cover; object-position: center 24%; filter: saturate(.78); }
.home-id-card__body h2 { margin: 3px 0 7px; font: 500 21px/1.04 "Space Grotesk",sans-serif; letter-spacing: -.03em; }
.home-id-card__body p { margin: 0; color: #6f685e; font-size: 10px; line-height: 1.4; }
.home-id-card__body .home-id-card__label { margin-bottom: 5px; color: var(--home-clay-dark); font: 9px "Space Grotesk",sans-serif; letter-spacing: .08em; }
.home-id-card__foot { border-top: 1px solid #e4ddd4; padding-top: 9px; font-size: 8px; }
.home-portrait-note { position: absolute; top: 40%; left: -92px; width: 160px; transform: rotate(-90deg); transform-origin: center; color: #777067; font: 9px "Space Grotesk",sans-serif; letter-spacing: .08em; }
.home-portrait-note__dot { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--home-clay); }
.home-hero__bottom { width: min(1168px,100%); margin: 48px auto 0; display: flex; align-items: center; gap: 16px; color: #837c73; font: 9px "Space Grotesk",sans-serif; letter-spacing: .14em; }
.home-hero__line { width: 66px; height: 1px; background: #c9c0b4; }
.home-hero__bottom span:last-child { margin-left: auto; }
.home-case,.home-capabilities,.home-toolkit,.home-credentials { padding: 112px 36px; }
.home-case { background: #f2ede5; }
.home-section-head { width: min(1168px,100%); margin: 0 auto 50px; }
.home-section-head h2,.home-toolkit__intro h2 { margin: 0; font-size: clamp(38px,5vw,62px); line-height: 1.04; letter-spacing: -.045em; font-weight: 500; }
.home-section-head > p:last-child { max-width: 520px; margin: 19px 0 0; color: var(--home-muted); font-size: 15px; line-height: 1.7; }
.home-case__layout { width: min(1168px,100%); margin: 0 auto; display: grid; grid-template-columns: minmax(0,1.25fr) minmax(300px,.7fr); gap: clamp(38px,7vw,95px); align-items: center; }
.home-dashboard-frame { position: relative; padding: 13px 13px 41px; background: var(--home-white); box-shadow: 0 18px 50px rgba(41,34,26,.08); }
.home-dashboard-frame img { display: block; width: 100%; height: auto; }
.home-image-caption { position: absolute; bottom: 14px; left: 17px; color: #777067; font: 9px "Space Grotesk",sans-serif; letter-spacing: .12em; }
.home-mono-label { margin: 0 0 13px; color: var(--home-clay-dark); font: 10px "Space Grotesk",sans-serif; letter-spacing: .13em; }
.home-case__detail h3 { margin: 0; font: 500 clamp(28px,3.1vw,40px)/1.12 "Space Grotesk",sans-serif; letter-spacing: -.04em; }
.home-case__detail > p:not(.home-mono-label):not(.home-disclosure) { margin: 15px 0 0; color: var(--home-muted); font-size: 14px; line-height: 1.75; }
.home-facts { margin: 26px 0 0; border-top: 1px solid #d8d0c6; }
.home-facts div { display: flex; align-items: baseline; gap: 14px; padding: 12px 0; border-bottom: 1px solid #d8d0c6; }
.home-facts dt { flex: 0 0 78px; color: var(--home-ink); font: 500 20px "Space Grotesk",sans-serif; }
.home-facts dd { margin: 0; color: #736d64; font-size: 12px; }
.home-disclosure { margin: 12px 0 0; color: #7e766d; font-size: 10px; line-height: 1.6; }
.home-text-link { display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; padding-bottom: 5px; border-bottom: 1px solid var(--home-clay); color: var(--home-ink); font-size: 13px; font-weight: 600; }
.home-text-link i { color: var(--home-clay); transition: transform .2s ease; }
.home-text-link:hover i { transform: translateX(4px); }
.home-capabilities { background: var(--home-paper); }
.home-section-head--row { display: flex; align-items: end; justify-content: space-between; gap: 38px; }
.home-section-head--row > p { max-width: 380px; margin: 0 0 6px; color: var(--home-muted); font-size: 14px; line-height: 1.7; }
.home-capability-list { width: min(1168px,100%); margin: auto; border-top: 1px solid var(--home-rule); }
.home-capability-list article { display: grid; grid-template-columns: 70px 1fr 50px; align-items: center; gap: 24px; padding: 26px 4px; border-bottom: 1px solid var(--home-rule); }
.home-capability-list__number { align-self: start; padding-top: 6px; color: var(--home-clay); font: 11px "Space Grotesk",sans-serif; }
.home-capability-list article h3 { margin: 0; font: 500 24px "Space Grotesk",sans-serif; letter-spacing: -.025em; }
.home-capability-list article p { max-width: 660px; margin: 7px 0 0; color: var(--home-muted); font-size: 13px; line-height: 1.65; }
.home-capability-list article > i { justify-self: end; color: var(--home-clay); font-size: 20px; }
.home-toolkit { background: var(--home-ink); color: #f7f2e9; display: grid; grid-template-columns: minmax(260px,.82fr) minmax(0,1.2fr); gap: 10px 75px; align-items: end; }
.home-toolkit h2 { color: #f7f2e9 !important; }
.home-toolkit__intro p:last-child { max-width: 360px; margin: 17px 0 0; color: #c3bcb1; font-size: 14px; line-height: 1.7; }
.home-toolkit__items { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-top: 1px solid #514c45; }
.home-toolkit__items span { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 17px 0; border-bottom: 1px solid #514c45; color: #f7f2e9; font: 18px "Space Grotesk",sans-serif; }
.home-toolkit__items span:nth-child(odd) { margin-right: 24px; }
.home-toolkit__items small { color: #c1b8ad; font: 8px "Space Grotesk",sans-serif; letter-spacing: .09em; text-align: right; }
.home-toolkit > .home-text-link { grid-column: 2; justify-self: start; color: #f7f2e9; border-color: #c77b62; }
.home-credentials { background: #f2ede5; }
.home-credentials .home-section-head { margin-bottom: 36px; }
.home-certificate-grid { width: min(1168px,100%); margin: auto; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.home-certificate-grid article { overflow: hidden; background: var(--home-white) !important; border: 1px solid #e3ddd4 !important; border-radius: 0 !important; box-shadow: 0 8px 24px rgba(44,36,27,.05); transition: transform .2s ease,box-shadow .2s ease; }
.home-certificate-grid article:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(44,36,27,.09); }
.home-certificate-grid article > div:first-child { height: auto; aspect-ratio: 16/10; padding: 12px !important; background: #e9e2d7 !important; }
.home-certificate-grid article > div:first-child img { width: 100%; height: 100%; object-fit: contain; border-radius: 0 !important; background: #f6f1e8 !important; }
.home-certificate-grid article > div:last-child { padding: 17px !important; }
.home-certificate-grid article > div:last-child > div { color: #746d63 !important; }
.home-certificate-grid article h3 { margin: 0; color: var(--home-ink) !important; font-size: 15px !important; line-height: 1.4 !important; }
.home-certificate-grid article p { color: #70695f !important; }
.home-cert-loading { min-height: 150px; display: grid; place-content: center; gap: 12px; text-align: center; color: var(--home-muted); }
.home-cert-loading i { color: var(--home-clay); font-size: 24px; }
.home-cert-loading p { margin: 0; font-size: 13px; }
.home-footer { padding: 65px 36px 25px; background: var(--home-paper); }
.home-footer__top,.home-footer__bottom { width: min(1168px,100%); margin: auto; }
.home-footer__top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 36px; border-bottom: 1px solid var(--home-rule); }
.home-footer__top p { margin: 0; font: 500 clamp(25px,4vw,42px) "Space Grotesk",sans-serif; letter-spacing: -.035em; }
.home-footer__top > a { display: inline-flex; align-items: center; gap: 12px; color: var(--home-clay-dark); font-weight: 600; }
.home-footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 22px; color: #777067; font-size: 11px; }
.home-footer__social { display: flex; gap: 16px; font-size: 16px; }
.home-footer__social a { color: #615b53; }
/* Physics badge: reserved canvas dimensions, quiet controls and true photo fallback. */
:root { --badge-paper: #f3efe6; --badge-ink: #302f2a; --badge-muted: #847b6e; --badge-copper: #ad643e; --badge-rule: #d9d0c1; --badge-focus: #925131; }
.badge-scene { position: relative; min-width: 0; width: 100%; background: transparent; isolation: isolate; }
.badge-scene--hero { background: transparent; }
.badge-scene__meta { position: absolute; top: 15px; left: 19px; right: 19px; z-index: 2; display: flex; justify-content: space-between; gap: 12px; color: var(--badge-muted); font: 9px "Space Grotesk",sans-serif; letter-spacing: .13em; pointer-events: none; }
.badge-scene__canvas { display: block; width: 100%; height: 580px; opacity: 0; transition: opacity .5s ease; touch-action: none; outline: none; }
.badge-scene.is-ready .badge-scene__canvas { opacity: 1; }
.badge-scene.is-dragging .badge-scene__canvas { cursor: grabbing !important; touch-action: none; }
.badge-scene .badge-scene__canvas:focus-visible,body.portfolio-home .badge-scene__canvas:focus-visible { outline: none; box-shadow: none; border-radius: 0; }
.badge-scene:has(.badge-scene__canvas:focus-visible)::after { content: ""; position: absolute; left: calc(50% - 20px); bottom: 12px; width: 40px; height: 3px; background: var(--badge-focus); pointer-events: none; }
.badge-scene__fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; transition: opacity .4s ease; }
.badge-scene__fallback img { width: 40%; height: auto; border: 10px solid var(--badge-ink); border-top-width: 22px; border-radius: 8px; transform: rotate(-8deg); box-shadow: 15px 23px 28px rgba(83,63,42,.2); }
.badge-scene.is-ready .badge-scene__fallback { opacity: 0; }
.badge-scene__footer { position: absolute; left: 18px; right: 18px; bottom: 17px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.badge-scene__hint { color: var(--badge-muted); font: 9px "Space Grotesk",sans-serif; letter-spacing: .05em; }
.badge-scene__controls { display: flex; align-items: center; gap: 3px; }
.badge-scene__controls button { border: 0; padding: 8px 10px; border-radius: 2px; background: transparent; color: var(--badge-ink); font: 11px "Sarabun",sans-serif; cursor: pointer; transition: background .18s ease,color .18s ease; min-height: 40px; }
.badge-scene__controls button:hover { background: #e6ddce; color: var(--badge-focus); }
.badge-scene__controls button:focus-visible { outline: 2px solid var(--badge-focus); outline-offset: 1px; }
.badge-scene__status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.badge-scene[data-badge-state="fallback"] .badge-scene__controls { display: none; }
.badge-preview { margin: 0; min-height: 100svh; display: grid; place-items: center; background: var(--home-paper,var(--badge-paper)); color: var(--badge-ink); font-family: "Sarabun",sans-serif; }
.badge-preview__header { max-width: 1320px; margin: auto; padding: 28px 48px; display: flex; justify-content: space-between; align-items: center; }
.badge-preview__header a { color: var(--badge-ink); text-decoration: none; font: 600 23px "Space Grotesk",sans-serif; }
.badge-preview__header a span { font-size: 10px; color: var(--badge-muted); font-weight: 400; letter-spacing: .1em; margin-left: 8px; }
.badge-preview__header > span { color: var(--badge-muted); font: 9px "Space Grotesk",sans-serif; letter-spacing: .13em; }
.badge-preview__layout { width: min(100%,900px); margin: 0 auto; padding: 0; display: block; }
.badge-preview__eyebrow { font: 10px "Space Grotesk",sans-serif; color: var(--badge-muted); letter-spacing: .18em; }
.badge-preview__copy h1 { font: 500 clamp(64px,7.5vw,110px)/.97 "Space Grotesk",sans-serif; letter-spacing: -.055em; margin: 24px 0 32px; }
.badge-preview__copy h1 em { font-style: normal; color: var(--badge-copper); }
.badge-preview__copy > p:not(.badge-preview__eyebrow) { font-size: 15px; line-height: 1.9; color: #675e52; }
.badge-preview__copy .badge-preview__photo-note { margin-top: 27px; font-size: 12px !important; }
.badge-preview__links { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 19px; }
.badge-preview__links a { color: var(--badge-focus); font-size: 12px; text-decoration: underline; text-underline-offset: 5px; }
.badge-preview__copy .badge-preview__keyboard { font-size: 11px !important; margin-top: 32px; }
.badge-scene--preview .badge-scene__canvas { height: 100svh; max-height: 900px; min-height: 0; }
.badge-preview__footer { max-width: 1320px; margin: auto; padding: 25px 48px; display: flex; justify-content: space-between; color: var(--badge-muted); font: 9px "Space Grotesk",sans-serif; letter-spacing: .12em; }
@media (max-width: 760px) {
 .badge-preview__header { padding: 23px 22px; }
 .badge-preview__layout { padding: 0; }
 .badge-preview__copy { order: 2; }
 .badge-scene--preview { order: 1; }
 .badge-preview__copy h1 { margin: 19px 0 24px; font-size: 66px; }
 .badge-scene--preview .badge-scene__canvas { height: 100svh; min-height: 0; }
 .badge-preview__footer { padding: 25px 22px; }
 .badge-scene--hero .badge-scene__canvas { height: 530px; }
 .badge-scene__footer { align-items: flex-start; flex-direction: column; gap: 5px; }
 .badge-scene__controls button { padding-left: 8px; padding-right: 8px; min-height: 44px; }
 .badge-scene__meta { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) { .badge-scene__canvas,.badge-scene__fallback,.badge-scene__controls button { transition: none; } }
@media (max-width: 900px) {
 .home-nav__inner { height: 68px; padding: 0 22px; }
 .home-nav__links { gap: 16px; }
 .home-nav__links a { font-size: 11px; }
 .home-hero { padding: 128px 24px 54px; min-height: auto; }
 .home-hero__inner { grid-template-columns: minmax(0,1fr) minmax(300px,.8fr); gap: 36px; }
 .home-hero h1 { font-size: clamp(44px,7vw,65px); }
 .home-portrait-scene { padding-right: 8px; }
 .home-portrait-note { display: none; }
 .home-case,.home-capabilities,.home-toolkit,.home-credentials { padding: 84px 24px; }
 .home-case__layout { grid-template-columns: 1.05fr .8fr; gap: 34px; }
}
@media (max-width: 680px) {
 .home-nav__inner { height: 64px; padding: 0 18px; }
 .home-nav__links,.home-nav__cta { display: none; }
 .home-menu-btn { display: inline-flex; }
 .home-hero { padding: 112px 21px 43px; }
 .home-hero__inner { grid-template-columns: 1fr; gap: 40px; }
 .home-hero h1 { max-width: 510px; font-size: clamp(47px,12.6vw,70px); }
 .home-hero__intro { margin-top: 21px; font-size: 16px; }
 .home-hero__tags { margin-top: 20px; }
 .home-hero__actions { display: grid; grid-template-columns: 1fr 1fr; }
 .home-button { padding: 0 12px; font-size: 12px; }
 .home-location { flex-wrap: wrap; font-size: 10px; }
 .home-portrait-scene { width: min(100%,420px); margin: 0 auto; padding-right: 13px; }
 .home-photo { height: min(112vw,500px); }
 .home-id-card { width: min(320px,88%); }
 .home-hero__bottom { margin-top: 37px; font-size: 8px; }
 .home-case,.home-capabilities,.home-toolkit,.home-credentials { padding: 72px 21px; }
 .home-section-head { margin-bottom: 32px; }
 .home-section-head h2,.home-toolkit__intro h2 { font-size: clamp(38px,10vw,54px); }
 .home-case__layout { grid-template-columns: 1fr; gap: 34px; }
 .home-section-head--row { display: block; }
 .home-section-head--row > p { margin-top: 18px; }
 .home-capability-list article { grid-template-columns: 34px 1fr 24px; gap: 12px; padding: 21px 0; }
 .home-capability-list article h3 { font-size: 19px; }
 .home-capability-list article p { font-size: 12px; }
 .home-capability-list article > i { font-size: 16px; }
 .home-toolkit { grid-template-columns: 1fr; gap: 27px; }
 .home-toolkit__items span { font-size: 16px; }
 .home-toolkit__items small { max-width: 95px; font-size: 7px; }
 .home-toolkit > .home-text-link { grid-column: 1; }
 .home-certificate-grid { grid-template-columns: 1fr; gap: 16px; }
 .home-certificate-grid article > div:first-child { aspect-ratio: 16/9; }
 .home-footer { padding: 47px 21px 22px; }
 .home-footer__top { align-items: flex-start; flex-direction: column; gap: 20px; }
 .home-footer__bottom { flex-wrap: wrap; font-size: 10px; }
 .home-footer__bottom > span { order: 3; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
 body.portfolio-home *,body.portfolio-home *::before,body.portfolio-home *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
