/* ---------- Base ---------- */

:root {
  --bg: #111111;
  --text: #f2f0ea;
  --muted: #aaa79f;
  --line: #45443f;
  --panel: #1d1d1b;
  --accent: #90a1cf;
  --max-width: 1500px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.4;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

p,
h1,
h2,
h3,
figure {
  margin: 0;
}

code {
  font-family: "Courier New", monospace;
  font-size: 0.9em;
}

::selection {
  background: var(--text);
  color: var(--bg);
}


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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(17, 17, 17, 0.92);
  backdrop-filter: blur(10px);
}

.site-name {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
}

.site-nav span {
  color: var(--muted);
  margin-right: 0.3rem;
}


/* ---------- Global sections ---------- */

main,
.site-footer {
  width: min(calc(100% - 2.5rem), var(--max-width));
  margin: 0 auto;
}

.section {
  padding: 2rem 0 7rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: 4rem;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  margin-bottom: 3rem;
}

#work .section-heading {
  margin-bottom: 1rem;
}

.section-number {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
  font-weight: 500;
}

.misc-page {
  min-height: calc(100vh - 54px);
  min-height: calc(100svh - 54px);
}

.lede {
  max-width: 28ch;
  font-size: clamp(1.5rem, 2.8vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.muted {
  color: var(--muted);
  margin-top: 1.5rem;
}


/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 5vw, 5rem);
  padding: 1.25rem 0 4rem;
}

.eyebrow {
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.hero h1 {
  white-space: nowrap;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(4rem, 11vw, 10rem);
  line-height: 0.82;
  letter-spacing: -0.055em;
  font-weight: 700;
}


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

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5vw;
  align-items: start;
}

.about-copy {
  display: grid;
  gap: 2rem;
}

.about-copy .lede {
  font-weight: 300;
}

.about-copy > p:not(.lede) {
  max-width: 52ch;
}

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

.portrait {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}


/* ---------- Work ---------- */

.work-group {
  display: grid;
  grid-template-columns: 160px 1fr;
}

.work-group + .work-group {
  margin-top: 7rem;
}

.current-work > .role,
.past-work > .role {
  grid-column: 2;
}

.work-group-label {
  padding-top: 1.25rem;
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.role {
  padding: 1.25rem 0 4rem;
  border-top: 1px solid var(--line);
}

.featured-role {
  border-top: 0;
}

.role-heading,
.compact-role {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
}

.role h3 {
  max-width: 24ch;
  font-size: clamp(1.5rem, 3.5vw, 4.25rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 500;
}

.bastl-role h3 {
  max-width: none;
  white-space: nowrap;
  font-size: clamp(1.5rem, 2.8vw, 3.5rem);
}

.company {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.role-date {
  white-space: nowrap;
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
  color: var(--muted);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem 1rem;
  margin-top: 3rem;
}

.video-card {
  display: block;
}

.video-card:hover {
  text-decoration: none;
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: transform 160ms ease;
}

.video-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.1);
  transition: filter 200ms ease;
}

.video-card:hover .video-thumb {
  transform: scale(0.985);
}

.video-card:hover .video-thumb img,
.video-card:focus-visible .video-thumb img {
  filter: saturate(1);
}

.video-thumb span {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  padding: 0.2rem 0.35rem;
  background: var(--bg);
  border: 1px solid var(--line);
  font-family: "Courier New", monospace;
  font-size: 0.7rem;
}

.video-card p {
  margin-top: 0.6rem;
  font-size: 0.85rem;
}

.compact-role {
  display: block;
  padding-bottom: 1.25rem;
}

.compact-role h3 {
  font-size: clamp(1.4rem, 3vw, 3.5rem);
}

.compact-role.with-mini-videos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
}

.role-meta {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.75rem;
}

.past-work .company {
  font-style: italic;
}

.mini-video-list {
  display: grid;
  grid-template-columns: repeat(2, 104px);
  gap: 0.5rem;
}

.mini-video-card {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
}

.mini-video-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.1);
  transition: filter 200ms ease;
}

.mini-video-card:hover img,
.mini-video-card:focus-visible img {
  filter: saturate(1);
}


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

.contact-grid,
.misc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5vw;
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.big-link {
  font-size: clamp(1.5rem, 3.4vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  overflow-wrap: anywhere;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.5rem;
  margin-top: 3rem;
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
}


/* ---------- Misc ---------- */

.post-list {
  border-top: 1px solid var(--line);
}

.post-row {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.post-row > span:first-child {
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0 3rem;
  border-top: 1px solid var(--line);
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
}


/* ---------- Mobile ---------- */

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 0.35rem 1rem;
  }

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

  .section {
    padding-bottom: 3.5rem;
  }

  .section-heading {
    grid-template-columns: 1fr;
    margin-bottom: 2rem;
  }

  #work .section-heading {
    margin-bottom: 1rem;
  }

  .about-grid,
  .contact-grid,
  .misc-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .misc-page .misc-grid {
    gap: 1.5rem;
  }

  .work-group {
    grid-template-columns: 1fr;
  }

  .current-work > .role,
  .past-work > .role {
    grid-column: 1;
  }

  .work-group-label {
    padding-top: 0;
    margin-bottom: 0.25rem;
  }

  .current-work > .featured-role {
    padding-top: 0.5rem;
  }

  .work-group + .work-group {
    margin-top: 3rem;
  }

  .current-work > .role:last-child,
  .past-work > .role:last-child {
    padding-bottom: 0;
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .role-heading,
  .compact-role {
    grid-template-columns: 1fr;
  }

  .compact-role.with-mini-videos {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
  }

  .mini-video-list {
    grid-template-columns: repeat(2, 72px);
  }

  .bastl-role h3 {
    white-space: normal;
  }

  .post-row {
    grid-template-columns: 78px 1fr auto;
  }

  .contact-grid {
    gap: 2rem;
  }

  .social-links {
    margin-top: 1.5rem;
  }
}

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

  .video-thumb {
    transition: none;
  }

  .video-thumb img,
  .mini-video-card img {
    transition: none;
  }
}
