/* Lucas Long — portfolio site
   Structure inspired by sagmeister.com: black canvas, bold uppercase type,
   edge-to-edge masonry image grids, minimal chrome.
   Type system: Arial Black headlines / Arial regular sub-heads / Bodoni body. */

@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  --bg: #000;
  --fg: #fff;
  --dim: #8a8a8a;
  --line: #262626;
  --gap: 2px;
  --grid-gap: 28px;
  --header-h: 64px;
  --bar-h: 43px;
  --hero-ratio: 1000 / 1125;
  --page-ratio: 2000 / 1125;

  --font-headline: "Arial Black", "Arial Black Regular", Arial, sans-serif;
  --font-subhead: Arial, Helvetica, sans-serif;
  --font-body: "Bodoni 72", "Bodoni MT", "Bodoni Moda", "Didot", Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-subhead);
}

body {
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Kill the browser's default focus/tap outline on tiles and links — on a
   dark full-bleed grid the native ring reads as a stray white line. Keyboard
   users still get a visible ring via :focus-visible. */
a, button {
  -webkit-tap-highlight-color: transparent;
}
a:focus, button:focus {
  outline: none;
}
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

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

h1, h2 {
  font-family: var(--font-headline);
  font-weight: 900;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 32px;
  background: #000;
}

.site-header .logo {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.site-header nav {
  display: flex;
  gap: 28px;
}

.site-header nav a {
  font-family: var(--font-subhead);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dim);
  transition: color 0.15s ease;
}

.site-header nav a:hover,
.site-header nav a.active {
  color: var(--fg);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--fg);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Homepage grid ---------- */

.intro-strip {
  padding: 56px 32px 40px;
  max-width: 760px;
}

.intro-strip p {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.5;
  margin: 0 0 6px;
  color: #e6e6e6;
}

.intro-strip .eyebrow {
  font-family: var(--font-subhead);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: var(--dim);
  margin-bottom: 14px;
  display: block;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
  padding: var(--grid-gap) var(--grid-gap) calc(var(--grid-gap) * 1.5);
}

.tile {
  position: relative;
  overflow: hidden;
  display: block;
  background: #111;
  cursor: pointer;
  aspect-ratio: var(--hero-ratio);
}

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

/* Sagmeister-style reveal: image stays plain at rest; hover fades in a dark
   wash and the title tracks the cursor as it moves across the tile.
   Ported from sagmeister.com's own .hovercover / .hoverbg pattern. */
.tile .hovercover {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.tile:hover .hovercover {
  opacity: 1;
}

.tile .hoverbg {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0.75;
}

.tile .label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: left 0.12s ease-out, top 0.12s ease-out;
  width: max-content;
  max-width: calc(100% - 48px);
  text-align: center;
  font-family: var(--font-headline);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.tile .label .sub {
  display: block;
  margin-top: 8px;
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0.2px;
  text-transform: none;
  color: #d8d8d8;
  font-size: 14px;
}

/* ---------- Project page ---------- */

.project-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--bar-h);
  padding: 0 32px;
  background: #000;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-subhead);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.project-bar .back {
  color: var(--dim);
}
.project-bar .back:hover { color: var(--fg); }

.info-toggle {
  background: none;
  border: none;
  color: var(--fg);
  font-family: var(--font-subhead);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
}

.project-body {
  position: relative;
}

/* Pins below the project bar and stays put while the gallery scrolls
   underneath it — rather than pushing the gallery down or scrolling away
   with the page. */
.project-info {
  position: fixed;
  top: calc(var(--header-h) + var(--bar-h));
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 0;
  overflow-y: auto;
  background: #000;
  transition: max-height 0.4s ease;
  border-bottom: 1px solid var(--line);
}

.project-info.open {
  max-height: min(1100px, calc(100vh - var(--header-h) - var(--bar-h)));
}

.project-info-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
  padding: 40px 32px 44px;
  max-width: 1400px;
}

.project-info h1 {
  font-size: clamp(28px, 4vw, 44px);
  margin: 0 0 20px;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.project-info .tagline {
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.55;
  color: #e6e6e6;
  margin: 0 0 18px;
  font-weight: 500;
}

.project-info p {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: #b8b8b8;
  margin: 0 0 16px;
}

.project-info p strong {
  color: var(--fg);
  font-weight: 600;
}

.meta-list {
  margin: 0;
}

.meta-list dt {
  font-family: var(--font-subhead);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--fg);
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin: 0 0 8px;
}

.meta-list dt:first-child {
  margin-top: 0;
}

.meta-list dd {
  font-family: var(--font-body);
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.5;
  color: #d8d8d8;
}

.meta-list dd:last-child {
  margin-bottom: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

/* ---------- Galleries ---------- */

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.gallery img {
  background: #111;
  width: 100%;
  height: 100%;
  aspect-ratio: var(--page-ratio);
  object-fit: cover;
}

.gallery .wide {
  grid-column: 1 / -1;
}

/* ---------- Next project / Related projects ---------- */

.next-project {
  text-align: right;
  padding: 28px 32px;
  border-bottom: 1px solid var(--line);
}

.next-project a {
  font-family: var(--font-subhead);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dim);
  transition: color 0.15s ease;
}

.next-project a:hover {
  color: var(--fg);
}

.related-projects {
  padding: 56px 0 0;
}

.related-projects h2 {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: clamp(24px, 3vw, 32px);
  margin: 0 0 28px;
  padding: 0 32px;
  letter-spacing: -0.5px;
}

/* ---------- About / Contact ---------- */

.simple-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 90px 32px 120px;
}

.simple-page h1 {
  font-size: clamp(30px, 5vw, 48px);
  margin: 0 0 28px;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.simple-page p {
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.6;
  color: #dcdcdc;
  margin: 0 0 20px;
}

.simple-page p.lead {
  font-weight: 600;
  color: var(--fg);
}

.about-photo {
  margin: 44px 0;
  max-width: 420px;
  aspect-ratio: 820 / 938;
  overflow: hidden;
}

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

.about-photo figcaption {
  margin-top: 10px;
  font-family: var(--font-subhead);
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--dim);
}

.contact-links {
  margin-top: 32px;
}

.contact-links a {
  display: inline-block;
  font-family: var(--font-subhead);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--fg);
  padding-bottom: 3px;
}

/* Contact page: mirrors sagmeister.com/contact/ — bright reversal from the rest of the site */
html:has(body.contact-body) {
  background: #fff;
}

.contact-body {
  background: #fff;
  color: #000;
  min-height: 100vh;
}

.contact-body .site-header {
  background: #fff;
  border-bottom: 1px solid #e2e2e2;
}

.contact-body .site-header nav a {
  color: #9a9a9a;
}
.contact-body .site-header nav a:hover,
.contact-body .site-header nav a.active {
  color: #000;
}

.contact-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 64px 32px 120px;
}

.contact-page h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 28px;
  text-transform: uppercase;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
  align-items: start;
}

.contact-page .info-block {
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.7;
  color: #1a1a1a;
}

.map-embed {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid #e2e2e2;
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(0.3) contrast(1.05);
}

.contact-page .info-block .name {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: 20px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.contact-page .info-block a {
  border-bottom: 1px solid #1a1a1a;
}

.site-footer {
  padding: 40px 32px 60px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-subhead);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--dim);
  text-transform: uppercase;
}

.site-footer a { color: var(--dim); }
.site-footer a:hover { color: var(--fg); }

.contact-body .site-footer {
  border-top: 1px solid #e2e2e2;
  color: #9a9a9a;
}
.contact-body .site-footer a { color: #9a9a9a; }
.contact-body .site-footer a:hover { color: #000; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .project-info-inner { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .gallery .wide { grid-column: 1; }
  .site-header { padding: 0 18px; }
  .project-bar { padding: 12px 18px; }
  .intro-strip { padding: 40px 18px 28px; }
  .simple-page { padding: 70px 20px 90px; }
  .contact-page { padding: 50px 20px 90px; }
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }

  .site-header nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #000;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    display: none;
  }
  .site-header nav.open { display: flex; }
  .site-header nav a {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
  }
  .menu-toggle { display: block; }

  .contact-body .site-header nav { background: #fff; border-bottom: 1px solid #e2e2e2; }
  .contact-body .site-header nav a { border-bottom: 1px solid #e2e2e2; }
}
