:root {
    --primary-teal: #0f766e;
    --primary-teal-dark: #0d5a55;
    --primary-indigo: #4338ca;
    --accent-ice: #60a5fa;
    --accent-coral: #0f766e;
    --accent-lilac: #a855f7;
    --accent-lime: #22c55e;
    --accent-slate: #596a7f;
    --accent-danger: #b91c1c;
    --bg-off-white: #f6f7fb;
    --bg-white: #ffffff;
    --white: #ffffff;
    --text-charcoal: #0f172a;
    --text-muted: #475569;
    --highlight-warm: #2563eb;
    --border-soft: rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 14px 30px rgba(15, 23, 42, 0.08);
    --shadow-tight: 0 10px 24px rgba(15, 23, 42, 0.12);
    --icon-contrast: var(--primary-indigo);
    --font-main: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: 'Fraunces', 'Space Grotesk', serif;
    --max-width: 1200px;
    --nav-height: 74px;
    --floating-action-size: 56px;
    --floating-action-gap: 1.75rem;
}

body[data-theme="dark"] {
    --primary-teal: #5eead4;
    --primary-teal-dark: #2dd4bf;
    --primary-indigo: #93c5fd;
    --accent-ice: #38bdf8;
    --accent-coral: #2dd4bf;
    --accent-lilac: #c4b5fd;
    --accent-lime: #4ade80;
    --bg-off-white: #0b1220;
    --bg-white: #0f172a;
    --white: #0b1220;
    --text-charcoal: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-slate: #cbd5f5;
    --accent-danger: #fca5a5;
    --highlight-warm: #38bdf8;
    --border-soft: rgba(148, 163, 184, 0.2);
    --shadow-soft: 0 18px 40px rgba(5, 7, 15, 0.4);
    --shadow-tight: 0 10px 30px rgba(5, 7, 15, 0.6);
    --icon-contrast: #f8fafc;
}

body[data-theme="dark"] .sticky-nav {
    background: linear-gradient(120deg, rgba(15, 23, 42, 0.92), rgba(30, 64, 175, 0.45), rgba(13, 148, 136, 0.45));
}

body[data-theme="dark"] .hero-badge {
    background-color: rgba(94, 234, 212, 0.18);
    color: var(--primary-teal);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    margin: 0;
    font-family: var(--font-main);
    color: var(--text-charcoal);
    background-color: var(--bg-white);
    line-height: 1.6;
    font-size: 1.0625rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Faint grid overlay for a sleek tech look */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.02) 1px, transparent 1px);
    background-size: 96px 96px;
    pointer-events: none;
    z-index: 0;
}

body[data-theme="dark"]::after {
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
}

/* Skip Link */
.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 1000;
    background: var(--bg-white);
    color: var(--primary-teal);
    padding: 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: var(--shadow-soft);
}

.skip-link:focus-visible {
    left: 20px;
    top: 20px;
    outline: 2px solid var(--primary-teal);
}

/* Accessibility: Remove default focus outline for programmatically focused structural elements */
[tabindex="-1"]:focus {
    outline: none !important;
}

/* Typography */
h1, h2, h3 {
    margin-top: 0;
    line-height: 1.2;
    color: var(--text-charcoal);
    text-align: center;
    transition: color 0.3s ease;
    text-rendering: optimizeLegibility;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

#hero-heading {
    white-space: pre-line;
}

#hero-heading.hero-is-typing::after {
    content: "|";
    margin-left: 0.15em;
    color: rgba(67, 56, 202, 0.9);
    animation: hero-caret-blink 1s steps(1, end) infinite;
}

body[data-theme="dark"] #hero-heading.hero-is-typing::after {
    color: rgba(147, 197, 253, 0.95);
}

@keyframes hero-caret-blink {
    0%, 45% { opacity: 1; }
    46%, 100% { opacity: 0; }
}

h2 {
    font-size: 2.25rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--primary-teal);
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 1.05rem;
    transition: color 0.3s ease;
}

.subheading {
    font-size: 1.25rem;
    color: var(--accent-slate);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}


/* Layout */
.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 5rem 0;
    /* Performance: Defer rendering of off-screen sections (reduces initial load time) */
    content-visibility: auto;
    /* Estimated size to prevent scrollbar jumping. 1px width avoids horizontal overflow issues. */
    contain-intrinsic-size: 1px 800px;
}

.hero-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 8rem 0 0;
    text-align: center;
    background: radial-gradient(circle at top, rgba(67, 56, 202, 0.2), transparent 55%),
        radial-gradient(circle at 20% 20%, rgba(14, 116, 144, 0.18), transparent 45%),
        radial-gradient(circle at 80% 10%, rgba(15, 118, 110, 0.16), transparent 40%),
        linear-gradient(135deg, rgba(15, 118, 110, 0.16), rgba(96, 165, 250, 0.12)),
        var(--bg-off-white);
}

.hero-section > .container {
    position: relative;
    z-index: 2;
}

.hero-layout {
    display: grid;
    gap: 2rem;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-media {
    width: 100%;
    margin: 0;
    height: clamp(240px, 34vw, 520px);
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 45%, rgba(0, 0, 0, 0.15) 82%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 45%, rgba(0, 0, 0, 0.15) 82%, rgba(0, 0, 0, 0) 100%);
}

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 35%, rgba(20, 184, 166, 0.3), rgba(15, 118, 110, 0.12) 45%, rgba(8, 47, 73, 0.12) 100%);
    mix-blend-mode: screen;
    pointer-events: none;
}

@media (max-width: 1099px) {
    .hero-section {
        padding-bottom: 0;
    }

    .hero-media {
        margin-top: 2rem;
        height: clamp(220px, 48vw, 420px);
        overflow: hidden;
        mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 55%, rgba(0, 0, 0, 0) 100%);
        -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 55%, rgba(0, 0, 0, 0) 100%);
    }

    .hero-photo {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
        border-radius: 0;
        border: 0;
        box-shadow: none;
    }
}

.hero-load-item {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--hero-delay, 0ms);
}

.hero-section.hero-loaded .hero-load-item {
    opacity: 1;
    transform: translateY(0);
}

.hero-section.hero-intro-started .hero-sync-item {
    opacity: 1;
    transform: translateY(0);
    transition-duration: 0.28s;
}

.hero-neural-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.92;
    /* Performance: Force a dedicated GPU compositing layer so canvas redraws are
       isolated and do not trigger repaints of surrounding page content. */
    will-change: transform;
}

body[data-theme="dark"] .hero-neural-canvas {
    opacity: 0.95;
}

.alt-bg {
    background-color: var(--bg-off-white);
    transition: background-color 0.3s ease;
}

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

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

/* Navigation */
.sticky-nav {
    position: sticky;
    top: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(226, 232, 240, 0.9), rgba(191, 219, 254, 0.85));
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    z-index: 1000;
    height: var(--nav-height);
    border-bottom: 1px solid var(--border-soft);
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    height: 100%;
    flex-wrap: nowrap;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-charcoal);
    letter-spacing: 0.02em;
    font-size: 1.1rem;
    white-space: nowrap;
    transition: color 0.2s ease, transform 0.2s ease;
}

.brand:hover,
.brand:focus-visible {
    color: var(--primary-teal);
}

.brand:active {
    transform: translateY(0) scale(0.96) !important;
    transition: transform 0.1s ease !important;
}

.site-title {
    font-family: var(--font-main);
    color: var(--text-charcoal);
}

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    object-fit: cover;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.25);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.brand:hover .brand-logo,
.brand:focus-visible .brand-logo {
    transform: scale(1.08) rotate(-4deg);
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.35);
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 2rem;
    position: relative;
    --indicator-left: 0px;
    --indicator-width: 0px;
    --indicator-opacity: 0;
}

.nav-links::before {
    content: "";
    position: absolute;
    top: 50%;
    /* Performance: Use transform instead of left to prevent main thread layout thrashing. GPU composited. */
    left: 0;
    width: var(--indicator-width);
    height: 40px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(67, 56, 202, 0.18), rgba(15, 118, 110, 0.2), rgba(96, 165, 250, 0.18));
    transform: translate(var(--indicator-left), -50%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), width 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.18s ease;
    will-change: transform, width, opacity;
    opacity: var(--indicator-opacity);
    z-index: 0;
}

.nav-links.indicator-appear::before {
    transition: opacity 0.3s ease;
}

.nav-links li {
    position: relative;
    z-index: 1;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.1rem;
    text-decoration: none;
    color: var(--text-charcoal);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
    color: var(--primary-teal);
}

.nav-actions {
    --menu-btn-height: 34.4px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.nav-actions .btn-small {
    height: var(--menu-btn-height);
    display: inline-flex;
    align-items: center;
}

/* Unused nav-toggle styles removed to keep stylesheet lean. */


/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, background 0.22s ease, background-color 0.22s ease, color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
    cursor: pointer;
}

/* Focus cue for secondary CTA */
.focus-cue {
  animation: gentle-pulse 3s infinite;
}

@keyframes gentle-pulse {
  0% { box-shadow: 0 0 0 0 rgba(148, 163, 184, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(148, 163, 184, 0); }
  100% { box-shadow: 0 0 0 0 rgba(148, 163, 184, 0); }
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-indigo), var(--primary-teal), var(--accent-lilac));
    color: var(--white);
    border: none;
    box-shadow: var(--shadow-tight);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: linear-gradient(135deg, var(--accent-ice), var(--highlight-warm), var(--accent-coral));
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
}

.btn-rounded {
    border-radius: 999px;
    overflow: hidden;
}

.btn-hire {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    white-space: nowrap;
    flex-shrink: 0;
    overflow: hidden;
    transform-origin: center;
    will-change: transform;
    animation: hire-pulse 2.6s ease-in-out infinite;
}

.btn-hire::before {
    content: "";
    position: absolute;
    inset: -10%;
    background:
        radial-gradient(circle at 16% 28%, rgba(255, 255, 255, 0.95), transparent 32%),
        radial-gradient(circle at 34% 62%, rgba(255, 255, 255, 0.65), transparent 40%),
        radial-gradient(circle at 72% 22%, rgba(255, 255, 255, 0.85), transparent 36%),
        radial-gradient(circle at 84% 68%, rgba(255, 255, 255, 0.7), transparent 38%),
        radial-gradient(circle at 52% 42%, rgba(255, 255, 255, 0.55), transparent 45%);
    opacity: 0;
    transform: scale(0.85);
    animation: hire-sparkle 2.6s ease-in-out infinite;
    pointer-events: none;
}

.btn-hire::after {
    content: "";
    position: absolute;
    top: -120%;
    left: -40%;
    width: 60%;
    height: 320%;
    background: linear-gradient(120deg, transparent 15%, rgba(255, 255, 255, 0.55) 45%, rgba(255, 255, 255, 0.1) 60%, transparent 75%);
    opacity: 0;
    transform: translateX(-120%) rotate(18deg);
    animation: hire-shimmer 2.6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes hire-shimmer {
    0%,
    35% {
        opacity: 0;
        transform: translateX(-140%) rotate(18deg);
    }
    42% {
        opacity: 0.7;
    }
    52% {
        opacity: 1;
        transform: translateX(240%) rotate(18deg);
    }
    100% {
        opacity: 0;
        transform: translateX(240%) rotate(18deg);
    }
}

@keyframes hire-sparkle {
    0%,
    30% {
        opacity: 0;
        transform: scale(0.85);
    }
    40% {
        opacity: 0.5;
        transform: scale(1.02);
    }
    55% {
        opacity: 0.9;
        transform: scale(1.08);
    }
    70% {
        opacity: 0.4;
        transform: scale(1.03);
    }
    100% {
        opacity: 0;
        transform: scale(0.95);
    }
}

@keyframes hire-pulse {
    0%,
    30%,
    100% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.04);
    }
    58% {
        transform: scale(1.02);
    }
}


.btn-ghost {
    border: 2px solid var(--accent-slate);
    color: var(--text-charcoal);
    background-color: transparent;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
    border-color: var(--primary-teal);
    color: var(--primary-teal);
    transform: translateY(-2px);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.25);
}

.btn:active {
    transform: translateY(0) scale(0.96) !important;
    transition: transform 0.1s ease !important;
}

.btn-small {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}


.nav-linkedin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--menu-btn-height);
    height: var(--menu-btn-height);
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    color: var(--text-charcoal);
    text-decoration: none;
    transition: border-color 0.18s ease, color 0.18s ease, background-color 0.25s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-linkedin:hover,
.nav-linkedin:focus-visible {
    color: var(--primary-teal);
    border-color: var(--primary-teal);
    background-color: rgba(15, 118, 110, 0.08);
    transform: translateY(-1px);
    outline: none;
}

.nav-linkedin svg {
    width: 16px;
    height: 16px;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--menu-btn-height);
    height: var(--menu-btn-height);
    padding: 0;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background-color: transparent;
    color: var(--text-charcoal);
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.18s ease, color 0.18s ease, background-color 0.25s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.theme-toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 44px;
    min-height: 44px;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    border-color: var(--primary-teal);
    color: var(--primary-teal);
}

.theme-toggle:active {
    transform: translateY(0) scale(0.92) !important;
    transition: transform 0.1s ease !important;
}

.theme-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

[hidden] {
    display: none !important;
}


/* Cards & Content */
.card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-soft);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease, border-color 0.22s ease, background-color 0.22s ease;
    position: relative;
    overflow: hidden;
}

.card:hover,
.card:focus-visible {
    transform: translateY(-5px);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.15);
    border-color: rgba(67, 56, 202, 0.2);
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg, var(--primary-indigo), var(--primary-teal), var(--accent-ice), var(--accent-coral));
}

.card::after,
.work-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(96, 165, 250, 0.2), transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card:hover::after,
.card:focus-visible::after,
.work-card:hover::after,
.work-card:focus-visible::after {
    opacity: 1;
}

.hero-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    margin: 0;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    filter: grayscale(1) contrast(1.06);
}

.hero-founder-link {
    margin: 0.25rem auto 1.25rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.hero-founder-link a {
    color: var(--primary-teal);
    font-weight: 600;
    text-decoration: underline;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: linear-gradient(120deg, rgba(67, 56, 202, 0.22), rgba(15, 118, 110, 0.2), rgba(15, 118, 110, 0.18));
    color: var(--primary-teal-dark);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-actions .btn {
    min-width: 190px;
    text-align: center;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: center;
    justify-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
}

.hero-metrics .metric-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    text-align: center;
    width: 100%;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.22s ease, box-shadow 0.28s ease, border-color 0.22s ease;
}

.hero-metrics .metric-card:hover,
.hero-metrics .metric-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.15);
    border-color: rgba(67, 56, 202, 0.2);
}

.metric-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--icon-contrast);
    margin: 0 auto 0.85rem;
}

.metric-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.hero-metrics h3 {
    margin-bottom: 0.25rem;
    font-size: 1.65rem;
    color: var(--primary-indigo);
}

.hero-metrics p {
    margin-bottom: 0;
    color: var(--accent-slate);
}

.work-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--bg-white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease, background-color 0.22s ease, border-color 0.22s ease;
    border: 1px solid var(--border-soft);
    position: relative;
}

.work-card:hover,
.work-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 20px 36px rgba(15, 23, 42, 0.18);
}

.work-card:active {
    transform: translateY(0) scale(0.98) !important;
    box-shadow: var(--shadow-soft) !important;
    transition: transform 0.1s ease, box-shadow 0.1s ease !important;
}

.placeholder-img {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(67, 56, 202, 0.22), rgba(15, 118, 110, 0.2), rgba(96, 165, 250, 0.2), rgba(15, 118, 110, 0.18));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-slate);
    font-weight: 500;
}

.work-details {
    padding: 1.5rem;
}

.work-details h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.external-icon {
    width: 16px;
    height: 16px;
    opacity: 0.4;
    transition: transform 0.3s ease, color 0.3s ease, opacity 0.3s ease;
    flex-shrink: 0;
}

.work-card:hover .external-icon,
.work-card:focus-visible .external-icon {
    opacity: 1;
    color: var(--primary-teal);
    transform: translate(2px, -2px);
}

.contact-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 0;
    max-width: 1100px;
    margin: 0 auto;
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    background: var(--bg-white);
}

.contact-info {
    padding: 2.5rem 2.25rem;
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.22), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(0, 0, 0, 0.12), transparent 60%),
        linear-gradient(150deg, var(--primary-indigo), var(--primary-teal));
    color: var(--white);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body[data-theme="dark"] .contact-eyebrow {
    background: rgba(15, 23, 42, 0.2);
}

.contact-info h2 {
    color: inherit;
    text-align: left;
    font-size: 1.9rem;
    margin: 0;
    line-height: 1.15;
}

.contact-lede {
    color: inherit;
    opacity: 0.9;
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.55;
}


.contact-follow-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.55);
    margin-top: 0.2rem;
}

.contact-follow-link:hover,
.contact-follow-link:focus-visible {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22);
}

.contact-highlights {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.contact-highlights li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: inherit;
}

.contact-highlight-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    color: inherit;
}

body[data-theme="dark"] .contact-highlight-icon {
    background: rgba(15, 23, 42, 0.2);
}

.contact-highlights li > div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    line-height: 1.4;
}

.contact-highlights li > div strong {
    font-weight: 600;
    font-size: 0.98rem;
}

.contact-highlights li > div span {
    font-size: 0.9rem;
    opacity: 0.85;
}

.contact-channels {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.92rem;
}

body[data-theme="dark"] .contact-channels {
    border-top-color: rgba(15, 23, 42, 0.25);
}

.contact-channels-label {
    opacity: 0.85;
}

.contact-channel-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.contact-channel-link:hover,
.contact-channel-link:focus-visible {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.6);
    outline: none;
}

body[data-theme="dark"] .contact-channel-link {
    border-color: rgba(15, 23, 42, 0.35);
}

body[data-theme="dark"] .contact-channel-link:hover,
body[data-theme="dark"] .contact-channel-link:focus-visible {
    background: rgba(15, 23, 42, 0.2);
    border-color: rgba(15, 23, 42, 0.55);
}

.contact-channel-link .external-icon {
    opacity: 0.85;
}

.contact-form {
    margin: 0;
    display: grid;
    gap: 0.75rem;
    padding: 2.5rem 2.25rem;
    background: linear-gradient(160deg, var(--bg-white), color-mix(in srgb, var(--bg-off-white) 70%, var(--bg-white)));
}

@media (max-width: 860px) {
    .contact-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .contact-info {
        padding: 2rem 1.75rem;
    }

    .contact-form {
        padding: 2rem 1.75rem;
    }
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background-color: var(--bg-white);
    color: var(--text-charcoal);
    font: inherit;
}

.contact-form textarea {
    resize: vertical;
}

/* Security: Hide honeypot field via CSS class due to strict CSP (no inline styles) */
.honeypot-field {
    display: none !important;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
    outline: 2px solid var(--primary-teal);
    outline-offset: 2px;
}

.contact-form input[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] {
    border-color: var(--accent-coral);
}

.contact-form input[aria-invalid="true"]:focus-visible,
.contact-form textarea[aria-invalid="true"]:focus-visible {
    outline-color: var(--accent-coral);
}

.contact-submit-btn {
    justify-self: center;
    min-width: 200px;
    text-align: center;
}

.submit-spinner {
    animation: btn-spin 1s linear infinite;
}

@keyframes btn-spin {
    100% { transform: rotate(360deg); }
}

.required-asterisk {
    color: var(--accent-coral);
    margin-left: 0.25rem;
}

.form-footnote {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0.5rem 0 0 0;
    justify-self: center;
}

.contact-form.is-submitting .contact-submit-btn {
    opacity: 0.8;
    pointer-events: none;
}

.form-success-msg {
    margin: 0;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--accent-lime) 45%, transparent);
    background-color: color-mix(in srgb, var(--accent-lime) 14%, transparent);
    color: var(--text-charcoal);
    font-size: 0.92rem;
    text-align: center;
}

.error-msg {
    color: var(--accent-coral);
    font-size: 0.875rem;
    display: block;
    margin-top: -0.5rem; /* pull it closer to the input */
}

/* Footer */
.site-footer {
    background-color: #0b1220;
    color: #e2e8f0;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-top {
    display: flex;
    gap: 4rem;
    padding: 4rem 0 3rem;
    flex-wrap: wrap;
}

.footer-brand {
    flex: 0 0 260px;
}

.footer-brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    margin-bottom: 1.25rem;
}

.footer-logo {
    border-radius: 10px;
    filter: brightness(1.1);
    width: 2.75rem;
    height: 2.75rem;
}

.footer-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.01em;
}

.footer-tagline {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.footer-nav {
    display: flex;
    gap: 3rem;
    flex: 1;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.footer-col {
    min-width: 120px;
}

.footer-col-heading {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: left;
    color: #94a3b8;
    margin: 0 0 1rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-col a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.footer-col a .footer-link-icon {
    width: 14px;
    height: 14px;
    margin-right: 0.4rem;
    vertical-align: -2px;
}

.footer-legal-trigger {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    background: transparent;
    border: 0;
    padding: 0;
    font-family: inherit;
    line-height: inherit;
    text-align: left;
    cursor: pointer;
}

.footer-col a:hover,
.footer-col a:focus-visible {
    color: #5eead4;
}


.footer-col a.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
}

.footer-col a.brand-link svg {
    width: 15px;
    height: 15px;
}

.footer-col a.external-link {
    display: inline-flex;
    align-items: center;
}

.footer-col a.external-link .external-icon {
    margin-left: 4px;
}

.footer-col a.external-link:hover .external-icon,
.footer-col a.external-link:focus-visible .external-icon {
    opacity: 1;
    color: #5eead4;
    transform: translate(2px, -2px);
}

.footer-legal-trigger:hover,
.footer-legal-trigger:focus-visible {
    color: #5eead4;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 1.25rem 0;
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-copy,
.footer-built {
    margin: 0;
    font-size: 0.85rem;
    color: #475569;
}

.footer-built {
    color: #334155;
}

.legal-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.legal-modal {
    width: min(760px, 100%);
    max-height: min(85vh, 920px);
    overflow-y: auto;
    background: var(--bg-white);
    color: var(--text-charcoal);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 1.25rem 1.1rem 1.1rem;
    box-shadow: var(--shadow-soft);
}

.legal-modal h2 {
    margin: 0 0 0.75rem;
}

.legal-modal h3 {
    margin: 1rem 0 0.35rem;
    font-size: 1rem;
    text-align: left;
}

.legal-modal p {
    margin: 0 0 0.75rem;
    line-height: 1.55;
}

.terms-conditions-modal h3 {
    margin-top: 1.35rem;
}

.terms-email-reveal {
    background: transparent;
    border: 0;
    padding: 0;
    color: #0f766e;
    text-decoration: underline;
    font: inherit;
    line-height: inherit;
    cursor: pointer;
}

.terms-email-reveal:hover,
.terms-email-reveal:focus-visible {
    color: #115e59;
}

.legal-modal-close {
    float: right;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.1rem 0.35rem;
    position: relative;
}

.legal-modal-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 44px;
    min-height: 44px;
}

.legal-modal-close:hover,
.legal-modal-close:focus-visible {
    color: var(--text-charcoal);
}

/* Placeholder styling */
input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.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;
}

.scroll-fade {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.scroll-fade.is-visible {
    opacity: 1;
    transform: translateY(0);
    will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }

    .scroll-fade,
    .scroll-fade.is-visible {
        opacity: 1;
        transform: none;
        transition: none;
        will-change: auto;
    }

    .btn-hire::after {
        animation: none;
    }

    .btn-hire::before {
        animation: none;
    }

    .btn-hire {
        animation: none;
    }

    .hero-load-item,
    .hero-section.hero-loaded .hero-load-item {
        opacity: 1;
        transform: none;
        transition: none;
    }

    #hero-heading.hero-is-typing::after {
        animation: none;
    }
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.25rem;
    }

    .sticky-nav {
        height: auto;
        padding: 0.75rem 0;
    }

    .nav-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }

    .nav-links {
        display: none;
    }


    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 260px;
    }
}

@media (max-width: 1100px) {
    .nav-links {
        display: none;
    }

    .grid-3 {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
        justify-content: center;
    }

    .grid-3 > :nth-last-child(1):nth-child(odd) {
        grid-column: 1 / -1;
        justify-self: center;
        max-width: 560px;
        width: 100%;
    }

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

@media (max-width: 1240px) {
    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }


    .nav-actions .btn-small {
        padding: 0.45rem 1.2rem;
    }
}

@media (max-width: 1180px) {
    .nav-bar {
        flex-wrap: nowrap;
        justify-content: space-between;
        row-gap: 0.75rem;
    }

    .nav-links {
        width: 100%;
    }

    .nav-actions {
        order: 0;
    }

    .nav-links {
        order: 0;
    }
}

@media (max-width: 720px) {
    .grid-3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-metrics {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 560px) {
    .nav-actions {
        --menu-btn-height: 32.8px;
    }

    .brand {
        font-size: 0.98rem;
        min-width: 0;
    }

    .brand span {
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .brand-logo {
        width: 32px;
        height: 32px;
    }

    .btn-small {
        padding: 0.45rem 1.15rem;
        font-size: 0.85rem;
    }
}

/* Back to Top Sentinel */
#back-to-top-sentinel {
    position: absolute;
    top: 0;
    height: 200px;
    width: 1px;
    pointer-events: none;
    visibility: hidden;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    right: 1rem;
    bottom: calc(1rem + var(--floating-action-size) + var(--floating-action-gap));
    width: var(--floating-action-size);
    height: var(--floating-action-size);
    border-radius: 50%;
    background-color: var(--bg-white);
    color: var(--primary-teal);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-tight);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.22s ease, border-color 0.18s ease, visibility 0.25s ease;
    z-index: 1200;
}

.back-to-top::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: var(--floating-action-size);
    min-height: var(--floating-action-size);
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.back-to-top:hover,
.back-to-top:focus-visible {
    transform: translateY(-3px);
    border-color: var(--primary-teal);
    color: var(--primary-teal-dark);
}

.back-to-top:active {
    transform: translateY(0) scale(0.92) !important;
    transition: transform 0.1s ease !important;
}

.brand:focus-visible,
.nav-links a:focus-visible,
.btn:focus-visible,
.theme-toggle:focus-visible,
.work-card:focus-visible,
.back-to-top:focus-visible {
    outline: 2px solid var(--primary-teal);
    outline-offset: 2px;
    transition: outline-offset 0.2s ease;
}

@media (max-width: 560px) {
    .back-to-top {
        width: var(--floating-action-size);
        height: var(--floating-action-size);
        right: 1rem;
        bottom: calc(1rem + var(--floating-action-size) + var(--floating-action-gap));
    }
}

/* ============================================================
   In Practice Section
   ============================================================ */

/* Override content-visibility for the in-practice section: its scroll scenes are
   much taller than the generic 800px placeholder, causing layout shifts that
   prevent the scroll-fade observer from detecting entry correctly. */
.ip-section {
    content-visibility: visible;
    contain-intrinsic-size: none;
}

.ip-section .subheading {
    margin-bottom: 3rem;
}

.ip-acts {
    margin-bottom: 2.5rem;
}

.ip-act + .ip-act {
    margin-top: 3rem;
}

.ip-act {
    --ip-sticky-top: clamp(calc(var(--nav-height) + 1rem), calc(50vh - 11rem), calc(100vh - 23rem));
    position: relative;
}

@media (min-width: 1101px) {
    .ip-act {
        --ip-sticky-top: clamp(calc(var(--nav-height) + 1.5rem), calc(50vh - 10rem), calc(100vh - 18rem));
        display: grid;
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
        gap: clamp(2rem, 4vw, 4rem);
        align-items: start;
    }

    .ip-act:nth-child(even) {
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
    }
}

/* Act header */
.ip-act-meta {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    margin-bottom: 1.25rem;
    opacity: 1;
    transform: none;
}

html.ip-enhanced .ip-act-meta {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

html.ip-enhanced .ip-act.ip-visible .ip-act-meta {
    opacity: 1;
    transform: none;
}

@media (min-width: 1101px) {
    .ip-act-meta {
        margin-bottom: 0;
        position: sticky;
        top: var(--ip-sticky-top);
        align-self: start;
        min-height: min(20rem, calc(100vh - var(--ip-sticky-top) - 2rem));
        display: flex;
        align-items: center;
    }

    .ip-act:nth-child(even) .ip-act-meta {
        grid-column: 2;
    }
}

.ip-act-text {
    flex: 1;
}

.ip-act-desc {
    margin: 0.4rem 0 0;
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 58ch;
}

.ip-act-num {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-white);
    border: 1px solid var(--border-soft);
    border-radius: 5px;
    padding: 3px 9px;
    flex-shrink: 0;
    margin-top: 0.2rem;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.ip-act-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-charcoal);
    margin: 0;
    text-align: left;
    line-height: 1.3;
}

.ip-act-title em {
    font-style: normal;
    color: var(--primary-teal);
}

/* Scroll scene: tall container so the sticky panel can "pin" while scrolling */
.ip-scroll-scene {
    position: relative;
    min-height: 180vh;
}

@media (min-width: 1101px) {
    .ip-scroll-scene {
        min-height: 210vh;
    }

    .ip-act:nth-child(even) .ip-scroll-scene {
        grid-column: 1;
        grid-row: 1;
    }
}

/* Sticky wrapper — holds both before and after panels, stacked in one cell */
.ip-scene-panel-wrap {
    position: sticky;
    top: var(--ip-sticky-top, 50vh);
    transform: none;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    width: 100%;
    align-items: start;
    z-index: 1;
    overflow: hidden;
    border-radius: 14px;
}

/* Both panels occupy the same grid cell (overlapping) */
.ip-scene-panel {
    grid-area: 1 / 1 / 2 / 2;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}

.ip-scene-before {
    opacity: 1;
    transform: none;
    filter: none;
    z-index: 2;
    /* Performance: Pre-promote to compositor layer so opacity/transform
       transitions run on the GPU without triggering a main-thread repaint. */
    will-change: opacity, transform;
}

.ip-scene-after {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
    filter: none;
    pointer-events: none;
    z-index: 1;
    will-change: opacity, transform;
}

/* When sentinel fires: magic sweep plays, before blurs away, after fades in */
.ip-scroll-scene.scene-revealed .ip-scene-before {
    opacity: 0;
    transform: scale(0.97);
    filter: blur(2px);
    pointer-events: none;
    transition: opacity 0.38s cubic-bezier(0.4, 0, 1, 1) 0.08s, transform 0.38s cubic-bezier(0.4, 0, 1, 1) 0.08s, filter 0.32s ease 0.04s;
}

.ip-scroll-scene.scene-revealed .ip-scene-after {
    opacity: 1;
    transform: none;
    filter: none;
    pointer-events: auto;
    z-index: 3;
    transition: opacity 0.52s cubic-bezier(0.16, 1, 0.3, 1) 0.24s, transform 0.52s cubic-bezier(0.16, 1, 0.3, 1) 0.24s;
}

/* Magic sweep beam — a glowing streak that crosses the panel when revealed */
.ip-scene-panel-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 0%,
        rgba(94, 234, 212, 0.1)  18%,
        rgba(94, 234, 212, 0.38) 38%,
        rgba(255, 255, 255, 0.93) 50%,
        rgba(94, 234, 212, 0.38) 62%,
        rgba(94, 234, 212, 0.1)  82%,
        transparent 100%
    );
    z-index: 20;
    pointer-events: none;
    opacity: 0;
    will-change: transform;
}

.ip-scroll-scene.scene-revealed .ip-scene-panel-wrap::before {
    animation: ip-magic-sweep 0.82s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 1;
}

@keyframes ip-magic-sweep {
    0%   { transform: translateX(-100%); opacity: 1; }
    88%  { opacity: 1; }
    100% { transform: translateX(100%);  opacity: 0; }
}

/* Sentinel element — sits at ~55% through the sticky experience to trigger the reveal */
.ip-scene-trigger {
    position: absolute;
    top: 122vh;
    left: 0;
    right: 0;
    height: 1px;
    pointer-events: none;
}

html.ip-no-sticky .ip-scroll-scene {
    min-height: auto;
}

html.ip-no-sticky .ip-scene-panel-wrap {
    position: relative;
    top: auto;
    transform: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

html.ip-no-sticky .ip-scene-panel {
    grid-area: auto;
}

html.ip-no-sticky .ip-scene-before,
html.ip-no-sticky .ip-scene-after {
    opacity: 1;
    transform: none;
    filter: none;
    pointer-events: auto;
}

html.ip-no-sticky .ip-scene-after {
    z-index: 2;
}

html.ip-no-sticky .ip-scene-trigger {
    display: none;
}

/* In no-sticky mode the sweep and animated transitions are not needed */
html.ip-no-sticky .ip-scene-panel-wrap::before {
    display: none;
}

html.ip-no-sticky .ip-scroll-scene.scene-revealed .ip-scene-before,
html.ip-no-sticky .ip-scroll-scene.scene-revealed .ip-scene-after {
    transition: none;
    filter: none;
}

@media (min-width: 1101px) {
    html.ip-no-sticky .ip-act {
        display: grid;
    }
}

/* Pipeline panel body — no horizontal scroll, full-width nodes */
.ip-panel-body--pipe {
    padding: 0.75rem;
}

.ip-panel {
    background: var(--bg-white);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.ip-panel-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-bottom: 1px solid var(--border-soft);
    background: var(--bg-off-white);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.ip-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ip-dot-bad  { background: var(--accent-danger); }
.ip-dot-good { background: var(--primary-teal); }

.ip-panel-body {
    padding: 0.875rem;
    overflow-x: auto;
}

/* Data table */
.ip-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Courier New', 'SF Mono', 'Menlo', monospace;
    font-size: 0.75rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.ip-table th {
    text-align: left;
    font-weight: 600;
    color: var(--text-charcoal);
    padding: 0 0.5rem 0.4rem;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.ip-table td {
    padding: 0.15rem 0.5rem;
    white-space: nowrap;
}

.val-bad  { color: var(--accent-danger);  font-weight: 600; }
.val-good { color: var(--primary-teal);  font-weight: 600; }

.ip-row-drop td {
    opacity: 0.45;
    text-decoration: line-through;
    text-decoration-color: var(--accent-coral);
}

.ip-tag {
    font-size: 0.6rem;
    background: rgba(15, 118, 110, 0.1);
    color: var(--primary-teal);
    border: 1px solid rgba(15, 118, 110, 0.2);
    border-radius: 4px;
    padding: 1px 5px;
    white-space: nowrap;
    font-family: var(--font-main);
    letter-spacing: 0.04em;
}

.ip-tag-drop {
    background: rgba(15, 118, 110, 0.08);
    color: var(--accent-coral);
    border-color: rgba(15, 118, 110, 0.2);
}

/* Pipeline layout */
.ip-pipeline {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.75rem;
    align-items: start;
}

.ip-pipe-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ip-pipe-arrow {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2rem;
    color: var(--text-muted);
}

.ip-pipe-node {
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 0.7rem 0.875rem;
    background: var(--bg-white);
    box-shadow: var(--shadow-soft);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.ip-pipe-name {
    font-family: 'Courier New', 'SF Mono', 'Menlo', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-charcoal);
    margin-bottom: 0.2rem;
    transition: color 0.3s ease;
}

.ip-pipe-sub {
    font-family: 'Courier New', 'SF Mono', 'Menlo', monospace;
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.ip-pipe-bad {
    border-color: rgba(185, 28, 28, 0.35);
    background: rgba(185, 28, 28, 0.06);
}

.ip-pipe-good {
    border-color: rgba(15, 118, 110, 0.3);
    background: rgba(15, 118, 110, 0.04);
}

body[data-theme="dark"] .ip-pipe-bad  { background: rgba(252, 165, 165, 0.14); }
body[data-theme="dark"] .ip-pipe-good { background: rgba(15, 118, 110, 0.08); }

/* Dark mode: soften the white flash so it doesn't blow out dark backgrounds */
body[data-theme="dark"] .ip-scene-panel-wrap::before {
    background: linear-gradient(
        105deg,
        transparent 0%,
        rgba(94, 234, 212, 0.08)  18%,
        rgba(94, 234, 212, 0.32)  38%,
        rgba(180, 255, 242, 0.68) 50%,
        rgba(94, 234, 212, 0.32)  62%,
        rgba(94, 234, 212, 0.08)  82%,
        transparent 100%
    );
}

.ip-badge {
    display: inline-block;
    font-size: 0.58rem;
    border-radius: 3px;
    padding: 1px 5px;
    vertical-align: middle;
    margin-left: 3px;
    font-family: var(--font-main);
    letter-spacing: 0.03em;
}

.ip-badge-err {
    background: var(--accent-danger);
    color: #fff;
}

.ip-badge-ok {
    background: var(--primary-teal);
    color: #fff;
}

.ip-chart-card {
    background: var(--bg-white);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.ip-chart-body {
    padding: 0.875rem;
}

.ip-chart-svg {
    display: block;
    width: 100%;
    height: auto;
}

/* ---- UGLY chart SVG styles (exaggerated ggplot2 defaults) ---- */
.cg-bg           { fill: #c8c8c8; }
body[data-theme="dark"] .cg-bg { fill: #2a2a2a; }
/* Major gridlines: thick white stripes */
.cg-grid         { stroke: #f5f5f5; stroke-width: 1.5; }
body[data-theme="dark"] .cg-grid { stroke: #1a1a1a; }
/* Minor gridlines: thinner white stripes — extra clutter */
.cg-grid-minor   { stroke: #e0e0e0; stroke-width: 0.75; }
body[data-theme="dark"] .cg-grid-minor { stroke: #222; }
.cg-grid-v       { stroke: #f5f5f5; stroke-width: 1.5; }
body[data-theme="dark"] .cg-grid-v { stroke: #1a1a1a; }
.cg-grid-minor-v { stroke: #e0e0e0; stroke-width: 0.75; }
body[data-theme="dark"] .cg-grid-minor-v { stroke: #222; }
/* Heavy black axes */
.cg-axis         { stroke: #111; stroke-width: 2.5; }
body[data-theme="dark"] .cg-axis { stroke: #bbb; }
/* Garish ggplot2 salmon-red and bright cyan */
.cg-line-a       { fill: none; stroke: #F8766D; stroke-width: 2; }
.cg-line-b       { fill: none; stroke: #00BFC4; stroke-width: 2; }
.cg-dot-a        { fill: #F8766D; stroke: #F8766D; }
.cg-dot-b        { fill: #00BFC4; stroke: #00BFC4; }
/* Heavy legend box */
.cg-legend-bg    { fill: #f5f5f5; stroke: #888; stroke-width: 1.5; }
body[data-theme="dark"] .cg-legend-bg { fill: #333; }
.cg-legend-line-a { stroke: #F8766D; stroke-width: 2; }
.cg-legend-line-b { stroke: #00BFC4; stroke-width: 2; }
/* Times New Roman for maximum chart-crime energy */
.cg-legend-text  { font-size: 7.5px; font-family: "Times New Roman", Times, serif; fill: #222; }
body[data-theme="dark"] .cg-legend-text { fill: #ddd; }
.cg-tick         { font-size: 7px; font-family: "Times New Roman", Times, serif; fill: #333; text-anchor: middle; }
body[data-theme="dark"] .cg-tick { fill: #aaa; }
.cg-tick-y       { font-size: 7px; font-family: "Times New Roman", Times, serif; fill: #333; text-anchor: end; }
body[data-theme="dark"] .cg-tick-y { fill: #aaa; }
.cg-plot-title   { font-size: 7.5px; font-family: "Times New Roman", Times, serif; fill: #111; text-anchor: middle; font-style: italic; }
body[data-theme="dark"] .cg-plot-title { fill: #ddd; }
.cg-plot-subtitle { font-size: 5.5px; font-family: "Times New Roman", Times, serif; fill: #555; text-anchor: middle; }
body[data-theme="dark"] .cg-plot-subtitle { fill: #999; }
.cg-axis-title   { font-size: 7px; font-family: "Times New Roman", Times, serif; fill: #444; text-anchor: middle; }
body[data-theme="dark"] .cg-axis-title { fill: #aaa; }
.cg-axis-title-y { font-size: 7px; font-family: "Times New Roman", Times, serif; fill: #444; text-anchor: middle; }
body[data-theme="dark"] .cg-axis-title-y { fill: #aaa; }

/* ---- PRETTY chart SVG styles (publication-ready custom theme) ---- */
.cn-grid     { stroke: var(--border-soft); stroke-width: 0.6; stroke-dasharray: none; }
.cn-baseline { stroke: var(--text-charcoal); stroke-width: 0.8; opacity: 0.25; }
/* Gradient fills defined inline in SVG <defs> */
.cn-fill-a   { fill: url(#grad-a); }
.cn-fill-b   { fill: url(#grad-b); }
/* Smooth curves — thick, rounded */
.cn-line-a   { fill: none; stroke: var(--primary-indigo); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.cn-line-b   { fill: none; stroke: var(--primary-teal);   stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
/* Endpoint dots only */
.cn-dot-a    { fill: #fff; stroke: var(--primary-indigo); stroke-width: 2; }
.cn-dot-b    { fill: #fff; stroke: var(--primary-teal);   stroke-width: 2; }
/* Direct end-of-line labels — bold, colored */
.cn-label-a  { font-size: 8px; font-family: var(--font-main), sans-serif; fill: var(--primary-indigo); font-weight: 700; }
.cn-label-b  { font-size: 8px; font-family: var(--font-main), sans-serif; fill: var(--primary-teal);   font-weight: 700; }
/* Minimal tick labels */
.cn-tick     { font-size: 7px; font-family: var(--font-main), sans-serif; fill: var(--text-muted); text-anchor: middle; }
.cn-tick-y   { font-size: 7px; font-family: var(--font-main), sans-serif; fill: var(--text-muted); text-anchor: end; }
/* Clean, left-aligned title in the brand font */
.cn-title    { font-size: 9px; font-family: var(--font-main), sans-serif; fill: var(--text-charcoal); font-weight: 600; text-anchor: start; }

/* Legacy reveal — kept for compatibility, not actively used on scroll scenes */
.ip-reveal {
    opacity: 0.18;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.ip-reveal-delay-1 { transition-delay: 0s; }
.ip-reveal-delay-2 { transition-delay: 0s; }

.ip-act.ip-visible .ip-reveal          { opacity: 1; }
.ip-act.ip-visible .ip-reveal-delay-1  { transition-delay: 0.35s; }
.ip-act.ip-visible .ip-reveal-delay-2  { transition-delay: 0.7s; }

/* "and so much more" narrative closer */
.ip-and-more {
    text-align: center;
    margin-top: 3rem;
    font-size: 1.35rem;
    font-style: italic;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

/* Responsive */
@media (max-width: 720px) {
    .ip-act {
        --ip-sticky-top: clamp(calc(var(--nav-height) + 0.75rem), calc(50vh - 10rem), calc(100vh - 20.5rem));
    }

    .ip-scroll-scene {
        min-height: 120vh;
    }

    .ip-scene-trigger {
        top: 96vh;
    }

    .ip-act-title { font-size: 1rem; }

    .ip-act-desc { font-size: 0.88rem; }
}

@media (max-width: 480px) {
    .ip-act {
        --ip-sticky-top: clamp(calc(var(--nav-height) + 0.5rem), calc(50vh - 8.75rem), calc(100vh - 18rem));
    }

    .ip-scroll-scene {
        min-height: 105vh;
    }

    .ip-scene-trigger {
        top: 88vh;
    }

    .ip-table { font-size: 0.68rem; }
    .ip-pipe-name { font-size: 0.68rem; }
}

/* Footer responsive */
@media (max-width: 768px) {
    .footer-top {
        flex-direction: column;
        gap: 2.5rem;
        padding: 3rem 0 2rem;
    }

    .footer-brand {
        flex: none;
    }

    .footer-nav {
        justify-content: flex-start;
        gap: 2rem;
    }

    .footer-bottom-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Print Stylesheet */
@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    body {
        margin: 0;
        padding: 0;
        line-height: 1.5;
        font-family: var(--font-main);
        background: white !important;
        color: black !important;
    }

    /* Hide non-printable or interactive elements */
    .nav-links,
    .nav-actions,
    .theme-toggle,
    .back-to-top,
    .skip-link,
    .hero-actions,
    .btn-hire,
    .hero-badge {
        display: none !important;
    }

    /* Adjust Header for Print */
    .sticky-nav {
        position: relative !important;
        background: none !important;
        border-bottom: 2px solid #000;
        height: auto;
        padding: 1rem 0;
        box-shadow: none !important;
        display: block !important;
    }

    .brand {
        font-size: 2rem;
        color: #000 !important;
        text-decoration: none !important;
    }

    .brand-logo {
        display: none !important;
    }

    /* Ensure content visibility */
    .scroll-fade {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .section {
        padding: 1rem 0;
        page-break-inside: avoid;
        content-visibility: visible !important;
        contain-intrinsic-size: auto !important;
    }

    .hero-section {
        padding: 2rem 0;
        background: none !important;
        text-align: left;
    }

    .hero-neural-canvas {
        display: none !important;
    }

    h1 {
        font-size: 2.5rem;
        text-align: left;
    }

    .subheading {
        text-align: left;
        margin-left: 0;
    }

    h2, h3 {
        color: #000 !important;
        page-break-after: avoid;
    }

    /* Links */
    a,
    a:visited {
        text-decoration: underline;
        color: #000 !important;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 90%;
    }

    a[href^="#"]::after,
    a[href^="javascript:"]::after,
    .brand[href]::after {
        content: "";
    }

    /* Layout Adjustments */
    .hero-metrics {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
        margin-top: 2rem;
    }

    .metric-card {
        border: 1px solid #ddd;
        box-shadow: none;
        padding: 1rem;
    }

    .grid-3 {
        display: block;
    }

    .card, .work-card {
        page-break-inside: avoid;
        margin-bottom: 1.5rem;
        border: 1px solid #ddd;
        box-shadow: none;
    }

    .placeholder-img {
        height: 100px;
        background: #eee !important;
        color: #000 !important;
        border-bottom: 1px solid #ddd;
    }

    /* Footer */
    .site-footer {
        background-color: #fff !important;
        color: #000 !important;
        border-top: 1px solid #000;
        padding: 1rem 0;
    }

    .site-footer::after {
        content: "View full portfolio at https://noahweidig.com";
        display: block;
        margin-top: 0.5rem;
        font-style: italic;
        font-size: 0.9rem;
    }

    .footer-col a,
    .footer-name,
    .footer-copy,
    .footer-built {
        color: #000 !important;
    }
}

@media print {
    .ai-chatbot {
        display: none !important;
    }
}

.ai-chatbot {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1300;
    width: auto;
    max-width: none;
}

.ai-chat-toggle {
    border: none;
    border-radius: 999px;
    width: var(--floating-action-size);
    height: var(--floating-action-size);
    font: inherit;
    color: var(--bg-white);
    background: linear-gradient(120deg, var(--primary-indigo), var(--primary-teal));
    box-shadow: var(--shadow-tight);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-left: auto;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.ai-chat-toggle:hover,
.ai-chat-toggle:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    filter: saturate(1.08);
}

.ai-chat-toggle-icon {
    width: 24px;
    height: 24px;
}

.ai-chat-toggle-icon--close {
    display: none;
}

.ai-chatbot.is-open .ai-chat-toggle-icon--chat {
    display: none;
}

.ai-chatbot.is-open .ai-chat-toggle-icon--close {
    display: block;
}

.ai-chat-panel {
    position: absolute;
    right: 0;
    bottom: calc(var(--floating-action-size) + 0.75rem);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    background: var(--bg-white);
    box-shadow: var(--shadow-soft);
    width: min(94vw, 370px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(4px);
}

@media (max-width: 560px) {
    .ai-chat-panel {
        width: min(94vw, 370px);
    }
}

.ai-chat-panel-head {
    padding: 0.75rem 0.95rem 0.7rem;
    background: linear-gradient(120deg, var(--primary-indigo), var(--primary-teal));
    color: var(--white);
}

.ai-chat-panel-head h2 {
    font-size: 0.98rem;
    margin: 0 0 0.15rem;
    text-align: left;
    color: inherit;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.ai-chat-panel-body {
    padding: 0.85rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ai-chat-meta {
    margin: 0;
    font-size: 0.82rem;
    color: inherit;
    opacity: 0.82;
}

.ai-chat-log {
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    max-height: min(48vh, 320px);
    overflow-y: auto;
    background: var(--bg-off-white);
    padding: 0.65rem;
}

.ai-chat-msg {
    width: fit-content;
    max-width: 92%;
    margin: 0 0 0.6rem;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    line-height: 1.45;
    font-size: 0.95rem;
}

.ai-chat-msg-user {
    margin-left: auto;
    background: var(--primary-indigo);
    color: var(--bg-white);
}

.ai-chat-msg-bot {
    background: color-mix(in srgb, var(--primary-teal) 16%, var(--bg-white));
}

.ai-chat-msg-bot.ai-chat-msg-error {
    background: color-mix(in srgb, #ff4d4f 12%, var(--bg-white));
    color: #991b1b;
    border: 1px solid color-mix(in srgb, #ff4d4f 30%, transparent);
}

.ai-chat-form {
    display: flex;
    gap: 0.5rem;
}

.ai-chat-form input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: var(--bg-off-white);
    color: var(--text-charcoal);
    font: inherit;
    padding: 0.55rem 0.65rem;
}

/* ============================================================
   Chat Greeting Bubble (speech bubble next to chat FAB)
   ============================================================ */

.ai-chat-greeting {
    position: absolute;
    right: calc(var(--floating-action-size) + 0.65rem);
    bottom: calc((var(--floating-action-size) - 2.25rem) / 2);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem 0.5rem 0.85rem;
    max-width: min(80vw, 240px);
    background: var(--bg-white);
    color: var(--text-charcoal);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
    font-size: 0.9rem;
    line-height: 1.25;
    white-space: nowrap;
    transform-origin: center right;
    animation: ai-chat-greeting-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    z-index: 1;
}

.ai-chat-greeting[hidden] {
    display: none;
}

.ai-chat-greeting.is-leaving {
    animation: ai-chat-greeting-out 0.25s ease-in forwards;
}


.ai-chat-greeting-text {
    font-weight: 500;
}

.ai-chat-greeting-wave {
    display: inline-block;
    transform-origin: 70% 70%;
    animation: ai-chat-wave 2.4s ease-in-out infinite;
}

.ai-chat-greeting-close {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1;
    padding: 0 0.15rem;
    cursor: pointer;
    border-radius: 4px;
}

.ai-chat-greeting-close:hover,
.ai-chat-greeting-close:focus-visible {
    color: var(--text-charcoal);
    outline: none;
}

.ai-chat-greeting-close:focus-visible {
    outline: 2px solid var(--primary-teal);
    outline-offset: 2px;
}

@keyframes ai-chat-greeting-in {
    0% {
        opacity: 0;
        transform: translateY(6px) scale(0.85);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes ai-chat-greeting-out {
    to {
        opacity: 0;
        transform: translateY(4px) scale(0.92);
    }
}

@keyframes ai-chat-wave {
    0%, 60%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
}

@media (max-width: 560px) {
    .ai-chat-greeting {
        max-width: min(70vw, 200px);
        font-size: 0.85rem;
        white-space: normal;
        border-radius: 14px;
    }
}

#bottom-hint-sentinel {
    height: 1px;
    width: 1px;
    pointer-events: none;
    visibility: hidden;
}

/* ============================================================
   Calendar FAB (schedule a meeting via cal.com)
   ============================================================ */

.cal-fab {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    z-index: 1250;
}

.cal-fab-toggle {
    border: none;
    border-radius: 999px;
    width: var(--floating-action-size);
    height: var(--floating-action-size);
    font: inherit;
    color: var(--bg-white);
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-indigo));
    box-shadow: var(--shadow-tight);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.cal-fab-toggle:hover,
.cal-fab-toggle:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    filter: saturate(1.08);
}

.cal-fab-toggle:focus-visible {
    outline: 2px solid var(--primary-teal);
    outline-offset: 3px;
}

.cal-fab-toggle:active {
    transform: translateY(0) scale(0.94);
}

.cal-fab-toggle-icon {
    width: 24px;
    height: 24px;
    transition: transform 200ms ease;
}

.cal-fab-toggle-icon--close {
    display: none;
}

.cal-fab.is-open .cal-fab-toggle-icon--cal {
    display: none;
}

.cal-fab.is-open .cal-fab-toggle-icon--close {
    display: block;
}

.cal-fab.is-open .cal-fab-toggle {
    transform: rotate(0deg);
}

.cal-fab-panel {
    position: absolute;
    left: 0;
    bottom: calc(var(--floating-action-size) + 0.75rem);
    width: min(94vw, 400px);
    height: min(72vh, 560px);
    background: var(--bg-white);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform-origin: bottom left;
    animation: cal-fab-in 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.cal-fab-panel[hidden] {
    display: none;
}

@keyframes cal-fab-in {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.92);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cal-fab-panel-head {
    padding: 0.75rem 0.95rem 0.7rem;
    background: linear-gradient(120deg, var(--primary-indigo), var(--primary-teal));
    color: var(--white);
}

.cal-fab-panel-head h2 {
    font-size: 0.98rem;
    margin: 0 0 0.15rem;
    text-align: left;
    color: inherit;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.cal-fab-meta {
    margin: 0;
    font-size: 0.82rem;
    color: inherit;
    opacity: 0.82;
}

.cal-fab-iframe-wrap {
    flex: 1;
    min-height: 0;
    background: var(--bg-off-white);
    position: relative;
}

.cal-fab-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: transparent;
    color-scheme: light;
}

body[data-theme="dark"] .cal-fab-iframe {
    color-scheme: dark;
}

@media (max-width: 560px) {
    .cal-fab-panel {
        width: calc(100vw - 2rem);
        height: min(76vh, 540px);
    }
}

@media print {
    .cal-fab {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ai-chat-toggle,
    .ai-chat-toggle-pulse,
    .ai-chat-toggle-badge,
    .ai-chat-greeting-wave,
    .ai-chat-greeting,
    .cal-fab-panel {
        animation: none !important;
    }
}

/* =============================================================
   World-class polish layer
   Adds: scroll progress bar, section eyebrows, capability cards,
   project thumbs, skill groups, pillar cards, contact polish,
   hero accents (status, trust strip, scroll cue, gradient name),
   refined focus treatments.
   ============================================================= */

/* Scroll progress bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 1200;
    pointer-events: none;
    background: transparent;
}
.scroll-progress > span {
    display: block;
    height: 100%;
    width: var(--progress, 0%);
    background: linear-gradient(90deg, var(--primary-indigo), var(--primary-teal), var(--accent-coral));
    box-shadow: 0 0 12px rgba(67, 56, 202, 0.35);
    transition: width 0.12s linear;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
}

/* Section heading pattern with eyebrow + subtitle */
.section-heading {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}
.section-heading h2 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 2.6rem);
    letter-spacing: -0.015em;
    text-wrap: balance;
}
.section-heading .section-sub {
    margin: 0;
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 560px;
    text-wrap: balance;
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.32rem 0.85rem;
    border-radius: 999px;
    background: linear-gradient(120deg, rgba(67, 56, 202, 0.14), rgba(15, 118, 110, 0.14));
    color: var(--primary-teal);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border: 1px solid var(--border-soft);
    white-space: nowrap;
}
.eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-indigo), var(--primary-teal));
    box-shadow: 0 0 6px rgba(15, 118, 110, 0.45);
}
.eyebrow--light {
    background: color-mix(in srgb, var(--primary-indigo) 8%, white);
    color: var(--text-charcoal);
    border-color: color-mix(in srgb, var(--primary-indigo) 22%, var(--border-soft));
}
body[data-theme="dark"] .eyebrow--light {
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.25);
}
body[data-theme="dark"] .eyebrow {
    background: linear-gradient(120deg, rgba(94, 234, 212, 0.14), rgba(147, 197, 253, 0.14));
    color: var(--primary-teal);
}

/* Hero: status pill, gradient name, trust strip, scroll cue */
.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.12);
    color: #047857;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid rgba(34, 197, 94, 0.28);
    margin-bottom: 1.25rem;
    backdrop-filter: blur(4px);
}
body[data-theme="dark"] .hero-status {
    background: rgba(74, 222, 128, 0.14);
    color: #6ee7b7;
    border-color: rgba(74, 222, 128, 0.35);
}
.hero-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
    animation: status-pulse 2s ease-out infinite;
}
@keyframes status-pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
    70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.hero-name-accent {
    background: linear-gradient(135deg, var(--primary-indigo) 0%, var(--primary-teal) 45%, var(--accent-coral) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% 200%;
    animation: name-shift 8s ease-in-out infinite;
    position: relative;
    display: inline-block;
}
@keyframes name-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.subheading strong {
    color: var(--text-charcoal);
    font-weight: 700;
}

.hero-scroll-cue {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background: transparent;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.hero-scroll-cue:hover,
.hero-scroll-cue:focus-visible {
    color: var(--primary-teal);
    border-color: rgba(15, 118, 110, 0.4);
    transform: translateY(-2px);
}
.hero-scroll-cue-icon {
    display: inline-flex;
    animation: scroll-cue-bounce 2.2s ease-in-out infinite;
}
@keyframes scroll-cue-bounce {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50% { transform: translateY(3px); opacity: 1; }
}

/* Hero metric refinement */
.hero-metrics .metric-card {
    position: relative;
    background: linear-gradient(155deg, var(--bg-white) 60%, color-mix(in srgb, var(--primary-indigo) 5%, var(--bg-white)));
}
.hero-metrics .metric-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(67, 56, 202, 0.12), transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.hero-metrics .metric-card:hover::before,
.hero-metrics .metric-card:focus-visible::before {
    opacity: 1;
}
.metric-num {
    background: linear-gradient(135deg, var(--primary-indigo), var(--primary-teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    display: inline-block;
}
.hero-metrics h3 {
    font-size: 1.9rem;
    letter-spacing: -0.02em;
}

/* 4-up grid */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .grid-4 { grid-template-columns: 1fr; }
}

/* Capability cards */
.capability-grid .capability-card {
    padding: 1.75rem 1.6rem 1.5rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.capability-card h3 {
    text-align: left;
    font-size: 1.2rem;
    margin: 0;
}
.capability-card p {
    margin: 0;
    font-size: 0.97rem;
    line-height: 1.55;
}
.capability-card em {
    color: var(--primary-teal);
    font-style: normal;
    font-weight: 600;
}
.capability-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(67, 56, 202, 0.14), rgba(15, 118, 110, 0.16));
    color: var(--primary-teal);
    border: 1px solid var(--border-soft);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s ease, color 0.25s ease;
}
.capability-icon svg {
    width: 22px;
    height: 22px;
}
.capability-card:hover .capability-icon,
.capability-card:focus-within .capability-icon {
    transform: rotate(-4deg) scale(1.06);
    background: linear-gradient(135deg, rgba(67, 56, 202, 0.22), rgba(15, 118, 110, 0.24));
    color: var(--primary-indigo);
}
.capability-tags {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.capability-tags li {
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary-teal) 10%, transparent);
    color: var(--primary-teal);
    letter-spacing: 0.02em;
}
body[data-theme="dark"] .capability-tags li {
    background: color-mix(in srgb, var(--primary-teal) 18%, transparent);
}

/* Selected Work thumbnails */
.work-grid .work-card {
    display: flex;
    flex-direction: column;
}
.work-thumb {
    position: relative;
    aspect-ratio: 17 / 10;
    background: linear-gradient(135deg, rgba(67, 56, 202, 0.1), rgba(15, 118, 110, 0.1), rgba(96, 165, 250, 0.08));
    overflow: hidden;
    border-bottom: 1px solid var(--border-soft);
    display: grid;
    place-items: center;
    padding: 1.25rem;
}
.work-thumb-square {
    position: relative;
    width: clamp(74px, 8.2vw, 102px);
    aspect-ratio: 1 / 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.work-thumb-icon {
    position: relative;
    z-index: 1;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(67, 56, 202, 0.2), rgba(15, 118, 110, 0.22));
    border: 1px solid color-mix(in srgb, var(--border-soft) 68%, var(--primary-teal) 32%);
    color: var(--primary-teal);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.16);
    transition: transform 0.25s ease, box-shadow 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.work-thumb-icon svg {
    width: 26px;
    height: 26px;
}
.work-card:hover .work-thumb-icon,
.work-card:focus-visible .work-thumb-icon {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-indigo), var(--primary-teal));
    box-shadow: 0 10px 22px rgba(67, 56, 202, 0.32);
    transform: translateY(-1px) scale(1.04);
}
.work-thumb-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    filter: grayscale(1) sepia(0.5) hue-rotate(145deg) saturate(1.2) contrast(0.95);
}
.work-thumb-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.4s ease;
}
.work-card:hover .work-thumb-img,
.work-card:focus-visible .work-thumb-img {
    filter: grayscale(0%);
}
.work-thumb-chip {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    color: #f8fafc;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    backdrop-filter: blur(4px);
}
.work-thumb--quickplot { background: linear-gradient(155deg, rgba(67, 56, 202, 0.12), rgba(15, 118, 110, 0.12)); }
.work-thumb--fire { background: linear-gradient(155deg, rgba(15, 118, 110, 0.14), rgba(220, 38, 38, 0.08), rgba(15, 23, 42, 0.04)); }
.work-thumb--roads { background: linear-gradient(155deg, rgba(15, 118, 110, 0.14), rgba(34, 197, 94, 0.08), rgba(96, 165, 250, 0.1)); }
.work-thumb--wui { background: linear-gradient(155deg, rgba(20, 184, 166, 0.16), rgba(34, 197, 94, 0.08), rgba(30, 64, 175, 0.08)); }
.work-thumb--imagestudio { background: linear-gradient(155deg, rgba(148, 163, 184, 0.16), rgba(15, 118, 110, 0.12)); }
.work-thumb--maplab { background: linear-gradient(155deg, rgba(45, 212, 191, 0.14), rgba(51, 65, 85, 0.12)); }

.wt-grid line { stroke: currentColor; opacity: 0.12; }
.wt-area-a { fill: url(#wt-qp-a); }
.wt-area-b { fill: url(#wt-qp-b); }
.wt-line-a { stroke: var(--primary-indigo); stroke-width: 2.25; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.wt-line-b { stroke: var(--primary-teal); stroke-width: 2.25; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.wt-dot-a { fill: var(--primary-indigo); }
.wt-dot-b { fill: var(--primary-teal); }

.wt-map path { fill: rgba(15, 23, 42, 0.12); stroke: rgba(15, 23, 42, 0.2); stroke-width: 1; }
body[data-theme="dark"] .wt-map path { fill: rgba(148, 163, 184, 0.1); stroke: rgba(148, 163, 184, 0.2); }
.wt-pulse { fill: #0f766e; filter: drop-shadow(0 0 8px rgba(15, 118, 110, 0.6)); transform-origin: center; animation: wt-pulse 2.4s ease-out infinite; }
@keyframes wt-pulse {
    0% { opacity: 1; transform: scale(0.7); }
    70% { opacity: 0.2; transform: scale(1.6); }
    100% { opacity: 0; transform: scale(1.9); }
}

.wt-roads path { stroke: var(--primary-teal); stroke-width: 1.5; fill: none; stroke-linecap: round; opacity: 0.6; }
.wt-roads path:nth-child(odd) { stroke: var(--primary-indigo); opacity: 0.55; }
.wt-road-dots circle { fill: var(--accent-coral); filter: drop-shadow(0 0 4px rgba(15, 118, 110, 0.55)); }

.work-card:hover .wt-pulse,
.work-card:focus-visible .wt-pulse { animation-duration: 1.6s; }
.work-card:hover .work-thumb-svg,
.work-card:focus-visible .work-thumb-svg { transform: scale(1.04); filter: none; }
.work-thumb-svg { transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), filter 0.45s cubic-bezier(0.16, 1, 0.3, 1); }

.work-tags {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.work-tags li {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary-indigo) 10%, transparent);
    color: var(--primary-indigo);
    letter-spacing: 0.03em;
}
body[data-theme="dark"] .work-tags li {
    background: color-mix(in srgb, var(--primary-indigo) 18%, transparent);
}

.wt-contours path { stroke: rgba(15, 118, 110, 0.65); stroke-width: 1.8; fill: none; stroke-linecap: round; }
.wt-hexes polygon { fill: rgba(20, 184, 166, 0.22); stroke: rgba(15, 118, 110, 0.65); stroke-width: 1.1; }
.wt-tiles rect { fill: rgba(30, 41, 59, 0.16); stroke: rgba(15, 118, 110, 0.35); stroke-width: 1; }
.wt-hist line { stroke: rgba(15, 118, 110, 0.8); stroke-width: 3; stroke-linecap: round; }
.wt-polys polygon { fill: rgba(30, 64, 175, 0.18); stroke: rgba(15, 23, 42, 0.26); stroke-width: 1.1; }
.wt-pins path { fill: rgba(20, 184, 166, 0.46); }
.wt-pins circle { fill: rgba(15, 23, 42, 0.6); }

/* Skills grid */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: center;
    margin-top: 0.5rem;
}
.skill-group {
    flex: 0 0 calc(33.333% - 0.8334rem);
    position: relative;
    background: var(--bg-white);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 1.25rem 1.25rem 1.4rem;
    box-shadow: var(--shadow-soft);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease, border-color 0.22s ease;
}
@media (max-width: 900px) {
    .skill-group { flex: 0 0 calc(50% - 0.625rem); }
}
@media (max-width: 560px) {
    .skill-group { flex: 0 0 100%; }
}
.skill-group:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.1);
    border-color: rgba(67, 56, 202, 0.2);
}
.skill-group-heading {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 0.85rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: left;
}
.skill-group-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
    box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 20%, transparent);
}
.skill-group-dot--indigo { background: var(--primary-indigo); color: var(--primary-indigo); }
.skill-group-dot--teal { background: var(--primary-teal); color: var(--primary-teal); }

.skill-chip-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.skill-chip-list li {
    font-size: 0.83rem;
    font-weight: 500;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary-teal) 6%, var(--bg-off-white));
    color: var(--text-charcoal);
    border: 1px solid var(--border-soft);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.skill-chip-list li:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary-indigo) 14%, transparent), color-mix(in srgb, var(--primary-teal) 14%, transparent));
    color: var(--primary-teal);
    border-color: rgba(15, 118, 110, 0.3);
}
body[data-theme="dark"] .skill-chip-list li {
    background: color-mix(in srgb, var(--primary-teal) 10%, var(--bg-off-white));
}

/* Why Hire Me pillar grid */
.pillar-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}
@media (max-width: 720px) { .pillar-grid { grid-template-columns: 1fr; } }

.pillar-card {
    position: relative;
    padding: 2rem 1.75rem 1.75rem;
    border-radius: 18px;
    background: var(--bg-white);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.22s ease;
}
.pillar-card:hover {
    transform: translateY(-4px);
    border-color: rgba(67, 56, 202, 0.25);
    box-shadow: 0 22px 38px rgba(15, 23, 42, 0.12);
}
.pillar-card h3 {
    text-align: left;
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
}
.pillar-card p {
    margin: 0;
    font-size: 0.97rem;
    line-height: 1.6;
}
.pillar-num {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 2.5rem;
    font-weight: 500;
    color: transparent;
    -webkit-text-stroke: 1.5px color-mix(in srgb, var(--primary-indigo) 35%, transparent);
    letter-spacing: -0.02em;
    pointer-events: none;
    transition: color 0.35s ease, -webkit-text-stroke-color 0.35s ease;
}
.pillar-card:hover .pillar-num {
    -webkit-text-stroke-color: color-mix(in srgb, var(--primary-teal) 55%, transparent);
}
.pillar-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--primary-indigo), var(--primary-teal), var(--accent-coral));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.pillar-card:hover::before { transform: scaleX(1); }
.pillar-card code {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    background: color-mix(in srgb, var(--primary-teal) 10%, transparent);
    color: var(--primary-teal);
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    font-size: 0.85em;
}

/* Closing contact CTA polish */
.contact-cta h2 {
    color: var(--text-charcoal);
    font-size: clamp(2.1rem, 3.5vw, 2.8rem);
    letter-spacing: -0.015em;
    margin: 0.6rem 0 0.5rem;
    text-wrap: balance;
}
.contact-cta-lede {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0 auto 1.75rem;
    text-wrap: balance;
}
.contact-cta-actions {
    display: flex;
    gap: 0.9rem;
    justify-content: center;
    flex-wrap: wrap;
}
.contact-cta {
    padding: clamp(5.5rem, 9vw, 7rem) 0 clamp(4.5rem, 8vw, 6rem);
}

.about-section {
    padding-top: 4.5rem;
}

.about-layout {
    display: grid;
    gap: 1.75rem;
    align-items: center;
}

.about-content h2,
.about-content p {
    text-align: left;
}

.about-content p:last-child {
    margin-bottom: 0;
}

.about-media {
    justify-self: center;
}

.about-photo {
    width: min(100%, 320px);
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
}

/* Contact form polish */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.form-field label {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-charcoal);
}
.contact-form input,
.contact-form textarea,
.contact-form select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.contact-form input:hover,
.contact-form textarea:hover,
.contact-form select:hover {
    border-color: color-mix(in srgb, var(--primary-teal) 40%, var(--border-soft));
}
.contact-form input:focus-visible,
.contact-form textarea:focus-visible,
.contact-form select:focus-visible {
    outline: none;
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-teal) 22%, transparent);
}
.select-wrap {
    position: relative;
}
.contact-form select {
    width: 100%;
    padding: 0.85rem 2.4rem 0.85rem 1rem;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background-color: var(--bg-white);
    color: var(--text-charcoal);
    font: inherit;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

body[data-theme="dark"] .contact-follow-link {
    border-color: #000;
}

body[data-theme="dark"] .contact-follow-link:hover,
body[data-theme="dark"] .contact-follow-link:focus-visible {
    border-color: #000;
}
.select-caret {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Better section spacing rhythm */
.section-heading + .grid-3,
.section-heading + .grid-4,
.section-heading + .skills-grid,
.section-heading + .pillar-grid,
.section-heading + .work-grid,
.section-heading + .ip-acts {
    margin-top: 0.5rem;
}

/* Responsive tweaks for hero */
@media (max-width: 720px) {
    .hero-scroll-cue { margin-top: 2rem; }
    .hero-metrics h3 { font-size: 1.55rem; }
    .section-heading { margin-bottom: 2.25rem; }
    .hero-media {
        width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        margin-top: 1.25rem;
        height: clamp(240px, 64vw, 420px);
    }
    .hero-photo {
        border-radius: 0;
        border: 0;
        box-shadow: none;
    }
    .contact-cta {
        padding: 4.25rem 0 4rem;
    }
}

@media (min-width: 1100px) {
    .hero-section {
        padding-top: 0;
    }

    .hero-layout {
        grid-template-columns: minmax(0, 1fr);
        min-height: 540px;
    }

    .hero-content {
        align-items: flex-start;
        z-index: 2;
        padding-right: clamp(1rem, 3vw, 2.5rem);
    }

    .hero-content h1,
    .hero-content .subheading {
        text-align: left;
        margin-left: 0;
        margin-right: 0;
    }

    .hero-actions {
        justify-content: flex-start;
        margin-left: 0;
    }

    .hero-media {
        position: absolute;
        top: 0;
        right: 0;
        width: 50vw;
        min-width: 46%;
        max-width: 860px;
        height: 100%;
        overflow: hidden;
        z-index: 1;
        mask-image: linear-gradient(to left, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0) 100%);
        -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0) 100%);
    }

    .hero-photo {
        width: 100%;
        height: 100%;
        min-height: 540px;
        object-fit: cover;
        object-position: center right;
        border-radius: 0;
        border: 0;
        box-shadow: none;
    }

    .about-layout {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
        gap: 2.5rem;
    }

    .about-media {
        justify-self: end;
        width: 100%;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-name-accent,
    .hero-status-dot,
    .hero-scroll-cue-icon,
    .wt-pulse,
    .scroll-progress > span {
        animation: none !important;
    }
    .scroll-progress > span { transition: none !important; }
}
