/* Two tall scenes share the entire page's coordinate system. Never restart them per section. */
.ocean-page { position: relative; isolation: isolate; overflow: clip; background: #002e3e; }
.ocean-backdrop { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.ocean-backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.hero h1, .featured h2, .projects h2 { font-family: 'Times New Roman', Times, serif; font-style: italic; font-weight: 400; }
.site-header { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; position: relative; z-index: 20; }
.wordmark { display: inline-flex; align-items: center; text-decoration: none; }
.wordmark .brand-wordmark { width: 190px; height: auto; }
.wordmark .brand-mark { display: none; width: 32px; height: 38px; object-fit: contain; flex-shrink: 0; }
.primary-nav { display: flex; align-items: center; gap: clamp(1rem, 2.3vw, 2.2rem); font-size: .9375rem; }
.primary-nav > a { text-decoration: none; padding-block: .6rem; }
.nav-button { display: flex; align-items: center; gap: .35rem; background: none; padding: .6rem 0; }
.nav-button .plus { color: #f1d398; }
/* Keep one vector and one composited surface throughout both directions. */
.plus { display: inline-block; flex: 0 0 11px; width: 11px; height: 11px; transform: translateZ(0) rotate(0deg); transform-origin: center; will-change: transform; transition: transform .25s ease; }
[aria-expanded='true'] > .plus { transform: translateZ(0) rotate(45deg); }
.primary-nav .nav-outline { padding: .45rem 1.25rem; border: 1px solid #d3e0e0; border-radius: 2rem; }
.menu-toggle { display: none; }
.hero { position: relative; min-height: 505px; padding-top: 62px; padding-bottom: 100px; display: flex; align-items: flex-start; }
.hero-copy { position: relative; z-index: 2; max-width: 730px; }
.hero-actions, .hero-profile-links { display: flex; align-items: center; gap: 1rem; }
.hero-actions { flex-wrap: wrap; }
.hero-icon-link { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; text-decoration: none; transition: background-color .18s, border-color .18s, color .18s; }
.hero-icon-link svg { width: 19px; height: 19px; }
.hero-icon-link .cv-icon { width: 21px; height: 24px; }
@media (max-width: 380px) { .hero-actions { gap: .7rem; } .hero-profile-links { gap: .6rem; } .hero-actions .button { padding-inline: 1.1rem; } }
.hero-education { list-style: none; margin: -.35rem 0 1.75rem; padding: 0; display: grid; gap: .85rem; font-size: 1rem; line-height: 1.5; text-shadow: 0 1px 4px #001c2ee6; }
.hero-education li { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); align-items: start; gap: .8rem; }
.hero-education svg { width: 1.75rem; height: 1.5rem; color: var(--paper); }
.hero-education li > span { color: #d1e3e6; }
.hero-education strong { color: var(--paper); font-weight: 650; }
.hero h1, .hero p { text-shadow: 0 1px 4px #001c2ee6, 0 0 12px #001c2e66; }
.hero h1 { font-size: clamp(2.75rem, 4.85vw, 4.6rem); line-height: 1.04; letter-spacing: -.045em; white-space: nowrap; }
.hero p { max-width: 440px; margin-top: 1.5rem; margin-bottom: 1.75rem; font-size: 1.125rem; line-height: 1.55; }
.contours { position: absolute; width: min(32vw, 390px); right: calc(-1 * var(--gutter)); bottom: 0; height: auto; z-index: 1; pointer-events: none; }
.featured { position: relative; margin-top: -20px; padding-block: 96px 100px; color: var(--ink); }
.fish-school { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.swimming-fish { position: absolute; left: 0; width: 96px; height: 56px; margin: -28px 0 0 -48px; overflow: hidden; }
.swimming-fish img { width: 3200%; max-width: none; height: 100%; }
@media (prefers-reduced-motion: reduce) { .fish-school { display: none; } }
.floor-window { position: absolute; inset: 0; overflow: hidden; z-index: -1; background: #9cddda; }
.floor-image { position: absolute; width: 100%; height: var(--scene-height, 1800px); top: calc(-1 * var(--scene-offset, 580px)); background: #9cddda url('../assets/ocean-light.webp') center top / cover no-repeat; }
.featured-layout { display: grid; grid-template-columns: .82fr 2fr; align-items: center; gap: 3.2rem; }
.featured .text-link { display: inline-flex; align-items: center; gap: .65rem; margin-top: 1.5rem; font-family: 'Times New Roman', Times, serif; font-size: clamp(1.4rem, 2vw, 1.75rem); font-style: italic; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.featured .text-link svg { width: 2.25rem; height: 1.125rem; flex: none; }
/* Keep each hinged card in a flattened group: a shared 3D scene can lose
   raster tiles as it crosses the viewport edge during scrolling. */
.featured-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem; perspective: 1300px; }
.featured-card { min-width: 0; transform: rotateY(4deg); transform-origin: right center; backface-visibility: hidden; }
.featured-card:nth-child(2) { transform: rotateY(-4deg); transform-origin: left center; }
.featured-card .card-button { display: flex; flex-direction: column; height: 100%; background: #043848; border-radius: 12px; box-shadow: 0 18px 24px -19px #073e51a6; }
.featured-card .card-media { display: block; width: 100%; aspect-ratio: 1.85; overflow: hidden; flex: none; }
.featured-card .card-media img { width: 100%; height: 100%; object-fit: cover; }
.featured-card .card-copy { display: flex; flex-direction: column; flex: 1; width: 100%; min-height: 14.5rem; padding: clamp(1.25rem, 2vw, 1.75rem); }
.featured-card { --card-title-size: 1.4rem; --card-title-leading: 1.16; }
.featured-card .card-title { font-size: var(--card-title-size); line-height: var(--card-title-leading); text-wrap: pretty; }
.featured-card .card-summary { margin: .9rem 0 1.25rem; }
.featured-card .card-open { align-self: flex-start; margin-top: auto; text-decoration: none; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; color: #c0e9e6; }
.featured-card .card-button:hover .card-open, .featured-card .card-button:focus-visible .card-open { color: #f1d398; }
.card-button { padding: 0; text-align: left; width: 100%; overflow: hidden; color: var(--paper); position: relative; }
.card-category { display: block; font-size: .6875rem; font-weight: 500; letter-spacing: .04em; line-height: 1.3; color: #d1e7e7; margin-bottom: .45rem; }
.card-tags { margin-top: .75rem; margin-bottom: 0; }
.project-tags { display: flex; flex-wrap: wrap; column-gap: .5em; row-gap: .3em; }
.project-tags > span { white-space: nowrap; }
.card-category.project-tags { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card-category.project-tags > span { display: inline; }
.card-title-slot { display: block; height: calc(var(--card-title-size) * var(--card-title-leading) * 2); }
.featured-card .card-title-slot { height: auto; }
.tag-separator { display: inline-block; color: #78b8c2; font-weight: 400; margin-right: .5em; }
.project-tags .tag-kind { color: #f1d398; font-weight: 650; }
.card-title { display: block; font-family: var(--serif); font-size: 1.5rem; font-weight: 400; line-height: 1.13; letter-spacing: -.02em; text-wrap: balance; }
.card-summary { display: block; font-size: .875rem; line-height: 1.45; margin-top: .6rem; color: #d6e6e7; }
.card-open { display: inline-block; font-size: .8125rem; margin-top: 1rem; text-decoration: underline; text-underline-offset: .25em; }
.projects { padding-block: 30px 56px; }
.section-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 2.3rem; }
.collection-filters button { padding: .08em 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; line-height: inherit; transition: opacity .18s ease; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .16em; text-decoration-color: #a1e2df55; }
.collection-filters button[aria-pressed='false'] { opacity: .35; text-decoration-color: transparent; }
.collection-filters button:hover { text-decoration-color: currentColor; }
.collection-filters button[aria-disabled='true'] { cursor: default; }
.featured h2, .projects h2 { font-size: clamp(2.7rem, 4.2vw, 4rem); line-height: 1.1; letter-spacing: -.04em; }
.project-rows { display: grid; gap: 1.8rem; }
.project-row { overflow-x: auto; scrollbar-width: none; touch-action: pan-y; cursor: grab; overscroll-behavior-x: contain; padding-block: 7px; }
.project-row::-webkit-scrollbar { display: none; }
.project-track { display: flex; gap: 2.4rem; width: max-content; padding-inline: var(--gutter); }
.project-group { display: flex; gap: 2.4rem; }
.project-card { flex: 0 0 246.6px; width: 246.6px; --card-title-size: 1.25rem; --card-title-leading: 1.13; }
/* One resolution-independent silhouette; the photograph and type stay untransformed. */
.project-card .card-button { display: block; width: calc(100% + 21.6px); margin-left: -10.8px; height: 184.5px; border-radius: 13px; background: transparent; overflow: visible; }
.project-card .card-surface { display: block; position: relative; width: 100%; height: 100%; overflow: hidden; background: #063747; mask: url('../assets/carousel-card-mask.svg') center / 100% 100% no-repeat; }
.project-card .card-button::after { content: ''; position: absolute; inset: 0; background: url('../assets/carousel-card-edge.svg') center / 100% 100% no-repeat; pointer-events: none; }
.project-card .card-media { position: absolute; inset: 0; display: block; }
.project-card .card-media img { height: 100%; width: 100%; object-fit: cover; transition: filter .2s; }
.project-card .card-copy { position: absolute; inset: auto 0 0; padding: 2.61rem 1.71rem .9rem; background: linear-gradient(transparent, #002d3ee8 52%, #002a3bf5); }
.project-card .card-title-slot { display: flex; align-items: flex-end; }
.project-card .card-title { width: 100%; font-size: var(--card-title-size, 1.5rem); text-wrap: pretty; }
.project-card .card-category { font-size: .6875rem; margin-bottom: .4rem; letter-spacing: .01em; }
.project-card .card-open { display: none; }
.site-footer { display: flex; gap: 1.6rem; align-items: center; padding-block: .45rem; font-size: .8125rem; color: #c5dcdf; border-top: 1px solid #96c4cc40; }
.footer-brand { font: 1.5rem var(--serif); color: var(--paper); text-decoration: none; }
.footer-brand img { width: 145px; height: auto; }
.footer-copyright { margin-left: auto; color: #bdd2d7; font: .8125rem/1.5 var(--serif); white-space: nowrap; text-align: right; }
.wave-definitions { position: absolute; pointer-events: none; }
@media (min-width: 1600px) { .hero { min-height: 560px; padding-top: 80px; } .featured { padding-block: 110px; } .project-card { width: 279px; flex-basis: 279px; } .project-card .card-button { height: 202.5px; } }
@media (max-width: 1000px) { .hero h1 { font-size: 3.5rem; } .featured-layout { grid-template-columns: .8fr 2fr; gap: 1.8rem; } .featured-cards { gap: 1.2rem; } .featured-card .card-copy { padding: 1rem; } .card-title { font-size: 1.3rem; } .card-summary { font-size: .8125rem; } }
@media (max-width: 720px) {
  :root { --gutter: 1.5rem; }
  .ocean-backdrop img { object-position: 15% top; }
  .site-header { min-height: 80px; }
  .wordmark .brand-wordmark { width: 154px; }
  .hero { min-height: 540px; padding-top: 54px; padding-bottom: 100px; }
  .hero h1 { font-size: clamp(1.9rem, 8.8vw, 3.5rem); line-height: 1.08; max-width: 550px; }
  .hero p { font-size: 1rem; max-width: 330px; margin-top: 1.4rem; }
  .hero-copy { width: 100%; }
  .contours { width: 230px; opacity: .75; bottom: 0; right: calc(-1 * var(--gutter)); }
  .featured { padding-block: 82px 88px; }
  .featured-layout { display: block; }
  .featured-intro { margin-bottom: 2.3rem; }
  .featured h2 br { display: none; }
  .featured .text-link { margin-top: 1rem; }
  .featured-cards { grid-template-columns: 1fr; gap: 1.5rem; perspective: none; }
  .featured-card, .featured-card:nth-child(2) { transform: none; }
  .featured-card .card-copy { padding: 1.5rem; min-height: 14.5rem; }
  .featured-card .card-title { font-size: var(--card-title-size); }
  .card-summary { font-size: .9375rem; }
  .featured-card .card-open { font-size: .875rem; margin-top: auto; }
  .projects { padding-block: 20px 40px; }
  .section-top { align-items: center; margin-bottom: 1.75rem; }
  .featured h2, .projects h2 { font-size: 2.8rem; }
  .project-row { scroll-snap-type: x mandatory; touch-action: pan-x pan-y; }
  .project-track, .project-group { gap: 1.8rem; }
  .project-card { width: min(70.2vw, 315px); flex-basis: min(70.2vw, 315px); scroll-snap-align: center; }
  .project-card .card-button { height: 225px; }
  .project-card .card-title { font-size: var(--card-title-size, 1.5rem); }
  .site-footer { flex-wrap: wrap; column-gap: 1.2rem; row-gap: .7rem; text-shadow: 0 1px 4px #002b3b; }
}

.site-footer .footer-brand { margin-right: auto; }
