:root {
  --bg: #f7f4ef;
  --paper: #fffdfb;
  --ink: #1c1917;
  --muted: #57534e;
  --faint: #78716c;
  --line: rgba(28, 25, 23, 0.12);
  --accent: #c2410c;
  --accent-dark: #9a3412;
  --header: 4.6rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { margin: 0; min-height: 100%; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Manrope, sans-serif;
  letter-spacing: -0.011em;
  color: var(--ink);
  background:
    radial-gradient(ellipse 55% 40% at 100% 0%, rgba(194, 65, 12, 0.08), transparent 60%),
    var(--bg);
}

::selection { background: #fed7aa; color: var(--accent-dark); }

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

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(247, 244, 239, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

header,
.hero,
.section,
.contact {
  width: min(72rem, calc(100% - 3rem));
  margin-inline: auto;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 1.75rem;
  padding: 0.95rem 0;
}

.logo {
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.logo-word {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}

.logo-word span { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-width: 0;
}

.nav a {
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

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

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: none;
}

.lang {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.lang button {
  padding: 0.35rem 0.35rem;
  border: 0;
  background: none;
  color: var(--faint);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.lang button[aria-pressed="true"] { color: var(--accent); }

.lang button:hover { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); }

.btn-ghost {
  border-color: rgba(28, 25, 23, 0.18);
  color: var(--ink);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

main { flex: 1; }

.hero {
  padding: 4.25rem 0 3.5rem;
}

.kicker {
  margin: 0 0 0.9rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent);
}

h1, h2, h3, p { margin: 0; }

h1, h2, .work h3, .group h3, .project h3, .cert h3 {
  font-weight: 800;
  letter-spacing: -0.04em;
}

h1 {
  max-width: 12em;
  margin-bottom: 1.15rem;
  font-size: clamp(2.7rem, 5.4vw, 4.5rem);
  line-height: 1.02;
}

h1 span { color: var(--accent); }

.lead {
  max-width: 36rem;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  font-weight: 500;
  line-height: 1.6;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.actions .btn { min-height: 2.9rem; padding: 0.75rem 1.2rem; }

.hero,
.section,
.contact { scroll-margin-top: 5.25rem; }

.section {
  padding: 4.25rem 0;
  border-top: 1px solid var(--line);
}

.section-head { max-width: 40rem; margin-bottom: 2.1rem; }

h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  line-height: 1.1;
}

.section-head .lead { margin-top: 0.85rem; }

.prose {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem 3.5rem;
}

.prose div { display: grid; gap: 1.15rem; align-content: start; }

.prose p {
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.7;
}

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

.work article {
  min-width: 0;
  padding: 1.35rem 1.25rem 1.45rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.num {
  display: block;
  margin-bottom: 0.7rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.work h3,
.group h3,
.project h3,
.cert h3 { font-size: 1.2rem; line-height: 1.25; }

.work p,
.cert p,
.project p,
.note {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.6;
}

.groups { display: grid; }

.group {
  display: grid;
  grid-template-columns: minmax(13rem, 18rem) minmax(0, 1fr);
  gap: 1rem 2.5rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
}

.group .note { margin-top: 0.4rem; color: var(--faint); font-size: 0.92rem; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  align-content: flex-start;
  min-width: 0;
}

.chips li {
  max-width: 100%;
  padding: 0.32rem 0.65rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
}

.cert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.35rem 1.6rem;
  align-items: center;
  max-width: 46rem;
  padding: 1.15rem 1.2rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.cert img {
  width: 7rem;
  height: 7rem;
  object-fit: contain;
}

.eyebrow {
  margin-bottom: 0.35rem;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.issuer {
  margin-top: 0.25rem;
  color: var(--faint);
  font-size: 0.92rem;
  font-weight: 600;
}

.projects { display: grid; gap: 0.85rem; }

.project {
  display: block;
  min-width: 0;
  padding: 1.35rem 1.35rem 1.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1rem;
  color: inherit;
  text-decoration: none;
}

.project:hover { border-color: rgba(194, 65, 12, 0.45); }
.project:hover h3 { color: var(--accent-dark); }

.project-link {
  display: inline-flex;
  margin-top: 0.9rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.more {
  display: inline-flex;
  margin-top: 1.35rem;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.more:hover { color: var(--accent-dark); }

.contact {
  padding: 4rem 0 2.4rem;
  border-top: 1px solid var(--line);
}

.contact h2 { letter-spacing: -0.04em; }

.contact .lead { margin-top: 0.85rem; }

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.8rem;
}

.fact {
  display: block;
  padding: 1.15rem 1.15rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.fact:hover { border-color: rgba(194, 65, 12, 0.45); }

.fact small {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--faint);
  font-size: 0.75rem;
  font-weight: 600;
}

.fact strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.fact:hover strong { color: var(--accent-dark); }

.fact-action {
  display: inline-block;
  margin-top: 0.65rem;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 600;
}

.fact.is-copied .fact-action { color: #15803d; }

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.5rem;
  margin-top: 1.8rem;
  color: var(--faint);
  font-size: 0.82rem;
  font-weight: 500;
}

.foot a { color: inherit; text-decoration: none; }
.foot a:hover { color: var(--accent-dark); }

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
}

@media (max-width: 980px) {
  header { flex-wrap: wrap; }
  .nav {
    order: 3;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
  }
  .hero { padding-top: 2.5rem; }
  .work { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  header,
  .hero,
  .section,
  .contact { width: min(72rem, calc(100% - 2rem)); }
  .actions { flex-direction: column; }
  .actions .btn { width: 100%; }
  .prose,
  .work,
  .facts,
  .group,
  .cert { grid-template-columns: 1fr; }
  .section { padding: 3.25rem 0; }
  .hero,
  .section,
  .contact { scroll-margin-top: 7.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
