/* Headline font, self-hosted (SIL Open Font License, see fonts/LICENSE-bricolage-grotesque.txt). */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bg: #0a0c12;
  --surface: #12151f;
  --surface-2: #181c29;
  --border: #252a3a;
  --text: #eef0f6;
  --muted: #9aa0b4;
  --blue: #4f8cff;
  --violet: #a46bff;
  --mint: #3ee6b5;
  --gradient: linear-gradient(100deg, var(--blue), var(--violet) 55%, var(--mint));
  --radius: 1.25rem;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  backdrop-filter: blur(12px);
  background: rgb(10 12 18 / 0.6);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav nav { display: flex; align-items: center; gap: 1.5rem; font-size: 0.95rem; }
.nav nav a { color: var(--muted); text-decoration: none; transition: color 0.15s; }
.nav nav a:hover { color: var(--text); }
.nav nav .nav-cta {
  color: var(--text);
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

main { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

/* Hero */
.hero { padding: 6rem 0 5rem; max-width: 52rem; }
.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}
h1, h2, h3, .project-title { font-family: var(--display); }
h1 {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 750;
}
h1 em, h2 em { font-style: normal; color: var(--blue); }
.lead { margin: 1.5rem 0 0; max-width: 40rem; color: var(--muted); font-size: 1.2rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.5rem; }
.button {
  display: inline-block;
  padding: 0.9rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.button:hover { transform: translateY(-2px); border-color: #3a4160; }
.button.primary {
  border-color: transparent;
  background: var(--gradient);
  color: #0a0c12;
  box-shadow: 0 10px 30px -10px rgb(124 120 255 / 0.7);
}
.button.primary:hover { box-shadow: 0 14px 36px -10px rgb(124 120 255 / 0.9); }

/* Sections */
.section { padding: 5rem 0; }
h2 {
  margin: 0 0 2.5rem;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 750;
}

/* Services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.service {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.service.featured { border-color: rgb(79 140 255 / 0.55); }
.service h3 { margin: 1.25rem 0 0.5rem; font-size: 1.3rem; letter-spacing: -0.015em; }
.service p { margin: 0 0 1.5rem; color: var(--muted); flex: 1; }
.icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  background: rgb(79 140 255 / 0.12);
  color: var(--blue);
}
.icon svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mail { color: var(--text); font-weight: 600; font-size: 0.95rem; text-underline-offset: 4px; text-decoration-color: var(--blue); overflow-wrap: anywhere; }
.mail:hover { color: var(--blue); }

/* Projects */
.projects { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.project {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.project:hover, .project:focus-visible {
  transform: translateY(-4px);
  border-color: #3a4160;
  box-shadow: 0 20px 50px -20px rgb(79 140 255 / 0.45);
}
.project:focus-visible, .button:focus-visible, .contact-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.project-shot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border-bottom: 1px solid var(--border);
}
.project-body { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.5rem 1.75rem 1.75rem; }
.project-title { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.015em; }
.project-text { color: var(--muted); }
.project-url { margin-top: 0.5rem; color: var(--blue); font-weight: 600; font-size: 0.95rem; }

/* Contact */
.contact {
  margin: 3rem 0 4rem;
  padding: 4rem 3rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  background: var(--surface);
  text-align: center;
}
.contact h2 { margin-bottom: 0; }
.contact .lead { margin: 1rem auto 0; }
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; max-width: 44rem; margin: 2.5rem auto 0; }
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgb(10 12 18 / 0.55);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.contact-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.contact-label { color: var(--muted); font-size: 0.9rem; }
.contact-mail { font-weight: 700; overflow-wrap: anywhere; }

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

/* Small screens */
@media (max-width: 860px) {
  .services, .projects, .contact-grid { grid-template-columns: 1fr; }
  .hero { padding: 3.5rem 0 3rem; }
  .section { padding: 3.5rem 0; }
  .contact { padding: 3rem 1.25rem; }
}
@media (max-width: 520px) {
  .nav nav a:not(.nav-cta) { display: none; }
  .brand span { font-size: 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .project, .contact-card { transition: none; }
  .button:hover, .project:hover, .contact-card:hover { transform: none; }
}
