/* ===== Custom Fonts ===== */
@font-face {
  font-family: 'FK Raster Roman Compact';
  /* UPDATE the filename(s) below to match your actual font file */
  src: url('../fonts/FKRasterRomanCompact-Smooth.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #FFFFF9;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #212529;
  background-color: #FFFFF9;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

/* ===== Top Nav ===== */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 56px;
  background: #FFFFF9;
}

.top-nav,
.top-nav a {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  letter-spacing: -0.24px;
}

.nav-links a {
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #3134E8;
}

.nav-links a.nav-active {
  color: #3134E8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav-links a svg {
  margin-left: 0;
  display: inline-block;
  position: relative;
  top: 0px;
}

.footer-links a svg {
  margin-left: 4px;
}

/* ===== Logo Box ===== */
.logo-box {
  display: inline-block;
  padding: 5px 6px 3px 6px;
  border-radius: 2px;
  animation: logo-bg-cycle 6s ease-in-out infinite;
  text-decoration: none;
  font-size: 0; /* collapses whitespace between inline-block spans */
  line-height: 0;
  vertical-align: middle;
}

.logo-box:hover .logo-first,
.logo-box:hover .logo-last {
  color: #3134E8;
}

.logo-first,
.logo-last {
  font-family: 'FK Raster Roman Compact', monospace;
  font-size: 35px;
  line-height: 35px;
  font-weight: normal;
  color: #212529;
  overflow: hidden;
  white-space: nowrap;
  display: inline-block;
  vertical-align: top;
  /* width animated by JS; color intentionally excluded from transition */
  transition: width 0.6s ease-in-out;
}

/* Spacing between each anchor letter and the rest of its word. This pushes the
   2nd letter past the anchor's visual edge so clipping never cuts the T or M. */
.logo-first .logo-anchor { margin-right: 1.5px; }
.logo-last  .logo-anchor { margin-right: 1.2px; }

@keyframes logo-bg-cycle {
  0%   { background-color: #E5FFB4; }
  50%  { background-color: #FAFFB4; }
  100% { background-color: #E5FFB4; }
}

/* ===== Homepage ===== */
.homepage {
  flex: 1;
  padding: 0 56px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

/* ===== Intro Text Block ===== */
.intro {
  padding-top: 88px;
}

.intro-text {
  font-family: "IBM Plex Mono", monospace;
  font-size: 35px;
  font-style: normal;
  font-weight: 400;
  line-height: 45px;
  letter-spacing: -0.5px;
  color: #212529;
}

.intro-meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: -0.5px;
  color: #212529;
  margin-top: 24px;
}

.intro-link {
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.intro-link:hover {
  color: #3134E8;
}

.hero {
  padding: 128px 0 0;
}

.hero-heading {
  font-family: "IBM Plex Mono", monospace;
  font-size: 56px;
  font-style: normal;
  font-weight: 400;
  line-height: 51.895px;
  letter-spacing: -0.649px;
}

.hero-name-wrapper {
  position: relative;
  display: inline-block;
  padding-bottom: 18px;
}

.squiggly-underline-wrapper {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 10px;
  overflow: hidden;
}

.squiggly-underline {
  width: calc(100% + 28px);
  height: 10px;
  display: block;
  margin-left: -28px;
}

.squiggly-underline path {
  will-change: transform;
}

.hero-name-wrapper:hover .squiggly-underline path {
  animation: move-squiggle 500ms linear infinite;
}

@keyframes move-squiggle {
  from { transform: translateX(0); }
  to { transform: translateX(28px); }
}

.bio {
  font-family: "IBM Plex Mono", monospace;
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 30px;
  letter-spacing: -0.5px;
  color: #212529;
  margin-bottom: 80px;
}

/* ===== Masonry Grid ===== */
.work {
  padding: 40px 0 128px;
}

.masonry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 40px;
  row-gap: 2.5rem;
  align-items: start;
}

.masonry-column {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* ===== Case Study Cards ===== */
.case-study-card {
  display: block;
  transition: color 0.2s ease;
}

.case-study-card:hover {
  color: #3134E8;
}

.card-image-wrapper {
  position: relative;
  overflow: hidden;
  background: #f0f0f0;
}

.card-image {
  width: 100%;
  height: auto;
  display: block;
}

.card-image-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  opacity: 0;
}

.case-study-card:hover .card-image-default {
  opacity: 0;
}

.case-study-card:hover .card-image-hover {
  opacity: 1;
}

.card-title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: -0.5px;
  margin-top: 16px;
}

.bio-link {
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.bio-link:hover {
  color: #3134E8;
}

.card-descriptor {
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 12px;
  color: #212529;
  margin-top: 10px;
}

/* ===== Footer Wave ===== */
.footer-wave {
  line-height: 0;
  display: block;
}

.footer-wave svg {
  display: block;
  width: 100%;
}

/* ===== Footer ===== */
.site-footer {
  display: flex;
  flex-direction: column;
  padding: 28px 56px;
  background-color: #E5FFB4;
  animation: logo-bg-cycle 6s ease-in-out infinite;
  font-size: 0.9rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
}

.footer-bottom {
  display: none;
}

.footer-credit {
  font-family: "FK Raster Roman Compact", monospace;
  font-size: 35px;
  font-style: normal;
  font-weight: 400;
  line-height: 40px;
  color: #212529;
  flex: 0 0 50%;
  max-width: 50%;
}

.footer-email {
  text-decoration: underline;
  transition: color 0.2s ease;
}

.footer-email:hover {
  color: #3134E8;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  letter-spacing: -0.24px;
  text-transform: uppercase;
  color: #212529;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #3134E8;
}

/* ===== About Page ===== */
.about-page {
  flex: 1;
  padding: 0 56px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  padding: 88px 0 128px;
}

.about-left {
  padding: 0;
}

.about-single-photo {
  width: 100%;
  height: auto;
  display: block;
}

.about-right {
  padding-top: 0;
  padding-bottom: 0;
}

.about-heading {
  font-family: "IBM Plex Mono", monospace;
  font-size: 40px;
  font-style: normal;
  font-weight: 400;
  line-height: 40px;
  letter-spacing: -0.5px;
  color: #212529;
}

.about-body {
  margin-top: 0;
}

.about-text {
  font-family: "IBM Plex Mono", monospace;
  font-size: 22px;
  font-style: normal;
  font-weight: 400;
  line-height: 30px;
  letter-spacing: -0.5px;
  color: #212529;
  margin-bottom: 24px;
}

.about-text:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .about-page {
    padding: 0 1.25rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-right {
    padding-top: 2rem;
    padding-bottom: 3rem;
  }

  .about-heading {
    font-size: 1.75rem;
  }
}

/* ===== Case Study Page ===== */
.case-study-page {
  flex: 1;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.cs-hero-image-wrapper {
  padding: 0 56px;
}

.cs-hero-image {
  width: 100%;
  height: auto;
  display: block;
}

.cs-content {
  padding: 64px 56px 128px;
}

.cs-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.cs-title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 40px;
  font-style: normal;
  font-weight: 400;
  line-height: 40px;
  letter-spacing: -0.5px;
  color: #212529;
  margin-bottom: 32px;
}

.cs-meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: -0.5px;
  color: #212529;
  margin-bottom: 16px;
}

.cs-overview {
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 300;
  line-height: 26px;
  color: #212529;
  margin-bottom: 24px;
}

.cs-overview:last-child {
  margin-bottom: 0;
}

.cs-section-subheading {
  color: #212529;
  font-family: "IBM Plex Mono", monospace;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: -0.5px;
  margin-top: 16px;
}

.cs-section-heading {
  color: #212529;
  font-family: "IBM Plex Mono", monospace;
  font-size: 24px;
  font-style: normal;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: -0.5px;
}

.cs-gallery {
  margin-top: 64px;
}

.cs-gallery--no-captions {
  margin-top: 104px;
}

.cs-gallery-grid--4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.cs-gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}

.cs-gallery-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.cs-gallery-square {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.cs-banner-video {
  margin-top: 64px;
}

.cs-full-image {
  margin-top: 64px;
}

.cs-full-image-el {
  width: 100%;
  height: auto;
  display: block;
}

.cs-banner-video-el {
  width: 100%;
  height: auto;
  display: block;
}

.cs-pullquote {
  margin-top: 104px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.cs-pullquote-text {
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 300;
  line-height: 26px;
  color: #212529;
}

.cs-sketches {
  margin-top: 64px;
}

.cs-sketches-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 16px;
}

.cs-sketches-square {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.cs-gallery-caption {
  text-align: left;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 300;
  line-height: 18px;
  color: #212529;
  margin-top: 16px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .top-nav {
    padding: 1rem 1.25rem;
  }

  .homepage {
    padding: 0 1.25rem;
  }

  .hero {
    padding: 2rem 0 0;
  }

  .hero-heading {
    font-size: 2.25rem;
  }

  .work {
    padding: 1.5rem 0 2rem;
  }

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

  .masonry-column {
    gap: 2rem;
  }

  .site-footer {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
    padding: 1.25rem;
  }

  .cs-hero-image-wrapper {
    padding: 0 1.25rem;
  }

  .cs-content {
    padding: 2rem 1.25rem 3rem;
  }

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

  .cs-title {
    font-size: 1.5rem;
  }

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

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