/* Portfolio — aerospace-grade product site
   Tokens adapted from Davis-style modernity + Apple/Tesla/SpaceX restraint
   Accent locked: #0C2340 · Type: Work Sans · No decorative line-art */

:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --surface: #ffffff;
  --border: rgba(12, 35, 64, 0.08);
  --border-strong: rgba(12, 35, 64, 0.16);
  --text: #000000;
  --muted: #5a6570;
  --accent: #0c2340;
  --accent-hover: #163a66;
  --accent-soft: rgba(12, 35, 64, 0.06);
  --pending: #8a6a12;
  --pending-bg: rgba(138, 106, 18, 0.08);
  --radius: 20px;
  --radius-hero: 50px;
  --radius-sm: 12px;
  --shadow: 0 2px 8px rgba(12, 35, 64, 0.04), 0 14px 36px rgba(12, 35, 64, 0.07);
  --shadow-hover: 0 4px 14px rgba(12, 35, 64, 0.07), 0 22px 52px rgba(12, 35, 64, 0.11);
  --font: "Work Sans", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  --max: 1180px;
  --narrow: 720px;
  --header-h: 3.75rem;
  --card-w: 378px;
  --card-img-h: 253px;
  --reveal-duration: 0.65s;
  --reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --carousel-ease: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 24px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

a:focus-visible,
.btn:focus-visible,
.nav-cta:focus-visible,
.carousel-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  z-index: 100;
  font-weight: 600;
}

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

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

.narrow {
  width: min(100% - 3.5rem, var(--narrow));
}

/* —— Header: translucent white sticky —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--accent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 8px 24px rgba(12, 35, 64, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
  padding: 0.55rem 0;
  flex-wrap: wrap;
}

.logo {
  font-weight: 650;
  letter-spacing: -0.03em;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  line-height: 24px;
}

.logo:hover {
  color: rgba(255, 255, 255, 0.88);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 15px;
  line-height: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: #fff;
}

.nav-cta {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 1.05rem !important;
  border-radius: 999px;
  background: #fff !important;
  color: var(--accent) !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  line-height: 1 !important;
  letter-spacing: -0.01em;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.nav-cta:hover {
  background: rgba(255, 255, 255, 0.92) !important;
  color: var(--accent) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

/* —— Hero: massive type + large rounded product image —— */
.hero {
  padding: clamp(4.5rem, 12vh, 8.5rem) 0 clamp(4rem, 10vh, 7rem);
  background: var(--bg);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 960px) {
  .hero-layout {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 4.5rem;
  }
}

.hero-copy {
  max-width: 34rem;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  line-height: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 1.35rem;
}

.hero h1 {
  font-size: clamp(2.75rem, 6.5vw, 49px);
  line-height: 1.08;
  margin: 0 0 0.85rem;
  letter-spacing: -0.045em;
  font-weight: 700;
  color: var(--text);
}

@media (min-width: 960px) {
  .hero h1 {
    font-size: 49px;
    line-height: 53px;
  }
}

.subtitle {
  font-size: 18px;
  line-height: 28px;
  color: var(--muted);
  margin: 0 0 1.1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 30rem;
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-size: 15px;
  line-height: 24px;
  font-weight: 500;
}

.lede:last-of-type {
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-visual {
  margin: 0;
  border-radius: var(--radius-hero);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #eef1f5;
  aspect-ratio: 4 / 3;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
  transform-origin: center;
}

.hero-visual:hover img {
  transform: scale(1.06);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 42px;
  border-radius: 999px;
  font-family: var(--font);
  font-weight: 500;
  font-size: 15px;
  line-height: 24px;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(12, 35, 64, 0.2);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  box-shadow: 0 6px 18px rgba(12, 35, 64, 0.26);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--accent) !important;
  border-color: var(--border-strong) !important;
  padding-inline: 36px;
}

.btn-ghost:hover {
  background: var(--accent-soft);
  color: var(--accent) !important;
  border-color: var(--accent) !important;
}

/* —— Sections —— */
.section {
  padding: clamp(4.5rem, 10vw, 7.5rem) 0;
}

.section-soft {
  background: var(--bg-soft);
}

.section-projects {
  padding-top: clamp(3.5rem, 8vw, 5.5rem);
  padding-bottom: clamp(4.5rem, 10vw, 7rem);
  overflow: hidden;
}

.section-head {
  margin-bottom: 2.5rem;
  max-width: 36rem;
}

.section-head--row {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.section-head--row > div:first-child {
  max-width: 36rem;
}

.section h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  line-height: 1.15;
  margin: 0 0 0.55rem;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--text);
}

.section-intro {
  color: var(--muted);
  margin: 0;
  font-size: 15px;
  line-height: 24px;
  font-weight: 500;
}

.section p {
  margin: 0 0 1rem;
}

.section p:last-child {
  margin-bottom: 0;
}

/* —— Project carousel —— */
.carousel-controls {
  display: flex;
  gap: 0.55rem;
  flex-shrink: 0;
}

.carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background var(--carousel-ease), border-color var(--carousel-ease),
    color var(--carousel-ease), opacity var(--carousel-ease), transform 0.2s ease;
}

.carousel-btn:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.carousel-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.carousel {
  /* Full-bleed track aligned to wrap left edge */
  --carousel-pad: max(1.75rem, calc((100vw - var(--max)) / 2 + 1.75rem));
}

.carousel-track {
  display: flex;
  gap: 1.35rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.35rem var(--carousel-pad) 1.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-card {
  flex: 0 0 min(var(--card-w), calc(100vw - 4.5rem));
  width: min(var(--card-w), calc(100vw - 4.5rem));
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
  transition: opacity var(--carousel-ease);
}

.carousel-card:hover {
  color: inherit;
}

.carousel-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius);
}

.carousel-media {
  border-radius: var(--radius);
  overflow: hidden;
  background: #eef1f5;
  box-shadow: var(--shadow);
  margin-bottom: 1.15rem;
  aspect-ratio: 378 / 253;
  height: auto;
  min-height: var(--card-img-h);
  transition: box-shadow 0.35s var(--reveal-ease), transform 0.35s var(--reveal-ease);
}

.carousel-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--reveal-ease);
}

.carousel-card:hover .carousel-media {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.carousel-card:hover .carousel-media img {
  transform: scale(1.06);
}

.carousel-media--solid {
  display: flex;
  align-items: flex-end;
  padding: 1.35rem;
  background: linear-gradient(160deg, #0c2340 0%, #163a66 100%);
  min-height: var(--card-img-h);
}

.carousel-kicker {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.carousel-card h3 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.35rem, 2.8vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--text);
}

.carousel-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 24px;
  font-weight: 500;
}

/* —— Experience / Education —— */
.section-split {
  border-block: 1px solid var(--border);
}

.split-panels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.75rem;
  align-items: start;
}

@media (min-width: 900px) {
  .split-panels {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4.5rem;
  }
}

.split-panel h2 {
  margin-top: 0;
  margin-bottom: 1.75rem;
  font-size: clamp(1.5rem, 2.8vw, 1.85rem);
}

.exp-card {
  padding: 0 0 1.65rem;
  margin-bottom: 1.65rem;
  border-bottom: 1px solid var(--border);
}

.exp-card:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.exp-head h3 {
  margin: 0 0 0.3rem;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.02em;
  font-weight: 650;
  color: var(--text);
}

.meta {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
  line-height: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.exp-bullets {
  margin: 0.85rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 15px;
  line-height: 24px;
  font-weight: 500;
}

.exp-bullets li {
  margin-bottom: 0.35rem;
}

.exp-bullets li:last-child {
  margin-bottom: 0;
}

.edu-card h3 {
  margin: 0 0 0.3rem;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.02em;
  font-weight: 650;
  color: var(--text);
}

.edu-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 24px;
  font-weight: 500;
}

/* —— Skills —— */
.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 1.35rem 0 0;
  padding: 0;
}

.skill-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 14px;
  line-height: 22px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.skill-list li:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

/* —— Contact —— */
.contact-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border);
}

.contact-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.25rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-list .label {
  display: inline-block;
  min-width: 5.5rem;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 20px;
}

.contact-list a {
  font-weight: 600;
  font-size: 15px;
  line-height: 24px;
  color: #0a66c2;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  letter-spacing: -0.01em;
}

.contact-list a:hover {
  color: #004182;
  text-decoration: underline;
}

.pending-inline {
  color: var(--pending);
  font-size: 14px;
  background: var(--pending-bg);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

/* —— Footer —— */
.site-footer {
  padding: 2.25rem 0 2.75rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
  letter-spacing: -0.01em;
  font-weight: 500;
}

.site-footer a {
  color: var(--muted);
}

/* —— Project detail —— */
.project-detail {
  padding: clamp(3rem, 7vw, 4.5rem) 0 clamp(4.5rem, 9vw, 6.5rem);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 14px;
  line-height: 22px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
}

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

.project-detail h1 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  letter-spacing: -0.04em;
  margin: 0 0 0.75rem;
  font-weight: 700;
  line-height: 1.12;
  color: var(--text);
}

.project-detail > .wrap > .meta,
.project-detail .wrap > .meta {
  margin-bottom: 1.5rem;
}

.project-detail .detail-body {
  margin-bottom: 1.5rem;
}

.project-detail .detail-body p {
  color: var(--muted);
  margin: 0 0 1rem;
  font-size: 15px;
  line-height: 24px;
  font-weight: 500;
}

.project-detail .detail-body p:last-child {
  margin-bottom: 0;
}

.project-detail .detail-body strong {
  color: var(--text);
  font-weight: 650;
}

.project-detail .tags {
  margin-bottom: 2.5rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tags li {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  line-height: 18px;
}

.project-detail .narrow {
  width: min(100% - 3.5rem, var(--max));
}

.detail-photos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .detail-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .detail-photos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.detail-photos figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.detail-photos img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
  transform-origin: center;
  cursor: zoom-in;
}

.detail-photos figure:hover img {
  transform: scale(1.06);
}

.detail-photos figcaption {
  padding: 0.75rem 1rem;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--border);
  line-height: 18px;
}


/* —— Flying Experience —— */
.flying-layout {
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 3.5vw, 2.75rem);
}

.flying-copy {
  max-width: 44rem;
}

.flying-copy h2 {
  margin-top: 0;
}

.flying-lede {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 15px;
  line-height: 24px;
  font-weight: 500;
  max-width: 36rem;
}

.flying-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.flying-list li {
  margin: 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
  font-size: 15px;
  line-height: 24px;
  font-weight: 500;
}

.flying-list strong {
  color: var(--text);
  font-weight: 600;
}

.flying-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
  align-items: stretch;
}

.flying-visual {
  margin: 0;
  border-radius: var(--radius-hero, 28px);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 18px 48px rgba(12, 35, 64, 0.12);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.flying-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  flex: 0 0 auto;
  transition: transform 0.55s ease;
  transform-origin: center;
}

.flying-visual:hover img {
  transform: scale(1.06);
}

.flying-visual figcaption {
  margin: 0;
  padding: 0.75rem 1rem 0.9rem;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-top: 1px solid var(--border);
  flex: 0 0 auto;
}

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

/* —— About —— */
.about-page {
  padding: clamp(4.5rem, 10vw, 7.5rem) 0 clamp(5rem, 11vw, 8.5rem);
  min-height: 55vh;
}

.about-page h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  letter-spacing: -0.04em;
  margin: 0 0 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

.about-page p {
  font-size: 15px;
  line-height: 24px;
  font-weight: 500;
  color: var(--muted);
  max-width: 38rem;
}

/* —— Scroll reveals (fade + slight clip/slide) —— */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  clip-path: inset(8% 0 0 0);
  transition: opacity var(--reveal-duration) var(--reveal-ease),
    transform var(--reveal-duration) var(--reveal-ease),
    clip-path var(--reveal-duration) var(--reveal-ease);
  will-change: opacity, transform, clip-path;
}

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

.reveal-delay-1 {
  transition-delay: 0.08s;
}
.reveal-delay-2 {
  transition-delay: 0.16s;
}
.reveal-delay-3 {
  transition-delay: 0.24s;
}
.reveal-delay-4 {
  transition-delay: 0.32s;
}

/* —— Responsive —— */
@media (max-width: 700px) {
  .wrap,
  .narrow {
    width: min(100% - 1.75rem, var(--max));
  }

  .carousel {
    --carousel-pad: 1.75rem;
  }

  .hero {
    padding: 3.5rem 0 3.25rem;
  }

  .hero-visual {
    border-radius: 28px;
  }

  .section {
    padding: 3.5rem 0;
  }

  .nav-list {
    gap: 0.15rem 1rem;
  }

  .nav-list a {
    font-size: 14px;
  }

  .btn {
    padding-inline: 28px;
    min-height: 36px;
  }

  .carousel-card h3 {
    font-size: 1.45rem;
  }

  .contact-list .label {
    min-width: 100%;
    margin-bottom: 0.15rem;
  }

  .split-panels {
    gap: 2.75rem;
  }
}

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

  .btn,
  .nav-cta,
  .carousel-btn,
  .carousel-card,
  .carousel-media,
  .carousel-media img,
  .hero-visual img,
  .flying-visual img,
  .detail-photos img,
  .skill-list li,
  .nav-list a,
  .reveal,
  .site-header,
  .carousel-track {
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    clip-path: none;
  }

  .carousel-card:hover .carousel-media,
  .carousel-card:hover .carousel-media img,
  .hero-visual:hover img,
  .flying-visual:hover img,
  .detail-photos figure:hover img,
  .btn-primary:hover,
  .nav-cta:hover {
    transform: none;
  }

  .hero-visual img,
  .flying-visual img,
  .detail-photos img {
    transition: none !important;
  }
}

/* —— Standalone section pages —— */
.page-section h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  letter-spacing: -0.04em;
  margin: 0 0 1.25rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

.page-lede {
  margin: 0 0 2rem;
  max-width: 40rem;
  color: var(--muted);
  font-size: 15px;
  line-height: 24px;
  font-weight: 500;
}

.page-section .exp-card h2,
.page-section .edu-card h2 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.project-tile {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-hero, 28px);
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(12, 35, 64, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  min-width: 0;
}

.project-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(12, 35, 64, 0.14);
}

.project-tile-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eef1f5;
}

.project-tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}

.project-tile:hover .project-tile-media img {
  transform: scale(1.06);
}

.project-tile-media--solid {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.project-tile h2 {
  font-size: 1.1rem;
  margin: 1rem 1.1rem 0.35rem;
  letter-spacing: -0.02em;
}

.project-tile p {
  margin: 0 1.1rem 1.15rem;
  color: var(--muted);
  font-size: 14px;
  line-height: 22px;
  font-weight: 500;
}

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

@media (prefers-reduced-motion: reduce) {
  .project-tile:hover,
  .project-tile:hover .project-tile-media img {
    transform: none;
  }
}


/* —— Recommendation letter card (Education) —— */
.rec-heading {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  font-weight: 700;
  color: var(--text);
}

.rec-link {
  display: flex;
  gap: 1.25rem;
  align-items: stretch;
  padding: 1.1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.25s var(--reveal-ease), transform 0.25s var(--reveal-ease), border-color 0.25s ease;
}

.rec-link:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: rgba(12, 35, 64, 0.28);
  color: inherit;
}

.rec-thumb-wrap {
  flex: 0 0 auto;
  width: 140px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f3f4f6;
  box-shadow: 0 1px 4px rgba(12, 35, 64, 0.08);
}

.rec-thumb {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.35s var(--reveal-ease);
}

.rec-link:hover .rec-thumb {
  transform: scale(1.03);
}

.rec-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.15rem 0.25rem 0.15rem 0;
}

.rec-title-line {
  display: block;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.rec-title {
  font-size: inherit;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.rec-title-line .rec-meta {
  font-size: inherit;
  font-weight: 500;
}

.rec-meta {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.rec-note {
  margin-top: 0.35rem;
  font-size: 15px;
  line-height: 24px;
  color: var(--muted);
  font-weight: 500;
}

.rec-cta {
  margin-top: auto;
  padding-top: 0.85rem;
  font-size: 14px;
  font-weight: 650;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

@media (max-width: 560px) {
  .rec-link {
    flex-direction: column;
  }

  .rec-thumb-wrap {
    width: min(180px, 55%);
  }
}


/* —— Full-size project photo viewer —— */
body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(12, 35, 64, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem 1.5rem;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox-img {
  max-width: min(96vw, 1400px);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  background: #fff;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2001;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
