/* ═══════════════════════════════════════════════════════════════════
   JEREMY GUNAWARMAN — SELECTED WORKS
   Image-based portfolio layout
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --paper: #ffffff;
  --ink: #0E0E0C;
  --pencil: #6E6B65;

  --banner-h: 108px;
  --content-max: 1800px;
  --gutter-side: 24px;

  --f-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: var(--banner-h); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* Screen reader only utility */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ═══ STICKY NAV BANNER ═══ */
.banner {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  min-height: var(--banner-h);
  background: #000;
  color: #fff;
  z-index: 100;
  padding: 18px 0;
}
.banner-inner {
  max-width: var(--content-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter-side);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.banner-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.name {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1;
}
.title {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
}
.degrees {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.02em;
}
.banner-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
}
.banner-right a {
  color: rgba(255,255,255,0.7);
  transition: color 160ms;
  padding: 2px 0;
  white-space: nowrap;
}
.banner-right a:hover { color: #fff; }
.banner-right a.active { color: #fff; }

@media (max-width: 720px) {
  :root { --banner-h: 68px; --gutter-side: 16px; }
  .banner { padding: 12px 0; }
  .name { font-size: 22px; }
  .title { font-size: 11px; }
  .degrees { font-size: 9px; }
  .banner-right { font-size: 11px; }
}

/* ═══ MAIN CONTENT — full-bleed image layout ═══ */
main {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0;
}

/* ═══ INDEX SECTION (pg-03 with hotspots) ═══ */
.index-section {
  padding: 0;
}
.index-wrap {
  position: relative;
  width: 100%;
  line-height: 0; /* remove image bottom gap */
}
.index-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

/* Clickable overlay hotspots — no visible hover highlight
   (avoids mismatch with PDF card boundary). Cursor still becomes pointer. */
.hotspot {
  position: absolute;
  display: block;
  cursor: pointer;
  background: transparent;
}
.hotspot:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

/* ═══ PROJECT SECTIONS — stacked border-to-border ═══ */
.project {
  scroll-margin-top: calc(var(--banner-h) + 16px);
  display: block;
  line-height: 0; /* prevent whitespace between images */
}
.project img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
}

/* Spread pages within same project stack border-to-border (no divider) */

/* Thick line between different projects */
.project-divider {
  height: 2px;
  background: #000;
  width: 100%;
  margin: 32px 0;
}

@media (max-width: 720px) {
  .project-divider { margin: 20px 0; }
}

/* ═══ FOOTER ═══ */
.footer {
  margin-top: 60px;
  border-top: 1px solid var(--ink);
  background: var(--paper);
  padding: 40px var(--gutter-side) 60px;
}
.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}
.footer-left { justify-self: start; }
.footer-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.footer-degrees {
  font-size: 11px;
  color: var(--pencil);
  margin-top: 2px;
}
.footer-right { justify-self: end; }
.back-top {
  font-size: 12px;
  color: var(--pencil);
  border-bottom: 1px solid var(--pencil);
  padding-bottom: 2px;
  transition: color 160ms;
}
.back-top:hover { color: var(--ink); border-color: var(--ink); }

@media (max-width: 720px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 20px;
  }
  .footer-left, .footer-right { justify-self: center; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
::selection {
  background: var(--ink);
  color: #fff;
}


/* ═══════════════════════════════════════════════════════════════════
   HOME SECTION (dark) — interactive floor plan
   ═══════════════════════════════════════════════════════════════════ */
.home-section {
  background: #000;
  color: #fff;
  min-height: 100vh;
}

/* Constrained inner container — matches Selected Works page offset. */
.section-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 max(48px, 5vw);
  width: 100%;
  box-sizing: border-box;
}

/* Home hero — floor plan + text right */
.home-hero {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  padding: 40px 0 60px;
  align-items: start;
}
.floorplan-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1800 / 2017;
  background: #000;
  overflow: hidden;
}
#floorplan-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: none;
  touch-action: none;
}
.home-cta {
  padding-top: 100px;
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  line-height: 1.65;
  font-style: italic;
  text-align: center;
}

@media (max-width: 900px) {
  .home-hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 40px;
  }
  .home-cta {
    padding-top: 0;
    order: -1;
    text-align: center;
    padding: 0 20px 8px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   ABOUT SECTION (light)
   ═══════════════════════════════════════════════════════════════════ */
.about-section {
  background: #fff;
  color: var(--ink);
  min-height: 100vh;
  padding: 0 0 80px;
}
.about-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 40px 0 40px;
}

/* About body — 2 columns */
.about-body {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 900px) {
  .about-body { grid-template-columns: 1fr; gap: 40px; }
}

.about-left { }
.portrait {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f0f0f0;
  overflow: hidden;
  margin-bottom: 20px;
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.02);
}
.about-identity {
  margin-bottom: 32px;
}
.identity-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}
.identity-degrees {
  font-size: 13px;
  color: rgba(14,14,12,0.65);
  font-weight: 400;
}
.get-in-touch { }
.git-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}
.git-list {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 4px 12px;
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
}
.git-list dt {
  color: var(--ink);
  font-weight: 400;
  white-space: nowrap;
}
.git-list dt::after { content: ":"; }
.git-list dd {
  margin: 0;
  color: var(--ink);
  white-space: nowrap;
}
.git-list a {
  color: inherit;
  border-bottom: 0.5px solid rgba(14,14,12,0.3);
  transition: border-color 160ms;
  white-space: nowrap;
}
.git-list a:hover { border-color: var(--ink); }

/* About right */
.about-right {
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.about-block { }
.block-title {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  line-height: 1.1;
}
.about-block p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  max-width: 68ch;
  text-align: justify;
  margin: 0;
}

/* Education list */
.edu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.edu-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}
.edu-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.edu-degree {
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}
.edu-meta {
  font-size: 12px;
  color: rgba(14,14,12,0.65);
  font-style: italic;
}

/* Mobile tweaks */
@media (max-width: 720px) {
  .about-section { padding: 0 0 60px; }
  .about-title { font-size: 22px; margin: 32px 0 32px; }
  .about-body { gap: 32px; }
  .portrait { max-width: 240px; }

  /* Get in touch — stack label above value so long URLs don't break */
  .git-list {
    grid-template-columns: 1fr;
    gap: 0;
    font-size: 12px;
  }
  .git-list dt {
    color: var(--pencil);
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 10px;
  }
  .git-list dt::after { content: ""; }
  .git-list dd {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
  }

  /* Education — natural text wrap (no weird indent when title is long) */
  .edu-head {
    display: block;
  }
  .edu-num {
    display: inline;
    font-size: 13px;
    margin-right: 6px;
  }
  .edu-degree {
    display: inline;
    font-size: 13px;
    line-height: 1.4;
  }
  .edu-meta { font-size: 11px; }

  /* Home banner — keep side-by-side layout (like Selected Works), just smaller */
  .banner-dark .name { font-size: 20px; }
  .banner-dark .title { font-size: 11px; }
  .banner-dark .degrees { font-size: 9px; }
  .banner-dark .banner-right { font-size: 11px; }
}
