
html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 5.5rem;
}

body {
    overflow-x: hidden;
}

img {
    height: auto;
}

:where(p, li, td, dd, .timeline-meta, .contact-card, .contact-footer-link, .books-hero__intro) {
    overflow-wrap: anywhere;
}


.scroll-progress {
    position: fixed;
    inset: 0 0 auto 0;
    height: 3px;
    transform: scaleX(0);
    transform-origin: 0 50%;
    background: linear-gradient(90deg, #38bdf8, #a855f7);
    z-index: 120;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.35);
    pointer-events: none;
}

:root {
    --font-base: 'Inter', 'Manrope', sans-serif;
    --font-heading: 'DM Serif Display', 'Georgia', serif;
    --font-accent: 'Manrope', 'Inter', sans-serif;
    --radius-base: 18px;
    --radius-pill: 999px;
    --transition-base: 0.3s ease;
    --shadow-soft: 0 24px 48px rgba(15, 23, 42, 0.28);
    --shadow-light: 0 16px 36px rgba(15, 23, 42, 0.12);
    --max-width: 1180px;
    --color-accent: #38bdf8;
    --color-accent-secondary: #f472b6;
    --color-surface-dark: rgba(15, 23, 42, 0.7);
    --color-surface-light: rgba(255, 255, 255, 0.92);
    --gradient-hero-dark: radial-gradient(120% 120% at 0% 100%, rgba(14, 165, 233, 0.32) 0%, rgba(59, 130, 246, 0) 55%),
        radial-gradient(120% 140% at 100% 0%, rgba(192, 38, 211, 0.28) 0%, rgba(15, 23, 42, 0) 60%),
        #0b1120;
    --gradient-hero-light: radial-gradient(100% 120% at 15% 100%, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0) 60%),
        radial-gradient(110% 120% at 90% 0%, rgba(236, 72, 153, 0.24) 0%, rgba(236, 72, 153, 0) 65%),
        #f8fafc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-base);
    line-height: 1.7;
    background: #0b1120;
    color: #e2e8f0;
    font-size: 16px;
    transition: background var(--transition-base), color var(--transition-base);
    position: relative;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(60% 60% at 10% 20%, rgba(56, 189, 248, 0.14), transparent 60%),
        radial-gradient(55% 55% at 90% 80%, rgba(236, 72, 153, 0.12), transparent 65%);
    opacity: 0.75;
    pointer-events: none;
    z-index: -2;
}

body.light-mode {
    background: #f8fafc;
    color: #0f172a;
}

body.light-mode::before {
    background: radial-gradient(60% 70% at 15% 20%, rgba(79, 70, 229, 0.12), transparent 65%),
        radial-gradient(55% 60% at 85% 80%, rgba(236, 72, 153, 0.14), transparent 70%);
    opacity: 0.85;
}

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

.container {
    width: min(92%, var(--max-width));
    margin: 0 auto;
}

.section {
    padding: clamp(3rem, 8vw, 5rem) 0;
}

.section h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3vw, 2.4rem);
    text-align: center;
    margin-bottom: 1rem;
}

.section-intro {
    text-align: center;
    max-width: 720px;
    margin: 0.5rem auto 2.5rem;
    color: inherit;
}

.section-card,
.feature-card,
.project-card,
.service-card,
.testimonial-card,
.resource-card {
    background: var(--color-surface-dark);
    border-radius: var(--radius-base);
    padding: clamp(1.5rem, 3vw, 2.4rem);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(148, 163, 184, 0.22);
    backdrop-filter: blur(16px);
}

body.light-mode .section-card,
body.light-mode .feature-card,
body.light-mode .project-card,
body.light-mode .service-card,
body.light-mode .testimonial-card,
body.light-mode .resource-card {
    background: var(--color-surface-light);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow-light);
}


@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .section-card,
    .feature-card,
    .project-card,
    .service-card,
    .testimonial-card,
    .resource-card,
    .site-nav,
    .book-card {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(15, 23, 42, 0.92);
    }

    body.light-mode .section-card,
    body.light-mode .feature-card,
    body.light-mode .project-card,
    body.light-mode .service-card,
    body.light-mode .testimonial-card,
    body.light-mode .resource-card,
    body.light-mode .site-nav,
    body.light-mode .book-card {
        background: rgba(255, 255, 255, 0.98);
    }
}

.site-header {
    padding: clamp(3.2rem, 8vw, 6.4rem) 0 clamp(2.6rem, 5vw, 4rem);
    position: relative;
    overflow: hidden;
    background: var(--gradient-hero-dark);
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

body.light-mode .site-header {
    background: var(--gradient-hero-light);
    border-bottom-color: rgba(148, 163, 184, 0.18);
}

.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 4rem);
    align-items: stretch;
}

@media (max-width: 980px) {
    .hero-layout {
        grid-template-columns: minmax(0, 1fr);
        text-align: center;
        justify-items: center;
    }

    .hero-copy {
        align-items: center;
        text-align: center;
    }

    .hero-side-panel {
        text-align: left;
        width: min(100%, 520px);
    }
}

.hero-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(1.5rem, 3vw, 2.4rem);
}

.hero-avatar {
    display: grid;
    gap: 1.5rem;
    justify-items: center;
    text-align: center;
}

.profile-pic {
    width: clamp(200px, 24vw, 240px);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid rgba(226, 232, 240, 0.4);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.35);
}

body.light-mode .profile-pic {
    border-color: rgba(148, 163, 184, 0.35);
    box-shadow: 0 20px 44px rgba(148, 163, 184, 0.25);
}

.hero-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.hero-pill {
    padding: 0.45rem 1.1rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: rgba(56, 189, 248, 0.16);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #bae6fd;
    text-transform: uppercase;
}

body.light-mode .hero-pill {
    background: rgba(56, 189, 248, 0.18);
    color: #0f172a;
    border-color: rgba(56, 189, 248, 0.35);
}

.toggle-button {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.45);
    color: inherit;
    cursor: pointer;
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    font-weight: 600;
}

.toggle-button:hover,
.toggle-button:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 12px 30px rgba(56, 189, 248, 0.22);
    outline: none;
}

.toggle-button__icon {
    font-size: 1.2rem;
}

body.light-mode .toggle-button {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(148, 163, 184, 0.28);
    box-shadow: var(--shadow-light);
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.hero-copy h1 {
    font-size: clamp(2.8rem, 5vw, 3.6rem);
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

.hero-side-panel {
    margin: clamp(1.5rem, 4vw, 2.4rem) 0;
    padding: clamp(1.4rem, 3vw, 1.9rem);
    border-radius: var(--radius-base);
    background: rgba(15, 23, 42, 0.42);
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.24);
}

body.light-mode .hero-side-panel {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: var(--shadow-light);
}

.hero-side-panel h2 {
    font-family: var(--font-accent);
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(244, 244, 255, 0.9);
}

body.light-mode .hero-side-panel h2 {
    color: rgba(15, 23, 42, 0.85);
}

.hero-side-panel ul {
    margin: 1rem 0 1.25rem;
    display: grid;
    gap: 0.75rem;
    text-align: left;
    padding-left: 1.1rem;
    list-style: disc;
}

@media (max-width: 980px) {
    .hero-side-panel ul {
        text-align: left;
    }
}

.hero-side-panel__note {
    font-size: 0.95rem;
    color: rgba(226, 232, 240, 0.82);
}

body.light-mode .hero-side-panel__note {
    color: rgba(30, 41, 59, 0.75);
}

.hero-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.35rem;
    margin-top: clamp(2.5rem, 6vw, 3.6rem);
}

.highlight-card {
    display: grid;
    gap: 0.55rem;
    padding: clamp(1.5rem, 3vw, 2rem);
    border-radius: var(--radius-base);
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.22);
    transition: transform 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
    position: relative;
}

.highlight-icon {
    font-size: 1.45rem;
    color: rgba(224, 231, 255, 0.88);
}

body.light-mode .highlight-icon {
    color: rgba(37, 99, 235, 0.75);
}

.highlight-card:hover,
.highlight-card:focus-within {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 18px 40px rgba(56, 189, 248, 0.18);
}

.highlight-card:focus-visible {
    outline: 2px solid rgba(56, 189, 248, 0.55);
    outline-offset: 3px;
}

body.light-mode .highlight-card {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(96, 165, 250, 0.24);
}

body.light-mode .highlight-card:focus-visible {
    outline-color: rgba(37, 99, 235, 0.5);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: 700;
    color: #38bdf8;
}

body.light-mode .stat-number {
    color: #2563eb;
}

.stat-label {
    font-size: 0.95rem;
    color: rgba(226, 232, 240, 0.82);
}

body.light-mode .stat-label {
    color: rgba(30, 41, 59, 0.72);
}

.intro-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: var(--font-accent);
    color: rgba(226, 232, 240, 0.7);
}

body.light-mode .intro-eyebrow {
    color: rgba(15, 23, 42, 0.55);
}

.intro-tagline {
    font-size: 1.15rem;
    font-weight: 600;
    font-family: var(--font-accent);
    color: rgba(224, 231, 255, 0.85);
}

body.light-mode .intro-tagline {
    color: rgba(30, 41, 59, 0.75);
}

.intro-summary {
    margin: 1.2rem 0 1.6rem;
    max-width: 680px;
    color: rgba(226, 232, 240, 0.9);
}

body.light-mode .intro-summary {
    color: rgba(30, 41, 59, 0.78);
}

.header-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

@media (max-width: 900px) {
    .header-cta {
        justify-content: center;
    }
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.78rem 1.9rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    text-decoration: none;
    color: #0b1120;
    background: linear-gradient(135deg, #38bdf8, #a855f7);
    border: none;
    transition: transform var(--transition-base), box-shadow var(--transition-base), filter var(--transition-base);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(56, 189, 248, 0.35);
    filter: brightness(1.05);
}

.cta-button.ghost {
    background: transparent;
    color: inherit;
    border: 1px solid currentColor;
}

body.light-mode .cta-button.ghost {
    color: #0f172a;
    border-color: rgba(30, 41, 59, 0.45);
}

.cta-button.ghost:hover {
    background: rgba(148, 163, 184, 0.18);
}

.section-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: clamp(2rem, 5vw, 3rem);
}

.site-nav {
    background: rgba(15, 23, 42, 0.82);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

body.light-mode .site-nav {
    background: rgba(248, 250, 252, 0.92);
    border-bottom-color: rgba(148, 163, 184, 0.25);
}

.site-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.9rem 0;
}

.site-nav a {
    text-decoration: none;
    font-weight: 600;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    color: inherit;
    transition: background var(--transition-base), color var(--transition-base);
}

.site-nav a.active {
    background: rgba(96, 165, 250, 0.24);
    color: #e0f2fe;
}

.site-nav a:hover,
.site-nav a:focus {
    background: rgba(96, 165, 250, 0.2);
    color: #bae6fd;
}

.site-nav a:focus-visible {
    outline: 2px solid rgba(96, 165, 250, 0.75);
    outline-offset: 2px;
}

body.light-mode .site-nav a:hover,
body.light-mode .site-nav a:focus {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

body.light-mode .site-nav a.active {
    background: rgba(37, 99, 235, 0.16);
    color: #1d4ed8;
}

.timeline {
    list-style: none;
    position: relative;
    margin: 2.5rem 0 0;
    padding-left: 1.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0.5rem;
    width: 2px;
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.6), rgba(14, 116, 144, 0.2));
}

.timeline li {
    position: relative;
    padding-left: 1.8rem;
    margin-bottom: 2.5rem;
}

.timeline-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 3px solid rgba(56, 189, 248, 0.8);
    background: #0f172a;
    position: absolute;
    left: -0.15rem;
    top: 0.35rem;
}

body.light-mode .timeline-marker {
    background: #f8fafc;
}

.timeline-content h3 {
    font-size: 1.35rem;
    margin-bottom: 0.4rem;
}

.timeline-content ul {
    margin-top: 0.75rem;
    padding-left: 1.1rem;
}

.timeline-content li {
    list-style: disc;
    margin-bottom: 0.4rem;
}

.grid {
    display: grid;
    gap: clamp(1.5rem, 4vw, 2.5rem);
}

.grid.two-col {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid.three-col {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.pill-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.pill-list li {
    background: rgba(148, 163, 184, 0.2);
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-weight: 500;
    color: inherit;
}

body.light-mode .pill-list li {
    background: rgba(96, 165, 250, 0.15);
}

.project-card h3,
.feature-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.project-card p,
.feature-card p {
    margin-bottom: 1rem;
}

.service-grid {
    margin-top: 2rem;
    gap: clamp(1.5rem, 3vw, 2rem);
}

.service-card ul {
    list-style: none;
    display: grid;
    gap: 0.65rem;
    margin-top: 1.25rem;
    padding-left: 0;
}

.service-card li {
    position: relative;
    padding-left: 1.5rem;
    color: rgba(226, 232, 240, 0.9);
}

.service-card li::before {
    content: "✔";
    position: absolute;
    left: 0;
    top: 0;
    color: #38bdf8;
}

body.light-mode .service-card li {
    color: rgba(30, 41, 59, 0.82);
}

body.light-mode .service-card li::before {
    color: #2563eb;
}

.text-link {
    color: #38bdf8;
    font-weight: 600;
    text-decoration: none;
}

.text-link:hover,
.text-link:focus {
    text-decoration: underline;
}

body.light-mode .text-link {
    color: #2563eb;
}

.achievement-list {
    list-style: none;
    display: grid;
    gap: 1.75rem;
}


.testimonial-carousel {
    --testimonial-gap: clamp(1.5rem, 4vw, 2.5rem);
    position: relative;
}

.testimonial-carousel.is-enhanced {
    overflow: hidden;
}

.testimonial-track {
    display: flex;
    flex-wrap: wrap;
    gap: var(--testimonial-gap);
    align-items: stretch;
}

.testimonial-carousel.is-enhanced .testimonial-track {
    flex-wrap: nowrap;
    transition: transform 900ms ease;
    will-change: transform;
}

.testimonial-grid.flowing-panels {
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 1fr);
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scroll-snap-type: x mandatory;
    gap: clamp(1.5rem, 4vw, 2.5rem);
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}

.testimonial-grid.flowing-panels::-webkit-scrollbar {
    height: 6px;
}

.testimonial-grid.flowing-panels::-webkit-scrollbar-track {
    background: transparent;
}

.testimonial-grid.flowing-panels::-webkit-scrollbar-thumb {
    background-color: rgba(148, 163, 184, 0.4);
    border-radius: 999px;
}

@media (min-width: 1024px) {
    .testimonial-grid.flowing-panels {
        grid-auto-flow: row;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        overflow-x: visible;
        padding-bottom: 0;
    }
}

.testimonial-card {
    flex: 1 1 clamp(260px, 30%, 360px);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    min-width: 0;
}

.testimonial-carousel.is-enhanced .testimonial-card {
    flex: 0 0 calc((100% - (var(--testimonial-gap) * 2)) / 3);
}

.testimonial-card::before {
    content: "“";
    font-size: 3rem;
    position: absolute;
    top: -0.75rem;
    left: -0.25rem;
    opacity: 0.15;
}

.testimonial-grid.flowing-panels .testimonial-card {
    scroll-snap-align: start;
}

.testimonial-card blockquote {
    font-style: italic;
    color: rgba(226, 232, 240, 0.9);
}

.testimonial-name {
    font-weight: 700;
}

.testimonial-meta {
    display: block;
    font-size: 0.9rem;
    margin-top: 0.35rem;
    color: rgba(226, 232, 240, 0.75);
}

body.light-mode .testimonial-card blockquote {
    color: rgba(30, 41, 59, 0.85);
}

body.light-mode .testimonial-meta {
    color: rgba(71, 85, 105, 0.75);
}

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

.resource-card h3 {
    margin-bottom: 0.65rem;
}

.resource-card p {
    margin-bottom: 1rem;
}

.table-heading {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 320px;
}

thead th {
    text-align: left;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

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

.interest-highlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.interest-card {
    position: relative;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1.75rem;
    border-radius: calc(var(--radius-base) * 1.1);
    text-decoration: none;
    color: inherit;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(14, 116, 144, 0.25));
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}

.interest-card:hover,
.interest-card:focus {
    transform: translateY(-6px);
    box-shadow: 0 18px 35px rgba(15, 118, 110, 0.25);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.38), rgba(14, 116, 144, 0.35));
}

.interest-card h3 {
    margin-bottom: 0.35rem;
    font-size: 1.1rem;
}

.interest-card p {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(226, 232, 240, 0.8);
}

.interest-icon {
    font-size: 1.75rem;
    line-height: 1;
    filter: drop-shadow(0 6px 12px rgba(14, 165, 233, 0.35));
}

body.light-mode .interest-card {
    background: linear-gradient(135deg, rgba(191, 219, 254, 0.95), rgba(224, 231, 255, 0.9));
    border-color: rgba(148, 163, 184, 0.35);
    box-shadow: 0 16px 30px rgba(59, 130, 246, 0.18);
}

body.light-mode .interest-card p {
    color: rgba(30, 41, 59, 0.78);
}

body.light-mode .interest-card:hover,
body.light-mode .interest-card:focus {
    background: linear-gradient(135deg, rgba(191, 219, 254, 1), rgba(224, 231, 255, 1));
    box-shadow: 0 22px 45px rgba(59, 130, 246, 0.25);
}

.interest-list {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.interest-list strong {
    display: inline-block;
    margin-bottom: 0.3rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-base);
    text-decoration: none;
    background: rgba(15, 23, 42, 0.7);
    color: inherit;
    transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}

.contact-card span {
    font-size: 1.75rem;
}

.contact-card:hover,
.contact-card:focus {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
    background: rgba(56, 189, 248, 0.2);
}

body.light-mode .contact-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

body.light-mode .contact-card:hover,
body.light-mode .contact-card:focus {
    background: rgba(219, 234, 254, 0.7);
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.18);
}

.contact-footer-link {
    margin-top: 1.5rem;
    text-align: center;
    font-weight: 600;
}

.contact-footer-link a {
    color: #38bdf8;
    text-decoration: none;
}

.contact-footer-link a:hover,
.contact-footer-link a:focus {
    text-decoration: underline;
}

body.light-mode .contact-footer-link a {
    color: #2563eb;
}

.site-footer {
    padding: 2.5rem 0;
    text-align: center;
    color: rgba(226, 232, 240, 0.7);
}

body.light-mode .site-footer {
    color: rgba(30, 41, 59, 0.7);
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.75s ease var(--reveal-delay, 0ms), transform 0.75s ease var(--reveal-delay, 0ms);
}

.reveal-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
}

.toggle-button {
    align-self: flex-start;
    padding: 0.65rem 1.3rem;
    border-radius: 999px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.65);
    color: #e2e8f0;
    transition: transform var(--transition-base), background var(--transition-base);
}

.toggle-button:hover,
.toggle-button:focus {
    transform: translateY(-2px);
    background: rgba(56, 189, 248, 0.25);
}

body.light-mode .toggle-button {
    background: rgba(255, 255, 255, 0.9);
    color: #1e293b;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

@media (prefers-reduced-motion: reduce) {
    .highlight-card,
    .reveal-on-scroll {
        transition: none;
        transform: none !important;
    }

    .reveal-on-scroll {
        opacity: 1 !important;
    }
}

.back-to-top-btn {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    padding: 0.75rem 1.1rem;
    border: none;
    border-radius: 999px;
    font-weight: 600;
    background: #38bdf8;
    color: #0f172a;
    cursor: pointer;
    box-shadow: 0 12px 25px rgba(56, 189, 248, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base), transform var(--transition-base);
}

.back-to-top-btn.show-btn {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-6px);
}

body.light-mode .back-to-top-btn {
    background: #2563eb;
    color: #f8fafc;
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.32);
}

@media (max-width: 600px) {
    .section-card,
    .feature-card,
    .project-card,
    .service-card,
    .testimonial-card,
    .resource-card {
        padding: 1.5rem;
    }

    .back-to-top-btn {
        right: 1rem;
        bottom: 1rem;
    }
}

@media (max-width: 900px) {
    .hero-highlights {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

/* Books page */
.books-page .section {
    padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}

.books-hero {
    position: relative;
    padding: clamp(4rem, 9vw, 6.5rem) 0 clamp(3rem, 7vw, 4rem);
    overflow: hidden;
    background: radial-gradient(120% 120% at 0% 100%, rgba(14, 165, 233, 0.25) 0%, rgba(14, 165, 233, 0) 60%),
        radial-gradient(140% 130% at 100% 0%, rgba(236, 72, 153, 0.22) 0%, rgba(15, 23, 42, 0) 60%);
}

body.light-mode .books-hero {
    background: radial-gradient(120% 120% at 0% 100%, rgba(59, 130, 246, 0.16) 0%, rgba(59, 130, 246, 0) 60%),
        radial-gradient(130% 120% at 95% 0%, rgba(244, 114, 182, 0.18) 0%, rgba(248, 250, 252, 0) 65%);
}

.books-hero__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
    gap: clamp(2rem, 4vw, 3.5rem);
    position: relative;
    align-items: start;
}

.books-hero__copy {
    display: grid;
    gap: 1.4rem;
}

.books-hero__content h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.6rem, 5vw, 3.4rem);
    letter-spacing: -0.02em;
}

.books-hero__intro {
    max-width: 700px;
    font-size: 1.07rem;
    color: rgba(226, 232, 240, 0.88);
}

body.light-mode .books-hero__intro {
    color: rgba(30, 41, 59, 0.75);
}

.books-hero__badge-tray {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.books-hero__badge {
    padding: 0.45rem 1rem;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(56, 189, 248, 0.18);
    border: 1px solid rgba(56, 189, 248, 0.32);
    color: #bae6fd;
}

body.light-mode .books-hero__badge {
    background: rgba(56, 189, 248, 0.2);
    color: #0f172a;
    border-color: rgba(56, 189, 248, 0.35);
}

.books-hero__back {
    justify-self: flex-start;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    background: rgba(15, 23, 42, 0.5);
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.35);
    transition: transform var(--transition-base), background var(--transition-base), border var(--transition-base);
}

.books-hero__back:hover {
    transform: translateY(-2px);
    background: rgba(30, 41, 59, 0.75);
    border-color: rgba(148, 163, 184, 0.55);
}

body.light-mode .books-hero__back {
    background: rgba(255, 255, 255, 0.75);
    color: #1f2937;
    border-color: rgba(148, 163, 184, 0.4);
}

body.light-mode .books-hero__back:hover {
    background: rgba(255, 255, 255, 0.96);
}

.books-hero__panel {
    background: rgba(15, 23, 42, 0.48);
    border-radius: var(--radius-base);
    padding: clamp(1.5rem, 3vw, 2rem);
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.28);
    display: grid;
    gap: 1rem;
}

body.light-mode .books-hero__panel {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: var(--shadow-light);
}

.books-hero__panel h2 {
    font-family: var(--font-accent);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(224, 231, 255, 0.9);
}

body.light-mode .books-hero__panel h2 {
    color: rgba(30, 41, 59, 0.75);
}

.books-hero__panel ul {
    display: grid;
    gap: 0.75rem;
    font-size: 0.98rem;
    color: rgba(226, 232, 240, 0.88);
}

body.light-mode .books-hero__panel ul {
    color: rgba(30, 41, 59, 0.72);
}

.books-hero__panel-note {
    font-size: 0.95rem;
    color: rgba(226, 232, 240, 0.75);
}

body.light-mode .books-hero__panel-note {
    color: rgba(30, 41, 59, 0.66);
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(1.75rem, 4vw, 2.5rem);
}

.book-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: clamp(1.75rem, 3.5vw, 2.5rem);
    border-radius: calc(var(--radius-base) + 8px);
    background: linear-gradient(160deg, rgba(30, 64, 175, 0.65), rgba(56, 189, 248, 0.18));
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(148, 163, 184, 0.25);
    backdrop-filter: blur(14px);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border var(--transition-base);
}

.book-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 45px rgba(56, 189, 248, 0.25);
    border-color: rgba(148, 163, 184, 0.35);
}

.book-card__media {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-base);
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.2);
    aspect-ratio: 16 / 10;
}

.book-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.book-card:hover .book-card__media img {
    transform: scale(1.04);
}

body.light-mode .book-card {
    background: linear-gradient(160deg, rgba(224, 231, 255, 0.85), rgba(219, 234, 254, 0.6));
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

body.light-mode .book-card__media {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.book-card__badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(56, 189, 248, 0.2);
    color: #bae6fd;
    border: 1px solid rgba(125, 211, 252, 0.4);
}

body.light-mode .book-card__badge {
    background: rgba(56, 189, 248, 0.22);
    color: #0f172a;
    border-color: rgba(14, 165, 233, 0.35);
}

.book-card h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin: 0;
}

.book-card__tagline {
    font-size: 1.05rem;
    line-height: 1.6;
    opacity: 0.9;
}

.book-card__preview {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-base);
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.book-card__preview h4 {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #e0f2fe;
    opacity: 0.85;
}

.book-card__preview p,
.book-card__preview li {
    opacity: 0.85;
}

.book-card__preview p {
    margin: 0;
}

.book-card__preview ul {
    display: grid;
    gap: 0.65rem;
    padding-left: 1.1rem;
    margin: 0;
}

body.light-mode .book-card__preview {
    background: rgba(248, 250, 252, 0.85);
    border-color: rgba(148, 163, 184, 0.22);
}

body.light-mode .book-card__preview h4 {
    color: #0f172a;
    opacity: 0.55;
}

.book-card__meta {
    display: grid;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.book-card__meta div {
    display: grid;
    gap: 0.25rem;
}

.book-card__meta dt {
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.75rem;
    opacity: 0.75;
}

.book-card__meta dd {
    margin: 0;
}

.book-card__actions {
    margin-top: auto;
}

.books-extras__card {
    text-align: center;
    display: grid;
    gap: 1.5rem;
}

.books-extras__card h2 {
    margin-bottom: 0;
}

.page-footer {
    padding: clamp(2rem, 5vw, 3rem) 0;
    text-align: center;
    background: rgba(15, 23, 42, 0.7);
}

body.light-mode .page-footer {
    background: rgba(241, 245, 249, 0.9);
}

@media (max-width: 900px) {
    .books-hero__content {
        grid-template-columns: minmax(0, 1fr);
        text-align: center;
        justify-items: center;
    }

    .books-hero__copy {
        justify-items: center;
    }

    .books-hero__badge-tray {
        justify-content: center;
    }

    .books-hero__panel {
        text-align: left;
        width: min(100%, 420px);
    }

    .books-hero__back {
        justify-self: center;
    }
}


@media (max-width: 900px) {
    .site-nav {
        top: 0;
    }

    .site-nav .container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .site-nav .container::-webkit-scrollbar {
        display: none;
    }

    .site-nav ul {
        flex-wrap: nowrap;
        justify-content: flex-start;
        width: max-content;
        min-width: 100%;
        padding-inline: 0.2rem;
    }

    .site-nav a {
        white-space: nowrap;
    }

    .testimonial-carousel.is-enhanced {
        overflow: visible;
    }

    .testimonial-track {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .testimonial-card {
        flex: 0 0 min(85vw, 320px);
        scroll-snap-align: start;
    }
}

@media (max-width: 640px) {
    .hero-copy h1,
    .books-hero__content h1 {
        word-break: break-word;
    }

    .contact-card {
        align-items: flex-start;
    }

    .contact-card span {
        margin-top: 0.15rem;
    }
}


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