:root {
  --bg: #f4f4f4;
  --surface: rgba(255, 255, 255, 0.88);
  --text: #111111;
  --muted: #4f4f4f;
  --line: rgba(17, 17, 17, 0.12);
  --line-strong: rgba(17, 17, 17, 0.25);
  --radius: 18px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-anchor: none;
}

body {
  position: relative;
  margin: 0;
  color: var(--text);
  font-family: "Avenir Next", Avenir, "Helvetica Neue", sans-serif;
  background: var(--bg);
}

:where(a, button, input, textarea, select):focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.noise-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image: radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.3) 1px, transparent 0);
  background-size: 4px 4px;
}

#fluid-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  filter: blur(var(--shader-soften, 0px));
  transform: translateZ(0);
}

main {
  position: relative;
}

.hero-shell {
  position: relative;
  z-index: 11;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 12;
  width: min(calc(100% - 28px), var(--max));
  margin: 14px auto 0;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  contain: paint;
}

html[data-perf="low"] .site-header {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 0.73rem;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.brand-text {
  font-size: 1.02rem;
  font-weight: 600;
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 20px;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav a:hover {
  opacity: 0.62;
}

.section {
  width: min(calc(100% - 28px), var(--max));
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-stage {
  width: min(calc(100% - 28px), var(--max));
  min-height: calc(100vh - 102px);
  margin: 14px auto 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.hero {
  width: 100%;
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 12px 18px 0;
}

.hero-inner {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  height: calc(clamp(1.7rem, 4.8vw, 3.2rem) * 0.94);
}

.hero-question,
.hero-title {
  grid-area: 1 / 1;
  margin: 0;
  font-family: "Avenir Next", Avenir, "Helvetica Neue", sans-serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 4.8vw, 3.2rem);
  letter-spacing: -0.02em;
  line-height: 0.94;
  white-space: nowrap;
}

.hero-title {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.hero-title.show {
  opacity: 1;
  transform: translateY(0);
}

.hero-subtitle {
  margin: 0;
  max-width: 36ch;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.45;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  min-width: 180px;
  padding: 0 28px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.74);
}

.hero-cta:hover {
  background: #111;
  color: #fff;
}

.hero-bottom {
  width: 100%;
  margin-top: 24px;
  padding: 0 6px;
  display: grid;
  justify-items: center;
  gap: 18px;
  position: relative;
  z-index: 2;
}

.hero-echoes {
  --echo-gap: clamp(4px, 1.2vh, 10px);
  min-height: 0;
  margin-top: var(--echo-gap);
  padding: 0 8px;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: var(--echo-gap);
  overflow: hidden;
  opacity: 0;
  transition: opacity 260ms ease;
  position: relative;
  z-index: 0;
}

.hero-echoes.show {
  opacity: 1;
}

.hero-echo-line {
  margin: 0;
  font-family: "Avenir Next", Avenir, "Helvetica Neue", sans-serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 4.8vw, 3.2rem);
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 0.94;
  white-space: nowrap;
}

.work-section {
  padding: 26px 0 62px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

h2,
h3 {
  margin: 0;
  font-family: "Avenir Next", Avenir, "Helvetica Neue", sans-serif;
}

h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  font-weight: 650;
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(1.18rem, 2.05vw, 1.48rem);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.work-controls {
  display: inline-flex;
  gap: 8px;
}

.filter-button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.filter-button.is-active {
  background: #111;
  color: #fff;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.project-card {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: transform 200ms ease, opacity 240ms ease, scale 200ms ease;
}

.project-card.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
  display: none;
}

.project-card:hover {
  transform: translateY(-2px);
}

.project-media {
  display: block;
  width: 100%;
  aspect-ratio: 18 / 10;
  object-fit: cover;
  background: #1f1f1f;
}

.project-content {
  padding: 12px;
  display: grid;
  gap: 6px;
}

.project-meta {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-content p {
  margin: 0;
  color: #2c2c2c;
  line-height: 1.5;
}

.expand-toggle {
  justify-self: start;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}

.project-details {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.project-details a {
  color: #111;
  text-decoration: none;
}

.project-details a:hover {
  text-decoration: underline;
}

.about-section {
  padding: 18px 0 60px;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
}

.about-portrait,
.about-content,
.contact-inner {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
}

.about-portrait {
  min-height: 320px;
  background:
    radial-gradient(circle at 42% 24%, rgba(255, 255, 255, 0.3), transparent 20%),
    linear-gradient(150deg, #262626 0%, #151515 56%, #353535 100%);
}

.about-content {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.about-content p {
  margin: 0;
  color: #2c2c2c;
  line-height: 1.6;
}

.about-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.about-meta div {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 10px;
}

.about-meta h3 {
  margin-bottom: 6px;
  font-size: 1.06rem;
}

.about-links,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.about-links a,
.contact-links a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: #fff;
  text-decoration: none;
}

.about-links a:hover,
.contact-links a:hover {
  background: #111;
  color: #fff;
}

.contact-section {
  padding: 0 0 84px;
}

.contact-inner {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.contact-inner p {
  margin: 0;
  color: #2c2c2c;
  max-width: 58ch;
  line-height: 1.55;
}

.contact-form {
  display: grid;
  gap: 12px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  color: #1c1c1c;
  font-size: 0.93rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 11px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.contact-form button {
  width: fit-content;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #111;
  border-radius: 999px;
  background: #111;
  color: #fff;
  cursor: pointer;
}

.contact-form button:hover {
  background: #fff;
  color: #111;
}

.form-status {
  margin: 0;
  min-height: 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .hero-title,
  .hero-echoes,
  .reveal,
  .project-card {
    transition: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 920px) {
  .project-grid,
  .about-meta {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .hero-stage {
    min-height: calc(100vh - 96px);
    margin-top: 10px;
  }

  .hero-shell {
    border-radius: 0;
  }

  .site-header {
    border-radius: 22px;
    align-items: flex-start;
    flex-wrap: wrap;
    row-gap: 10px;
    padding: 12px 14px;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .site-nav a {
    font-size: 0.9rem;
  }

  .hero {
    min-height: auto;
    padding: 10px 14px 0;
  }

  .hero-inner {
    padding: 0;
  }

  .hero-bottom {
    margin-top: 16px;
    padding: 0 4px;
    gap: 14px;
  }

  .hero-echoes {
    --echo-gap: 6px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .hero-inner {
    height: auto;
    min-height: calc(clamp(1.15rem, 8.2vw, 2rem) * 1.08);
  }

  .hero-question,
  .hero-title {
    font-size: clamp(1.15rem, 8.2vw, 2rem);
    line-height: 1.02;
    letter-spacing: -0.01em;
    white-space: normal;
    overflow-wrap: anywhere;
    text-wrap: balance;
    max-width: 100%;
    text-align: center;
  }

  .hero-echo-line {
    font-size: clamp(1.05rem, 7.4vw, 1.85rem);
    line-height: 1.02;
    letter-spacing: -0.01em;
    white-space: nowrap;
    max-width: 100%;
  }
}
