.project-list {
  display: grid;
  gap: 22px;
}

.project-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  min-height: 440px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.project-card:nth-child(even) .project-visual {
  order: 2;
}

.project-visual {
  position: relative;
  display: grid;
  min-height: 380px;
  place-items: center;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: var(--panel-2);
}

.project-card:nth-child(even) .project-visual {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.project-visual::before,
.project-visual::after {
  position: absolute;
  content: "";
}

.project-visual::before {
  width: 62%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 28%;
  transform: rotate(25deg);
}

.project-visual::after {
  width: 32%;
  aspect-ratio: 1;
  border: 1px solid var(--accent);
  border-radius: 50%;
}

.project-visual span {
  position: relative;
  z-index: 2;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: rgba(11, 13, 15, 0.82);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.13em;
}

.pcb-visual {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 26px 26px;
}

.robot-visual::before {
  border-radius: 8px;
  transform: rotate(-18deg) skewY(-10deg);
}

.chip-visual::before {
  border-radius: 10px;
  box-shadow:
    54px 0 0 -53px var(--accent),
    -54px 0 0 -53px var(--accent),
    0 54px 0 -53px var(--accent),
    0 -54px 0 -53px var(--accent);
  transform: rotate(45deg);
}

.phone-visual::before {
  width: 34%;
  aspect-ratio: 0.53;
  border-radius: 34px;
  transform: rotate(8deg);
}

.project-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 62px);
}

.project-content h3 {
  margin: 12px 0 18px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.project-content > p:not(.project-number) {
  margin: 0;
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 26px 0;
  list-style: none;
}

.tag-list li {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #c5c9cd;
  font-size: 0.8rem;
}

.text-link {
  width: fit-content;
  margin-top: auto;
  padding-top: 18px;
  font-weight: 800;
}

.statement {
  padding: 110px 0;
  border-block: 1px solid var(--line);
  background: var(--panel);
}

.statement-grid,
.two-column {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(30px, 8vw, 100px);
}

.statement h2,
.compact h2 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.statement-copy,
.body-copy {
  color: var(--muted);
  font-size: 1.08rem;
}

.statement-copy p:first-child,
.body-copy p:first-child {
  margin-top: 0;
}

.section-heading.compact {
  display: block;
  margin: 0;
}

.contact {
  padding: 130px 0 150px;
}

.contact h2 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.6rem, 6.7vw, 6rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.contact > p:not(.eyebrow) {
  max-width: 650px;
  margin: 26px 0 0;
  color: var(--muted);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 36px;
  font-weight: 800;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0 40px;
  border-top: 1px solid var(--line);
  color: #7f878e;
  font-size: 0.85rem;
}


/* =========================================
   PROJECT PHOTOS
   ========================================= */

.project-photo {
  position: relative;
  padding: 0;
  overflow: hidden;
}

.project-photo::before,
.project-photo::after {
  display: none;
}

.project-photo img {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
  object-position: center;
}


/* =========================================
   TABLETS / SMALL LAPTOPS
   ========================================= */

@media (max-width: 850px) {

  .site-header {
    align-items: center;
  }

  .nav {
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid,
  .project-card,
  .statement-grid,
  .two-column,
  .section-heading {
    grid-template-columns: 1fr;
  }

  .section-heading h2,
  .section-heading > p:last-child {
    grid-column: 1;
  }


  /* Project cards stack vertically */

  .project-card {
    min-height: 0;
  }

  .project-card:nth-child(even) .project-visual {
    order: 0;
  }

  .project-visual,
  .project-card:nth-child(even) .project-visual {
    min-height: 420px;
    border: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-content {
    min-height: 0;
    padding: 42px;
  }

  .project-content h3 {
    font-size: clamp(2.2rem, 7vw, 3.5rem);
  }


  /* About / statement */

  .statement-grid,
  .two-column {
    gap: 48px;
  }

  .statement {
    padding: 90px 0;
  }


  /* Contact */

  .contact {
    padding: 100px 0 120px;
  }
}


/* =========================================
   MOBILE PHONES
   ========================================= */

@media (max-width: 560px) {

  /* Overall width */

  .shell,
  .site-header {
    width: min(calc(100% - 28px), var(--max));
  }


  /* Header */

  .site-header {
    position: static;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 0;
  }

  .brand {
    flex-shrink: 0;
    font-size: 0.9rem;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .nav {
    gap: 12px;
    justify-content: flex-end;
    margin-top: 0;
    font-size: 0.8rem;
  }

  .nav-cta {
    padding: 6px 10px;
  }


  /* Hero */

  .hero {
    min-height: auto;
    padding-top: 64px;
    padding-bottom: 72px;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(3rem, 15vw, 4.6rem);
    line-height: 0.93;
    letter-spacing: -0.065em;
  }

  .hero-copy {
    max-width: 100%;
    margin-top: 26px;
    font-size: 1rem;
    line-height: 1.65;
  }

  .hero-actions {
    gap: 10px;
    margin-top: 26px;
  }

  .button {
    min-height: 44px;
    padding: 0 15px;
    font-size: 0.88rem;
  }

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


  /* Sections */

  .section,
  .contact {
    padding-block: 78px;
  }

  .section-heading {
    display: block;
    margin-bottom: 34px;
  }

  .section-heading h2 {
    margin-top: 8px;
    font-size: clamp(2.3rem, 11vw, 3.5rem);
    line-height: 1;
  }

  .section-heading > p:last-child {
    margin-top: 18px;
  }


  /* Project cards */

  .project-list {
    gap: 18px;
  }

  .project-card {
    grid-template-columns: 1fr;
    min-height: 0;
    border-radius: 18px;
  }

  .project-card:nth-child(even) .project-visual {
    order: 0;
  }

  .project-visual,
  .project-card:nth-child(even) .project-visual {
    min-height: 0;
    aspect-ratio: 4 / 3;

    border: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-photo img {
    object-fit: cover;
    object-position: center;
  }

  .project-content {
    min-height: 0;
    padding: 30px 24px;
  }

  .project-content h3 {
    margin: 10px 0 16px;
    font-size: clamp(2rem, 10vw, 2.8rem);
    line-height: 1.02;
  }

  .project-content > p:not(.project-number) {
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .tag-list {
    gap: 7px;
    margin: 22px 0;
  }

  .tag-list li {
    padding: 6px 9px;
    font-size: 0.75rem;
  }

  .text-link {
    margin-top: 8px;
    padding-top: 14px;
  }


  /* Statement / About */

  .statement {
    padding: 76px 0;
  }

  .statement-grid,
  .two-column {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .statement h2,
  .compact h2 {
    font-size: clamp(2.3rem, 12vw, 3.8rem);
  }

  .statement-copy,
  .body-copy {
    font-size: 1rem;
  }


  /* Contact */

  .contact h2 {
    font-size: clamp(2.4rem, 12vw, 4rem);
  }

  .contact-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-top: 28px;
  }


  /* Footer */

  .footer {
    display: block;
    padding: 24px 0 32px;
  }

  .footer p {
    margin: 5px 0;
  }
}


/* =========================================
   VERY SMALL PHONES
   ========================================= */

@media (max-width: 390px) {

  .shell,
  .site-header {
    width: calc(100% - 22px);
  }

  .site-header {
    align-items: flex-start;
  }

  .brand {
    font-size: 0.82rem;
  }

  .nav {
    gap: 8px;
    font-size: 0.75rem;
  }

  .hero {
    padding-top: 52px;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 15vw, 3.7rem);
  }

  .project-content {
    padding: 26px 20px;
  }

  .project-visual,
  .project-card:nth-child(even) .project-visual {
    aspect-ratio: 1 / 1;
  }
}