/* =====================================================
   Hero Cinematic Section
   ===================================================== */

/* -- Semantic variables for hero -- */
:root {
    --hero-text: var(--white);
    --hero-text-muted: rgba(var(--white-rgb), 0.7);
    --hero-stat-number: var(--primary);
    --hero-stat-label: rgba(var(--white-rgb), 0.8);
    --hero-stat-border: rgba(var(--white-rgb), 0.15);
    --hero-btn-outline-border: rgba(var(--white-rgb), 0.3);
    --hero-btn-outline-color: var(--white);
    --hero-btn-outline-hover-bg: rgba(var(--white-rgb), 0.1);
}

.hero-cinematic {
    position: relative;
    width: 100%;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: radial-gradient(ellipse at 15% 15%, var(--slate-600) 0%, var(--slate-800) 40%, var(--slate-900) 100%);
}

/* Glassmorphism Parallax Orbs Background */
.hero-glass-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.glass-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    will-change: transform, translate;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: rgba(var(--primary-rgb), 0.4);
    top: -10%;
    right: -10%;
    animation: orb-float-1 20s ease-in-out infinite alternate;
}

.orb-2 {
    width: 450px;
    height: 450px;
    /* Use a cool complementary deep blue tone similar to primary but cooler */
    background: rgba(14, 165, 233, 0.2);
    bottom: -20%;
    left: -10%;
    animation: orb-float-2 25s ease-in-out infinite alternate;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: rgba(var(--primary-rgb), 0.2);
    top: 40%;
    left: 20%;
    animation: orb-float-3 15s ease-in-out infinite alternate;
}

.orb-4 {
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    bottom: 20%;
    right: 15%;
    animation: orb-float-1 18s ease-in-out infinite alternate-reverse;
}

.orb-5 {
    width: 250px;
    height: 250px;
    background: rgba(var(--primary-rgb), 0.3);
    top: 20%;
    right: 30%;
    animation: orb-float-2 22s ease-in-out infinite alternate-reverse;
}

@keyframes orb-float-1 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-50px, 50px) scale(1.1);
    }
}

@keyframes orb-float-2 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, -50px) scale(1.15);
    }
}

@keyframes orb-float-3 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-30px, -40px) scale(0.9);
    }
}

/* Noise texture overlay */
.hero-cinematic::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.04;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* Hero photo — absolute within container, goes behind stats bar */
.hero-photo {
    position: absolute;
    bottom: -4rem;
    left: 0;
    z-index: 0;
    display: flex;
    align-items: flex-end;
}

.hero-photo picture {
    display: block;
}

.hero-photo img {
    display: block;
    height: auto;
    width: auto;
    height: 850px;
    object-fit: contain;
    opacity: 0.85;
}

/* Content wrapper — container with photo absolute left, text right */
.hero-content-wrapper {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 6rem 1.5rem 5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100dvh - 80px);
}

@media (min-width: 768px) {
    .hero-content-wrapper {
        padding: 5.5rem 3rem 5rem;
    }
}

@media (min-width: 1024px) {
    .hero-content-wrapper {
        padding: 0 5rem;
    }
}

.hero-content {
    max-width: 40rem;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .hero-content {
        margin-left: auto;
        text-align: right;
    }
}

/* Pre-title */
.hero-pretitle {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hero-text);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    margin-bottom: 1rem;
}

/* Hero title */
.hero-cinematic .hero-title {
    font-size: clamp(2.25rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--hero-text);
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero-cinematic .hero-title .text-secondary {
    color: var(--hero-text);
}

.hero-cinematic .hero-title .highlight {
    color: var(--primary);
}

/* Typewriter tagline */
.hero-tagline-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    min-height: 2rem;
}

@media (min-width: 768px) {
    .hero-tagline-wrapper {
        justify-content: flex-end;
    }
}


.hero-tagline {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--hero-text-muted);
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
}

.hero-tagline-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background-color: var(--primary);
    margin-left: 2px;
    vertical-align: middle;
    animation: blink-caret 1s step-end infinite;
}

@keyframes blink-caret {
    50% {
        opacity: 0;
    }
}

/* Hero description */
.hero-description {
    font-size: 1.05rem;
    color: var(--hero-text-muted);
    font-weight: 400;
    line-height: 1.7;
    max-width: 32rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .hero-description {
        font-size: 1.125rem;
        margin-left: auto;
    }
}

.hero-description .accent {
    color: var(--hero-text);
    font-weight: 600;
}

/* CTA overrides inside hero */
.hero-cinematic .cta-group {
    margin-top: 0;
}

@media (min-width: 768px) {
    .hero-cinematic .cta-group {
        justify-content: flex-end;
    }
}

.hero-cinematic .btn-outline {
    background-color: transparent;
    border-color: var(--hero-btn-outline-border);
    color: var(--hero-btn-outline-color);
    box-shadow: none;
}

.hero-cinematic .btn-outline:hover {
    background-color: var(--hero-btn-outline-hover-bg);
    border-color: rgba(var(--white-rgb), 0.5);
}

/* Stats bar — full width at bottom of hero */
.hero-stats-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 4;
    background: rgba(var(--black-rgb), 0.3);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(var(--white-rgb), 0.1);
    padding: 1.5rem 2rem;
}

.hero-stats-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    max-width: var(--container-width);
    margin: 0 auto;
}

.hero-stats-bar .stat-number {
    color: var(--hero-stat-number) !important;
}

.hero-stats-bar .stat-item p:not(.stat-number) {
    color: var(--hero-stat-label);
}

@media (max-width: 767px) {
    .hero-stats-inner {
        gap: 2rem;
    }

    .hero-stats-bar {
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 479px) {
    .hero-stats-inner {
        flex-wrap: wrap;
        gap: 1rem 2rem;
        justify-content: center;
    }

    .hero-stats-inner .stat-item {
        width: calc(50% - 1rem);
    }

    .hero-stats-bar {
        padding: 0.75rem 1rem;
    }

    .hero-stats-bar .stat-number {
        font-size: 1.5rem;
    }
}

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 6rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.hero-scroll-label {
    color: rgba(var(--white-rgb), 0.4);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.hero-scroll-line {
    width: 1px;
    height: 2rem;
    background: linear-gradient(to bottom, rgba(var(--white-rgb), 0.4), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Small desktop (13" laptops, short viewports) */
@media (min-width: 768px) and (max-height: 900px) {
    .hero-photo img {
        height: calc(100dvh - 4rem);
    }

    .hero-content-wrapper {
        padding-bottom: 7rem;
    }
}

/* Mobile: photo as background top, text below */
@media (max-width: 767px) {
    .hero-cinematic {
        min-height: auto;
    }

    .hero-content-wrapper {
        min-height: auto;
        padding-top: 0;
        padding-bottom: 5rem;
    }

    .hero-photo {
        position: relative;
        bottom: auto;
        left: auto;
        width: 100%;
        height: 65dvh;
        overflow: hidden;
        mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    }

    .hero-photo picture {
        width: 100%;
        height: 100%;
    }

    .hero-photo img {
        width: 100%;
        height: 100%;
        max-height: none;
        object-fit: cover;
        object-position: top center;
        opacity: 0.8;
    }

    .hero-content {
        text-align: left;
    }

    .hero-scroll {
        display: none;
    }
}

/* Reduce GPU load on mobile: fewer orbs, less blur */
@media (max-width: 767px) {
    .glass-orb {
        filter: blur(40px);
    }

    .orb-4,
    .orb-5 {
        display: none;
    }
}

.cta-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

@media (min-width: 640px) {
    .cta-group {
        flex-direction: row;
    }
}

.btn {
    height: 3.5rem;
    /* h-14 */
    padding: 0 2rem;
    /* px-8 */
    border-radius: 0.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    width: 100%;
}

@media (min-width: 640px) {
    .btn {
        width: auto;
    }
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 10px 15px -3px rgba(var(--primary-rgb), 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: scale(1.02);
}

.btn-outline {
    background-color: var(--surface-light);
    border: 1px solid rgba(var(--secondary-rgb), 0.2);
    color: var(--secondary);
    box-shadow: 0 1px 2px 0 rgba(var(--black-rgb), 0.05);
}

.btn-outline:hover {
    border-color: rgba(var(--primary-rgb), 0.5);
    background-color: rgba(var(--primary-light-rgb), 0.1);
}

/* Stats */
.stats-row {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding-top: 2rem;
    margin-top: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-item h3,
.stat-number {
    font-size: 1.875rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1.2;
}

.stat-item p:not(.stat-number) {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* Trust Section — Infinite Marquee */
.trust-section {
    padding: 3rem 0;
    overflow: hidden;
    background-color: var(--background-gradient-start);
}

.trust-label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 2rem;
}

.trust-marquee {
    position: relative;
    width: 100%;
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.trust-marquee-track {
    display: flex;
    align-items: center;
    gap: 4rem;
    width: max-content;
    animation: marquee-scroll 25s linear infinite;
}

.trust-marquee:hover .trust-marquee-track {
    animation-play-state: paused;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-25%);
    }
}

.trust-logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.4;
    filter: grayscale(100%);
    transition: opacity 0.4s ease, filter 0.4s ease;
}

.trust-logo-item:hover {
    opacity: 1;
    filter: grayscale(0%);
}

[data-theme="dark"] .trust-logo-item {
    filter: grayscale(100%) brightness(0) invert(1);
    opacity: 0.3;
}

[data-theme="dark"] .trust-logo-item:hover {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.trust-logo-item img {
    height: 36px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
}

@media (min-width: 768px) {
    .trust-logo-item img {
        height: 44px;
        max-width: 160px;
    }

    .trust-marquee-track {
        gap: 5rem;
    }
}

/* Base Section Styles */
.section-padding {
    padding: 5rem 1rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding: 8rem 2.5rem;
    }
}

.section-white {
    background-color: var(--surface-light);
}

/* Expertise Section */
.expertise-section {
    background: linear-gradient(to bottom, var(--background-gradient-start), var(--surface-light));
}

.section-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 4rem;
    gap: 1.5rem;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .section-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.section-tag {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background-color: var(--surface-light);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    box-shadow: 0 1px 2px 0 rgba(var(--black-rgb), 0.05);
    display: inline-block;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(var(--secondary-rgb), 0.1);
}

.section-tag-primary {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.section-tag-dark {
    background-color: var(--secondary);
    color: var(--white);
    border-color: var(--secondary);
}

.section-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.25rem;
    }
}

.section-intro {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.6;
    max-width: 28rem;
}

@media (min-width: 768px) {
    .section-intro {
        font-size: 1rem;
    }
}

/* Expertise header — cinematic style */
.expertise-header {
    margin-bottom: 4rem;
}

.expertise-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    margin-bottom: 1rem;
}

.expertise-heading {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.expertise-heading em {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    color: var(--primary);
}

/* Expertise grid */
.expertise-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: var(--container-width);
    margin: 0 auto;
}

@media (min-width: 768px) {
    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Expertise card — tall cinematic card */
.expertise-card {
    position: relative;
    border-radius: 2rem;
    height: clamp(400px, 50vw, 520px);
    overflow: hidden;
    cursor: pointer;
}

/* Background image */
.expertise-card-img {
    position: absolute;
    inset: 0;
}

.expertise-card-img picture {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.expertise-card-img .card-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.7s ease-out;
}

.expertise-card:hover .expertise-card-img .card-bg-img,
.expertise-card:focus-within .expertise-card-img .card-bg-img {
    transform: scale(1.05);
}

/* Burgundy overlay */
.expertise-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(var(--primary-rgb), 0.8);
    transition: background 0.5s ease;
    z-index: 1;
}

.expertise-card:hover .expertise-card-overlay,
.expertise-card:focus-within .expertise-card-overlay {
    background: rgba(var(--primary-rgb), 0.6);
}

/* Card body — content anchored to bottom */
.expertise-card-body {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    z-index: 2;
}

@media (min-width: 768px) {
    .expertise-card-body {
        padding: 2.5rem;
    }
}

/* Tags — monospace pills */
.expertise-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}

.expertise-tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    background: rgba(var(--primary-rgb), 0.9);
    color: var(--white);
}

/* Card title */
.expertise-card-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 0.25rem;
}

/* Subtitle — serif italic */
.expertise-card-subtitle {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1rem;
    color: rgba(var(--white-rgb), 0.7);
    margin-bottom: 0.5rem;
}

/* Glassmorphic expanding panel on hover */
.expertise-card-panel {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.5s ease-out;
}

.expertise-card:hover .expertise-card-panel,
.expertise-card:focus-within .expertise-card-panel {
    max-height: 300px;
    opacity: 1;
}

/* Focus outline for keyboard/touch accessibility */
.expertise-card:focus-within {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.expertise-card-panel-inner {
    margin-top: 0.5rem;
    padding: 1.25rem;
    background: rgba(var(--white-rgb), 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 1.5rem;
    border: 1px solid rgba(var(--white-rgb), 0.15);
}

/* Bullet points */
.expertise-card-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.expertise-card-points li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(var(--white-rgb), 0.85);
}

.expertise-card-points li::before {
    content: '▸';
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 0.1em;
}

/* Key Strengths Section */
.strengths-section {
    background: var(--surface-light);
}

.strengths-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: var(--container-width);
    margin: 0 auto;
}

@media (min-width: 640px) {
    .strengths-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .strengths-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Strength item — numbered manifesto block */
.strength-item {
    padding: 2rem;
    border-bottom: 1px solid rgba(var(--secondary-rgb), 0.08);
}

@media (min-width: 640px) {
    .strength-item {
        border-bottom: none;
    }
}

.strength-number {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.strength-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.strength-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* =====================================================
   Journey Steps (horizontal timeline)
   ===================================================== */
/* =====================================================
   Content Inventory Cards
   ===================================================== */
.content-inventory {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.25rem;
    margin-top: 2.5rem;
}

@media (min-width: 640px) {
    .content-inventory {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .content-inventory {
        grid-template-columns: repeat(4, 1fr);
    }
}

.inventory-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    min-height: 16rem;
    background-size: cover;
    background-position: center top;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.inventory-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(var(--black-rgb), 0.25);
}

.inventory-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.75) 100%);
    transition: background 0.3s ease;
}

.inventory-card:hover .inventory-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.82) 100%);
}

.inventory-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding: 1.5rem;
    color: var(--white);
}

.inventory-number {
    font-size: 2.75rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.inventory-body h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.inventory-body p {
    font-size: 0.8125rem;
    line-height: 1.55;
    opacity: 0.85;
}

/* =====================================================
   Role Cards (Scope / Build / Scale)
   ===================================================== */
.role-cards {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

@media (min-width: 768px) {
    .role-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

.role-card {
    position: relative;
    background: var(--surface-light);
    border: 1px solid rgba(var(--secondary-rgb), 0.08);
    border-radius: 1rem;
    padding: 2rem 1.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.role-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(var(--primary-rgb), 0.15);
    border-color: rgba(var(--primary-rgb), 0.25);
}

.role-phase {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary);
    opacity: 0.08;
    line-height: 1;
    position: absolute;
    top: 1rem;
    right: 1rem;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    transition: opacity 0.3s ease;
}

.role-card:hover .role-phase {
    opacity: 0.18;
}

.role-card h4 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.role-subtitle {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
}

.role-achievements {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.role-achievements li {
    position: relative;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    min-height: 3.5rem;
}

.role-achievements li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

/* =====================================================
   Topic Cards (photo background)
   ===================================================== */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

@media (min-width: 640px) {
    .topic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .topic-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Last row: 2 cards centered */
    .topic-card:nth-child(4) {
        grid-column: 1 / 2;
        margin-left: auto;
        margin-right: 0;
    }

    .topic-grid:has(.topic-card:nth-child(5):last-child) .topic-card:nth-child(4) {
        grid-column: auto;
    }

    .topic-grid:has(.topic-card:nth-child(5):last-child) {
        grid-template-columns: repeat(6, 1fr);
    }

    .topic-grid:has(.topic-card:nth-child(5):last-child) .topic-card:nth-child(1),
    .topic-grid:has(.topic-card:nth-child(5):last-child) .topic-card:nth-child(2),
    .topic-grid:has(.topic-card:nth-child(5):last-child) .topic-card:nth-child(3) {
        grid-column: span 2;
    }

    .topic-grid:has(.topic-card:nth-child(5):last-child) .topic-card:nth-child(4) {
        grid-column: 2 / 4;
        margin-left: 0;
    }

    .topic-grid:has(.topic-card:nth-child(5):last-child) .topic-card:nth-child(5) {
        grid-column: 4 / 6;
    }
}

.topic-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    min-height: 14rem;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.topic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(var(--black-rgb), 0.25);
}

.topic-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(64, 0, 16, 0.9) 100%);
    transition: background 0.3s ease;
}

.topic-card:hover .topic-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(64, 0, 16, 0.97) 100%);
}

.topic-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding: 1.5rem;
    color: var(--white);
}

.topic-content h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.topic-content p {
    font-size: 0.8125rem;
    line-height: 1.55;
    opacity: 0.85;
}

/* Track Record (Journey) Section */
/* Journey / Timeline */
.journey-section {
    position: relative;
    overflow: hidden;
    background: var(--surface-light);
}

.timeline {
    position: relative;
    padding-left: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Vertical line */
.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), rgba(var(--primary-rgb), 0.15));
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Dot */
.timeline-dot {
    position: absolute;
    left: -2.5rem;
    top: 2rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--surface-light);
    box-shadow: 0 0 0 2px var(--primary);
    z-index: 2;
    margin-left: calc(0.5rem - 0.375rem);
}

/* Card */
.timeline-card {
    background: var(--surface-accent);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    padding: 2rem;
    transition: box-shadow 0.3s ease;
}

.timeline-card:hover {
    box-shadow: var(--shadow-lg);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.timeline-company {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.timeline-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.timeline-list li {
    position: relative;
    padding-left: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.timeline-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 50%;
    background: var(--primary);
}

.timeline-card .deal-badges {
    margin-top: 0.5rem;
}

/* Vision Section */
.vision-section {
    background: var(--surface-light);
    position: relative;
    overflow: hidden;
}

.vision-intro {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-muted);
    max-width: 640px;
    line-height: 1.6;
    margin-top: 1rem;
}

.vision-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .vision-grid {
        grid-template-columns: 1.4fr 1fr;
        gap: 2.5rem;
        align-items: start;
    }
}

.vision-card {
    background: rgba(var(--surface-light-rgb), 0.8);
    backdrop-filter: blur(12px);
    border-radius: 2rem;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
    will-change: transform;
}

.vision-card:hover {
    box-shadow: var(--shadow-xl);
}

.vision-number {
    font-family: var(--font-mono);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--primary);
    opacity: 0.25;
    line-height: 1;
    display: block;
    margin-bottom: 1.5rem;
}

.vision-card-title {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.vision-card-desc {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Asymmetric offset on desktop */
@media (min-width: 768px) {
    .vision-card--large {
        padding: 3rem;
    }

    .vision-card--small {
        margin-top: 4rem;
    }
}

/* Events Section */

.events-see-all {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    letter-spacing: 0.04em;
    transition: gap var(--transition-base);
}

.events-see-all:hover {
    gap: 0.75rem;
}

.events-see-all .material-symbols-outlined {
    font-size: 1rem;
}

.events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: var(--container-width);
    margin: 0 auto;
}

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

.event-card {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 2rem;
    border: 1px solid rgba(var(--secondary-rgb), 0.1);
    background-color: var(--surface-accent);
    transition: border-color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.event-card:hover {
    border-color: rgba(var(--primary-rgb), 0.3);
    box-shadow: 0 12px 24px -8px rgba(var(--black-rgb), 0.1);
}

.date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 5rem;
    min-height: 5.5rem;
    background-color: var(--primary);
    border-radius: 1rem;
    flex-shrink: 0;
}

.date-month {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.date-day {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--white);
    line-height: 1;
}

.event-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    min-width: 0;
}

.event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.event-pill {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.1875rem 0.625rem;
    border-radius: 9999px;
}

.event-pill--location {
    background-color: var(--primary);
    color: var(--white);
}

.event-pill--type {
    background-color: var(--event-type-secondary-bg);
    color: var(--event-type-secondary-color);
}

.event-pill--past {
    background-color: rgba(var(--secondary-rgb), 0.08);
    color: var(--text-muted);
}

.event-title {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.3;
}

.event-title a {
    color: inherit;
    text-decoration: none;
    background-image: linear-gradient(var(--primary), var(--primary));
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: background-size 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.event-card:hover .event-title a {
    background-size: 100% 2px;
}

.event-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.event-card-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: gap var(--transition-base);
}

.event-card-link:hover {
    gap: 0.75rem;
}

.event-card-link .material-symbols-outlined {
    font-size: 0.875rem;
}

/* Education Section */
.education-section {
    background: var(--surface-light);
}

.education-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: var(--container-width);
    margin: 0 auto;
}

@media (min-width: 768px) {
    .education-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.education-card {
    background: rgba(var(--primary-rgb), 0.06);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    border-radius: 2rem;
    padding: 2rem;
    transition: border-color var(--transition-base);
}

.education-card:hover {
    border-color: rgba(var(--primary-rgb), 0.25);
}

[data-theme="dark"] .education-card {
    background: var(--slate-800);
}

.edu-year {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 1rem;
}

.edu-school {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.1;
    margin-bottom: 0.375rem;
}

.edu-field {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Tech Stack Section */
/* Stack / Control Room */
.stack-section {
    background: var(--surface-light);
}

.stack-categories {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .stack-categories {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem 2.5rem;
    }
}

@media (min-width: 1024px) {
    .stack-categories {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stack-category-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    margin-bottom: 1.25rem;
}

.stack-category-label--ai {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.15);
}

.stack-category-label--infra {
    color: var(--sky-700);
    background: rgba(var(--sky-100-rgb), 0.5);
    border: 1px solid var(--sky-100);
}

.stack-category-label--dev {
    color: var(--secondary);
    background: rgba(var(--secondary-rgb), 0.06);
    border: 1px solid rgba(var(--secondary-rgb), 0.12);
}

.stack-category-label--design {
    color: #9333ea;
    background: rgba(147, 51, 234, 0.08);
    border: 1px solid rgba(147, 51, 234, 0.15);
}

.stack-category-label--iot {
    color: #15803d;
    background: rgba(21, 128, 61, 0.08);
    border: 1px solid rgba(21, 128, 61, 0.15);
}

.stack-category-label--cycling {
    color: #c2410c;
    background: rgba(194, 65, 12, 0.08);
    border: 1px solid rgba(194, 65, 12, 0.15);
}

.stack-category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stack-tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    padding: 1.5rem 1rem;
    border-radius: 2rem;
    background: var(--surface-accent);
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.stack-tool:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

/* Stack logos */
.stack-logo {
    height: 2.5rem;
    width: auto;
    max-width: 5rem;
    object-fit: contain;
    margin-bottom: 0.75rem;
    transition: transform 0.3s ease;
}

.stack-tool:hover .stack-logo {
    transform: scale(1.1);
}

.stack-logo-invertible {
    filter: none;
}

[data-theme="dark"] .stack-logo-invertible {
    filter: invert(1) brightness(2);
}

.stack-tool-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.stack-tool-role {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.stack-tool:hover .stack-tool-role {
    opacity: 1;
    max-height: 2rem;
}

/* Hobbies Section */
/* Hobbies Section */
.hobbies-section {
    background: var(--surface-light);
}

.hobbies-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: var(--container-width);
    margin: 0 auto;
}

@media (min-width: 768px) {
    .hobbies-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Hobby card — reuses expertise card pattern */
.hobby-card {
    position: relative;
    border-radius: 2rem;
    height: clamp(350px, 45vw, 450px);
    overflow: hidden;
    cursor: pointer;
}

.hobby-card-img {
    position: absolute;
    inset: 0;
}

.hobby-card-img picture {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hobby-card-img .card-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.7s ease-out;
}

.hobby-card:hover .hobby-card-img .card-bg-img {
    transform: scale(1.05);
}

.hobby-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(var(--primary-rgb), 0.8);
    transition: background 0.5s ease;
    z-index: 1;
}

.hobby-card:hover .hobby-card-overlay {
    background: rgba(var(--primary-rgb), 0.6);
}

/* Warm sienna — Gravel (golden hour earth tones) */
.hobby-card--forest .hobby-card-overlay {
    background: rgba(120, 75, 30, 0.8);
}

.hobby-card--forest:hover .hobby-card-overlay {
    background: rgba(120, 75, 30, 0.6);
}

/* Deep indigo — Tech (dark navy + neon blue-purple) */
.hobby-card--electric .hobby-card-overlay {
    background: rgba(15, 20, 55, 0.8);
}

.hobby-card--electric:hover .hobby-card-overlay {
    background: rgba(15, 20, 55, 0.6);
}

/* Warm taupe — DIY (light wood, minimalist neutrals) */
.hobby-card--amber .hobby-card-overlay {
    background: rgba(120, 110, 90, 0.8);
}

.hobby-card--amber:hover .hobby-card-overlay {
    background: rgba(120, 110, 90, 0.6);
}

.hobby-card-body {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    z-index: 2;
}

@media (min-width: 768px) {
    .hobby-card-body {
        padding: 2.5rem;
    }
}

.hobby-card-desc {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1rem;
    color: rgba(var(--white-rgb), 0.7);
}


/* =====================================================
   CV Download Modal - RGAA Accessible
   ===================================================== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(var(--black-rgb), 0.6);
    backdrop-filter: blur(4px);
}

.modal-container {
    position: relative;
    background: var(--surface-light);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 28rem;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(var(--black-rgb), 0.25);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal[aria-hidden="false"] .modal-container {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    color: var(--text-muted);
    transition: background-color 0.2s, color 0.2s;
}

.modal-close:hover {
    background-color: var(--slate-100);
    color: var(--secondary);
}

.modal-close:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.modal-content h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    padding-right: 2rem;
}

.modal-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Project Hero */
.project-hero {
    padding-top: 6rem;
    padding-bottom: 4rem;
    background: linear-gradient(180deg, var(--background-light) 0%, transparent 100%);
}

.project-hero-content {
    max-width: 48rem;
}

.project-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface-light);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.project-tag .material-symbols-outlined {
    color: var(--primary);
    font-size: 1.25rem;
}

.project-tag-text {
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.875rem;
}

.project-heading {
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* Project hero grid — 50/50 on desktop, stacked on mobile */
.project-hero .hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    max-width: var(--container-width);
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .project-hero .hero-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Project hero image + browser screenshot */
.project-hero-image {
    display: flex;
    align-items: center;
}

.project-browser-img {
    width: 100%;
    height: auto;
    border-radius: 1rem;
}

/* Project logo in hero */
.project-logo-wrapper {
    margin-bottom: 1.5rem;
}

.project-logo {
    width: 100%;
    max-width: 16rem;
}

.project-logo-wide {
    max-width: 20rem;
}

/* Centered variant for expertise-header */
.expertise-header-centered {
    text-align: center;
}

.expertise-header-centered .expertise-label {
    margin-inline: auto;
}

.expertise-header-centered .section-intro {
    max-width: 40rem;
    margin-inline: auto;
    margin-top: 1rem;
}

/* Stack grid (project pages) */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(5rem, 1fr));
    gap: 2rem;
    max-width: var(--container-width);
    margin: 0 auto;
    opacity: 0.7;
}

.stack-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-color);
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
}

.stack-item:hover {
    opacity: 1;
    transform: translateY(-2px);
    color: var(--secondary);
}

.stack-item:hover .stack-logo {
    transform: scale(1.1);
}

/* Journey steps (project pages) */
.journey-steps {
    display: flex;
    gap: 1rem;
    margin-top: 3rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem;
}

.journey-step {
    flex: 0 0 16rem;
    scroll-snap-align: start;
    position: relative;
    background: var(--surface-accent);
    border: 1px solid rgba(var(--secondary-rgb), 0.08);
    border-radius: 1rem;
    padding: 2rem 1.5rem 1.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.journey-step:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(var(--primary-rgb), 0.15);
    border-color: rgba(var(--primary-rgb), 0.25);
}

.step-number {
    position: absolute;
    top: -0.5rem;
    right: 0.5rem;
    font-size: 6rem;
    font-weight: 900;
    line-height: 1;
    color: var(--primary);
    opacity: 0.08;
    pointer-events: none;
    user-select: none;
    transition: opacity 0.3s ease;
}

.journey-step:hover .step-number {
    opacity: 0.18;
}

.step-icon {
    width: 2.75rem;
    height: 2.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.step-icon .material-symbols-outlined {
    font-size: 1.25rem;
    color: var(--white);
}

.journey-step::after {
    content: '';
    position: absolute;
    top: 3.25rem;
    right: -1rem;
    width: 2rem;
    height: 2px;
    background: rgba(var(--primary-rgb), 0.2);
    z-index: 2;
}

.journey-step:last-child::after {
    display: none;
}

.journey-step h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.journey-step p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.55;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .journey-steps {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        overflow-x: visible;
        scroll-snap-type: none;
        padding-bottom: 0;
    }

    .journey-step {
        flex: none;
    }
}

@media (min-width: 1280px) {
    .journey-steps {
        grid-template-columns: repeat(6, 1fr);
    }

    .journey-step {
        padding: 2rem 1.25rem 1.5rem;
    }
}

@media (max-width: 767px) {
    .journey-step {
        flex: 0 0 14rem;
    }
}

/* Project Navigation (prev / next) */
.project-nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: none;
}

.project-nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
}

.project-nav-name {
    color: var(--secondary);
}

.project-nav-back {
    background: var(--slate-100);
    color: var(--secondary);
}

.project-nav-next {
    text-align: right;
}

.project-nav-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Key Figures Banner */
.key-figures {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 2.5rem 0;
}

.key-figures-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem 0;
}

.key-figure {
    text-align: center;
    padding: 0.5rem 2rem;
}

.key-figure-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}

.key-figure-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.key-figure-divider {
    width: 1px;
    height: 3rem;
    background: rgba(255, 255, 255, 0.2);
}

/* Section Alt Background */
.section-alt {
    background-color: var(--slate-50);
}

/* Project Sections */
.project-section {
    padding: 4rem 0;
}

.project-section.bg-light {
    background: var(--slate-50);
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 0.75rem;
    text-align: center;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 42rem;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

/* Methodology Grid */
.methodology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.methodology-step {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(var(--black-rgb), 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.methodology-step:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(var(--black-rgb), 0.1);
}


/* Case Studies Grid */
.case-studies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.case-study-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--slate-200);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.case-study-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 15px -3px rgba(var(--primary-rgb), 0.1);
}

.case-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.case-icon .material-symbols-outlined {
    font-size: 2rem;
    color: var(--white);
}

.case-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.75rem;
}

.case-description {
    color: var(--text-muted);
    line-height: 1.6;
}

.case-description strong {
    color: var(--primary);
    font-weight: 700;
}

/* Tech Stack Section */
.tech-highlights {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 42rem;
    margin: 0 auto 3rem;
}

.tech-highlight-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--white);
    border-radius: 0.5rem;
    border: 1px solid var(--slate-200);
}

.tech-highlight-item .material-symbols-outlined {
    color: var(--primary);
    font-size: 1.5rem;
}

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

.tech-category {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    border: 1px solid var(--slate-200);
}

.tech-category-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.tech-category-icon .material-symbols-outlined {
    font-size: 2rem;
    color: var(--white);
}

.tech-category-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1.25rem;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.tech-badge {
    padding: 0.5rem 1rem;
    background: var(--slate-100);
    color: var(--secondary);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.375rem;
    transition: background-color 0.2s, color 0.2s;
}

.tech-badge:hover {
    background: var(--primary);
    color: var(--white);
}

/* Project CTA */
.project-cta {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: var(--white);
    text-align: center;
}

.cta-content {
    max-width: 42rem;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--white);
}

.cta-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.6;
}

.project-cta .btn {
    background: var(--white);
    color: var(--primary);
}

.project-cta .btn:hover {
    background: var(--slate-100);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .project-title {
        font-size: 2rem;
    }

    .project-role {
        font-size: 1.125rem;
    }

    .project-tagline {
        font-size: 1rem;
    }

    .methodology-grid,
    .case-studies-grid,
    .tech-stack-grid {
        grid-template-columns: 1fr;
    }

    .project-nav-grid {
        grid-template-columns: 1fr;
    }

    .cta-title {
        font-size: 1.75rem;
    }

    /* Key figures: stack vertically on mobile */
    .key-figures-grid {
        flex-direction: column;
        gap: 1.5rem;
    }

    .key-figure-divider {
        width: 3rem;
        height: 1px;
    }

    .key-figure {
        padding: 0;
    }

    /* Nav footer: stack vertically on mobile */
    .project-nav-inner {
        flex-direction: column;
        gap: 1.5rem;
    }

    .project-nav-link {
        text-align: center;
    }
}

/* Dark Mode - Project Pages */
[data-theme="dark"] .project-hero {
    background: linear-gradient(180deg, var(--surface-light) 0%, transparent 100%);
}

[data-theme="dark"] .project-tag {
    background: var(--surface-accent);
    border: 1px solid var(--slate-700);
}

[data-theme="dark"] .section-alt {
    background-color: var(--surface-accent);
}

[data-theme="dark"] .project-nav {
    border-color: var(--slate-700);
}

[data-theme="dark"] .project-nav-back {
    background: var(--slate-800);
    color: var(--text-main);
}

[data-theme="dark"] .project-nav-name {
    color: var(--text-main);
}

/* =====================================================
   Achievement Badges
   ===================================================== */

.achievement-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--slate-200);
}

.achievement-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, var(--slate-100) 0%, var(--slate-50) 100%);
    border: 1px solid var(--slate-200);
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary);
    transition: all 0.2s;
}

.achievement-badge .material-symbols-outlined {
    font-size: 0.875rem;
    color: var(--primary);
}

.achievement-badge:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(var(--primary-rgb), 0.2);
}

.achievement-badge:hover .material-symbols-outlined {
    color: var(--white);
}

/* =====================================================
   Mobile Menu
   ===================================================== */
.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    color: var(--secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.mobile-menu-btn:hover {
    background-color: rgba(var(--secondary-rgb), 0.1);
}

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

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: var(--white);
    z-index: 10000001;
    padding: 1.5rem;
    box-shadow: -8px 0 30px rgba(var(--black-rgb), 0.15);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(var(--black-rgb), 0.5);
    z-index: 10000000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--slate-200);
}

.mobile-menu-title {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--secondary);
}

.mobile-menu-close {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.mobile-menu-close:hover {
    background-color: var(--slate-100);
    color: var(--secondary);
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-nav-link {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary);
    padding: 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.mobile-nav-link:hover {
    background-color: rgba(var(--primary-rgb), 0.05);
    color: var(--primary);
}

.mobile-search-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.mobile-search-btn .material-symbols-outlined {
    font-size: 1.25rem;
}

.mobile-menu-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.btn-contact-mobile {
    width: 100%;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.btn-contact-mobile .material-symbols-outlined {
    font-size: 1.25rem;
}

.btn-contact-mobile:hover {
    background-color: var(--primary-dark);
}

/* Mobile Menu Social Links */
.mobile-menu-social {
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--slate-200);
}

.mobile-social-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: var(--slate-100);
    color: var(--secondary);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.mobile-social-link:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* =====================================================
   Theme Toggle Button
   ===================================================== */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--secondary);
    transition: all var(--transition-fast);
    padding: 0;
    margin-right: 1rem;
}

.theme-toggle:hover {
    background-color: var(--surface-accent);
    color: var(--primary);
    border-color: var(--primary);
}

.theme-toggle .material-symbols-outlined {
    font-size: 1.25rem;
}

/* Steps timeline */
.steps-timeline {
    counter-reset: step-counter;
    position: relative;
    padding-left: 3rem;
    margin: 2rem 0;
}

.steps-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-light);
}

.step {
    counter-increment: step-counter;
    position: relative;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: var(--surface-accent);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.step:last-child {
    margin-bottom: 0;
}

.step::before {
    content: counter(step-counter);
    position: absolute;
    left: -3rem;
    top: 1.5rem;
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    z-index: 1;
}

.step h3 {
    margin-top: 0;
    padding-left: 0;
    border-left: none;
    border-top: none;
    padding-top: 0;
}

/* Prose styling for article content */
.prose {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-main);
}

.prose h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-top: 3.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    color: var(--secondary);
    letter-spacing: -0.01em;
    position: relative;
}

.prose h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 2.5rem;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.prose h2:first-child {
    margin-top: 0;
}

.prose h3 {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.prose p {
    margin-bottom: 1.5rem;
}

.prose ul,
.prose ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.prose ul li::marker {
    color: var(--primary);
}

.prose ol li::marker {
    color: var(--primary);
    font-weight: 600;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose li strong:first-child {
    color: var(--secondary);
}

.prose blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-muted);
}

.prose img {
    max-width: 100%;
    border-radius: var(--radius-lg);
    margin: 2rem 0;
}

.prose a {
    color: var(--primary);
    text-decoration: underline;
}

.prose code {
    background: var(--surface-accent);
    padding: 0.2em 0.4em;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
}

.prose pre {
    background: var(--surface-accent);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: 2rem 0;
}

.prose pre code {
    background: none;
    padding: 0;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.9375rem;
}

.prose th,
.prose td {
    border: none;
    border-bottom: 1px solid var(--border-light);
    padding: 0.75rem 1rem;
    text-align: left;
}

.prose thead th {
    background: var(--surface-accent);
    font-weight: 700;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    border-bottom: 2px solid var(--primary);
}

.prose tbody tr:hover {
    background: rgba(var(--primary-rgb), 0.04);
}

.prose tbody tr:nth-child(even) {
    background: #f8f8f6;
}

.prose tbody tr:nth-child(even):hover {
    background: #f0eeec;
}

[data-theme="dark"] .prose tbody tr:nth-child(even) {
    background: var(--surface-accent);
}

[data-theme="dark"] .prose tbody tr:nth-child(even):hover {
    background: rgba(var(--primary-rgb), 0.06);
}

/* Event Page */
.event-page {
    padding-top: var(--header-height);
}

.event-header .container {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "date tags"
        "date title"
        "date excerpt"
        "date meta"
        "date cta"
        "image image";
    gap: 0.5rem 2rem;
    align-items: start;
}

.event-header .event-hero-image {
    grid-area: image;
}

.event-header-content {
    display: contents;
}

.event-header .event-info {
    display: contents;
}

.event-date-large {
    grid-area: date;
    grid-row: 1 / 6;
    background: var(--primary);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    text-align: center;
    min-width: 100px;
    align-self: start;
}

.event-date-large .date-month {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: inherit;
}

.event-date-large .date-day {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    color: inherit;
}

.event-date-large .date-range {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
    margin-top: 0.5rem;
    opacity: 0.8;
}

.event-header .event-tags {
    grid-area: tags;
}

.event-header .event-title {
    grid-area: title;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
}

.event-header .event-excerpt {
    grid-area: excerpt;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.375rem;
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.event-header .event-meta {
    grid-area: meta;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}

.event-header .event-cta {
    grid-area: cta;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.meta-item .material-symbols-outlined {
    font-size: 1.25rem;
    color: var(--primary);
}

.event-cta {
    margin-top: 1.5rem;
}

.event-hero-image {
    margin-top: 3rem;
}

.event-hero-image img {
    width: 100%;
    border-radius: var(--radius-xl);
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

/* =====================================================
   Glossary
   ===================================================== */
.glossary-page {
    padding-top: var(--header-height);
}

.glossary-header {
    text-align: center;
    padding-bottom: 0;
}

.glossary-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.glossary-definition {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.375rem;
    font-style: italic;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.glossary-search {
    max-width: 400px;
    margin: 0 auto 2rem;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper .material-symbols-outlined {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
}

.search-input-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    background: var(--surface-light);
    color: var(--text-main);
    transition: all var(--transition-fast);
}

.search-input-wrapper input:focus:not(:focus-visible) {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* Standards section */
.standards-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.standards-section h2 {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.standards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .standards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.standard-card {
    background: var(--surface-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    transition: all var(--transition-fast);
}

.standard-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.standard-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.standard-name a {
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color var(--transition-fast);
}

.standard-name a:hover {
    color: var(--secondary);
}

.standard-name svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.standard-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* FAQ section */
.faq-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.faq-section h2 {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--surface-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-fast);
}

.faq-item[open] {
    border-color: var(--primary);
}

.faq-question {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary);
    padding: 1rem 1.25rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: all var(--transition-fast);
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--primary);
    transition: transform var(--transition-fast);
    flex-shrink: 0;
}

.faq-item[open] .faq-question::after {
    transform: rotate(45deg);
}

.faq-question:hover {
    background: var(--surface-accent);
}

.faq-answer {
    padding: 0 1.25rem 1.25rem 1.25rem;
    color: var(--text-main);
    line-height: 1.7;
}

.faq-answer p {
    margin-bottom: 1rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer code {
    background: var(--surface-accent);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-size: 0.875em;
    font-family: var(--font-mono);
}

/* Resources section */
.resources-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.resources-section h2 {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.resources-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.resource-item {
    margin: 0;
}

.resource-link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1.25rem;
    background: var(--surface-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    transition: all var(--transition-fast);
}

.resource-link:hover {
    background: var(--surface-accent);
    border-color: var(--primary);
}

.resource-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary);
}

.resource-owner {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.resource-type {
    align-self: flex-start;
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
    padding: 0.2rem 0.625rem;
    border-radius: 9999px;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.25rem;
}

/* Dark mode adjustments */
[data-theme="dark"] .stats-box {
    background: rgba(var(--primary-rgb), 0.05);
}

[data-theme="dark"] .standard-card,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .resource-link {
    background: var(--surface-dark);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .standard-card:hover,
[data-theme="dark"] .faq-item[open],
[data-theme="dark"] .resource-link:hover {
    border-color: var(--primary);
}

/* =====================================================
   Pagefind Search Overrides
   ===================================================== */
.search-wrapper {
    margin-top: 2rem;
}

/* Pagefind UI customizations */
:root {
    --pagefind-ui-scale: 1;
    --pagefind-ui-primary: var(--primary);
    --pagefind-ui-text: var(--text-main);
    --pagefind-ui-background: var(--surface-light);
    --pagefind-ui-border: var(--border-light);
    --pagefind-ui-tag: var(--surface-accent);
    --pagefind-ui-border-width: 1px;
    --pagefind-ui-border-radius: var(--radius-lg);
    --pagefind-ui-image-border-radius: var(--radius-md);
    --pagefind-ui-image-box-ratio: 16 / 9;
    --pagefind-ui-font: var(--font-display);
}

.pagefind-ui__search-input {
    font-family: var(--font-display) !important;
}

.pagefind-ui__result-link {
    color: var(--secondary) !important;
    font-weight: 600 !important;
}

.pagefind-ui__result-link:hover {
    color: var(--primary) !important;
}

/* =====================================================
   Veille Section on Homepage
   ===================================================== */
.veille-section {
    background: var(--surface-light);
}

.veille-see-all {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    text-decoration: none;
    transition: gap 0.3s ease;
}

.veille-see-all:hover {
    gap: 0.6rem;
}

.veille-see-all .material-symbols-outlined {
    font-size: 0.9rem;
}

/* =====================================================
   Blog Section on Homepage
   ===================================================== */
.blog-section {
    background: var(--surface-accent);
}

.blog-see-all {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    text-decoration: none;
    transition: gap 0.3s ease;
}

.blog-see-all:hover {
    gap: 0.6rem;
}

.blog-see-all .material-symbols-outlined {
    font-size: 0.9rem;
}

/* No content placeholder */
.no-content {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Heading anchor links */
.heading-anchor {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 0.5rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

h2:hover .heading-anchor,
h3:hover .heading-anchor,
h4:hover .heading-anchor {
    opacity: 1;
}

.heading-anchor:hover {
    color: var(--primary);
}

/* =====================================================
   Legal Pages (Mentions légales & Confidentialité)
   ===================================================== */

/* Main legal page container */
.legal-page {
    padding-top: var(--header-height);
}

.legal-header {
    padding-bottom: 2rem;
}

.legal-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.legal-lead {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.375rem;
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 700px;
}

.legal-content {
    padding-top: 0;
}

/* Legal tables */
.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    font-size: 0.875rem;
}

.legal-table thead {
    background: rgba(var(--primary-rgb), 0.08);
}

.legal-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    border-bottom: 1px solid var(--border-light);
}

.legal-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light);
}

.legal-table tbody tr:last-child td {
    border-bottom: none;
}

.legal-table tbody tr:hover {
    background: var(--surface-light);
}

/* ============================================================
   Reduced Motion — WCAG 2.1 AA (Success Criterion 2.3.3)
   Disables cyclic/continuous animations for users who prefer
   reduced motion via their OS or browser settings.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {

    /* 1. Hero floating glass orbs — stop infinite float animations */
    .glass-orb {
        animation: none !important;
    }

    /* 2. Trust marquee — stop infinite horizontal scroll */
    .trust-marquee-track {
        animation: none !important;
    }

    /* 3. Hero scroll indicator — stop pulse animation */
    .hero-scroll-line {
        animation: none !important;
    }

    /* 4. Hero tagline cursor — keep visible but stop blinking */
    .hero-tagline-cursor {
        animation: none !important;
        opacity: 1 !important;
    }

    /* 5. Expertise card image — disable hover zoom transition */
    .expertise-card-img .card-bg-img {
        transition: none !important;
    }
}