/* =========================================================
   Version 1 â€” "The Editorial Brief"
   Light, typography-first magazine layout
   ========================================================= */

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --paper: #faf7f1;
    --paper-deep: #f3eee4;
    --paper-band: #f6f1e7;
    --ink: #1a1611;
    --ink-soft: #47413a;
    --muted: #71695d;
    --accent: #1d4d38;
    --accent-bright: #2b7351;
    --hairline: #e2dccc;
    --font-body: 'Inter', sans-serif;
    --font-display: 'Playfair Display', serif;
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 104px;
}

body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.7;
    overflow-x: hidden;
}

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

.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 48px;
}

/* ---------- Navigation ---------- */
.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.nav.scrolled {
    background: rgba(250, 247, 241, 0.93);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 var(--hairline);
}

.nav-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 48px;
    height: 104px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-img {
    height: 62px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 48px;
}

.nav-link {
    text-decoration: none;
    color: var(--ink-soft);
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    position: relative;
    padding: 4px 0;
    transition: color 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.35s var(--ease);
}

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

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

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 101;
}

.hamburger {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--ink);
    position: relative;
    transition: background 0.3s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 2px;
    background: var(--ink);
    left: 0;
    transition: transform 0.3s, top 0.3s;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.nav-toggle.active .hamburger { background: transparent; }
.nav-toggle.active .hamburger::before { transform: rotate(45deg); top: 0; }
.nav-toggle.active .hamburger::after { transform: rotate(-45deg); top: 0; }

/* ---------- Hero ---------- */
.hero {
    display: flex;
    flex-direction: column;
    padding: 144px 0 96px;
    background-image: linear-gradient(rgba(250, 247, 241, 0.72), rgba(250, 247, 241, 0.72)), url('Assets/Images/hero_bkg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 70vh;
    justify-content: center;
}

.hero > .wrap:first-child {
    max-width: 880px;
    margin-inline: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2.4rem, 5.4vw, 4.4rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    max-width: 20ch;
    margin-bottom: 38px;
}

.hero-title em {
    font-style: italic;
    color: var(--accent);
}

.hero-tagline {
    font-size: 1.18rem;
    font-weight: 300;
    color: var(--muted);
    max-width: 52ch;
    margin-bottom: 40px;
}

.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
    flex-wrap: wrap;
}

.btn-solid {
    display: inline-block;
    background: var(--ink);
    color: var(--paper);
    text-decoration: none;
    padding: 16px 36px;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    font-weight: 500;
    border-radius: 2px;
    transition: background 0.3s, transform 0.3s var(--ease);
}

.btn-solid:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

.btn-quiet {
    color: var(--ink);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 3px;
    transition: color 0.3s, border-color 0.3s;
}

.btn-quiet:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* ---------- Sections ---------- */
.section {
    padding: 116px 0;
}

.section-alt {
    background: var(--paper-deep);
}

.section-head {
    max-width: 760px;
    margin-bottom: 76px;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2.1rem, 3.6vw, 3rem);
    letter-spacing: -0.01em;
    margin-bottom: 18px;
}

.section-subtitle {
    color: var(--muted);
    font-size: 1.06rem;
}

/* ---------- Projects (bento grid) ---------- */
.bento {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 28px;
}

.bento-cell {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.bento-feature { grid-column: span 7; grid-row: span 2; }
.bento-half { grid-column: span 5; }

.bento-cell:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(26, 22, 17, 0.10);
}

.bento-fig {
    overflow: hidden;
    background: var(--paper-band);
}
.bento-fig img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 16 / 10;
    display: block;
    transition: transform 0.7s var(--ease);
}
.bento-cell:hover .bento-fig img { transform: scale(1.045); }

.bento-feature .bento-fig { flex: 1 1 auto; }
.bento-feature .bento-fig img { aspect-ratio: auto; }

.bento-body { padding: 20px 22px 22px; }

.bento-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: -0.005em;
    margin: 0 0 9px;
    display: inline-block;
    position: relative;
}
.bento-feature .bento-title { font-size: clamp(1.7rem, 2.3vw, 2.15rem); }

.bento-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.4s var(--ease);
}
.bento-cell:hover .bento-title::after { width: 100%; }

.bento-excerpt {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 14px;
}
.bento-feature .bento-excerpt { font-size: 1.02rem; max-width: 52ch; }

.bento-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.bento-tags li {
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
    border: 1px solid var(--hairline);
    border-radius: 2px;
    padding: 4px 10px;
    background: var(--paper);
}

@media (max-width: 1000px) {
    .bento { grid-template-columns: repeat(6, 1fr); }
    .bento-feature { grid-column: span 6; grid-row: auto; }
    .bento-feature .bento-fig img { aspect-ratio: 16 / 10; }
    .bento-half { grid-column: span 6; }
    .bento-cell { grid-column: span 2; }
}
@media (max-width: 640px) {
    .bento { grid-template-columns: 1fr; }
    .bento-cell,
    .bento-feature,
    .bento-half { grid-column: span 1; grid-row: auto; }
    .bento-fig img,
    .bento-feature .bento-fig img { aspect-ratio: 3 / 2; }
}

/* ---------- Skills list ---------- */
.skills-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.skills-list li {
    background: var(--paper);
    border: 1px solid var(--hairline);
    border-radius: 2px;
    padding: 10px 18px;
    font-size: 0.92rem;
    color: var(--ink-soft);
    cursor: default;
    transition: color 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}

.skills-list li:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* ---------- Footer ---------- */
.footer {
    background: var(--ink);
    color: var(--paper);
    padding: 48px 0 28px;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.footer-brand {
    min-width: 0;
}

.footer-name {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.6rem;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.footer-tag {
    font-family: var(--font-display);
    font-style: italic;
    color: #b5ad9e;
    font-size: 0.98rem;
}

.footer-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 28px;
}

.footer-links a {
    position: relative;
    color: #cfc8b9;
    text-decoration: none;
    font-size: 0.86rem;
    font-variant: small-caps;
    letter-spacing: 0.06em;
    padding: 4px 0;
    transition: color 0.3s;
}

.footer-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--accent-bright);
    transition: width 0.35s var(--ease);
}

.footer-links a:hover {
    color: var(--paper);
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-base {
    margin-top: 24px;
    padding-top: 26px;
    border-top: 1px solid rgba(250, 247, 241, 0.16);
    font-size: 0.85rem;
    font-variant: small-caps;
    letter-spacing: 0.08em;
    color: #8e8779;
}

/* ---------- Scroll reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s var(--ease) var(--d, 0s), transform 0.7s var(--ease) var(--d, 0s);
}

.reveal.in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .wrap,
    .nav-inner {
        padding: 0 28px;
    }
}

@media (max-width: 860px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(80vw, 360px);
        height: 100vh;
        background: var(--paper);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 34px;
        transition: right 0.4s var(--ease);
        box-shadow: -14px 0 44px rgba(26, 22, 17, 0.14);
        border-left: 1px solid var(--hairline);
    }

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

    .nav-menu .nav-link {
        font-family: var(--font-display);
        font-size: 1.35rem;
        color: var(--ink);
    }

    .hero {
        padding-top: 116px;
    }

    .section {
        padding: 84px 0;
    }

    .footer-grid {
        flex-direction: column;
    }

    .footer-links {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .wrap,
    .nav-inner {
        padding: 0 18px;
    }

    .hero-cta {
        gap: 22px;
    }

    .profile-text,
    .profile-skills-text {
        max-width: none;
    }
}

/* ---------- Profile (Option 2: Integrated Narrative) ---------- */
.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
    align-items: stretch;
}

/* Both profile columns share the same heading treatment for visual parity. */
.profile-grid .section-title {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    margin-bottom: 22px;
}

.profile-text {
    color: var(--muted);
    font-size: 1.04rem;
    margin-bottom: 18px;
    max-width: 44ch;
}

.profile-skills-title {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: -0.01em;
}

.profile-skills-text {
    color: var(--muted);
    font-size: 1.04rem;
    margin-bottom: 24px;
    max-width: 44ch;
}

@media (max-width: 1024px) {
    .profile-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* =========================================================
   Project Pages — light-theme components
   ========================================================= */

/* ---------- Project hero ---------- */
.project-hero {
    display: block;
    padding: 120px 0 56px;
    background: var(--paper-deep);
    background-image: none;
    min-height: auto;
    border-bottom: 1px solid var(--hairline);
}

.project-hero > .wrap:first-child {
    max-width: 1180px;
    margin-inline: auto;
    text-align: left;
    display: block;
}

.project-hero-inner {
    max-width: 880px;
    margin-inline: auto;
    text-align: left;
}

.project-hero--app .project-hero-inner {
    max-width: 914px;
}

.project-hero .hero-title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    max-width: none;
    line-height: 1.15;
    margin-bottom: 14px;
}

.project-hero .hero-tagline {
    font-size: 1.05rem;
    max-width: 60ch;
    margin-bottom: 20px;
}

.back-link {
    color: var(--ink);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 3px;
    transition: color 0.3s, border-color 0.3s;
}

.back-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* ---------- Project page header (hero removed, folded into body) ---------- */
.project-page-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2rem, 3.4vw, 2.8rem);
    letter-spacing: -0.01em;
    line-height: 1.15;
    color: var(--ink);
    margin: 0 0 18px;
}

.about-text .back-link,
.case-study-container .back-link {
    display: inline-block;
    margin-bottom: 18px;
}

.case-study-container .project-page-title {
    margin-bottom: 24px;
}

/* ---------- Project page header band ---------- */
.project-page-header {
    max-width: 880px;
    margin: 72px auto 40px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--hairline);
}

.project-page-header .project-eyebrow {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    line-height: 1.7;
    margin: 0 0 10px;
}

.project-page-header .project-page-title {
    margin: 0;
}

.project-page-header .lead {
    font-family: var(--font-body);
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--ink-soft);
    margin: 14px 0 0;
}

@media (max-width: 480px) {
    .project-page-header { margin: 56px auto 28px; padding-bottom: 20px; }
}

/* Header band inside the wider .about-text column (app/dashboard pages) */
.about-text .project-page-header {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

/* Lead paragraph = folded-in tagline (matches body paragraph styling) */
.section--app .about-text .lead {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink-soft);
    margin-bottom: 22px;
}

.case-study-section .lead,
.case-study-container > .lead {
    font-family: var(--font-body);
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--ink-soft);
    margin-bottom: 16px;
}

/* Back-to-Projects link at the bottom of the page content */
.back-to-projects {
    margin-top: 28px;
    text-align: right;
}

.section--app .back-to-projects {
    max-width: 914px;
    margin: 28px auto 0;
}

/* Project hero — responsive */
@media (max-width: 860px) {
    .project-hero { padding: 108px 0 48px; }
}

@media (max-width: 480px) {
    .project-hero { padding: 100px 0 40px; }
    .project-hero .hero-tagline { max-width: none; }
}

/* ---------- Project body (dashboard-style pages) ---------- */
.project-body {
    max-width: 820px;
    margin: 0 auto;
    text-align: left;
}

.about-text {
    max-width: 914px;
    margin: 0 auto;
    text-align: left;
}

.project-body p,
.about-text p {
    color: var(--ink-soft);
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 18px;
}

.project-body .lead,
.about-text .lead {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    line-height: 1.5;
    letter-spacing: -0.005em;
    color: var(--ink);
    margin-bottom: 26px;
}

.project-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.45rem;
    letter-spacing: -0.005em;
    color: var(--ink);
    margin: 36px 0 12px;
}

.project-body ul,
.about-text ul {
    margin: 0 0 22px 1.25rem;
    color: var(--ink-soft);
    line-height: 1.7;
}

.project-body ul li,
.about-text ul li {
    margin-bottom: 8px;
}

.project-body ul li strong,
.about-text ul li strong {
    color: var(--ink);
}

/* ---------- Tech tags ---------- */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px 0;
}

.tech-tag {
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
    border: 1px solid var(--hairline);
    border-radius: 2px;
    padding: 5px 11px;
    background: var(--paper);
}

/* ---------- Dashboard embed ---------- */
.dashboard-container {
    margin-top: 56px;
    border: 1px solid var(--hairline);
    border-radius: 14px;
    overflow: hidden;
    background: var(--paper);
    box-shadow: 0 10px 28px rgba(26, 22, 17, 0.07);
}

.dashboard-iframe {
    width: 100%;
    height: 78vh;
    min-height: 560px;
    border: 0;
    display: block;
    background: var(--paper);
}

.error-message {
    padding: 44px 24px;
    text-align: center;
    color: var(--muted);
}

.error-message strong {
    display: block;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 8px;
}

/* ---------- Case study ---------- */
.case-study-container {
    max-width: 880px;
    margin: 0 auto;
}

.case-study-section h2 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.85rem;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--hairline);
}

.case-study-section h3 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.35rem;
    color: var(--ink);
    margin: 32px 0 16px;
}

.case-study-section h4 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--ink);
    margin: 22px 0 12px;
}

.case-study-section p {
    color: var(--ink-soft);
    font-size: 1.02rem;
    line-height: 1.75;
    margin-bottom: 20px;
}

.case-study-section ul {
    margin: 0 0 22px 1.25rem;
    color: var(--ink-soft);
    line-height: 1.7;
}

.case-study-section li {
    margin-bottom: 10px;
}

.case-study-section li strong {
    color: var(--ink);
}

.case-study-section code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
    font-size: 0.9em;
    background: var(--paper-band);
    border: 1px solid var(--hairline);
    border-radius: 3px;
    padding: 1px 6px;
    color: var(--accent);
}

/* Tab system (light) */
.tab-container {
    background: var(--paper);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(26, 22, 17, 0.07);
    margin-bottom: 40px;
}

.tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 14px 14px 0;
    background: var(--paper-deep);
    border-bottom: 1px solid var(--hairline);
}

.tab-button {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--muted);
    transition: color 0.3s, border-color 0.3s, background 0.3s;
    margin-bottom: -1px;
    border-radius: 6px 6px 0 0;
}

.tab-button:hover { color: var(--ink); }

.tab-button.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: var(--paper);
}

.tab-content {
    display: none;
    padding: 34px 34px 28px;
    background: var(--paper);
}

.tab-content.active { display: block; }

@media (max-width: 480px) {
    .tab-content { padding: 24px 18px 16px; }
    .tab-button { padding: 10px 14px; font-size: 0.84rem; }
}

.tab-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--hairline);
}

.tab-nav-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: var(--ink);
    color: var(--paper);
    border: none;
    border-radius: 2px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s var(--ease);
}

.tab-nav-button:hover:not(:disabled) {
    background: var(--accent);
    transform: translateY(-2px);
}

.tab-nav-button.prev i { margin-right: 0.5rem; }
.tab-nav-button.next i { margin-left: 0.5rem; }

.tab-nav-button:disabled {
    background: var(--paper-band);
    color: var(--muted);
    cursor: not-allowed;
}

/* Visualizations */
.viz-container {
    margin: 28px 0;
    text-align: center;
    background: var(--paper-band);
    padding: 22px;
    border-radius: 10px;
    border: 1px solid var(--hairline);
}

.viz-container img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.viz-caption {
    margin-top: 12px;
    font-size: 0.88rem;
    color: var(--muted);
    font-style: italic;
}

.text-center {
    text-align: center;
    margin: 22px 0;
    color: var(--muted);
}

/* Notebook embed */
.embed-container {
    position: relative;
    padding-bottom: 150%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 24px 0 30px;
    border-radius: 10px;
    border: 1px solid var(--hairline);
    box-shadow: 0 6px 18px rgba(26, 22, 17, 0.08);
    background: #fff;
}

.embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Results table */
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin: 26px 0;
    border: 1px solid var(--hairline);
    border-radius: 10px;
    overflow: hidden;
    font-size: 0.96rem;
    background: var(--paper);
}

.results-table thead { background: var(--paper-deep); }

.results-table th {
    padding: 14px 16px;
    text-align: left;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--ink);
    border-bottom: 1px solid var(--hairline);
}

.results-table th.center,
.results-table td.center { text-align: center; }

.results-table td {
    padding: 14px 16px;
    color: var(--ink-soft);
    border-bottom: 1px solid var(--hairline);
}

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

.results-table .highlight {
    color: var(--accent);
    font-weight: 600;
}

@media (max-width: 640px) {
    .dashboard-iframe { height: 62vh; min-height: 440px; }
    .project-body, .about-text { padding: 0 4px; }
}

/* =========================================================
   Project app pages — compact layout (A) + minimal carousel (C)
   Tighter typography/spacing (A) plus a modern, minimalist
   carousel of the Problem / Approach / Outcome / Key Capabilities
   blocks (C), with round Prev/Next arrows flanking the text and
   each section shown as a true heading. Keeps the embedded app
   iframe reachable with far less scrolling.
   ========================================================= */
.section--app {
    padding: 120px 0 80px;
}

.section--app .section-title {
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
    margin-bottom: 12px;
}

.section--app .about-text p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.section--app .about-text ul {
    line-height: 1.6;
    margin-bottom: 12px;
}

.section--app .about-text ul li {
    margin-bottom: 5px;
}

.section--app .tech-stack {
    margin: 16px 0 0;
}

.section--app .dashboard-container {
    margin-top: 28px;
    max-width: 914px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Minimal carousel (app pages) ---------- */
.app-carousel {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 30px 0 0;
}

.carousel-arrow {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--hairline);
    background: var(--paper);
    color: var(--ink-soft);
    cursor: pointer;
    transition: border-color 0.3s, color 0.3s, background 0.3s, transform 0.3s var(--ease);
}

.carousel-arrow svg {
    width: 18px;
    height: 18px;
    display: block;
}

.carousel-arrow:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.carousel-arrow:disabled {
    opacity: 0.32;
    cursor: not-allowed;
}

.carousel-viewport {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    /* Height is driven by JS to match the active slide; animate the change. */
    transition: height 0.45s var(--ease);
}

.carousel-track {
    display: flex;
    /* Keep each slide at its natural height instead of stretching to the
       tallest slide, so the viewport can shrink to the active slide. */
    align-items: flex-start;
    transition: transform 0.55s var(--ease);
    will-change: transform;
}

.carousel-slide {
    min-width: 100%;
    padding: 0 6px;
    box-sizing: border-box;
}

.slide-heading {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--hairline);
}

.carousel-slide p {
    color: var(--ink-soft);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.carousel-slide ul {
    margin: 0 0 4px 1.1rem;
    color: var(--ink-soft);
    line-height: 1.65;
}

.carousel-slide li {
    margin-bottom: 8px;
}

.carousel-slide li strong {
    color: var(--ink);
}

.carousel-meta {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin-top: 24px;
}

.carousel-counter {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--muted);
}

.carousel-counter strong {
    color: var(--accent);
    font-weight: 600;
}

@media (max-width: 640px) {
    .section--app { padding: 48px 0 64px; }
    .app-carousel { gap: 10px; margin-top: 22px; }
    .carousel-arrow { width: 36px; height: 36px; }
    .carousel-arrow svg { width: 15px; height: 15px; }
    .carousel-slide { padding: 0 4px; }
    .slide-heading { font-size: 1.3rem; }
    .carousel-meta { margin-top: 18px; }
}