:root {
    --bg: #f6f3ee;
    --ink: #0b1c2c;
    --muted: #52606d;
    --accent: #0f4c5c;
    --card: #fff;
    --border: rgba(15, 76, 92, 0.2);
    --shadow: 0 16px 30px rgba(10, 20, 30, 0.08);
}

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

html, body {
    width: 100%;
    background-color: var(--bg);
    color: var(--ink);
    font-family: "IBM Plex Sans", "Source Sans 3", "Helvetica Neue", sans-serif;
    line-height: 1.6;
    font-size: 0.95rem;
}

a {
    color: inherit;
}

.site-header {
    position: static;
    background-color: var(--bg);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    gap: 16px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ink);
    min-width: 0;
}

.brand-title {
    font-family: "IBM Plex Mono", "Source Code Pro", monospace;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo {
    height: 36px;
    filter: brightness(0);
    transition: transform 0.2s ease;
    transform-origin: center;
}

.brand:hover .logo {
    transform: scale(1.08);
}

.pill-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
}

.pill-link:hover {
    background: rgba(15, 76, 92, 0.08);
}

#nav-links {
    display: flex;
    gap: 8px;
    list-style: none;
    flex-wrap: wrap;
}

.topbar-nav {
    display: flex;
    align-items: center;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--accent);
    font-family: "IBM Plex Mono", "Source Code Pro", monospace;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-decoration: none;
    background: var(--card);
    box-shadow: 0 6px 14px rgba(10, 20, 30, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link:focus {
    background: rgba(15, 76, 92, 0.08);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(10, 20, 30, 0.12);
}

.video-container {
    max-width: 1100px;
    margin: 16px auto 0;
    position: relative;
    height: 320px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    background-color: var(--card);
    position: sticky;
    top: 0;
    z-index: 25;
}

.background-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.logo-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 220px;
    opacity: 0.95;
    pointer-events: none;
}

.video-meta {
    position: absolute;
    bottom: 16px;
    left: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 2;
}

.name-overlay {
    font-family: "IBM Plex Mono", "Source Code Pro", monospace;
    font-size: 0.95rem;
    color: #fff;
    background: rgba(11, 28, 44, 0.55);
    padding: 6px 10px;
    border-radius: 8px;
}

.video-caption {
    font-size: 0.9rem;
    color: #fff;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

section {
    margin-bottom: 24px;
}

h1,
h2,
h3 {
    color: var(--ink);
    font-weight: 600;
    font-size: 1.1rem;
}

p {
    color: var(--muted);
}

.card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.about-me-container {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    align-items: start;
}

.profile-picture {
    width: 150px;
    height: 150px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--border);
    background-color: #f9f8f5;
}

#projects h1 {
    text-align: left;
    margin-bottom: 12px;
}

.project {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.project:last-child {
    border-bottom: 0;
}

.project-image img {
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    border: 2px dashed var(--border);
    border-radius: 8px;
    background-color: #f9f8f5;
}

.project-image {
    position: relative;
}

.project-media-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-sim-cta {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    border: none;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(10, 20, 30, 0.15);
}

.project-sim-cta:hover {
    background: #0d3f4d;
}

.project-image video {
    width: 100%;
    max-height: 240px;
    height: auto;
    object-fit: contain;
    border: 2px dashed var(--border);
    border-radius: 8px;
    background-color: #f9f8f5;
}

.project-description h2 {
    color: var(--accent);
    margin-bottom: 8px;
}

.project-link {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    font-weight: 600;
}

.project-link:hover {
    color: var(--ink);
}

.inline-link {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    font-weight: 600;
}

.inline-link:hover {
    color: var(--ink);
}

.reverse .project-image {
    order: 2;
}

.reverse .project-description {
    order: 1;
}

.reverse .project-media-stack {
    order: 2;
}

form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.form-grid .full {
    grid-column: span 2;
}

input,
textarea {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    background-color: var(--card);
    color: var(--ink);
}

textarea {
    min-height: 180px;
}

button,
.btn-primary {
    align-self: flex-start;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.unsaved-banner {
    position: sticky;
    top: 0;
    z-index: 40;
    background: #0f172a;
    color: #e2e8f0;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.unsaved-pill {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.15);
    color: #e2e8f0;
    font-weight: 600;
    font-size: 0.85rem;
}

.unsaved-pill.is-dirty {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
}

.toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.toolbar .pill-btn {
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--accent);
    padding: 6px 12px;
    font-weight: 600;
}

.help-panel {
    background: rgba(15, 76, 92, 0.12);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    color: var(--ink);
}

.dropzone {
    border: 2px dashed var(--border);
    background: rgba(15, 76, 92, 0.08);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: var(--muted);
}

.dropzone:hover,
.dropzone.dragover {
    border-color: rgba(15, 76, 92, 0.5);
    background: rgba(15, 76, 92, 0.14);
    color: var(--ink);
}

.previews {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.7);
}

.preview-mobile {
    max-width: 420px;
}

.preview-image {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #f9f8f5;
    object-fit: contain;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(15, 76, 92, 0.1);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
}

.preview a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.preview a:hover {
    color: var(--accent);
}

footer {
    text-align: center;
    padding: 16px 0 24px;
    color: var(--muted);
    font-size: 0.85rem;
}

.site-footer {
    padding: 32px 24px;
    margin-top: 24px;
}

.footer-dark {
    background: #0b1c2c;
    color: #e6edf3;
}

.footer-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.footer-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-brand .footer-title {
    font-size: 1rem;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 6px;
}

.footer-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: rgba(230, 237, 243, 0.7);
    margin-bottom: 8px;
    font-weight: 600;
}

.footer-text {
    font-size: 0.9rem;
    color: rgba(230, 237, 243, 0.85);
    margin-bottom: 6px;
}

.footer-text a {
    color: #f8fafc;
    text-decoration: none;
    font-weight: 600;
}

.footer-text a:hover {
    text-decoration: underline;
}

.footer-socials {
    display: flex;
    gap: 12px;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
}

.social-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(230, 237, 243, 0.2);
    color: #f8fafc;
    text-decoration: none;
    font-size: 1rem;
}

.social-icon-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 800px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 900px) {
    .video-container {
        height: 260px;
        margin: 12px 16px 0;
    }

    main {
        padding: 16px;
    }

    .about-me-container {
        grid-template-columns: 1fr;
    }

    .profile-picture {
        width: 140px;
        height: 140px;
    }

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

    .reverse .project-image,
    .reverse .project-description {
        order: initial;
    }
}

@media (max-width: 600px) {
    .topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 16px;
    }

    .brand {
        width: 100%;
    }

    .topbar-nav {
        width: 100%;
    }

    #nav-links {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }

    .nav-link {
        padding: 10px 12px;
        border-radius: 12px;
        font-size: 0.9rem;
    }

    .header-actions {
        flex-wrap: wrap;
    }

    .name-overlay {
        left: 12px;
        right: 12px;
        text-align: left;
    }
}

@media (max-width: 520px) {
    .brand {
        justify-content: flex-start;
        flex: 0 0 auto;
        min-width: 0;
        width: auto;
    }

    .brand-title {
        display: none;
    }

    .logo {
        height: auto;
        max-width: 72px;
        width: auto;
    }

    .topbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 10px 12px;
    }

    .topbar-nav {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: flex-end;
        width: auto;
    }

    #nav-links {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        justify-content: flex-end;
        width: auto;
    }

    .nav-link {
        padding: 7px 10px;
        border-radius: 999px;
        font-size: 0.8rem;
        white-space: nowrap;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Data-driven trajectory and projects */
.entry-list {
    display: grid;
    gap: 16px;
    margin-top: 12px;
}

.entry-card {
    padding: 16px;
}

.entry-card.is-clickable {
    cursor: pointer;
}

.entry-card.is-clickable:hover {
    border-color: rgba(15, 76, 92, 0.35);
    background: rgba(255, 255, 255, 0.9);
}

.entry-header {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
    justify-content: space-between;
}

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

.entry-dates {
    font-size: 0.85rem;
    color: var(--muted);
}

.entry-meta {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.entry-highlights {
    margin-top: 8px;
    padding-left: 18px;
    color: var(--muted);
}

.entry-card p,
#project-detail-content p,
#trajectory-detail-content p,
#awards-detail-content p {
    margin: 10px 0;
}

.entry-links {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.entry-links a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
}

.entry-links--previews {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.project-gallery + .entry-links,
.award-gallery + .entry-links,
.detail-media + .entry-links {
    margin-top: 20px;
}

.entry-links--previews a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(15, 76, 92, 0.22);
    background: rgba(15, 76, 92, 0.06);
    text-decoration: none;
    color: var(--ink);
    box-shadow: 0 10px 18px rgba(10, 20, 30, 0.06);
    min-height: 56px;
}

.entry-links--previews a:hover,
.entry-links--previews a:focus {
    background: rgba(15, 76, 92, 0.1);
    border-color: rgba(15, 76, 92, 0.35);
}

.entry-mini-gallery {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    grid-auto-flow: column;
    grid-auto-columns: minmax(140px, 1fr);
    overflow-x: auto;
    padding-bottom: 4px;
}

.entry-mini-item {
    margin: 0;
}

.entry-mini-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #f9f8f5;
    display: block;
}

.entry-mini-item figcaption {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.3;
}

.link-preview-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(15, 76, 92, 0.12);
    color: var(--accent);
    flex: 0 0 auto;
}

.link-preview-body {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.link-preview-title {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ink);
}

.link-preview-meta {
    font-size: 0.78rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-preview-thumb {
    width: 44px;
    height: 34px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(15, 76, 92, 0.18);
    background: #f9f8f5;
    flex: 0 0 auto;
}

.link-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-link-previews {
    margin-top: 14px;
}

.project-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.project-type {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid var(--border);
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--accent);
}

.project-timeframe {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 6px 0 8px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.tag {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.8rem;
    color: var(--accent);
    background: rgba(15, 76, 92, 0.08);
}

.entry-empty {
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

/* Static list/detail views for projects and trajectory */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0 20px;
}

.filter-input,
.filter-select {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font: inherit;
    background: var(--card);
    color: var(--ink);
}

.filter-input {
    flex: 1 1 220px;
}

.filter-select {
    flex: 0 0 160px;
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.entry-card--media {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
    gap: 12px;
    align-items: start;
}

.entry-media {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #f9f8f5;
}

.entry-media--missing {
    display: none;
}

.entry-media img,
.entry-media video {
    width: 100%;
    height: 320px;
    object-fit: cover;
    object-position: center;
    display: block;
    background: #0b1c2c;
}

.entry-content .entry-header {
    margin-top: 0;
}

.back-link {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
}

@media (max-width: 700px) {
    .filter-select {
        flex: 1 1 160px;
    }

    .entry-card--media {
        grid-template-columns: 1fr;
    }

    .entry-media img {
        height: 200px;
    }

    .entry-links--previews {
        grid-template-columns: 1fr;
    }
}

/* Projects & trajectory section styling */
.trajectory-group {
    margin-top: 20px;
}

.trajectory-group h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 10px;
}

.project-list .project {
    margin: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    box-shadow: var(--shadow);
}

.project-list .project + .project {
    margin-top: 0;
}

.project-list .project-image img {
    background: #f9f8f5;
}

#project-detail-content .project-image {
    margin-bottom: 16px;
}

#project-detail-content .project-image img {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f9f8f5;
}

#project-detail-content .project-image video {
    width: 100%;
    max-height: 420px;
    height: auto;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f9f8f5;
}

#trajectory-detail-content .project-image video {
    width: 100%;
    max-height: 420px;
    height: auto;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f9f8f5;
}

#trajectory-detail-content .project-image iframe,
#project-detail-content .project-image iframe {
    width: 100%;
    height: 420px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f9f8f5;
}

#project-detail-content .project-header {
    margin-bottom: 6px;
}

#trajectory-detail-content .entry-meta {
    margin-top: 6px;
}

.detail-media {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.detail-media img {
    width: 100%;
    max-height: 360px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #f9f8f5;
    object-fit: contain;
}

/* Awards media */
.award-media {
    margin: 12px 0;
}

.award-list .award-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    box-shadow: var(--shadow);
}

.award-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 20px;
    align-items: start;
    margin-top: 8px;
}

.award-description .entry-meta {
    margin-top: 0;
}

.award-media img,
.award-media video {
    width: 100%;
    max-height: 500px;
    border-radius: 10px;
    border: 2px dashed rgba(15, 76, 92, 0.35);
    background: #f9f8f5;
    object-fit: contain;
}

.award-media embed {
    width: 100%;
    height: 420px;
    border-radius: 10px;
    border: 2px dashed rgba(15, 76, 92, 0.35);
    background: #f9f8f5;
    pointer-events: none;
}

.award-card .entry-header {
    border-bottom: 1px solid rgba(15, 76, 92, 0.15);
    padding-bottom: 10px;
    margin-bottom: 4px;
}

@media (max-width: 800px) {
    .award-body {
        grid-template-columns: 1fr;
    }
}

.entry-subtitle {
    margin-top: 16px;
    margin-bottom: 10px;
    font-size: 1rem;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.project-gallery-thumb {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
}

.project-gallery-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: #f9f8f5;
}

.project-gallery-thumb video {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: #0b1c2c;
}

.award-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.award-gallery-thumb {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
}

.award-gallery img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 10px;
    background: #f9f8f5;
}

.award-gallery-caption {
    padding: 8px 10px 10px;
    font-size: 0.85rem;
    color: var(--ink);
    text-align: left;
    background: #fff;
    border-top: 1px solid var(--border);
}

#trajectory-detail-content .award-gallery {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

#trajectory-detail-content .award-gallery img {
    height: 260px;
    object-fit: cover;
    object-position: center;
}

.award-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(11, 28, 44, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 1001;
}

.award-lightbox.is-open {
    display: flex;
}

.award-lightbox-image {
    max-width: 85vw;
    max-height: 85vh;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
}

.award-lightbox-video {
    max-width: 85vw;
    max-height: 85vh;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #000;
}

.award-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(11, 28, 44, 0.9);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.award-lightbox-prev {
    left: 24px;
}

.award-lightbox-next {
    right: 24px;
}

.award-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(11, 28, 44, 0.9);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

.award-lightbox-counter {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.9rem;
}

.award-lightbox-caption {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 70vw;
    color: #fff;
    font-size: 0.95rem;
    text-align: center;
}

body.lightbox-open .award-gallery,
body.lightbox-open .detail-media {
    visibility: hidden;
}

/* Lightbox for images */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(11, 28, 44, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 1000;
}

.lightbox.is-open {
    display: flex;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(11, 28, 44, 0.9);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.lightbox-open {
    overflow: hidden;
}

/* Interactive timeline (Trajectory page) */
.timeline {
    position: relative;
}

.timeline-overview {
    position: relative;
    margin-top: 12px;
    padding: 8px 0 20px;
}

.timeline-overview-track {
    position: relative;
    height: 96px;
    margin-top: 6px;
    margin-bottom: 6px;
    overflow: visible;
    --timeline-line-y: 22px;
}

.timeline-overview-track::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: var(--timeline-line-y);
    height: 6px;
    border-radius: 999px;
    background: rgba(15, 76, 92, 0.12);
}

.timeline-year-ticks {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: var(--timeline-line-y);
    pointer-events: none;
}

.timeline-year-tick {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: var(--muted);
    white-space: nowrap;
}

.timeline-year-tick::after {
    content: "";
    position: absolute;
    left: 50%;
    top: calc(var(--timeline-line-y) - 6px);
    width: 1px;
    height: 6px;
    background: rgba(15, 76, 92, 0.25);
}

.timeline-today-line {
    position: absolute;
    top: 0;
    width: 2px;
    background: #c0392b;
    opacity: 0.5;
    pointer-events: none;
    z-index: 2;
}

.timeline-today-label {
    position: absolute;
    top: 4px;
    left: 6px;
    font-size: 0.65rem;
    color: #c0392b;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.timeline-today-tooltip {
    position: absolute;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: #0f172a;
    color: #fff;
    font-size: 0.7rem;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
    z-index: 3;
}

.timeline-today-tooltip.is-visible {
    opacity: 0.95;
}

/* Sonification simulator */
.sonification-sim {
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    background: #fff;
}

.sim-help {
    display: grid;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(15, 76, 92, 0.06);
    margin-bottom: 16px;
}

.sim-intro {
    margin: 0;
    font-size: 0.9rem;
    color: var(--ink);
    line-height: 1.4;
}

.sim-help-step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    font-size: 0.9rem;
    color: var(--ink);
}

.sim-help-step > div > span {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
}

.sim-help-badge {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #0f4c5c;
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.sim-help-keys {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sim-callout {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--ink);
}

.sim-key {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    font-weight: 600;
    font-size: 0.85rem;
}

.sim-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.sim-controls .button.primary[data-sim="toggle"] {
    font-size: 0.95rem;
    padding: 12px 22px;
    border-radius: 999px;
    margin: 0 auto;
    flex: 0 0 100%;
    justify-content: center;
}

.sim-touch-controls {
    display: none;
    margin: 16px 0;
    padding: 12px;
    border-radius: 12px;
    border: 1px dashed var(--border);
    background: rgba(15, 76, 92, 0.05);
}

.sonification-sim.sim-touch-enabled .sim-touch-controls {
    display: grid;
    gap: 10px;
}

.sim-touch-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 600;
}

.sim-touch-grid {
    display: grid;
    gap: 8px;
    justify-items: center;
}

.sim-touch-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
}

.sim-touch-btn {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--ink);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    width: 100%;
}

.sim-touch-btn:active {
    transform: translateY(1px);
}

.sim-touch-note {
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
    text-align: center;
}

.sim-control {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--muted);
}

.sim-threshold-help {
    margin: 4px 0 0;
    font-size: 0.78rem;
    color: var(--muted);
    max-width: 260px;
    line-height: 1.35;
}

.sim-control-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sim-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sim-optional {
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.8rem;
    color: var(--muted);
}

.sim-optional summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--ink);
    list-style: none;
}

.sim-optional summary::-webkit-details-marker {
    display: none;
}

.sim-control select {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 0.85rem;
    background: #fff;
}

.sim-control--range {
    min-width: 180px;
}

.sim-control--range input[type="range"] {
    width: 180px;
    accent-color: var(--accent);
}

.sim-range-value {
    font-size: 0.8rem;
    color: var(--muted);
}

/* Home showcase */
.home-showcase {
    margin-top: 24px;
}

.home-showcase-inner {
    max-width: 1100px;
    margin: 0 auto 24px;
    padding: 0 24px;
}

.home-showcase-intro {
    margin: 8px 0 0;
    color: var(--muted);
    max-width: 760px;
    line-height: 1.5;
}

.home-carousel {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 8px 0 32px;
}

.home-carousel-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.home-carousel-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.home-carousel-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.home-carousel-note {
    font-size: 0.8rem;
    color: var(--muted);
}

.home-carousel-viewport {
    overflow: hidden;
    border-radius: 18px;
}

.home-carousel-track {
    display: flex;
    transition: transform 0.75s ease;
    will-change: transform;
}

.home-slide {
    position: relative;
    min-height: 360px;
    flex: 0 0 100%;
    border-radius: 0;
    border: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
    transform: scale(1);
    transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.home-slide:hover {
    transform: scale(1.03);
    box-shadow: 0 18px 40px rgba(10, 20, 30, 0.2);
    z-index: 2;
}

.home-slide {
    opacity: 1;
}

.home-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 10, 16, 0.05) 0%, rgba(5, 10, 16, 0.65) 70%, rgba(5, 10, 16, 0.85) 100%);
}

.home-slide--empty {
    background: #f2f0ea;
}

.home-slide-overlay {
    position: relative;
    z-index: 1;
    padding: 24px;
    max-width: 90%;
    color: #fff;
}

.home-slide-overlay--center {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
}

.home-slide-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.88);
}

.home-slide-tag {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 8px;
}

.home-slide-overlay h4 {
    margin: 0 0 8px;
    font-size: 1.3rem;
}

.home-slide-overlay p {
    margin: 0 0 10px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

.home-slide-meta {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.home-flow-sim {
    border: none;
    border-radius: 0;
    padding: 0;
    background: #f8f9f6;
    box-shadow: none;
}

.home-flow-sim-inner {
    max-width: none;
    margin: 0 auto;
    padding: 28px 32px 36px;
}

.home-flow-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.home-flow-header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.home-flow-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

@media (max-width: 900px) {
    .home-showcase-inner {
        padding: 0 18px;
    }

    .home-carousel-inner {
        padding: 0 18px;
    }

    .home-carousel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .home-slide {
        flex: 0 0 100%;
        min-height: 320px;
    }

    .home-slide-overlay {
        padding: 18px;
    }

    .home-flow-sim-inner {
        padding: 22px 18px 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-carousel-track {
        transition: none;
    }

    .home-slide {
        transition: none;
    }
}

/* Legacy home grid styles retained for compatibility (unused). */

.home-panel {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 16px 30px rgba(10, 20, 30, 0.06);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

.home-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.home-panel-header h3 {
    margin: 0;
    font-size: 1rem;
}

.home-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--muted);
}

.home-panel-controls {
    display: inline-flex;
    gap: 6px;
}

.home-panel-controls button {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--accent);
    cursor: pointer;
}

.home-reel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 1fr);
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
}

.home-reel::-webkit-scrollbar {
    height: 6px;
}

.home-reel::-webkit-scrollbar-thumb {
    background: rgba(15, 76, 92, 0.2);
    border-radius: 999px;
}

.home-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 230px;
    scroll-snap-align: start;
    cursor: pointer;
}

.home-card-media {
    height: 130px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.home-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #f2f0ea;
}

.home-card-body {
    padding: 12px;
    display: grid;
    gap: 6px;
}

.home-card-body h4 {
    margin: 0;
    font-size: 0.95rem;
}

.home-card-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

.home-card-meta {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
}

.home-card-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.home-panel--sim .sim-preview-block {
    margin-top: 0;
}

.home-panel--sim .sim-preview-cta {
    position: static;
    margin-bottom: 10px;
}

.home-panel--sim .sim-preview {
    background: rgba(15, 76, 92, 0.04);
}

@media (max-width: 960px) {
    .home-slide {
        min-height: 320px;
    }
}

.sim-preview-block {
    position: relative;
    margin: 18px 0 8px;
}

.project-list .sim-preview-block {
    margin: 12px 0 0;
}

.sim-preview-cta {
    position: absolute;
    top: -12px;
    left: 16px;
    z-index: 2;
    border: none;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(10, 20, 30, 0.18);
}

.sim-preview {
    padding: 18px;
    border-radius: 14px;
    background: rgba(15, 76, 92, 0.08);
    border: 1px solid var(--border);
}

.project-list .sim-preview {
    background: rgba(15, 76, 92, 0.06);
}

/* Affiliations strip */
.affiliations-strip {
    margin: 22px 0 0;
    padding: 8px 0;
}

.brand-grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    align-items: center;
    justify-items: center;
    padding: 8px 0;
}

.brand-tile {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 18px;
    border-radius: 14px;
    border: none;
    background: transparent;
    text-decoration: none;
    color: var(--ink);
    box-shadow: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    width: 100%;
    max-width: 260px;
}

.brand-tile:hover,
.brand-tile:focus {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(10, 20, 30, 0.12);
    border-color: rgba(15, 76, 92, 0.4);
}

.brand-logo {
    width: 200px;
    height: 110px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.brand-logo img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    background: transparent;
    padding: 0;
}

.brand-logo--blue img {
    filter: hue-rotate(200deg) saturate(4) brightness(0.6) contrast(1.6);
}

.brand-logo--placeholder {
    font-size: 0.8rem;
}

@media (max-width: 640px) {
    .brand-grid-list {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 14px;
    }

    .brand-logo {
        width: 100%;
        height: 90px;
    }
}

.sim-preview-panels {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 14px;
}

.sim-preview-panel {
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.8);
    padding: 10px;
}

.sim-preview-panel canvas {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    background: #0b1c2c;
}

.sim-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 18px;
}

.sim-modal[hidden] {
    display: none;
}

.sim-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 28, 44, 0.6);
}

.sim-modal-dialog {
    position: relative;
    max-width: 1100px;
    width: min(1100px, 95vw);
    max-height: 90vh;
    overflow: auto;
    background: var(--card);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(10, 20, 30, 0.2);
    padding: 20px;
}

.sim-modal-close {
    position: sticky;
    top: 0;
    margin-left: auto;
    border: none;
    background: rgba(15, 76, 92, 0.12);
    color: var(--accent);
    border-radius: 999px;
    width: 36px;
    height: 36px;
    font-size: 20px;
    cursor: pointer;
}

.sim-modal-close:hover {
    background: rgba(15, 76, 92, 0.2);
}

.modal-open {
    overflow: hidden;
}

.sim-full {
    margin-top: 16px;
}

.sim-launch {
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.85rem;
    cursor: pointer;
}

.sim-launch:hover {
    background: rgba(15, 76, 92, 0.08);
}

.sim-status {
    font-size: 0.8rem;
    color: var(--muted);
}

.sim-hint {
    font-size: 0.8rem;
    color: var(--accent);
}

.sim-panels {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.sim-panel {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    background: var(--bg);
}

.sim-label {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.sim-panel-note {
    margin: -4px 0 10px;
    font-size: 0.78rem;
    color: var(--muted);
}

.sim-panel canvas {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    background: #0b1c2c;
}

@media (max-width: 720px) {
    .sim-panels {
        grid-template-columns: 1fr;
    }
}

.sim-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
}

.sim-modal[hidden] {
    display: none;
}

.sim-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 28, 44, 0.55);
}

.sim-modal-content {
    position: relative;
    width: min(960px, 92vw);
    max-height: 88vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(10, 20, 30, 0.2);
    z-index: 2;
}

.sim-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: rgba(15, 76, 92, 0.1);
    color: var(--ink);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
}

body.modal-open {
    overflow: hidden;
}

.timeline-overview-label {
    position: absolute;
    top: -2px;
    font-size: 0.75rem;
    color: var(--muted);
}

.timeline-overview-label--start {
    left: 0;
}

.timeline-overview-label--end {
    right: 0;
}

.timeline-dot {
    position: absolute;
    top: 0;
    transform: none;
    border-radius: 10px;
    border: 2px solid var(--accent);
    background: rgba(15, 76, 92, 0.06);
    box-shadow: 0 6px 16px rgba(10, 20, 30, 0.12);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
    text-align: center;
}

.timeline-dot--work {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(15, 76, 92, 0.18), rgba(15, 76, 92, 0.05));
    box-shadow: 0 8px 18px rgba(15, 76, 92, 0.18);
}

.timeline-dot--education {
    border-color: #2d6f4a;
    border-style: dashed;
    background: repeating-linear-gradient(
        135deg,
        rgba(45, 111, 74, 0.16),
        rgba(45, 111, 74, 0.16) 6px,
        rgba(45, 111, 74, 0.04) 6px,
        rgba(45, 111, 74, 0.04) 12px
    );
    box-shadow: 0 8px 18px rgba(45, 111, 74, 0.18);
}

.timeline-dot:focus-visible {
    outline: 2px solid rgba(15, 76, 92, 0.35);
    outline-offset: 2px;
}

.timeline-dot-label {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0.02em;
    line-height: 1.1;
    padding: 0 10px;
    box-sizing: border-box;
}

.timeline-dot--work .timeline-dot-title,
.timeline-dot--work .timeline-dot-date {
    color: var(--ink);
}

.timeline-dot--education .timeline-dot-title {
    color: #1f5b3f;
}

.timeline-dot--education .timeline-dot-date {
    color: #2d6f4a;
}

.timeline-dot-title {
    text-align: center;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-dot--multiline .timeline-dot-title {
    white-space: normal;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.timeline-dot-date {
    font-size: 0.6rem;
    color: var(--muted);
    white-space: nowrap;
}

.timeline-dot-date--start {
    justify-self: start;
}

.timeline-dot-date--end {
    justify-self: end;
}

.timeline-dot--dates-hidden .timeline-dot-date {
    display: none;
}

.timeline-dot--title-hidden .timeline-dot-title {
    display: none;
}

.timeline-dot--compact .timeline-dot-label {
    opacity: 0;
    pointer-events: none;
}

.timeline-dot--compact:focus-visible .timeline-dot-label,
.timeline-dot--compact:hover .timeline-dot-label {
    opacity: 1;
    pointer-events: auto;
}

.timeline-dot--dates-hidden:hover .timeline-dot-date,
.timeline-dot--dates-hidden:focus-visible .timeline-dot-date,
.timeline-dot--title-hidden:hover .timeline-dot-title,
.timeline-dot--title-hidden:focus-visible .timeline-dot-title {
    display: inline;
}

.timeline-viewport {
    position: relative;
    margin-top: 10px;
    padding: 18px 0 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
}

.timeline-viewport-window {
    position: absolute;
    top: 10px;
    height: 34px;
    border-radius: 999px;
    background: rgba(15, 76, 92, 0.12);
    border: 1px solid rgba(15, 76, 92, 0.25);
    transition: left 0.1s ease, width 0.1s ease;
}

.timeline-viewport-items {
    display: grid;
    gap: 10px;
    padding: 18px 16px 6px;
}

.timeline-viewport-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    align-items: center;
    text-align: left;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
    cursor: pointer;
}

.timeline-viewport-title {
    font-weight: 600;
    color: var(--ink);
}

.timeline-viewport-meta {
    grid-column: 1 / -1;
    font-size: 0.85rem;
    color: var(--muted);
}

.timeline-viewport-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid var(--border);
    padding: 3px 8px;
    border-radius: 999px;
    color: var(--accent);
    justify-self: end;
}

.timeline-viewport-item--education .timeline-viewport-tag {
    color: #2d6f4a;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.timeline-empty {
    color: var(--muted);
    padding: 12px 0 0;
}

.timeline-popover {
    position: fixed;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, 0, 0) scale(0.98);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 900;
}

.timeline-popover.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, 0, 0) scale(1);
}

.timeline-popover-card {
    width: min(320px, 80vw);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 18px 32px rgba(10, 20, 30, 0.18);
    padding: 12px;
}

.timeline-popover-media {
    margin-bottom: 10px;
}

.timeline-popover-media img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border);
    max-height: 160px;
    object-fit: cover;
}

.timeline-popover-caption {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 6px;
}

.timeline-popover-title {
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 4px;
}

.timeline-popover-meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 4px;
}

.timeline-popover-dates {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.timeline-popover-highlights {
    padding-left: 18px;
    color: var(--muted);
    font-size: 0.85rem;
}

@media (max-width: 700px) {
    .timeline-viewport-item {
        grid-template-columns: 1fr;
    }

    .timeline-viewport-tag {
        justify-self: start;
    }
}

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

/* LandsatConnect case study */
.landsatconnect {
    margin-top: 24px;
}

.case-hero-media {
    margin-bottom: 16px;
}

.case-hero-video {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #0b1c2c;
}

.case-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.case-header h2 {
    margin-bottom: 4px;
}

.case-subtitle {
    color: var(--muted);
    margin-top: 4px;
}

.case-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.case-badge {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(15, 76, 92, 0.08);
    font-weight: 600;
}

.case-badge--accent {
    color: #9a6b18;
    background: rgba(154, 107, 24, 0.12);
}

.case-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.case-links a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
}

.case-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.case-section {
    margin-bottom: 20px;
}

.case-section h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--ink);
}

.case-section h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.case-list {
    padding-left: 18px;
    color: var(--muted);
}

.case-features {
    display: grid;
    gap: 16px;
}

.case-feature {
    display: grid;
    grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.case-feature-media {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #f9f8f5;
    padding: 0;
    cursor: pointer;
}

.case-feature-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.case-feature-media:focus-visible {
    outline: 2px solid rgba(15, 76, 92, 0.5);
    outline-offset: 2px;
}

.case-columns {
    display: grid;
    gap: 12px;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.case-dialog {
    border: none;
    border-radius: 12px;
    padding: 16px;
    max-width: 720px;
    width: min(90vw, 720px);
}

.case-dialog::backdrop {
    background: rgba(11, 28, 44, 0.7);
}

.case-dialog-image {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #f9f8f5;
}

.case-dialog-caption {
    margin-top: 8px;
    color: var(--muted);
}

.case-dialog-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 999px;
    width: 34px;
    height: 34px;
    font-size: 20px;
    cursor: pointer;
}

@media (max-width: 900px) {
    .case-feature {
        grid-template-columns: 1fr;
    }
}

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

/* Autonomous Assistance longform */
.project-longform {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.longform-header h2 {
    margin-bottom: 6px;
}

.longform-section h3 {
    margin-bottom: 8px;
    font-size: 1rem;
}

.longform-section h4 {
    margin: 12px 0 6px;
    font-size: 0.95rem;
    color: var(--ink);
}

.longform-section p {
    margin: 10px 0;
}

.longform-figure {
    margin: 14px 0 22px;
}

.longform-figure img {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #f9f8f5;
}

.longform-figure figcaption {
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--muted);
}

.budget-table {
    margin: 16px 0;
    overflow-x: auto;
}

.budget-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.budget-table th,
.budget-table td {
    border: 1px solid var(--border);
    padding: 10px 12px;
    text-align: left;
}

.budget-table th {
    background: #f9f8f5;
    color: var(--ink);
    font-weight: 600;
}

.budget-table.detailed {
    margin-top: 12px;
}

.budget-table.detailed .total-row td {
    background: rgba(15, 76, 92, 0.08);
}

.budget-note {
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.budget-bars {
    display: grid;
    gap: 10px;
    margin: 12px 0 4px;
}

.budget-bar {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.budget-bar .bar {
    height: 10px;
    background: rgba(15, 76, 92, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.budget-bar .fill {
    display: block;
    height: 100%;
    background: var(--accent);
    border-radius: 999px;
}

.budget-bar .fill.medium {
    width: 60%;
}

.budget-bar .fill.high {
    width: 85%;
}

@media (max-width: 700px) {
    .budget-bar {
        grid-template-columns: 1fr;
    }
}
