/* ===========================================================
   Romain Tarayre — Portfolio
   Simple, quiet design. One accent color, plain text links.
   =========================================================== */

:root {
  --bg: #0e0e10;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f2f1ec;
  --text-muted: #93928d;
  --accent: #ff6a3d;
  --container: 760px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

h1, h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

em { color: var(--accent); font-style: italic; }

p { margin: 0 0 1.1em; }
a { color: var(--text); text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  max-width: 860px;
}

.logo {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
  text-decoration: none;
}

.logo:hover { color: var(--text); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.92rem;
  color: var(--text-muted);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); border-bottom-color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.92rem;
  cursor: pointer;
  font-family: inherit;
}

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 20px;
  max-width: 860px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.meta-line {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 2.8rem);
}

.contact-line {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 18px;
}

.contact-line div { margin-bottom: 6px; }
.contact-line div:last-child { margin-bottom: 0; }

.hero-photo {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 5;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Section ---------- */
.section {
  padding: 40px 0;
  max-width: 860px;
}

.section h2 {
  font-size: 1.3rem;
  margin-bottom: 20px;
}

.prose p { color: var(--text-muted); }
.prose p:last-child { margin-bottom: 0; }

.hobbies-line {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 18px;
}

/* ---------- Photo grid ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.photo-grid img {
  border-radius: 4px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* ---------- Resume page ---------- */
.resume-section { max-width: 760px; }

.resume-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 28px;
  padding: 10px 20px;
  border: 1px solid var(--accent);
  border-radius: 24px;
  color: var(--text);
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.resume-download:hover {
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
}

.resume-preview {
  aspect-ratio: 1700 / 2200;
  max-width: 640px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.resume-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- Expandable entries (shared logo badge + photo styles) ---------- */
.entry-logo-badge {
  flex-shrink: 0;
  background: #fff;
  border-radius: 4px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
}

.entry-logo-badge img { height: 30px; width: auto; display: block; }

.entry-photo {
  border-radius: 4px;
  margin-bottom: 14px;
}

.entry-photo.wrap-left { float: left; width: 42%; margin: 0 20px 14px 0; }
.entry-photo.wrap-right { float: right; width: 42%; margin: 0 0 14px 20px; }

.entry-photo-row {
  clear: both;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 4px;
}

.entry-photo-row img { border-radius: 4px; width: 100%; }

.entry-photo-large {
  clear: both;
  display: block;
  width: 100%;
  border-radius: 4px;
  margin: 4px 0 1.1em;
}

.spec-table-wrap {
  clear: both;
  overflow-x: auto;
  margin: 4px 0 1.4em;
}

.spec-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.85rem;
}

.spec-table th,
.spec-table td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  color: var(--text-muted);
}

.spec-table th {
  color: var(--text);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
}

/* ---------- Projects grid ---------- */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 28px;
}

.project-card {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.project-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.project-card-title {
  display: block;
  margin-top: 12px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.05rem;
}

.project-card-sub {
  display: block;
  margin-top: 3px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.project-card:hover .project-card-title { color: var(--accent); }
.project-card:hover img { border-color: var(--accent); }

.project-grid.dimmed .project-card {
  opacity: 0.1;
  pointer-events: none;
}

/* ---------- Internships timeline ---------- */
.timeline-note {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 540px;
  margin: -8px 0 40px;
}

.timeline {
  position: relative;
  height: 620px;
  max-width: 680px;
  margin: 0 auto 40px;
}

/* Thin center axis with the year ticks, kept visible between the
   two rounded-rectangle columns */
.timeline-axis {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line);
  transform: translateX(-50%);
}

/* Joby / Alton's specific date range, a shorter rounded rectangle
   to the right of the axis */
.timeline-range {
  position: absolute;
  left: 50%;
  margin-left: 34px;
  width: 16px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: rgba(255, 106, 61, 0.4);
  z-index: 2;
}

.timeline-endpoint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-endpoint.present { top: -24px; color: var(--accent); }
.timeline-endpoint.start { top: calc(100% + 14px); }

.timeline-year {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 20px;
  z-index: 2;
}

/* Joby / Alton: short entries that sit to the right of the spine */
.timeline-node {
  position: absolute;
  left: 50%;
  top: 0;
  margin-left: 66px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  max-width: 260px;
  background: none;
  border: none;
  margin-top: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  z-index: 3;
}

.timeline-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.timeline-node:hover .timeline-card {
  border-color: var(--accent);
  transform: translateX(4px);
}

.timeline-card-text { display: flex; flex-direction: column; }
.timeline-card-title { font-size: 1rem; }
.timeline-card-dates { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }

.timeline.dimmed .timeline-node {
  opacity: 0.12;
  pointer-events: none;
}

/* McGill Aerial Design's specific roles (Propulsion Member, Co-Captain)
   sit to the left of the spine, mirroring the Joby / Alton cards on
   the right. Mobile collapses everything into one column already, so
   this mirroring is desktop-only. */
@media (min-width: 721px) {
  .timeline-node.left {
    left: auto;
    right: 50%;
    margin-left: 0;
    margin-right: 66px;
    flex-direction: row-reverse;
    text-align: right;
  }
  .timeline-node.left .timeline-card-text { align-items: flex-end; }

  .timeline-range.left {
    left: auto;
    right: 50%;
    margin-left: 0;
    margin-right: 34px;
  }
}

/* Expanded project overlay */
.project-overlay {
  display: none;
}

.project-overlay.open {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  padding: 56px 24px;
}

.project-panel {
  display: none;
}

.project-panel.active {
  display: block;
  max-width: var(--container);
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 36px;
  position: relative;
}

.project-panel.active::after { content: ""; display: block; clear: both; }

.project-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
  font-family: inherit;
}

.project-close:hover { color: var(--accent); }

.project-panel h2 { font-size: 1.3rem; padding-right: 28px; }
.entry-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 18px; }
.entry-meta span:not(:last-child)::after { content: " · "; }
.project-panel p { color: var(--text-muted); }

.project-panel video,
.project-panel iframe {
  clear: both;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  margin: 4px 0 1.1em;
}

.project-panel iframe { aspect-ratio: 16 / 9; height: auto; }

.project-panel video.entry-video-vertical {
  display: block;
  width: 100%;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

body.project-open { overflow: hidden; }

/* ---------- Landing (video) page ---------- */
@font-face {
  font-family: "Heros Cn Bold";
  src: url("../fonts/TeXGyreHerosCn-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DejaVu Sans ExtraLight";
  src: url("../fonts/DejaVuSans-ExtraLight.ttf") format("truetype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

html.landing, body.landing {
  height: 100%;
  overflow: hidden;
  margin: 0;
}

.landing-hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}

.landing-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.landing-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 64px;
  background: rgba(14, 14, 16, 0.25);
  padding: 24px;
}

.landing-title-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.landing-title-wrap {
  width: 100vw;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px;
  padding: 26px 28px;
  box-sizing: border-box;
}

/* Continuous dimension line: an extension tick + arrowhead + line,
   all drawn at the same 2px stroke weight so they read as one mark */
.landing-dim-line {
  position: relative;
  flex: 1 1 auto;
  min-width: 22px;
  height: 2px;
  background: #fff;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.landing-dim-line.left { margin-left: 12px; }
.landing-dim-line.right { margin-right: 12px; }

.landing-dim-line::before {
  /* arrowhead */
  content: "";
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border-style: solid;
  transform: translateY(-50%);
}

.landing-dim-line.left::before {
  left: 0;
  border-width: 6px 10px 6px 0;
  border-color: transparent #fff transparent transparent;
}

.landing-dim-line.right::before {
  right: 0;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #fff;
}

.landing-dim-line::after {
  /* extension tick */
  content: "";
  position: absolute;
  top: 50%;
  width: 2px;
  height: 20px;
  background: #fff;
  transform: translateY(-50%);
}

.landing-dim-line.left::after { left: -12px; }
.landing-dim-line.right::after { right: -12px; }

.landing-title {
  flex-shrink: 0;
  font-family: "Heros Cn Bold", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: clamp(1.5rem, 5.6vw, 4.2rem);
  text-align: center;
  color: #fff;
  margin: 0;
  white-space: nowrap;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.landing-subtitle {
  margin: -18px 0 0;
  font-family: "DejaVu Sans ExtraLight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 200;
  letter-spacing: 0.06em;
  font-size: clamp(0.85rem, 2vw, 1.15rem);
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.landing-nav {
  display: flex;
  gap: 56px;
}

.landing-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.landing-icon {
  width: 140px;
  height: 140px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  overflow: hidden;
  display: grid;
  background: rgba(14, 14, 16, 0.4);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.landing-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

.landing-icon.single { grid-template-columns: 1fr; }

.landing-icon.triangle {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
}
.landing-icon.triangle img:nth-child(1) { grid-column: 1; grid-row: 1; }
.landing-icon.triangle img:nth-child(2) { grid-column: 2; grid-row: 1; }
.landing-icon.triangle img:nth-child(3) { grid-column: 1 / 3; grid-row: 2; }
.landing-icon.triangle img { background: #fff; object-fit: contain; padding: 6px; }

.landing-icon.quad {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
}

.landing-icon.morph {
  position: relative;
  background: #fff;
  display: block;
}
.landing-icon.morph img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  background: #fff;
  opacity: 0;
  animation: logoMorph 9s ease-in-out infinite;
}
.landing-icon.morph img:nth-child(1) { animation-delay: 0s; }
.landing-icon.morph img:nth-child(2) { animation-delay: 3s; }
.landing-icon.morph img:nth-child(3) { animation-delay: 6s; }

@keyframes logoMorph {
  0% { opacity: 0; }
  4% { opacity: 1; }
  29% { opacity: 1; }
  33% { opacity: 0; }
  100% { opacity: 0; }
}

.landing-icon.glyph {
  place-items: center;
  color: var(--text-muted);
}

.landing-icon.glyph svg { width: 34px; height: 34px; }

.landing-link:hover .landing-icon { border-color: var(--accent); transform: translateY(-2px); }
.landing-link:hover .landing-icon.glyph { color: var(--accent); }

.landing-label {
  font-family: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

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

@media (max-width: 720px) {
  .landing-overlay { gap: 40px; }
  .landing-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px 36px;
  }
  .landing-icon { width: 100px; height: 100px; }
  .landing-label { font-size: 0.82rem; }
  .landing-title-wrap { gap: 8px; padding: 20px 14px; }
  .landing-title { letter-spacing: 0.04em; }
  .landing-title-block { gap: 4px; }
  .landing-subtitle { margin-top: -12px; }
}

/* Desktop: title, tiles, and labels sized up ~50% */
@media (min-width: 721px) {
  .landing-title { font-size: clamp(3.6rem, 8.4vw, 6.4rem); }
  .landing-nav { gap: 84px; }
  .landing-link { gap: 18px; }
  .landing-icon { width: 210px; height: 210px; }
  .landing-label { font-size: 1.5rem; }
  .landing-subtitle { font-size: clamp(1rem, 1.6vw, 1.35rem); margin-top: -22px; }
}

/* ---------- Placeholder ---------- */
.placeholder {
  padding: 40px 0 80px;
}

.placeholder p { color: var(--text-muted); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 60px;
  max-width: 860px;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.85rem;
  max-width: 860px;
}

.footer-links a {
  color: var(--text-muted);
  margin-left: 18px;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { max-width: 340px; }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 6px 24px 14px;
    display: none;
  }

  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .nav-links a.active { border-bottom-color: var(--line); }
  .nav-toggle { display: inline-block; }
  .site-header { position: relative; }

  .photo-grid { grid-template-columns: repeat(2, 1fr); }

  .entry-photo.wrap-left,
  .entry-photo.wrap-right {
    float: none;
    width: 100%;
    margin: 0 0 14px;
  }
  .entry-photo-row { grid-template-columns: 1fr; }

  .project-grid { grid-template-columns: 1fr; }
  .project-overlay.open { padding: 28px 16px; }
  .project-panel.active { padding: 24px; }

  .timeline { height: 640px; max-width: none; }
  .timeline-axis { display: none; }
  .timeline-range { left: 16px; margin-left: 0; transform: none; }
  .timeline-year { left: 16px; }
  .timeline-endpoint { left: 16px; transform: none; }

  .timeline-node {
    left: auto;
    right: 0;
    margin-left: 0;
    margin-right: 0;
    flex-direction: row;
    text-align: left;
    max-width: 156px;
    gap: 8px;
  }
  .timeline-node .timeline-card { padding: 6px 10px 6px 6px; gap: 8px; }
  .timeline-card-title { font-size: 0.82rem; }
  .timeline-card-dates { font-size: 0.68rem; }
  .entry-logo-badge img { height: 18px; }

  /* McGill Aerial Design's role cards stay on the left edge (by the
     spine) instead of collapsing into the same right-aligned column
     as the internships, since their dates can overlap (e.g. Co-Captain
     and Joby both cover mid-2026) and would otherwise sit on top of
     each other. */
  .timeline-node.left {
    left: 16px;
    right: auto;
    margin-left: 12px;
    margin-right: 0;
    max-width: 156px;
  }

  .timeline-note { margin-bottom: 32px; }
}
