@import url('https://fonts.googleapis.com/css2?family=STIX+Two+Text:ital,wght@0,400..700;1,400..700&display=swap');

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #666666;
  --line: #d9d9d9;
  --focus: #000;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'STIX Two Text', 'Times New Roman', Times, serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}
a { color: inherit; }
.skip-link {
  position: absolute;
  left: 1rem;
  top: -200px;
  background: #fff;
  border: 1px solid #000;
  padding: .5rem .75rem;
  z-index: 2000;
}
.skip-link:focus { top: 1rem; }

.site-header {
  width: 100%;
  left: 0;
  z-index: 1000;
  position: fixed;
  top: 0;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: #0f0f0f;
}

.header-inner {
  max-width: 100%;
  margin: 0;
  padding: 0.65rem 1.35rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.site-title { text-decoration: none; font-size: .9rem; letter-spacing: .03em; font-weight: 500; }
.desktop-nav { display: flex; gap: 1.1rem; }
.desktop-nav a { text-decoration: none; position: relative; font-weight: 500; font-size: 0.96rem; opacity: 0.95; }
.desktop-nav a:hover::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1px; background: currentColor;
}
.social-links { display: flex; gap: .75rem; align-items: center; }
.social-links svg { width: 18px; fill: currentColor; }
.menu-toggle { display: none; background: transparent; border: none; padding: 0; }
.menu-toggle span { width: 22px; height: 2px; background: currentColor; display: block; margin: 4px 0; }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.94);
  color: #fff;
  padding: 6rem 2rem;
}
.mobile-menu nav { display: grid; gap: 1rem; font-size: 1.4rem; }
.mobile-menu a { text-decoration: none; }

.hero {
  min-height: 100vh;
  display: grid;
  align-items: center;
  justify-items: start;
  text-align: left;
  color: #fff;
  position: relative;
  overflow: hidden;
  background-image: url('../assets/img/hero.webp');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: scroll;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(18, 20, 24, 0.16) 0%,
      rgba(18, 20, 24, 0.16) 100%
    ),
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.82) 0%,
      rgba(0, 0, 0, 0.65) 35%,
      rgba(0, 0, 0, 0.35) 60%,
      rgba(0, 0, 0, 0) 85%
    );
  pointer-events: none;
}
.hero-content {
  position: relative;
  max-width: 900px;
  padding: 2rem 2.25rem 2rem clamp(10%, 12vw, 15%);
}
.hero h1 { font-size: clamp(1.75rem, 5vw, 3.1rem); margin: 0 0 1rem; font-weight: 600; }
.hero p { margin: 0; font-size: clamp(0.95rem, 1.7vw, 1.1rem); }

.section-narrow { max-width: 1140px; margin: 0 auto; padding: 4.5rem 1.5rem; }
.intro-text { text-align: center; display: grid; gap: 1rem; }
.intro-text p { font-size: clamp(1rem, 1.6vw, 1.2rem); max-width: 900px; margin: 0 auto; }

.split-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 2.5rem;
  align-items: center;
}
.split-section img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  display: block;
}
.split-section figcaption {
  text-align: center;
  margin-top: .75rem;
  color: var(--muted);
  font-size: .92rem;
}
.split-section h2 {
  font-family: inherit;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  letter-spacing: .01em;
  margin: 0 0 .75rem;
  font-weight: 600;
}
.split-section ul {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: .45rem;
}
.split-section article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(1rem, 2.2vw, 1.5rem);
  background: #fff;
  box-shadow: 0 8px 22px rgba(10, 10, 10, 0.04);
}

.project-page .section-narrow { max-width: 1160px; }

.project-hero {
  display: grid;
  gap: .85rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2.8rem;
}

.project-hero .page-title {
  text-align: left;
  margin: 0;
}

.project-subtitle {
  margin: 0;
  font-size: 1.05rem;
}

.project-meta {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.project-abstract {
  margin: 0;
  max-width: 74ch;
  line-height: 1.6;
}

.project-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, .75fr);
  gap: .85rem 1.25rem;
  align-items: start;
  margin-top: .2rem;
}

.project-hero-intro {
  display: grid;
  gap: .75rem;
}

.tech-chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.tech-chips li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .36rem .72rem;
  background: #fbfbfb;
  font-size: .86rem;
  font-weight: 500;
}

.project-spec-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: .85rem 1rem;
}

.project-spec-card dl,
.project-spec-card dt,
.project-spec-card dd {
  margin: 0;
}

.project-spec-card dl {
  display: grid;
  gap: .7rem;
}

.project-spec-card dl div {
  display: grid;
  gap: .15rem;
}

.project-spec-card dt {
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.project-spec-card dd {
  font-size: .92rem;
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.project-toc {
  position: sticky;
  top: calc(5rem + 1.5rem);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  background: #fafafa;
}

.project-toc-title {
  margin: 0 0 .75rem;
  font-size: .88rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}

.project-toc ol {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: .45rem;
}

.project-toc a {
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  padding: .1rem .2rem;
}

.project-toc a.is-active {
  color: #111;
  font-weight: 600;
  background: #f0f0f0;
}

.project-jump {
  display: none;
  margin-bottom: 1rem;
}

.project-jump label {
  display: block;
  margin-bottom: .35rem;
  font-size: .88rem;
  color: var(--muted);
}

.project-jump select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .55rem .6rem;
  font: inherit;
  background: #fff;
}

.project-content {
  min-width: 0;
}

.project-content > .split-section {
  padding: 2.4rem 0;
}

.project-content > .split-section:first-child {
  padding-top: .15rem;
}

.project-page .split-section figure {
  margin: 0;
}

.project-page .split-section img {
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  max-width: min(100%, 720px);
  transition: box-shadow .2s ease;
}

.project-page .split-section figcaption {
  margin-top: .65rem;
  font-size: .9rem;
  line-height: 1.4;
  color: #5a5a5a;
}


@media (min-width: 1025px) {
  .project-page--mp4 .project-layout {
    grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  }

  .project-page--mp4 .project-toc {
    top: calc(5rem + .8rem);
    padding: .9rem .95rem;
    max-height: calc(100vh - (5rem + .8rem) - 1rem);
    overflow-y: auto;
  }

  .project-page--mp4 .project-toc ol {
    gap: .3rem;
  }

  .project-page--mp4 .project-toc li {
    line-height: 1.32;
  }


  .project-page--sailboat .project-layout {
    grid-template-columns: minmax(0, 245px) minmax(0, 1fr);
    gap: 1.5rem;
  }

  .project-page--sailboat .project-toc {
    padding: .85rem .9rem;
  }

  .project-page--sailboat .project-toc-title {
    margin-bottom: .55rem;
    font-size: .82rem;
  }

  .project-page--sailboat .project-toc ol {
    padding-left: 1rem;
    gap: .2rem;
  }

  .project-page--sailboat .project-toc a {
    display: block;
    font-size: .93rem;
    line-height: 1.2;
    padding: .08rem .18rem;
  }
}

.project-actions {
  margin-top: .4rem;
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid #000;
  text-decoration: none;
  padding: .62rem .92rem;
  font-size: .9rem;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.08);
}

.btn-primary {
  background: #111;
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: #111;
}

.split-section.reverse figure { order: 1; }
.split-section.reverse article { order: 2; }

.project-cta {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9f9f9;
  padding: clamp(1.2rem, 2.6vw, 1.75rem);
}

.project-cta h2 { margin-top: 0; }
.project-cta p { margin: 0; max-width: 66ch; }

.project-deliverables {
  margin-top: 1.5rem;
}


.projects h2, .page-title {
  font-family: inherit;
  letter-spacing: .01em;
  text-align: center;
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 600;
  margin: 0 0 2rem;
}
.project-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, minmax(0,1fr)); }
.project-card {
  border: 1px solid var(--line);
  text-decoration: none;
  padding: 1rem;
  transition: transform .25s ease, border-color .25s ease;
}
.project-card:hover { transform: translateY(-3px); border-color: #000; }
.project-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.project-card h3 { font-size: 1rem; margin: .9rem 0 .4rem; }
.project-card p { margin: 0; color: var(--muted); }

.page-main { padding-top: 5rem; }
.lead { text-align: center; max-width: 700px; margin: 0 auto 2rem; color: var(--muted); }

.pdf-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: calc(100vh - 130px);
  border-top: 1px solid var(--line);
}
.pdf-sidebar {
  border-right: 1px solid var(--line);
  padding: 1rem;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  background: #fafafa;
}
.pdf-viewer-panel {
  padding: 1rem 1.25rem;
  width: 75%;
  margin: 0 auto;
}
.pdf-toolbar { display: flex; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.button { border: 1px solid #000; padding: .5rem .75rem; text-decoration: none; font-size: .9rem; }
.pdf-frame {
  width: 100%;
  height: 177vh;
  border: 1px solid var(--line);
}
.pdf-missing { color: #8a0000; }
.small { color: var(--muted); font-size: .92rem; }

.site-footer {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 2rem 1rem;
  display: grid;
  gap: .5rem;
}
.site-footer nav { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.site-footer nav a { text-decoration: none; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

@media (max-width: 980px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .project-layout { grid-template-columns: 1fr; gap: .6rem; }
  .project-toc { display: none; }
  .project-jump { display: block; }
  .split-section { grid-template-columns: 1fr; }
  .split-section.reverse figure,
  .split-section.reverse article { order: initial; }
}
@media (max-width: 820px) {
  .desktop-nav, .header-inner > .social-links { display: none; }
  .menu-toggle { display: inline-block; justify-self: end; color: inherit; }
  .header-inner { grid-template-columns: 1fr auto; margin: 0; }
  .pdf-layout { grid-template-columns: 1fr; }
  .pdf-sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .hero {
    justify-items: start;
    text-align: left;
  }
  .hero::before {
    background:
      linear-gradient(
        180deg,
        rgba(18, 20, 24, 0.14) 0%,
        rgba(18, 20, 24, 0.14) 100%
      ),
      linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.74) 0%,
        rgba(0, 0, 0, 0.56) 35%,
        rgba(0, 0, 0, 0.28) 60%,
        rgba(0, 0, 0, 0) 88%
      );
  }
  .hero-content {
    padding: 2rem 1.5rem 2rem clamp(7%, 9vw, 10%);
  }
}
@media (max-width: 640px) {
  .project-grid { grid-template-columns: 1fr; }
  .project-hero-grid { grid-template-columns: 1fr; }
  .project-spec-card { margin-top: .1rem; }
  .project-actions { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero { animation: heroPan 16s ease-in-out infinite alternate; }
}
@keyframes heroPan {
  from { background-position: center top; }
  to { background-position: center 20%; }
}

.asset-missing {
  border: 1px dashed #999;
  min-height: 120px;
}

/* =========================
   ENGINEERING TRACK section
   ========================= */

.background {
  padding: clamp(28px, 4vw, 44px) 0;
}

.section-header {
  margin-bottom: 18px;
}

.section-lede {
  margin-top: 10px;
  max-width: 72ch;
  opacity: 0.9;
}

@media (min-width: 1025px) {
  .background .section-lede {
    margin-left: clamp(14px, 2.2vw, 18px);
    max-width: none;
    white-space: nowrap;
  }
}

.timeline {
  display: grid;
  gap: clamp(18px, 3vw, 28px);
}

.split-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(14px, 2.6vw, 22px);
  align-items: center;
  padding: clamp(14px, 2.2vw, 18px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.split-row.reverse {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.split-row.reverse .split-media {
  order: 2;
}
.split-row.reverse .split-copy {
  order: 1;
}

.split-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.caption {
  margin-top: 8px;
  font-size: 0.9rem;
  opacity: 0.85;
}

.split-copy h3 {
  margin: 0 0 10px;
  letter-spacing: 0.02em;
  text-transform: none;
}

.facts {
  margin: 12px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.mini-cards {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mini-card {
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

.mini-title {
  font-weight: 600;
  margin-bottom: 6px;
}

/* Responsive */
@media (max-width: 820px) {
  .split-row,
  .split-row.reverse {
    grid-template-columns: 1fr;
  }

  .split-row.reverse .split-media,
  .split-row.reverse .split-copy {
    order: initial;
  }

  .mini-cards {
    grid-template-columns: 1fr;
  }
}


/* ENGINEERING TRACK hard-scope overrides (ensure rules apply on loaded stylesheet) */
.background .split-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
}

.background .split-row.reverse {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.background .mini-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 820px) {
  .background .split-row,
  .background .split-row.reverse,
  .background .mini-cards {
    grid-template-columns: 1fr;
  }
}

/* =========================
   Sailboat project page
   ========================= */

.sailboat-page {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #fff;
}

.sailboat-page .section-narrow {
  max-width: 1200px;
  padding-top: 100px;
  padding-bottom: 100px;
}

.sailboat-page .project-hero {
  border-bottom: 1px solid var(--line);
}

.sailboat-page h1,
.sailboat-page h2 {
  font-family: 'Playfair Display', Georgia, serif;
}

.sailboat-page .project-hero .page-title {
  text-align: left;
  margin-bottom: .6rem;
}

.sailboat-page .project-meta {
  font-size: 1rem;
}

.sailboat-page .split-section article {
  box-shadow: none;
  border: 1px solid #e4e4e4;
}

.sailboat-page .split-section figcaption {
  font-size: .84rem;
  color: #707070;
}

.sailboat-outcomes {
  display: grid;
  gap: 1rem;
}

.sailboat-outcomes h2 {
  margin: 0;
}

.sailboat-outcomes p {
  margin: 0;
  max-width: 90ch;
  font-size: 1.02rem;
}

.sailboat-final-cta {
  background: #f5f5f5;
  padding: 120px 1.5rem;
  display: flex;
  justify-content: center;
}

.sailboat-download-btn {
  background: #000;
  color: #fff;
  text-decoration: none;
  padding: 18px 40px;
  border-radius: 4px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.sailboat-download-btn:hover {
  background: #1f1f1f;
  transform: translateY(-1px);
}
