:root {
  --background: #f9f9f9;
  --surface: #ffffff;
  --surface-low: #f3f3f3;
  --text: #1b1b1b;
  --text-muted: #4c4546;
  --primary: #000000;
  --on-primary: #ffffff;
  --outline: #cfc4c5;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100dvh;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--background);
  overflow: hidden;
}

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

.container {
  width: min(1100px, 100% - 2.5rem);
  margin: 0 auto;
}

.topbar {
  flex-shrink: 0;
  border-bottom: 1px solid var(--outline);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 1.4rem;
}

.desktop-nav a {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.desktop-nav a.active {
  color: var(--text);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.2rem;
}

.resume-link {
  border: 1px solid var(--outline);
  padding: 0.38rem 0.72rem;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.resume-link:hover {
  background: var(--surface-low);
}

.single-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0 4.2rem;
  overflow: hidden;
}

.eyebrow {
  display: inline-block;
  border: 1px solid var(--outline);
  background: var(--surface-low);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.28rem 0.52rem;
}

h1 {
  margin: 0.72rem 0 0.55rem;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.08rem, 2vw, 1.5rem);
  line-height: 1.2;
}

h3 {
  margin: 0 0 0.32rem;
  font-size: 0.98rem;
  line-height: 1.3;
}

p {
  margin: 0;
  line-height: 1.46;
}

.lead {
  color: var(--text-muted);
  max-width: 780px;
  font-size: 0.92rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.btn {
  border: 1px solid var(--primary);
  padding: 0.54rem 0.85rem;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-secondary {
  background: var(--surface);
  color: var(--primary);
}

.grid {
  display: grid;
  gap: 0.72rem;
}

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

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

.card {
  border: 1px solid var(--outline);
  background: var(--surface);
  padding: 0.72rem;
}

.muted {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.home-expect {
  margin-top: 1.8rem;
}

.expect-grid {
  display: flex;
  flex-direction: column;
}

.expect-item {
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--outline);
}

.expect-item:last-child {
  border-bottom: none;
}

.home-main {
  gap: 1.35rem;
  padding-top: 2.4rem;
}

.home-main .home-hero-title {
  margin: 0.9rem 0 0.75rem;
  font-size: clamp(2.05rem, 5.5vw, 3.35rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.home-main .lead {
  max-width: 760px;
  font-size: 1rem;
}

.home-main .actions {
  margin-top: 1.2rem;
}

.home-main .home-expect {
  margin-top: 2.65rem;
}

.home-main .card {
  padding: 0.95rem;
}

.top-space {
  padding-top: 2rem;
}

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

.service-priority-card h3 {
  font-size: 0.83rem;
  line-height: 1.25;
}

.service-priority-card .muted {
  font-size: 0.72rem;
  line-height: 1.28;
}

.services-compact .row {
  padding: 0.44rem 0;
}

.services-compact h3 {
  font-size: 0.82rem;
  margin-bottom: 0.18rem;
}

.services-compact .muted {
  font-size: 0.72rem;
  line-height: 1.28;
}

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

.project-card-mini {
  display: flex;
  flex-direction: column;
  padding: 0.66rem;
}

.project-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.2rem;
}

.project-head h3 {
  font-size: 1rem;
}

.project-link {
  width: 1.45rem;
  height: 1.45rem;
  border: 1px solid #a39a9b;
  background: var(--surface-low);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}

.project-link:hover {
  background: #ececec;
  border-color: var(--text);
}

.project-card-mini .muted {
  font-size: 0.74rem;
  line-height: 1.34;
}

.project-card-mini .tags {
  margin-top: auto;
  padding-top: 0.62rem;
}

.compact-list {
  border-top: 1px solid var(--outline);
}

.compact-list .row {
  border-bottom: 1px solid var(--outline);
  padding: 0.58rem 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  border: 1px solid var(--outline);
  background: var(--surface-low);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.4rem;
}

.contact-grid {
  display: grid;
  gap: 0.72rem;
  grid-template-columns: 1fr;
}

.contact-link {
  border: 1px solid var(--outline);
  background: var(--surface);
  padding: 0.68rem;
}

.contact-link:hover {
  background: var(--surface-low);
}

.site-footer {
  display: none;
}

.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 120;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--outline);
  background: rgba(255, 255, 255, 0.96);
}

.mobile-nav a {
  text-align: center;
  color: var(--text-muted);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.72rem 0.3rem;
}

.mobile-nav a.active {
  color: var(--text);
  font-weight: 700;
  background: var(--surface-low);
}

@media (max-width: 759px) {
  body.mobile-scroll {
    overflow-y: auto;
  }

  body.mobile-scroll .single-window {
    overflow: visible;
    justify-content: flex-start;
    min-height: calc(100dvh - 6.6rem);
    padding-bottom: 5rem;
  }

  body.mobile-scroll .single-window::after {
    content: "";
    display: block;
    height: 8rem;
    flex-shrink: 0;
  }

  body.mobile-fixed .single-window {
    overflow: hidden;
  }

  .home-main .home-expect {
    margin-top: 1.35rem;
  }

  .home-main .home-expect .expect-item {
    padding: 1rem 0;
  }

  .home-main .home-expect h3 {
    font-size: 0.82rem;
    margin-bottom: 0.2rem;
  }

  .home-main .home-expect .muted {
    font-size: 0.68rem;
    line-height: 1.28;
  }

  .top-space {
    padding-top: 2.15rem;
  }

  .contact-grid {
    gap: 0.52rem;
  }

  .contact-link {
    padding: 0.54rem;
  }
}

@media (min-width: 760px) {
  .desktop-nav {
    display: flex;
  }

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

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

  .expect-grid {
    flex-direction: row;
    margin-top: 2rem;
  }

  .expect-item {
    flex: 1;
    padding: 0 1.5rem;
    border-bottom: none;
    border-right: 1px solid var(--outline);
  }

  .expect-item:first-child {
    padding-left: 0;
  }

  .expect-item:last-child {
    padding-right: 0;
    border-right: none;
  }

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

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

  .single-window {
    padding: 1.1rem 0 0.8rem;
  }

  .home-main {
    padding-top: 1.6rem;
    padding-bottom: 1rem;
  }

  .top-space {
    padding-top: 1.9rem;
  }

  .service-priority-card h3 {
    font-size: 0.92rem;
  }

  .service-priority-card .muted {
    font-size: 0.78rem;
  }

  .site-footer {
    display: block;
    flex-shrink: 0;
    border-top: 1px solid var(--outline);
    padding: 0.55rem 0;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

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

  .footer-links a {
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  .mobile-nav {
    display: none;
  }
}
