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

:root {
  color-scheme: light;
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --ink: #09090b;
  --muted: #5b6472;
  --line: #e4e4e7;
  --strong-line: #18181b;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --shadow: 0 18px 42px rgba(9, 9, 11, 0.08);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-x: hidden;
}

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

a:hover {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 max(20px, calc((100vw - var(--max)) / 2));
  background: rgba(250, 250, 250, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: Archivo, ui-sans-serif, system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  font-size: 17px;
  line-height: 1;
}

.top-nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #2d3138;
  font-size: 14px;
  font-weight: 700;
}

main {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.hero-section {
  min-height: calc(100svh - 68px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 56px;
  align-items: center;
  padding: 82px 0 58px;
  border-bottom: 1px solid var(--strong-line);
}

.hero-copy h1 {
  width: min(880px, 100%);
  margin: 0;
  font-family: Archivo, ui-sans-serif, system-ui, sans-serif;
  font-size: 6rem;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy,
.project-hero > div {
  min-width: 0;
}

.hero-copy p {
  width: min(720px, 100%);
  margin: 28px 0 0;
  color: #252a32;
  font-size: 1.25rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--strong-line);
  border-radius: 7px;
  font-size: 14px;
  font-weight: 800;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.button.secondary {
  background: transparent;
}

.button:hover {
  transform: translateY(-1px);
}

.hero-panel {
  display: grid;
  gap: 10px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--strong-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel strong {
  font-family: Archivo, ui-sans-serif, system-ui, sans-serif;
  font-size: 19px;
}

.hero-panel span {
  display: block;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--strong-line);
}

.summary-strip div {
  min-height: 120px;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
}

.summary-strip div:last-child {
  border-right: 0;
}

.summary-strip strong {
  display: block;
  font-family: Archivo, ui-sans-serif, system-ui, sans-serif;
  font-size: 36px;
  line-height: 1;
}

.summary-strip span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.section {
  padding: 76px 0;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  margin-bottom: 28px;
}

.section-heading h2,
.contact-section h2,
.content-block h2,
.side-card h2 {
  font-family: Archivo, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
}

.section-heading h2 {
  margin: 0;
  font-size: 2.6rem;
  line-height: 1.05;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.featured-grid,
.portfolio-grid {
  display: grid;
  gap: 16px;
}

.featured-grid {
  grid-template-columns: 1.2fr 1fr;
}

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

.portfolio-card {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 20px;
  min-height: 300px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.portfolio-card:hover {
  border-color: var(--strong-line);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.featured-card {
  min-height: 300px;
  background: #101114;
  color: #fff;
}

.featured-card p,
.featured-card .project-type,
.featured-card .project-tags span {
  color: #d9dde4;
}

.featured-card .project-tags span {
  border-color: rgba(255, 255, 255, 0.24);
}

.featured-card .project-link.secondary {
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.portfolio-card-top,
.mobile-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.project-icon,
.app-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
}

.project-icon {
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: var(--surface);
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
}

.app-icon {
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(9, 9, 11, 0.14);
  object-fit: cover;
}

.project-type {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.portfolio-card h3 {
  margin: 0;
  font-family: Archivo, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.55rem;
  line-height: 1.12;
}

.portfolio-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.project-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tags span,
.tag-list span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.project-links-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.project-link,
.table-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.project-link.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.project-link.secondary:hover,
.table-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.filter-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.filter-button.active,
.filter-button:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.approach-grid article {
  min-height: 240px;
  padding: 24px;
  background: var(--surface);
}

.approach-grid span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.approach-grid h3 {
  margin: 24px 0 10px;
  font-family: Archivo, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.35rem;
}

.approach-grid p {
  margin: 0;
  color: var(--muted);
}

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

.contact-section h2 {
  margin: 0;
  max-width: 720px;
  font-size: 3rem;
  line-height: 1.08;
}

.contact-section p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.contact-links {
  display: grid;
  gap: 10px;
}

.contact-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--accent);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.contact-links a span:last-child {
  min-width: 0;
}

.contact-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
}

.contact-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.github-icon svg {
  fill: currentColor;
  stroke: none;
}

.site-footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 42px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer span:first-child {
  color: var(--ink);
  font-weight: 900;
}

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 48px;
  align-items: end;
  padding: 68px 0 42px;
  border-bottom: 1px solid var(--strong-line);
}

.breadcrumb {
  display: inline-flex;
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.project-hero-icon,
.project-hero-mark {
  display: grid;
  width: 78px;
  height: 78px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 18px;
}

.project-hero-icon {
  box-shadow: 0 18px 34px rgba(9, 9, 11, 0.16);
  object-fit: cover;
}

.project-hero-mark {
  border: 1px solid var(--ink);
  background: var(--surface);
  color: var(--accent);
  font-size: 22px;
  font-weight: 900;
}

.project-hero h1 {
  margin: 0;
  font-family: Archivo, ui-sans-serif, system-ui, sans-serif;
  font-size: 4.8rem;
  line-height: 0.98;
  letter-spacing: 0;
}

.project-hero p {
  margin: 24px 0 0;
  max-width: 720px;
  color: #252a32;
  font-size: 1.2rem;
}

.project-meta-panel {
  display: grid;
  gap: 14px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--strong-line);
  border-radius: var(--radius);
}

.project-meta-panel dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.project-meta-panel div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.project-meta-panel div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.project-meta-panel dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.project-meta-panel dd {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.project-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 42px;
}

.content-block {
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}

.content-block:first-child {
  padding-top: 0;
}

.content-block h2 {
  margin: 0 0 12px;
  font-size: 1.9rem;
  line-height: 1.1;
}

.content-block p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.highlight-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.highlight-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: #252a32;
}

.link-grid,
.side-list {
  display: grid;
  gap: 10px;
}

.link-card,
.side-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
}

.link-card::after,
.side-list a::after,
.table-link::after {
  content: "↗";
  font-size: 12px;
}

.side-panel {
  position: sticky;
  top: 92px;
  align-self: start;
  display: grid;
  gap: 18px;
}

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

.side-card h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.legal-page {
  width: min(840px, calc(100% - 40px));
  margin: 0 auto;
  padding: 70px 0;
}

.legal-page h1 {
  margin: 0 0 18px;
  font-family: Archivo, ui-sans-serif, system-ui, sans-serif;
  font-size: 4rem;
  line-height: 0.98;
}

.legal-page h2 {
  margin: 34px 0 8px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.legal-page p,
.legal-page li {
  color: var(--muted);
}

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

@media (max-width: 1040px) {
  .hero-copy h1 {
    font-size: 4.6rem;
  }

  .portfolio-grid,
  .approach-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .top-nav {
    width: 100%;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero-section,
  .featured-grid,
  .project-hero,
  .project-detail-grid,
  .contact-section,
  .section-heading {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
    padding-top: 56px;
  }

  .featured-card {
    grid-row: auto;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  body {
    word-break: normal;
  }

  main,
  .site-footer,
  .legal-page {
    width: calc(100vw - 72px);
    max-width: var(--max);
  }

  .hero-copy h1,
  .project-hero h1,
  .legal-page h1 {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
    font-size: clamp(2.2rem, 9.5vw, 2.75rem);
    line-height: 1;
  }

  .hero-copy p,
  .project-hero p {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-all;
    font-size: 1.05rem;
  }

  .hero-panel,
  .project-meta-panel,
  .portfolio-card,
  .side-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .hero-section .hero-copy p,
  .hero-section .hero-panel {
    width: min(100%, 280px);
  }

  .summary-strip,
  .portfolio-grid,
  .approach-grid {
    grid-template-columns: 1fr;
  }

  .summary-strip div {
    min-height: 94px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .summary-strip div:last-child {
    border-bottom: 0;
  }

  .section {
    padding: 58px 0;
  }

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

  .portfolio-card-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact-section h2 {
    font-size: 2.25rem;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
