:root {
  --bg: #151613;
  --surface: #1e201c;
  --surface-soft: #282a25;
  --surface-strong: #f1eee5;
  --border: #393d35;
  --border-strong: #565d50;
  --text: #f3f0e8;
  --text-soft: #c7c5b8;
  --text-strong: #1f211d;
  --accent: #8f9b57;
  --accent-soft: #c7cf9d;
  --max-width: 1180px;
  --shadow: 0 18px 42px rgba(8, 9, 7, 0.2);
  --font-main: "Avenir Next", "Helvetica Neue", "Nimbus Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 112px;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background:
    radial-gradient(circle at top left, rgba(143, 155, 87, 0.14), transparent 28%),
    linear-gradient(180deg, #181a16 0%, #151613 100%);
  color: var(--text);
}

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

p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
  font-size: 1rem;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.site-header,
.hero,
.service-grid,
.process-grid,
.project-grid,
.site-footer,
.contact-panel {
  border: 1px solid var(--border);
  background: rgba(30, 32, 28, 0.9);
  box-shadow: var(--shadow);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  border-radius: 10px;
  position: sticky;
  top: 0;
  background: #21231e;
  z-index: 20;
}

.brand-block {
  display: grid;
  gap: 4px;
}

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

.brand-note {
  font-size: 0.92rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-nav a {
  color: var(--text-soft);
  font-size: 0.95rem;
  transition: color 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.brand:hover,
.brand:focus-visible {
  color: var(--text);
}

main {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 24px;
  padding: 44px;
  border-radius: 14px;
}

.hero-copy {
  display: grid;
  gap: 22px;
  align-content: start;
}

.hero-copy h1 {
  max-width: 12ch;
  font-size: clamp(2.9rem, 5vw, 5.2rem);
  line-height: 0.98;
}

.hero-copy p {
  max-width: 62ch;
  font-size: 1.08rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button-solid {
  background: var(--accent);
  color: #14160f;
}

.button-solid:hover,
.button-solid:focus-visible {
  background: #9cab60;
}

.button-outline {
  border-color: var(--border-strong);
  color: var(--text);
}

.button-outline:hover,
.button-outline:focus-visible {
  border-color: var(--accent-soft);
  color: var(--accent-soft);
}

.hero-panel {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  border-radius: 12px;
  padding: 24px;
}

.hero-list {
  display: grid;
  gap: 14px;
}

.hero-list li {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(241, 236, 231, 0.1);
  color: var(--text);
  line-height: 1.5;
}

.hero-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.section-grid,
.process-section,
.projects-section,
.contact-section {
  display: grid;
  gap: 18px;
}

.section-heading {
  display: grid;
  gap: 10px;
  padding: 0 6px;
}

.section-heading h2,
.contact-panel h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.08;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-radius: 14px;
  overflow: hidden;
}

.service-card {
  padding: 24px;
  border-right: 1px solid var(--border);
  min-height: 220px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.service-card:last-child {
  border-right: 0;
}

.service-card h3,
.process-card h3,
.project-surface h3 {
  font-size: 1.2rem;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-radius: 14px;
  overflow: hidden;
}

.process-card {
  padding: 24px;
  border-right: 1px solid var(--border);
  display: grid;
  gap: 16px;
}

.process-card:last-child {
  border-right: 0;
}

.process-card span {
  color: var(--accent-soft);
  font-weight: 600;
  font-size: 0.94rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.project-card {
  background: rgba(30, 32, 28, 0.98);
  min-height: 360px;
  padding: 24px;
  display: grid;
  align-content: space-between;
  gap: 20px;
}

.project-card.project-link {
  cursor: pointer;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.project-card.project-link:hover,
.project-card.project-link:focus-visible {
  background: rgba(40, 42, 37, 0.98);
  box-shadow: 0 8px 24px rgba(143, 155, 87, 0.15);
}

.project-card-featured {
  background:
    linear-gradient(180deg, rgba(143, 155, 87, 0.12), rgba(30, 32, 28, 0.98) 32%);
}

.project-surface {
  display: grid;
  gap: 16px;
}

.project-image-placeholder {
  min-height: 180px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(143, 155, 87, 0.11), rgba(143, 155, 87, 0.04)),
    #191b18;
  color: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  font-size: 0.96rem;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-meta li {
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 0.92rem;
}

.contact-panel {
  border-radius: 14px;
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.7fr);
  gap: 20px;
}

.contact-copy {
  display: grid;
  gap: 16px;
}

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

.contact-points li {
  color: var(--text);
  line-height: 1.5;
  padding-left: 18px;
  position: relative;
}

.contact-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.contact-actions {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 12px;
}

.site-footer {
  margin-top: 24px;
  border-radius: 14px;
  padding: 24px;
  display: grid;
  gap: 20px;
}

.footer-copy {
  display: grid;
  gap: 8px;
}

.footer-title {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

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

.platform-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #1a1715;
  color: var(--text);
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
}

.footer-base {
  color: #b0b5a5;
  font-size: 0.92rem;
}

.project-detail {
  display: grid;
  gap: 40px;
}

.project-detail-header {
  display: grid;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 32px;
}

.project-detail-header h1 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: 1.1;
  margin-top: 12px;
}

.project-detail-intro {
  font-size: 1.08rem;
  max-width: 70ch;
}

.back-link {
  color: var(--accent);
  font-size: 0.95rem;
  transition: color 160ms ease;
  display: inline-block;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--accent-soft);
}

.project-detail-content {
  display: grid;
  gap: 48px;
}

.detail-section {
  display: grid;
  gap: 16px;
}

.detail-section h2 {
  font-size: 1.6rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.detail-section p {
  max-width: 80ch;
  line-height: 1.7;
}

.feature-list,
.impact-list {
  display: grid;
  gap: 14px;
  max-width: 80ch;
}

.feature-list li,
.impact-list li {
  color: var(--text-soft);
  line-height: 1.65;
}

.feature-list li strong {
  color: var(--text);
}

.impact-list li strong {
  color: var(--text);
}

.tech-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.tech-section {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  background: var(--surface-soft);
}

.tech-section h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.tech-section ul {
  display: grid;
  gap: 8px;
}

.tech-section li {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
}

.project-detail-footer {
  display: grid;
  gap: 20px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
}

.project-detail-footer > div {
  display: grid;
  gap: 12px;
}

.project-detail-footer h2 {
  font-size: 1.4rem;
}

.project-detail-footer p {
  max-width: 70ch;
}

.about-section {
  display: grid;
  gap: 32px;
}

.about-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}

.about-header h1 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: 1.1;
}

.headshot {
  width: 240px;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(8, 9, 7, 0.25);
  float: right;
  margin: 0 0 24px 32px;
}

.about-content {
  display: block;
}

.about-block {
  display: block;
  margin-bottom: 40px;
}

.about-block h2 {
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 16px;
}

.about-block p {
  line-height: 1.7;
  margin: 0 0 12px 0;
}

.about-cta {
  border-top: 1px solid var(--border);
  padding-top: 32px;
  clear: both;
}

.about-cta h2 {
  font-size: 1.6rem;
}

@media (max-width: 1080px) {
  .hero,
  .service-grid,
  .process-grid,
  .platform-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(calc(100% - 20px), var(--max-width));
    padding-top: 12px;
  }

  .site-header,
  .hero,
  .contact-panel {
    padding: 20px;
  }

  .site-header,
  .contact-panel,
  .hero {
    grid-template-columns: 1fr;
    display: grid;
  }

  .site-nav,
  .hero-actions {
    gap: 10px 14px;
  }

  .hero-copy h1 {
    max-width: none;
    font-size: clamp(2.3rem, 12vw, 3.6rem);
  }

  .service-grid,
  .process-grid,
  .project-grid,
  .platform-grid {
    grid-template-columns: 1fr;
  }

  .service-card,
  .process-card {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .service-card:last-child,
  .process-card:last-child {
    border-bottom: 0;
  }

  .contact-panel {
    grid-template-columns: 1fr;
  }

  .project-detail {
    gap: 24px;
  }

  .project-detail-header {
    padding-bottom: 20px;
  }

  .project-detail-header h1 {
    font-size: clamp(1.8rem, 8vw, 3rem);
  }

  .detail-section h2 {
    font-size: 1.3rem;
  }

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

  .project-detail-footer {
    gap: 16px;
    padding-top: 24px;
  }

  .about-header {
    padding-bottom: 16px;
  }

  .about-header h1 {
    font-size: clamp(1.8rem, 8vw, 3rem);
  }

  .headshot {
    width: 100%;
    max-width: 280px;
    float: none;
    margin: 0 0 24px 0;
  }

  .about-block h2 {
    font-size: 1.2rem;
  }

  .about-cta {
    padding-top: 20px;
  }

  .about-cta h2 {
    font-size: 1.3rem;
  }
}
