:root {
  --black: #050505;
  --ink: #111111;
  --charcoal: #252525;
  --grey: #77736d;
  --silver: #d8d8d5;
  --paper: #f5f1e8;
  --white: #ffffff;
  --red: #8c1118;
  --gold: #b9954c;
  --glass: rgba(255, 255, 255, 0.68);
  --glass-dark: rgba(7, 7, 7, 0.42);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  --heading-mixed: "Faculty Glyphic", Georgia, serif;
  --body-mixed: "League Spartan", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body-mixed);
  font-size: 1.125rem;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.skip-link {
  background: var(--white);
  border: 2px solid var(--red);
  color: var(--black);
  left: 1rem;
  padding: 0.75rem 1rem;
  position: fixed;
  top: -10rem;
  z-index: 20;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  align-items: flex-start;
  display: flex;
  gap: 1.25rem;
  justify-content: space-between;
  left: 0;
  padding: 1rem clamp(1rem, 3vw, 2.25rem);
  pointer-events: none;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 10;
}

.site-header.is-scrolled {
  text-shadow: 0 1px 18px rgba(255, 255, 255, 0.84);
}

.brand,
.nav-links a {
  pointer-events: auto;
}

.brand img {
  height: 2.5rem;
  filter: drop-shadow(0 1px 12px rgba(255, 255, 255, 0.75));
  width: auto;
}

.nav-links {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.15rem;
  text-align: right;
}

.nav-links a {
  color: var(--black);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  text-shadow:
    0 0 6px rgba(255, 255, 255, 0.9),
    0 0 2px rgba(245, 241, 232, 0.95);
  text-transform: uppercase;
}

.nav-links a:focus-visible,
.button:focus-visible,
.text-link:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.hero {
  align-items: stretch;
  display: grid;
  isolation: isolate;
  min-height: 92svh;
  overflow: hidden;
  padding: 0;
  position: relative;
}

.hero-video {
  height: 100%;
  inset: 0;
  object-fit: cover;
  object-position: center 58%;
  position: absolute;
  width: 100%;
  z-index: -1;
}

.hero::after {
  background:
    linear-gradient(
      180deg,
      rgba(245, 241, 232, 0.84) 0%,
      rgba(245, 241, 232, 0.18) 34%,
      rgba(5, 5, 5, 0.1) 68%,
      rgba(245, 241, 232, 0.95) 100%
    ),
    linear-gradient(
      90deg,
      rgba(245, 241, 232, 0.45),
      transparent 28%,
      transparent 72%,
      rgba(245, 241, 232, 0.38)
    );
  content: "";
  inset: 0;
  position: absolute;
  z-index: 0;
}

.glass-panel {
  backdrop-filter: blur(26px) saturate(1.08);
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.64);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.eyebrow,
.kicker,
.card-label {
  color: var(--red);
  font-family: var(--body-mixed);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 0.75rem;
  text-transform: uppercase;
}

.hero-overlay {
  align-content: space-between;
  display: grid;
  min-height: 92svh;
  padding: 7.25rem clamp(1rem, 5vw, 4rem) 4.75rem;
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--black);
  font-family: var(--heading-mixed);
  font-size: 3rem;
  font-weight: 400;
  line-height: 1.08;
  margin: 0;
  max-width: 880px;
  text-shadow: 0 2px 8px rgba(5, 5, 5, 0.16);
  text-wrap: balance;
}

.contact-content h2 {
  font-size: 3.35rem;
  line-height: 1.25;
  margin: 0;
  max-width: 34rem;
}

.hero-actions,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.45rem;
}

.button {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 600;
  justify-content: center;
  line-height: 1;
  min-height: 2.85rem;
  padding: 0.85rem 1.15rem;
  text-decoration: none;
  text-transform: uppercase;
}

.button.primary {
  background: var(--black);
  color: var(--white);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(5, 5, 5, 0.22);
  color: var(--black);
}

.collage-section,
.contact-section {
  overflow: hidden;
  padding: clamp(4.5rem, 9vw, 7rem) 1rem;
  position: relative;
  scroll-margin-top: 6.5rem;
}

.bridge {
  background:
    linear-gradient(180deg, rgba(245, 241, 232, 0.74), var(--paper) 18%),
    repeating-linear-gradient(
      90deg,
      rgba(5, 5, 5, 0.05) 0 1px,
      transparent 1px 68px
    );
}

.section-shell {
  margin: 0 auto;
  max-width: 1120px;
}

.two-column {
  align-items: center;
  display: grid;
  gap: clamp(2rem, 6vw, 5rem);
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
}

.two-column.flip {
  grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1fr);
}

.section-copy,
.section-heading {
  max-width: 720px;
}

h2,
h3 {
  font-family: var(--heading-mixed);
  font-weight: 400;
  letter-spacing: 0;
}

h2 {
  font-size: 4rem;
  line-height: 1.02;
  margin: 0 0 1.25rem;
}

h3 {
  font-size: 1.8rem;
  line-height: 1.12;
  margin: 0 0 0.8rem;
}

.section-copy p:not(.kicker),
.carousel-card p,
.contact-content p {
  color: var(--charcoal);
  font-size: 1.2rem;
}

.collage-frame {
  position: relative;
}

.collage-frame::before,
.collage-frame::after {
  content: "";
  position: absolute;
  z-index: -1;
}

.collage-frame::before {
  background: var(--red);
  height: 18%;
  left: -5%;
  top: 10%;
  transform: rotate(-7deg);
  width: 38%;
}

.collage-frame::after {
  background: rgba(185, 149, 76, 0.6);
  bottom: -4%;
  height: 36%;
  right: -3%;
  transform: rotate(5deg);
  width: 28%;
}

.collage-frame img {
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(5, 5, 5, 0.1);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.2);
  object-fit: cover;
  transform: rotate(1.5deg);
  width: 100%;
}

.writing-frame img {
  aspect-ratio: 3 / 4;
  max-height: 720px;
  transform: rotate(-2deg);
}

.paper-note {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(5, 5, 5, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
  font-family: var(--heading-mixed);
  padding: 0.75rem 1rem;
  position: absolute;
}

.note-a {
  left: -1rem;
  top: 68%;
  transform: rotate(-8deg);
}

.note-b {
  right: 1rem;
  top: 4%;
  transform: rotate(7deg);
}

.work-section {
  background-color: var(--white);
  background-image:
    linear-gradient(rgba(245, 241, 232, 0.9), rgba(245, 241, 232, 0.9)),
    url("./public/assets/collage-work.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.work-categories {
  display: grid;
  gap: 3rem;
  margin-top: 2.5rem;
}

.work-category {
  display: grid;
  gap: 1rem;
}

.category-heading {
  max-width: 760px;
}

.category-heading h3 {
  font-size: 2.15rem;
  margin-bottom: 0;
}

.project-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-tile {
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.92),
      rgba(245, 241, 232, 0.96)
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0 31px,
      rgba(5, 5, 5, 0.08) 31px 32px
    );
  border: 1px solid rgba(5, 5, 5, 0.12);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
  margin-top: 0.85rem;
  min-height: 100%;
  overflow: visible;
  position: relative;
}

.project-tile::before {
  background: rgba(185, 149, 76, 0.72);
  border-left: 1px dotted rgba(5, 5, 5, 0.18);
  border-right: 1px dotted rgba(5, 5, 5, 0.18);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
  content: "";
  height: 1.1rem;
  left: 1.3rem;
  position: absolute;
  top: -0.55rem;
  transform: rotate(-3deg);
  width: 3.6rem;
  z-index: 2;
}

.project-tile:nth-of-type(5n + 2)::before {
  background: rgba(122, 142, 110, 0.72);
  left: 2rem;
  top: -0.6rem;
  transform: rotate(2deg);
  width: 5.8rem;
}

.project-tile:nth-of-type(5n + 3)::before {
  background: rgba(139, 146, 178, 0.72);
  left: auto;
  right: 1.8rem;
  top: -0.5rem;
  transform: rotate(-2deg);
  width: 4.4rem;
}

.project-tile:nth-of-type(5n + 4)::before {
  background: rgba(140, 17, 24, 0.58);
  left: 50%;
  top: -0.65rem;
  transform: translateX(-50%) rotate(1.5deg);
  width: 6.4rem;
}

.project-tile:nth-of-type(5n + 5)::before {
  background: rgba(119, 115, 109, 0.62);
  left: 2.4rem;
  top: -0.5rem;
  transform: rotate(3deg);
  width: 3rem;
}

.image-tile img {
  aspect-ratio: 4 / 3;
  background: rgba(245, 241, 232, 0.65);
  filter: saturate(0.9);
  margin: 0 auto;
  max-width: 400px;
  object-fit: contain;
  width: 100%;
}

.project-tile div,
.text-tile {
  padding: 1.35rem;
}

.project-tile h4 {
  font-family: var(--heading-mixed);
  font-size: 1.28rem;
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.65rem;
}

.project-tile a {
  text-decoration: none;
}

.project-tile a:hover,
.project-tile a:focus-visible,
.carousel-card a:hover,
.carousel-card a:focus-visible {
  color: var(--red);
}

.project-tile p {
  color: var(--charcoal);
  font-size: 1rem;
  line-height: 1.4;
  margin: 0;
}

.text-tile {
  align-content: start;
  display: grid;
  min-height: 15rem;
}

.text-tile span,
.image-tile div span {
  color: var(--red);
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
}

.side-section {
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.05) 1px, transparent 1px),
    var(--paper);
  background-size: 64px 64px;
}

.side-layout {
  align-items: center;
  display: grid;
  gap: clamp(2rem, 6vw, 5rem);
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
}

.side-carousel {
  margin-left: auto;
  max-width: 440px;
  min-width: 0;
  width: 100%;
}

.carousel-stage {
  min-height: 40rem;
  perspective: 1400px;
  position: relative;
}

.carousel-card {
  backface-visibility: hidden;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(5, 5, 5, 0.12);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.1);
  inset: 0;
  overflow: hidden;
  padding: 1.3rem;
  position: absolute;
  transform: rotateY(96deg) scale(0.94);
  transform-origin: center;
  transition:
    opacity 360ms ease,
    transform 520ms ease;
  opacity: 0;
  pointer-events: none;
  width: 100%;
}

.carousel-card.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: rotateY(0deg) scale(1);
}

.carousel-card.is-exiting {
  opacity: 0;
  transform: rotateY(-96deg) scale(0.94);
}

.carousel-card img {
  aspect-ratio: 1 / 1;
  background: rgba(245, 241, 232, 0.65);
  border: 1px solid rgba(5, 5, 5, 0.1);
  filter: saturate(0.92);
  margin: 0 0 1rem;
  max-width: 500px;
  object-fit: contain;
  width: 100%;
}

.carousel-card span {
  color: var(--red);
  display: inline-block;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.carousel-card a {
  text-decoration: none;
}

.carousel-card h3 {
  font-size: 1.5rem;
}

.carousel-card p {
  font-size: 1rem;
  line-height: 1.35;
}

.carousel-controls {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.15rem;
}

.carousel-button {
  background: var(--black);
  border: 0;
  border-radius: 999px;
  color: var(--white);
  cursor: pointer;
  font-family: var(--body-mixed);
  font-size: 0.86rem;
  font-weight: 800;
  min-height: 2.5rem;
  padding: 0.7rem 1rem;
  text-transform: uppercase;
}

.carousel-button:focus-visible,
.carousel-dots button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.carousel-dots {
  align-items: center;
  display: flex;
  gap: 0.55rem;
}

.carousel-dots button {
  background: rgba(5, 5, 5, 0.28);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  height: 0.65rem;
  padding: 0;
  width: 0.65rem;
}

.carousel-dots button.is-active {
  background: var(--red);
  width: 1.65rem;
}

.writing-section {
  background: var(--white);
}

.text-link {
  color: var(--red);
  display: inline-flex;
  font-weight: 800;
  margin-top: 0.5rem;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25rem;
}

.contact-section {
  isolation: isolate;
  min-height: 80svh;
  padding: clamp(5rem, 9vw, 7rem) 1rem;
}

.contact-video {
  height: 100%;
  inset: 0;
  object-fit: cover;
  object-position: center;
  position: absolute;
  width: 100%;
  z-index: -2;
}

.contact-section::after {
  background:
    linear-gradient(
      90deg,
      rgba(245, 241, 232, 0.9),
      rgba(245, 241, 232, 0.62) 48%,
      rgba(5, 5, 5, 0.1)
    ),
    linear-gradient(
      180deg,
      rgba(245, 241, 232, 0.76),
      rgba(245, 241, 232, 0.12) 38%,
      rgba(5, 5, 5, 0.28)
    );
  content: "";
  inset: 0;
  position: absolute;
  z-index: -1;
}

.contact-content {
  color: var(--black);
  margin-left: clamp(1.25rem, 5vw, 4rem);
  max-width: 780px;
  padding-top: clamp(1rem, 5vw, 4rem);
  position: relative;
}

@media (max-width: 900px) {
  .hero-overlay {
    align-content: center;
  }

  .site-header {
    padding: 1rem;
  }

  .nav-links {
    gap: 0.4rem;
  }

  .two-column,
  .two-column.flip,
  .side-layout {
    grid-template-columns: 1fr;
  }

  h2 {
    font-size: 3rem;
  }

  .side-carousel {
    margin: 0 auto;
  }

  .carousel-stage {
    min-height: 40rem;
  }

  .project-list,
  .compact-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    font-size: 1rem;
  }

  .hero {
    min-height: 88svh;
  }

  .brand img {
    height: 1.7rem;
  }

  .nav-links a {
    font-size: 0.78rem;
  }

  .contact-section {
    min-height: 76svh;
  }

  .contact-content {
    margin-left: 0;
  }

  .hero-overlay {
    min-height: 88svh;
    padding: 8.2rem 1rem 3.2rem;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .contact-content h2 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 2.3rem;
  }

  h3 {
    font-size: 1.45rem;
  }

  .carousel-stage {
    min-height: 42rem;
  }

  .carousel-card h3 {
    font-size: 1.45rem;
  }

  .section-copy p:not(.kicker),
  .carousel-card p,
  .contact-content p {
    font-size: 1.05rem;
  }

  .carousel-card p {
    font-size: 0.98rem;
  }

  .project-list,
  .compact-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .carousel-card,
  .carousel-card.is-active,
  .carousel-card.is-exiting {
    transform: none;
  }
}
