@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --page-bg: #f7f4ed;
  --text: #111111;
  --muted: rgba(17, 17, 17, 0.54);
  --line: rgba(17, 17, 17, 0.22);
  --line-strong: rgba(17, 17, 17, 0.82);
  --surface: rgba(255, 255, 255, 0.52);
  --surface-strong: #ffffff;
  --radius: 20px;
  --header-height: 54px;
  --font-main: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Manrope", var(--font-main);
  font-family: var(--font-main);
  color: var(--text);
  background: var(--page-bg);
}

:root.is-dark {
  --page-bg: #111111;
  --text: #f7f4ed;
  --muted: rgba(247, 244, 237, 0.58);
  --line: rgba(247, 244, 237, 0.24);
  --line-strong: rgba(247, 244, 237, 0.82);
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: #1b1b1b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(0, 141, 204, 0.14), transparent 34rem),
    var(--page-bg);
  font-family: var(--font-main);
  line-height: 1.2;
  transition: color 240ms ease, background-color 240ms ease;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto minmax(80px, 1fr);
  align-items: center;
  min-height: var(--header-height);
  padding: 10px 18px;
  border-bottom: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--page-bg) 88%, transparent);
  backdrop-filter: blur(18px);
}

.brand,
.main-nav,
.theme-button {
  font-size: clamp(12px, 1.05vw, 15px);
  letter-spacing: -0.03em;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-self: start;
}

.brand span:first-child {
  font-weight: 700;
}


.brand span:first-child,
.stack-item h3,
.dialog-content h2 {
  font-family: var(--font-heading);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}

.main-nav a,
.text-link,
.contact-link {
  position: relative;
}

.main-nav a::after,
.text-link::after,
.contact-link::after {
  position: absolute;
  right: 0;
  bottom: -2px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
  content: '';
}

.main-nav a:hover::after,
.text-link:hover::after,
.contact-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.theme-button {
  justify-self: end;
  padding: 0;
  color: var(--muted);
  background: transparent;
}

.section-shell {
  width: min(100%, 1680px);
  margin: 0 auto;
  padding-right: 18px;
  padding-left: 18px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: clamp(28px, 5vw, 88px);
  min-height: 72svh;
  padding-top: clamp(36px, 6vw, 76px);
  padding-bottom: clamp(36px, 6vw, 76px);
  border-bottom: 1px solid var(--line-strong);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h1,
.section-heading h2,
.contact h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: -0.065em;
}

.hero h1 {
  max-width: 15ch;
  font-size: clamp(42px, 8vw, 112px);
  line-height: 0.9;
}

.hero__meta {
  align-self: end;
  max-width: 520px;
  font-size: clamp(15px, 1.25vw, 20px);
  letter-spacing: -0.055em;
}

.hero__meta p {
  margin: 0 0 18px;
}

.text-link {
  display: inline-flex;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.filters-panel {
  display: grid;
  gap: 8px;
  padding-top: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-strong);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}

.filter-label {
  min-width: 54px;
  color: var(--muted);
}

.filter-label,
.filter-chip,
.view-button,
.project-item {
  font-size: clamp(13px, 1vw, 16px);
  letter-spacing: -0.035em;
}

.filter-chip,

.filter-chip:hover,
.filter-chip.is-active,

.filter-chip.is-active::before,
.view-button.is-active::before {
  content: '● ';
  font-size: 0.75em;
}

.works {
  padding-top: 18px;
  padding-bottom: clamp(64px, 8vw, 120px);
  border-bottom: 1px solid var(--line-strong);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
}

.section-heading h2,
.contact h2 {
  font-size: clamp(32px, 5vw, 72px);
  line-height: 0.9;
}

.section-heading--plain {
  display: block;
  padding-bottom: 28px;
}


.works-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 32vw);
  gap: 18px;
  align-items: start;
}



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


.project-item {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) 0.6fr 0.45fr 0.8fr 1fr;
  width: 100%;
  min-height: 56px;
  padding: 10px 0;
  color: var(--text);
  text-align: left;
  background: transparent;
  border-bottom: 1px solid var(--line);
  transition: color 160ms ease, padding 160ms ease, border-color 160ms ease;
}

.project-item:hover,
.project-item:focus-visible {
  padding-left: 10px;
  color: var(--text);
  border-color: var(--line-strong);
  outline: none;
}

.project-item span:not(.project-item__title) {
  color: var(--muted);
}

.project-item__title {
  font-weight: 620;
}




.project-preview {
  position: sticky;
  top: calc(var(--header-height) + 18px);
}

.preview-card {
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}


.preview-card p {
  margin: 0 0 3px;
  font-size: 17px;
  letter-spacing: -0.035em;
}

.preview-card span {
  color: var(--muted);
  font-size: 14px;
}

.empty-state {
  margin: 40px 0 0;
  color: var(--muted);
  font-size: 17px;
  letter-spacing: -0.035em;
}

.about,
.stack,
.contact {
  padding-top: clamp(42px, 6vw, 76px);
  padding-bottom: clamp(42px, 6vw, 76px);
  border-bottom: 1px solid var(--line-strong);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: clamp(28px, 7vw, 120px);
}

.about-lead {
  max-width: 980px;
  margin: 0;
  font-size: clamp(24px, 3.6vw, 54px);
  line-height: 1;
  letter-spacing: -0.065em;
}

.about-copy {
  align-self: end;
  max-width: 620px;
}

.about-copy p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 1.2vw, 18px);
  letter-spacing: -0.045em;
}

.about-copy p + p {
  margin-top: 18px;
}

.stack-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}

.stack-item {
  min-height: 230px;
  padding: 16px;
  border-right: 1px solid var(--line);
}

.stack-item:last-child {
  border-right: 0;
}

.stack-item span {
  display: block;
  margin-bottom: 64px;
  color: var(--muted);
}

.stack-item h3 {
  margin: 0 0 12px;
  font-size: clamp(20px, 2vw, 32px);
  font-weight: 520;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.stack-item p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  letter-spacing: -0.025em;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  gap: 30px;
}

.contact h2 {
  max-width: 980px;
}

.contact-actions {
  align-self: end;
  display: grid;
  gap: 10px;
  justify-items: start;
}

.contact-link {
  font-size: clamp(17px, 1.6vw, 24px);
  letter-spacing: -0.055em;
}

.project-dialog {
  width: min(980px, calc(100vw - 28px));
  padding: 0;
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
}

.project-dialog::backdrop {
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(12px);
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 50%;
}


.dialog-content {
  padding: clamp(20px, 4vw, 46px);
}

.dialog-content h2 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 520;
  line-height: 0.92;
  letter-spacing: -0.065em;
}

.dialog-content p {
  max-width: 720px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 16px;
  letter-spacing: -0.025em;
}

.dialog-content ul {
  display: grid;
  gap: 10px;
  max-width: 760px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dialog-content li {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  letter-spacing: -0.025em;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  padding: 11px 16px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: -0.025em;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.project-link:hover,
.project-link:focus-visible {
  color: var(--page-bg);
  background: var(--text);
  border-color: var(--text);
}

.project-link[hidden] {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1180px) {
  
  .project-item {
    grid-template-columns: minmax(180px, 1.1fr) 0.56fr 0.4fr 0.7fr;
  }

  .project-item span:last-child {
    display: none;
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .main-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    order: 3;
    width: 100%;
    padding-top: 8px;
  }

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

  .hero {
    min-height: auto;
  }

  .hero h1 {
    max-width: 10ch;
  }

  .hero__meta {
    align-self: start;
  }

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

  .project-preview {
    display: none;
  }

  .project-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 14px 0;
  }

  .project-item span:nth-child(4),
  .project-item span:nth-child(5) {
    display: none;
  }

  .project-item__title {
    grid-row: span 2;
  }

  .stack-list {
    grid-template-columns: 1fr;
  }

  .stack-item {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stack-item:last-child {
    border-bottom: 0;
  }

  .stack-item span {
    margin-bottom: 48px;
  }

  .contact-actions {
    align-self: start;
  }
}

@media (max-width: 620px) {
  .section-shell,
  .site-header {
    padding-right: 12px;
    padding-left: 12px;
  }

  .hero h1 {
    font-size: clamp(36px, 13vw, 58px);
  }

  .hero__meta {
    font-size: 16px;
  }

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

  
  .filter-label {
    width: 100%;
  }

  .about-lead {
    font-size: clamp(28px, 9vw, 44px);
  }

  }

#contact-title {
  margin-bottom: 20px;
}

.dialog-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  border-radius: 24px 24px 0 0;
}

.dialog-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dialog-media[hidden] {
  display: none;
}

.preview-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 8px);
}

.preview-media[hidden] {
  display: none;
}

.preview-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 120ms ease;
}