:root {
    /* Signal Teal palette */
    --bg: #f3f5f7;
    --surface: #ffffff;
    --surface-elevated: #ffffff;
    --text: #0c1222;
    --text-muted: #334155;
    --text-subtle: #64748b;
    --border: #e2e8f0;
    --primary: #0f766e;
    --primary-hover: #0d9488;
    --accent: #14b8a6;
    --accent-muted: rgba(20, 184, 166, 0.12);
    --hero-bg: #0f172a;
    --hero-bg-soft: #134e4a;
    --text-inverse: #e2e8f0;
    --success: #0f766e;
    --warning: #d97706;
    --error: #e11d48;

    /* Legacy aliases */
    --bg-light: var(--bg);
    --bg-dark: var(--hero-bg);
    --bg-dark-soft: #1e293b;
    --text-main: var(--text);
    --line: var(--border);
    --content-max: 1080px;

    --radius-sm: 0.5rem;
    --radius-md: 0.85rem;
    --shadow-card: 0 1px 2px rgba(12, 18, 34, 0.04), 0 4px 16px rgba(12, 18, 34, 0.06);
    --shadow-card-hover: 0 4px 8px rgba(12, 18, 34, 0.06), 0 12px 28px rgba(12, 18, 34, 0.1);
    --shadow-header: 0 1px 0 var(--border), 0 4px 20px rgba(12, 18, 34, 0.06);
    --transition-fast: 160ms ease-out;
    --transition-base: 220ms ease-out;
    --focus-ring: 0 0 0 3px rgba(15, 118, 110, 0.35);
}

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

html {
    scroll-behavior: smooth;
}

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

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

    .hero-animate {
        opacity: 1 !important;
        transform: none !important;
    }
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Source Sans 3", "Segoe UI", Roboto, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
ul,
ol {
    margin: 0;
}

h1,
h2,
h3,
.brand-mark {
    font-family: "Outfit", "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible,
button:focus-visible,
.button:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -3rem;
    z-index: 100;
    padding: 0.6rem 1rem;
    color: var(--text-inverse);
    background: var(--hero-bg);
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 1rem;
}

main:focus {
    outline: none;
}

.content-wrap {
    width: min(100% - 2.5rem, var(--content-max));
    margin-inline: auto;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-header);
}

.site-navigation {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand-mark {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    transition: color var(--transition-fast);
}

.brand-mark:hover {
    color: var(--primary);
}

.navigation-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 1rem;
    padding: 0;
    margin: 0;
}

.navigation-list a {
    position: relative;
    display: inline-block;
    padding: 0.45rem 0.35rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.navigation-list a::after {
    content: "";
    position: absolute;
    left: 0.35rem;
    right: 0.35rem;
    bottom: 0.2rem;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
    transform: scaleX(0);
    transition: transform var(--transition-fast);
}

.navigation-list a:hover {
    color: var(--text);
}

.navigation-list a:hover::after,
.navigation-list a.is-active::after {
    transform: scaleX(1);
}

.navigation-list a.is-active {
    color: var(--primary);
    font-weight: 600;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0.6rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.nav-toggle-bar {
    display: block;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
}

/* Hero */
.intro-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    color: var(--text-inverse);
    padding: 7.5rem 0 6.5rem;
    background: linear-gradient(155deg, var(--hero-bg) 0%, #1a3a38 45%, var(--hero-bg-soft) 100%);
}

.intro-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 75%);
    pointer-events: none;
}

.intro-section::after {
    content: "";
    position: absolute;
    top: -20%;
    right: -10%;
    width: min(55vw, 480px);
    height: min(55vw, 480px);
    background: radial-gradient(circle, rgba(20, 184, 166, 0.22) 0%, transparent 70%);
    pointer-events: none;
}

.intro-layout {
    position: relative;
    z-index: 1;
}

.intro-layout h1 {
    font-size: clamp(2.25rem, 5.5vw, 3.6rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.intro-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 0.85rem;
    font-weight: 600;
}

.intro-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: #99f6e4;
    margin-bottom: 1rem;
}

.intro-description {
    max-width: 36rem;
    color: #cbd5e1;
    font-size: 1.1rem;
}

.intro-actions {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.intro-secondary-link {
    margin-top: 1.1rem;
    font-size: 0.95rem;
    color: rgba(226, 232, 240, 0.8);
}

.intro-secondary-link a {
    color: #99f6e4;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.intro-secondary-link a:hover {
    color: #ffffff;
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 0;
    list-style: none;
}

.hero-chips li {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #ccfbf1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.hero-animate {
    opacity: 0;
    transform: translateY(12px);
    animation: heroFadeUp 0.55s ease-out forwards;
}

.hero-animate--1 { animation-delay: 0.05s; }
.hero-animate--2 { animation-delay: 0.12s; }
.hero-animate--3 { animation-delay: 0.19s; }
.hero-animate--4 { animation-delay: 0.26s; }
.hero-animate--5 { animation-delay: 0.33s; }
.hero-animate--6 { animation-delay: 0.4s; }

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

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.65rem 1.5rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.button:hover {
    transform: translateY(-1px);
}

.button:active {
    transform: translateY(0);
}

.button-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.35);
}

.button-primary:hover {
    background: var(--primary-hover);
}

.button-secondary {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.45);
    color: #f0fdfa;
}

.button-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.65);
}

.button-outline {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}

.button-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--accent-muted);
}

.project-card .button-secondary,
.project-card .button-primary.button-sm {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
    box-shadow: none;
}

.project-card .button-primary.button-sm {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 6px rgba(15, 118, 110, 0.25);
}

.project-card .button-primary.button-sm:hover {
    background: var(--primary-hover);
}

.project-card .button-secondary:hover {
    background: var(--accent-muted);
}

.button-ghost {
    background: transparent;
    color: var(--primary);
}

.button-ghost:hover {
    background: var(--accent-muted);
}

.button-sm {
    min-height: 38px;
    padding: 0.45rem 1.15rem;
    font-size: 0.875rem;
    border-radius: 999px;
}

.button:disabled,
.button[aria-disabled="true"] {
    opacity: 0.5;
    pointer-events: none;
}

/* Sections */
.section-block {
    padding: 4.5rem 0;
    border-bottom: 1px solid var(--border);
}

.section-eyebrow {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.section-block h2 {
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--text);
}

.section-block > .content-wrap > p:first-of-type,
.section-lead {
    color: var(--text-subtle);
    max-width: 42rem;
    margin-bottom: 0;
}

.section-block p {
    color: var(--text-subtle);
    max-width: 42rem;
}

#about p {
    line-height: 1.7;
}

#about p:first-of-type {
    color: var(--text);
    font-size: 1.125rem;
    line-height: 1.55;
}

#about p + p {
    margin-top: 1rem;
}

#contact p + p {
    margin-top: 1rem;
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--transition-base), transform var(--transition-base);
}

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

/* Project cards */
.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem 1.6rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-card);
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast);
}

.project-card:hover {
    border-color: rgba(15, 118, 110, 0.25);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.project-card h3 {
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.65rem;
    color: var(--text);
}

.project-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.project-media-item {
    margin: 0;
    padding: 0;
    display: block;
    width: 100%;
    font: inherit;
    text-align: inherit;
    cursor: zoom-in;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg);
    transition: border-color var(--transition-fast);
}

.project-media-item:hover {
    border-color: var(--accent);
}

.project-media-item img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 10;
    object-fit: contain;
    background: #ffffff;
    cursor: zoom-in;
    transition: transform var(--transition-base);
}

.project-media-item:hover img {
    transform: scale(1.02);
}

.project-highlights {
    margin: 0.85rem 0 0;
    padding-left: 1.2rem;
    color: var(--text-subtle);
}

.project-highlights-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
    list-style: disc;
}

.project-subheading {
    margin-top: 1.5rem;
    margin-bottom: 0.15rem;
    font-size: 1rem;
    font-family: "Outfit", sans-serif;
    color: var(--text);
}

.project-kicker {
    margin: -0.25rem 0 0.9rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.98rem;
    max-width: none;
}

.project-meta {
    margin: -0.55rem 0 1.1rem;
    color: var(--text-subtle);
    font-size: 0.88rem;
    max-width: none;
}

.project-groups,
.engineering-highlights {
    display: grid;
    gap: 0.85rem;
    margin-top: 0.7rem;
}

.project-group h5,
.engineering-highlights h5 {
    margin: 0 0 0.4rem;
    font-family: "Outfit", sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary);
}

.project-group ul {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--text-subtle);
}

.project-group li + li {
    margin-top: 0.28rem;
}

.project-group li {
    overflow-wrap: anywhere;
}

.engineering-highlights article {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 0.85rem 0.95rem;
}

.engineering-highlights p {
    margin: 0;
    max-width: none;
    font-size: 0.95rem;
}

@media (min-width: 720px) {
    .engineering-highlights {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 960px) {
    .project-groups {
        grid-template-columns: 1.15fr 0.85fr 1.1fr;
        gap: 1rem 1.35rem;
    }
}

.project-progression {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.project-progression > li {
    padding-left: 0.9rem;
    border-left: 3px solid var(--accent);
}

.project-progression h4 {
    font-size: 1rem;
    margin-bottom: 0.15rem;
    font-family: "Outfit", sans-serif;
}

.project-confidential {
    margin-top: 0.75rem;
    font-style: italic;
    color: var(--text-subtle);
    font-size: 0.95rem;
}

.project-tech {
    margin-top: 1rem;
}

.engineering-highlights + .project-tech {
    margin-top: 1.35rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.65rem;
    list-style: none;
    padding: 0;
}

.tech-tags li {
    padding: 0.3rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: default;
    user-select: none;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.tech-tags li:hover {
    border-color: var(--accent);
    color: var(--primary);
}

.project-links {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.repo-links {
    color: var(--text-subtle);
    font-size: 0.95rem;
}

.repo-links a {
    color: var(--primary);
    font-weight: 600;
    margin-left: 0.35rem;
    transition: color var(--transition-fast);
}

.repo-links a:hover {
    color: var(--primary-hover);
}

.repo-sep {
    margin: 0 0.35rem;
    color: var(--border);
}

/* Engineering notes */
.notes-grid {
    margin-top: 1.75rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.note-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.35rem 1.45rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    box-shadow: var(--shadow-card);
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast);
}

.note-card:hover {
    border-color: rgba(15, 118, 110, 0.3);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.note-card h3 {
    font-size: 1.08rem;
    line-height: 1.35;
}

.note-card > p:not(.note-category):not(.note-card-action) {
    color: var(--text-subtle);
    max-width: none;
    flex: 1;
    font-size: 0.98rem;
}

.note-category {
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    max-width: none;
}

.note-card-action {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    max-width: none;
}

.note-card-cta {
    color: var(--primary);
    font-weight: 600;
    transition: color var(--transition-fast);
}

a.note-card-cta:hover {
    color: var(--primary-hover);
}

.note-card-cta::after {
    content: " \2192";
}

.note-card-cta[aria-disabled="true"] {
    color: var(--text-subtle);
    font-weight: 500;
    cursor: default;
}

.note-card-status {
    color: var(--text-subtle);
    font-size: 0.85rem;
    font-style: italic;
}

/* Experience */
.experience-list {
    margin: 1.75rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 1rem;
}

.experience-item {
    padding: 1.25rem 1.35rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.experience-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.25rem 1rem;
}

.experience-heading h3 {
    font-size: 1.05rem;
    font-family: "Outfit", sans-serif;
}

.experience-period {
    color: var(--text-subtle);
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
}

.experience-company {
    margin-top: 0.2rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.experience-item > p:last-child {
    margin-top: 0.7rem;
    color: var(--text-subtle);
    max-width: none;
}

/* Skills */
.skills-grid {
    margin-top: 1.75rem;
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 960px) {
    .skills-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem 2.5rem;
    }
}

.skill-group h3 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
}

/* Contact */
.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.5rem;
}

.site-footer {
    padding: 2.25rem 0;
    color: var(--text-subtle);
    background: var(--surface);
    border-top: 1px solid var(--border);
    font-size: 0.95rem;
}

.site-footer a {
    color: var(--primary);
    font-weight: 500;
}

.site-footer a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Lightbox */
.image-lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(12, 18, 34, 0.88);
    z-index: 1000;
    padding: 1rem 3rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.image-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox-stage {
    width: min(1000px, 100%);
    max-height: 90vh;
    text-align: center;
    transform: scale(0.96);
    transition: transform var(--transition-base);
}

.image-lightbox.is-open .lightbox-stage {
    transform: scale(1);
}

#lightbox-image {
    width: 100%;
    max-height: 82vh;
    object-fit: contain;
    background: #0b1220;
    border-radius: var(--radius-sm);
}

.lightbox-caption {
    margin-top: 0.6rem;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.lightbox-button {
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 1.4rem;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.lightbox-button:hover {
    background: rgba(255, 255, 255, 0.22);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.9rem;
    line-height: 1;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

/* Engineering note article pages */
.note-article-header {
    padding: 2.5rem 0 2rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.note-back-link {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1.25rem;
    transition: color var(--transition-fast);
}

.note-back-link:hover {
    color: var(--primary-hover);
}

.note-article-header .note-category {
    margin-bottom: 0.5rem;
}

.note-article-header h1 {
    font-size: clamp(1.65rem, 4vw, 2.25rem);
    line-height: 1.25;
    max-width: 42rem;
    letter-spacing: -0.02em;
}

.note-article-subtitle {
    margin-top: 0.85rem;
    color: var(--text-subtle);
    max-width: 42rem;
    font-size: 1.05rem;
}

.note-article-meta {
    margin-top: 1rem;
    color: var(--text-subtle);
    font-size: 0.9rem;
}

.note-article-body {
    padding: 2.5rem 0 4rem;
}

.note-article-content {
    max-width: 42rem;
}

.note-article-content h2 {
    font-size: 1.35rem;
    margin-top: 2.25rem;
    margin-bottom: 0.85rem;
    color: var(--text);
    font-family: "Outfit", sans-serif;
}

.note-article-content h2:first-child {
    margin-top: 0;
}

.note-article-content p {
    color: var(--text-subtle);
    max-width: none;
    margin-bottom: 1rem;
}

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

.note-article-content ul {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
    color: var(--text-subtle);
}

.note-article-content li + li {
    margin-top: 0.35rem;
}

.note-related-project {
    margin-top: 2.25rem;
}

.note-related-project p {
    margin-bottom: 0;
}

.note-related-project a {
    color: var(--primary);
    font-weight: 600;
}

.note-related-project a:hover {
    color: var(--primary-hover);
}

.note-article-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.flow-diagram {
    margin: 1.25rem 0 1.5rem;
    padding: 1.25rem 1.35rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--text-subtle);
    line-height: 1.5;
    box-shadow: var(--shadow-card);
}

.flow-diagram .flow-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.flow-diagram .flow-step {
    text-align: center;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-weight: 500;
}

.flow-diagram .flow-arrow {
    text-align: center;
    padding: 0.35rem 0;
    color: var(--primary);
    font-size: 1.1rem;
    line-height: 1;
}

.flow-diagram .flow-split {
    display: grid;
    gap: 0.5rem;
    margin: 0.25rem 0;
}

.flow-diagram .flow-join {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-subtle);
    padding: 0.25rem 0;
}

.flow-diagram .flow-branch {
    display: grid;
    gap: 0.85rem;
    margin-top: 0.5rem;
}

@media (min-width: 520px) {
    .flow-diagram .flow-branch {
        grid-template-columns: 1fr 1fr;
    }
}

.flow-diagram .flow-branch-label {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.25rem;
}

.flow-diagram .flow-branch-col .flow-step {
    font-size: 0.9rem;
}

.flow-diagram .flow-branch--nested {
    margin-top: 0.35rem;
}

.comparison-grid {
    display: grid;
    gap: 1rem;
    margin: 1.25rem 0 1.5rem;
}

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

.comparison-panel {
    padding: 1.15rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.comparison-panel h3 {
    font-size: 1rem;
    margin-bottom: 0.65rem;
    font-family: "Outfit", sans-serif;
}

.comparison-panel .flow-diagram {
    margin: 0;
    padding: 0.85rem;
    background: var(--bg);
    box-shadow: none;
}

.comparison-panel ul {
    margin: 0;
    padding-left: 1.15rem;
    font-size: 0.95rem;
    color: var(--text-subtle);
}

.comparison-panel li + li {
    margin-top: 0.35rem;
}

.comparison-panel > p {
    margin-top: 0.75rem;
    margin-bottom: 0;
    color: var(--text-subtle);
    max-width: none;
}

@media (max-width: 760px) {
    .site-navigation {
        min-height: auto;
        flex-wrap: wrap;
        gap: 0;
        padding: 0.65rem 0;
    }

    .nav-toggle {
        display: flex;
    }

    .navigation-list {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.35rem 0 0.5rem;
    }

    .navigation-list.is-open {
        display: flex;
    }

    .navigation-list a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .intro-section {
        padding: 5.5rem 0 4.5rem;
    }

    .section-block {
        padding: 3.5rem 0;
    }

    .project-card:hover,
    .note-card:hover {
        transform: none;
    }

    .image-lightbox {
        padding: 0.75rem;
    }

    .lightbox-prev {
        left: 0.6rem;
    }

    .lightbox-next {
        right: 0.6rem;
    }

    .note-article-header {
        padding: 2rem 0 1.75rem;
    }

    .note-article-body {
        padding: 2rem 0 3.5rem;
    }
}
