* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    padding: 60px 20px 20px;
    max-width: 1200px;
    margin: 0 auto;
    background-color: #f4f4f4;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 100px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.logo-wordmark {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: #333;
    line-height: 1;
    display: inline-block;
    position: relative;
}

.logo-wordmark::after {
    content: '';
    position: absolute;
    inset: -3px -2px;
    background: #111;
    transform: scaleX(0);
    transform-origin: left;
    pointer-events: none;
}

.logo-wordmark.redact::after {
    animation: redactSweep 1s ease-in-out forwards;
}

@keyframes redactSweep {
    0%   { transform: scaleX(0); transform-origin: left; }
    50%  { transform: scaleX(1); transform-origin: left; }
    51%  { transform: scaleX(1); transform-origin: right; }
    100% { transform: scaleX(0); transform-origin: right; }
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 400;
}

.nav-links a.active {
    font-weight: 500;
}

.hamburger {
    display: none;
}

main {
    margin-top: 100px;
}

h1 {
    text-align: center;
    margin-bottom: 100px;
    font-size: 16px;
    font-weight: 400;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.project {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.project a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.project img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project:hover .overlay {
    opacity: 1;
}

.overlay p {
    font-size: 14px;
    text-align: center;
    color: #333;
}

/* Catalog bar: filters (left) + view toggle (right) */
.catalog-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px 40px;
    margin-bottom: 60px;
}

.catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 40px;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 16px;
}

/* The toggle reveals the categories (collapsed by default) */
.filter-toggle {
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    padding: 2px 0;
}

.filter-toggle .ft-value {
    font-weight: 400;
    color: #777;
}

.filter-toggle::after {
    content: '+';
    margin-left: 8px;
    color: #777;
    font-weight: 400;
}

.filter-group.open .filter-toggle::after {
    content: '\2013'; /* en dash */
}

.filter-options {
    display: none;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 16px;
}

.filter-group.open .filter-options {
    display: flex;
}

.filter-btn {
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #777;
    cursor: pointer;
    padding: 2px 0;
    position: relative;
    transition: color 0.2s ease;
}

.filter-btn:hover {
    color: #333;
}

.filter-btn.active {
    color: #333;
    font-weight: 500;
}

.filter-btn.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 1px;
    background: #333;
}

.filter-btn:focus-visible,
.filter-toggle:focus-visible,
.view-btn:focus-visible {
    outline: 1px solid #333;
    outline-offset: 3px;
}

/* View toggle (grid / list) */
.view-toggle {
    display: flex;
    align-items: center;
    gap: 14px;
}

.view-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: #bbb;
    display: inline-flex;
    transition: color 0.2s ease;
}

.view-btn:hover {
    color: #777;
}

.view-btn.active {
    color: #333;
}

.view-btn svg {
    display: block;
    width: 18px;
    height: 18px;
}

.project.is-hidden {
    display: none;
}

/* List view */
.list-header {
    display: none;
}

.list-header.visible {
    display: grid;
    grid-template-columns: 44px 2.5fr 1.5fr 1.5fr;
    gap: 20px;
    padding-bottom: 12px;
    margin-bottom: 4px;
    border-bottom: 1px solid #ccc;
}

.list-header span {
    font-size: 12px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #777;
}

.list-meta {
    display: none;
}

.portfolio-grid.list-view {
    display: block;
}

.portfolio-grid.list-view .project {
    aspect-ratio: auto;
    overflow: visible;
}

.portfolio-grid.list-view .project a {
    display: grid;
    grid-template-columns: 44px 2.5fr 1.5fr 1.5fr;
    gap: 20px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #e0e0e0;
    height: auto;
}

.portfolio-grid.list-view .project:first-child a {
    border-top: 1px solid #e0e0e0;
}

.portfolio-grid.list-view .project img {
    width: 36px;
    height: 36px;
    object-fit: cover;
}

.portfolio-grid.list-view .overlay {
    display: none;
}

.portfolio-grid.list-view .list-meta {
    display: contents;
}

.portfolio-grid.list-view .lm-title {
    font-size: 15px;
    color: #333;
}

.portfolio-grid.list-view .lm-sector,
.portfolio-grid.list-view .lm-material {
    font-size: 13px;
    color: #777;
}

.portfolio-grid.list-view .project a:hover .lm-title {
    text-decoration: underline;
}

footer {
    margin-top: 100px;
    font-size: 12px;
    color: #777;
}

/* Project page styles */
.project-intro {
    display: flex;
    justify-content: space-between;
    margin-bottom: 60px;
}

/* PUSH UP AND DOWN */

body {
    padding-top: 50px;
}

main {
    margin-top: 150px;
}

.abstract {
    width: 60%;
}

.credits {
    width: 35%;
}

.project-intro h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 0;
    text-align: left;
}

.project-date {
    font-size: 14px;
    color: #777;
    font-weight: 300;
    margin-top: 5px;
    margin-bottom: 20px;
}

h2 {
    font-size: 12px;
    font-weight: 300;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: #777;
}

.project-intro p, .awards-patents p, .discover-more p {
    font-size: 14px;
    margin-bottom: 10px;
}

.credits p {
    font-size: 12px;
}

.credits span {
    font-weight: 500;
    color: #333;
}

.credits .job-title {
    color: #777;
}

.awards-patents {
    display: flex;
    justify-content: space-between;
    margin-bottom: 60px;
}

.awards, .patents, .discover-more {
    width: 30%;
}

.discover-more {
    display: flex;
    flex-direction: column;
}

.discover-more p {
    margin-bottom: 5px;
}

.discover-more a {
    color: #333;
    text-decoration: none;
}

.discover-more a:hover {
    text-decoration: underline;
}

.single-image, .split-images, .gif, .video {
    margin-bottom: 60px;
}

.single-image img, .gif img, .video video {
    width: 100%;
    height: auto;
    display: block;
}

.split-images {
    display: flex;
    justify-content: space-between;
}

.split-images img {
    width: 48%;
    height: auto;
    display: block;
}

@media screen and (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .catalog-bar {
        gap: 20px;
        margin-bottom: 40px;
    }

    .catalog-filters {
        flex-direction: column;
        gap: 14px;
        width: 100%;
    }

    .list-header.visible,
    .portfolio-grid.list-view .project a {
        grid-template-columns: 30px 1.6fr 1fr 1fr;
        gap: 10px;
    }

    .portfolio-grid.list-view .project img {
        width: 26px;
        height: 26px;
    }

    .portfolio-grid.list-view .lm-title {
        font-size: 14px;
    }

    .portfolio-grid.list-view .lm-sector,
    .portfolio-grid.list-view .lm-material {
        font-size: 12px;
    }

    .logo-wordmark {
        font-size: 13px;
    }

    .project-intro, .awards-patents {
        flex-direction: column;
    }

    .abstract, .credits, .awards, .patents, .discover-more {
        width: 100%;
        margin-bottom: 30px;
    }

    .hamburger {
        display: block;
        cursor: pointer;
        width: 30px;
        height: 20px;
        position: relative;
        z-index: 1001;
    }

    .hamburger span {
        display: block;
        position: absolute;
        height: 3px;
        width: 100%;
        background: #333;
        border-radius: 3px;
        opacity: 1;
        left: 0;
        transform: rotate(0deg);
        transition: .25s ease-in-out;
    }

    .hamburger span:nth-child(1) {
        top: 0px;
    }

    .hamburger span:nth-child(2) {
        top: 8px;
    }

    .hamburger span:nth-child(3) {
        top: 16px;
    }

    .hamburger.active span:nth-child(1) {
        top: 8px;
        transform: rotate(135deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
        left: -60px;
    }

    .hamburger.active span:nth-child(3) {
        top: 8px;
        transform: rotate(-135deg);
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #f4f4f4;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1000;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 20px 0;
    }
}

.about-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.profile {
    display: flex;
    gap: 50px;
    margin-bottom: 60px;
    align-items: flex-start;
}

.profile-image {
    width: clamp(260px, 32%, 360px);
    aspect-ratio: 940 / 1670;
    height: auto;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex: 1;
    min-width: 0;
    padding-top: 6px;
}

.profile-info h1 {
    font-size: 24px;
    margin: 0 0 5px 0;
    line-height: 1.2;
    font-weight: 700;
}

.profile-info .subtitle {
    font-size: 14px;
    font-weight: 300;
    margin-bottom: 15px;
}

.profile-info .role {
    margin: 0;
    font-size: 14px;
}

.profile-info .location {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 20px;
}

.profile-info .contact {
    margin-top: 20px;
    font-size: 14px;
}

.profile-info .email {
    font-size: 14px;
}

.about {
    margin-bottom: 60px;
}

.about p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.credentials {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.credentials .column {
    flex: 1;
    min-width: calc(25% - 30px);
}

.credentials h2 {
    font-size: 14px;
    margin-bottom: 20px;
    font-weight: 400;
    text-transform: uppercase;
    color: #666;
}

.credential-item {
    margin-bottom: 20px;
}

.credential-item p {
    margin: 0;
    line-height: 1.3;
}

.credential-item .title {
    font-weight: 400;
    font-size: 14px;
}

.credential-item .subtitle,
.credential-item .authors {
    font-weight: 300;
    color: #666;
    font-size: 14px;
}

.credential-item .location,
.credential-item .id {
    font-size: 12px;
    color: #666;
}

.credential-item .date {
    font-size: 12px;
    color: #666;
}

@media (max-width: 768px) {
    .profile, .credentials {
        flex-direction: column;
    }

    .profile-image {
        width: 100%;
        max-width: 300px;
        aspect-ratio: 940 / 1670;
        height: auto;
        margin: 0 auto;
    }

    .profile-info {
        text-align: center;
    }

    .credentials .column {
        width: 100%;
    }
}


.profile-info h1,
.profile-info .subtitle,
.profile-info .role,
.profile-info .location,
.profile-info .contact,
.profile-info .email {
    text-align: left;
}

.profile-info h1 {
    margin-bottom: 5px;
}

.profile-info .subtitle {
    margin-top: 0;
}


.video-page {
    background-color: black;
}

.video-page header,
.video-page footer,
.video-page .nav-links a {
    color: white;
}

.video-page .logo-wordmark {
    color: white;
}

.video-page .logo-wordmark::after {
    background: #fff;
}

.full-screen-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.video-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: black;
}

.video-page header,
.video-page footer,
.video-page .nav-links a {
    color: white;
}

.video-page .hamburger span {
    background-color: white;
}


.video-page .nav-links a {
    color: white;
}

.video-page main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 60px; /* Adjust this value to control space above footer */
}

.video-page footer {
    font-size: 12px;
    background: transparent;
    padding: 20px 40px;
    width: 100%;
}

.full-screen-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}


@media screen and (max-width: 768px) {
    .video-page .nav-links.active {
        background-color: rgba(0, 0, 0, 0.9);
    }
}

.video-page .nav-links a {
    color: white;
}




body {
  background-color: #f4f4f4; /* Adjust this to match your site's background color */
}

.research-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.research-item {
  display: flex;
  background-color: #f4f4f4;
  border: 1px solid #e0e0e0;
  height: 300px; /* Set a fixed height for all items */
}

.research-item img {
  width: 50%;
  object-fit: cover;
}

.research-info {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 50%;
  overflow: hidden; /* Hide overflow content */
}

.research-info h2 {
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 15px;
  color: #333;
}

.research-info p {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 5; /* Limit to 5 lines */
  -webkit-box-orient: vertical;
}


.research-info-footer {
  display: flex;
  align-items: center;
}

.status {
  font-size: 10px;
  font-weight: 300;
  color: #999;
  text-decoration: none;
  transition: color 0.3s ease;
}

.status:hover {
  color: #666;
}

@media (max-width: 768px) {
  .research-item {
    flex-direction: column;
	height: auto; /* Allow height to adjust on mobile */
  }

  .research-item img,
  .research-info {
    width: 100%;
  }

  .research-info {
    padding: 20px;
  }

  .research-info h2 {
    font-size: 16px;
  }

  .research-info p {
    font-size: 12px;
  }

  .status {
    font-size: 9px;
  }
}


/* Common styles for both sections */
.electron-emission,
.material-science {
    margin: 80px 0;
}

.electron-emission h2,
.material-science h2 {
    font-size: 28px; /* Increased from 24px */
    font-weight: 300; /* Thin weight */
    color: #333;
    margin-bottom: 40px; /* Increased margin after title */
}


/* Common styles for both sections */
.electron-emission,
.material-science {
    margin: 80px 0;
}

.electron-emission h2,
.material-science h2 {
    font-size: 28px;
    font-weight: 300; /* Thin weight */
    color: #333;
    margin-bottom: 40px;
    text-transform: none; /* Remove caps lock */
}

/* Electron emission section styles */
.electron-emission .subtitle {
    font-size: 12px;
    color: #777;
    margin-bottom: 20px;
    text-transform: none; /* Remove caps lock */
    font-weight: 300;
}

.two-column-text {
    display: flex;
    gap: 40px;
}

.two-column-text p {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
}

/* Material science section styles */
.science-topics {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.topic {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.topic img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.topic-content {
    flex: 1;
}

.topic h3 {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 10px;
    color: #333;
}

.topic p {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

@media (max-width: 768px) {
    .two-column-text {
        flex-direction: column;
    }

    .topic {
        flex-direction: column;
    }

    .topic img {
        margin-bottom: 10px;
    }
}
/* ============================================================
   Image slots (placeholders for media to be added later)
   ============================================================ */
.slots {
    margin: 60px 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
.slots.two { grid-template-columns: 1fr 1fr; }
.img-slot {
    aspect-ratio: 16 / 9;
    border: 1px dashed #bdbdbd;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.img-slot span {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #999;
}
@media (max-width: 768px) {
    .slots.two { grid-template-columns: 1fr; }
}

/* ============================================================
   Platform banner (Organism — launch the live tool)
   ============================================================ */
.platform-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    margin: 50px 0;
    padding: 36px 40px;
    border: 1px solid #333;
    background: #fff;
}
.platform-banner .pb-label {
    font-size: 12px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #777;
    margin-bottom: 8px;
}
.platform-banner .pb-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    text-transform: none;
    text-align: left;
    margin-bottom: 8px;
}
.platform-banner .pb-desc {
    font-size: 14px;
    color: #777;
    max-width: 48ch;
}
.platform-banner .pb-button {
    flex: none;
    display: inline-block;
    background: #333;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 0.04em;
    padding: 14px 26px;
    transition: background 0.2s ease;
}
.platform-banner .pb-button:hover { background: #111; }
@media (max-width: 768px) {
    .platform-banner { padding: 28px 24px; }
    .platform-banner .pb-button { width: 100%; text-align: center; }
}

/* ============================================================
   Reserved marker — projects behind the access gate
   ============================================================ */
.lock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #333;
    padding: 5px 9px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 9.5px;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #333;
    line-height: 1;
    white-space: nowrap;
}
.lock-mark {
    width: 9px;
    height: 11px;
    flex: none;
    display: block;
}
.lock-mark path, .lock-mark rect {
    fill: none;
    stroke: #333;
    stroke-width: 1.3;
}

/* grid view: pinned over the thumbnail, above the hover overlay */
.project .lock-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

/* list view: badge off, small tag next to the title instead */
.portfolio-grid.list-view .project .lock-badge {
    display: none;
}
.lock-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 12px;
    padding: 3px 7px;
    border: 1px solid #ccc;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #777;
    line-height: 1;
    vertical-align: 2px;
}
.lock-tag .lock-mark {
    width: 8px;
    height: 10px;
}
.lock-tag .lock-mark path, .lock-tag .lock-mark rect {
    stroke: #777;
}

/* research cards: opposite the DISCOVER MORE link */
.research-info-footer .lock-badge {
    margin-left: auto;
}

@media screen and (max-width: 768px) {
    /* keep only the padlock on small thumbnails */
    .project .lock-badge .lb-t {
        display: none;
    }
    .project .lock-badge {
        top: 8px;
        right: 8px;
        padding: 5px 6px;
    }
}

/* ============================================================
   Reserved previews — obscured thumbnails (blur + scan layer)
   ============================================================ */

/* the image itself: frosted, desaturated, slightly overscaled so the
   blur never shows soft edges; clip-path trims the halo */
.project.locked img,
.research-item.locked .shroud img {
    filter: blur(13px) grayscale(0.9) contrast(1.08) brightness(1.03);
    transform: scale(1.06);
    clip-path: inset(0);
}

/* the technical layer: 4px scanlines + 34px hairline grid + inner hairline */
.project.locked a::before,
.research-item.locked .shroud::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-color: rgba(244, 244, 244, 0.16);
    background-image:
        repeating-linear-gradient(to bottom, rgba(51, 51, 51, 0.15) 0 1px, transparent 1px 4px),
        repeating-linear-gradient(to right,  rgba(51, 51, 51, 0.07) 0 1px, transparent 1px 34px),
        repeating-linear-gradient(to bottom, rgba(51, 51, 51, 0.07) 0 1px, transparent 1px 34px);
    box-shadow: inset 0 0 0 1px rgba(51, 51, 51, 0.14);
}

/* research: wrapper that gives the scan layer an exact box to cover */
.research-item.locked .shroud {
    position: relative;
    display: block;
    width: 50%;
    flex: none;
    overflow: hidden;
}
.research-item.locked .shroud img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* list view: no scan layer over a 36px thumb, just a light frost */
.portfolio-grid.list-view .project.locked a::before {
    display: none;
}
.portfolio-grid.list-view .project.locked img {
    filter: blur(3px) grayscale(0.9) contrast(1.08);
    transform: none;
}

@media screen and (max-width: 768px) {
    .project.locked img {
        filter: blur(8px) grayscale(0.9) contrast(1.08) brightness(1.03);
    }
    .research-item.locked .shroud {
        width: 100%;
    }
    .research-item.locked .shroud img {
        height: auto;
    }
}

/* ============================================================
   Figures (framed charts/diagrams — used by the Alphabet page)
   ============================================================ */
.figure { margin: 60px 0; }
.figure-frame { border: 1px solid #e0e0e0; padding: 28px; background: #fff; }
.figure-frame svg { display: block; width: 100%; height: auto; }
.figure-frame.is-live { padding: 0; }
.figcap {
    font-size: 12px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #777;
    margin-top: 12px;
}
.figure-row { display: flex; justify-content: space-between; gap: 4%; margin: 60px 0; }
.figure-row .figure { width: 48%; margin: 0; }

/* ============================================================
   Media captions (Lab page): caption sits under the media,
   full width, never as an extra column in the flex row
   ============================================================ */
.single-image .figcap,
.video .figcap,
.gif .figcap,
.split-images .figcap {
    margin-top: 12px;
}
.split-images { flex-wrap: wrap; }
.split-images .figcap { flex: 0 0 100%; }

@media screen and (max-width: 768px) {
    .figure-frame { padding: 18px; }
    .figure-row { flex-direction: column; gap: 0; }
    .figure-row .figure { width: 100%; margin-bottom: 40px; }
    .figure-row .figure:last-child { margin-bottom: 0; }
}

/* ============================================================
   Coming soon — badge + in-page preview (no dedicated page)
   ============================================================ */

/* badge: same hairline frame as RESERVED, with a slow progress sweep
   along the bottom edge and a hairline clock mark */
.soon-badge {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    border: 1px solid #333;
    padding: 5px 10px 6px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 9.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #333;
    line-height: 1;
    white-space: nowrap;
    transition: background 0.25s ease, color 0.25s ease;
}
/* progress track */
.soon-badge::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: #ececec;
}
/* travelling segment */
.soon-badge::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 38%;
    height: 2px;
    background: #333;
    animation: soonProgress 3.6s ease-in-out infinite;
}
@keyframes soonProgress {
    0%   { left: -38%; }
    100% { left: 100%; }
}

.soon-mark { width: 11px; height: 11px; flex: none; display: block; }
.soon-mark circle, .soon-mark path {
    fill: none;
    stroke: #333;
    stroke-width: 1.2;
    stroke-linecap: round;
}

.project .soon-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}
.portfolio-grid.list-view .project .soon-badge { display: none; }

/* hover on the card: the badge inverts — it signals the preview is clickable */
.project.soon a:hover .soon-badge {
    background: #333;
    color: #fff;
}
.project.soon a:hover .soon-badge::before { background: rgba(255, 255, 255, 0.28); }
.project.soon a:hover .soon-badge::after  { background: #fff; }
.project.soon a:hover .soon-mark circle,
.project.soon a:hover .soon-mark path { stroke: #fff; }
.project.soon a { cursor: pointer; }

/* list view: quieter tag beside the title, no animation */
.soon-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 12px;
    padding: 3px 7px;
    border: 1px solid #ccc;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #777;
    line-height: 1;
    vertical-align: 2px;
}
.soon-tag .soon-mark { width: 9px; height: 9px; }
.soon-tag .soon-mark circle, .soon-tag .soon-mark path { stroke: #777; }

@media (prefers-reduced-motion: reduce) {
    .soon-badge::after { animation: none; left: 0; }
}

/* ---------- preview overlay ---------- */
.preview {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background-color: rgba(244, 244, 244, 0.94);
    background-image:
        repeating-linear-gradient(to right,  rgba(51, 51, 51, 0.05) 0 1px, transparent 1px 34px),
        repeating-linear-gradient(to bottom, rgba(51, 51, 51, 0.05) 0 1px, transparent 1px 34px);
    -webkit-backdrop-filter: blur(4px);
            backdrop-filter: blur(4px);
}
.preview.open { display: flex; }
body.preview-lock { overflow: hidden; }

.preview-panel {
    position: relative;
    width: 100%;
    max-width: 940px;
    max-height: 100%;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #333;
    animation: previewIn 0.28s ease-out;
}
@keyframes previewIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.preview-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 22px;
    border-bottom: 1px solid #e0e0e0;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #777;
}
.preview-meta .live { display: flex; align-items: center; gap: 8px; }
.preview-meta .dot {
    width: 7px;
    height: 7px;
    background: #333;
    border-radius: 50%;
    animation: soonPulse 1.9s ease-in-out infinite;
}
@keyframes soonPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.preview-close {
    position: absolute;
    top: 6px;
    right: 8px;
    z-index: 3;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    color: #333;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}
.preview-close:hover { color: #999; }

.preview-body { display: flex; }
.preview-figure {
    position: relative;
    width: 56%;
    flex: none;
    overflow: hidden;
    border-right: 1px solid #e0e0e0;
    background: #f4f4f4;
}
.preview-figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* one scan sweep on open — the image itself stays in the clear */
.preview-figure::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: #333;
    opacity: 0;
    animation: previewScan 1.1s ease-out 0.15s;
}
@keyframes previewScan {
    0%   { top: 0;    opacity: 0; }
    15%  { opacity: 0.5; }
    85%  { opacity: 0.5; }
    100% { top: 100%; opacity: 0; }
}

.preview-info { padding: 40px 40px 30px; display: flex; flex-direction: column; }
.preview-info .pv-kicker {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #777;
    margin-bottom: 12px;
}
.preview-info h2 {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 300;
    line-height: 1.15;
    color: #333;
    margin: 0 0 16px;
    text-transform: none;
    text-align: left;
    letter-spacing: -0.01em;
}
.preview-info .pv-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.preview-info .pv-tags span {
    border: 1px solid #e0e0e0;
    padding: 4px 9px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 9.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #777;
}
.preview-info .pv-teaser { font-size: 15px; line-height: 1.7; color: #777; margin: 0 0 26px; }
.preview-info .pv-status {
    margin-top: auto;
    border-top: 1px solid #e0e0e0;
    padding-top: 16px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 11.5px;
    color: #999;
}
.preview-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    border-top: 1px solid #e0e0e0;
    padding: 16px 22px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.preview-foot a, .preview-foot button {
    background: none;
    border: none;
    padding: 0 0 2px;
    color: #333;
    text-decoration: none;
    font-family: inherit;
    font-size: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
    border-bottom: 1px solid #ccc;
}
.preview-foot a:hover, .preview-foot button:hover { border-color: #333; }

@media screen and (max-width: 768px) {
    .project .soon-badge .sb-t { display: none; }
    .project .soon-badge { top: 8px; right: 8px; padding: 5px 7px 6px; }
    .preview { padding: 0; }
    .preview-panel { max-width: none; height: 100%; border: none; }
    .preview-body { flex-direction: column; }
    .preview-figure { width: 100%; border-right: none; border-bottom: 1px solid #e0e0e0; aspect-ratio: 4 / 3; }
    .preview-info { padding: 28px 24px 22px; }
}
