:root {
  --bg: #0b0f14;
  --bg-2: #111821;
  --line: #1f2a37;
  --text: #e6edf3;
  --muted: #8b98a7;
  --accent: #3ddc97;
  --accent-2: #4cc2ff;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f9fb;
    --bg-2: #ffffff;
    --line: #dde3ea;
    --text: #0f1720;
    --muted: #5a6776;
    --accent: #0f9d63;
    --accent-2: #0a7fc2;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

.accent { color: var(--accent); }
.mono { font-family: var(--mono); }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand { font-family: var(--mono); font-weight: 500; }
.nav nav { display: flex; gap: 24px; }
.nav nav a { color: var(--muted); font-size: 14px; transition: color .15s; }
.nav nav a:hover { color: var(--text); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 60px);
  padding-top: 48px;
  padding-bottom: 48px;
}
.prompt {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 12px;
}
.prompt::after {
  content: "▋";
  margin-left: 4px;
  color: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

h1 {
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}
.lede {
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--muted);
  max-width: 34ch;
  margin: 0 0 28px;
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.tags span {
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--bg-2);
}
.cta { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 500;
  font-size: 15px;
  background: var(--bg-2);
  transition: border-color .15s, transform .15s;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #04130c; }
.btn.primary:hover { filter: brightness(1.08); }

/* Topology */
.topology { width: 100%; max-width: 380px; justify-self: center; }
.topology .links line { stroke: var(--line); stroke-width: 1.5; }
.topology .nodes rect,
.topology .nodes circle {
  fill: var(--bg-2);
  stroke: var(--accent-2);
  stroke-width: 1.5;
}
.topology .packets circle { fill: var(--accent); }
.topology .labels text {
  font-family: var(--mono);
  font-size: 9px;
  fill: var(--muted);
  text-anchor: middle;
  dominant-baseline: middle;
}

/* Sections */
.section { padding-top: 88px; padding-bottom: 32px; scroll-margin-top: 40px; }
h2 {
  font-size: 28px;
  letter-spacing: -0.02em;
  margin: 0 0 32px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.num { font-family: var(--mono); font-size: 14px; color: var(--accent); font-weight: 400; }

.about { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.about p { margin: 0; color: var(--muted); font-size: 17px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  transition: border-color .15s;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.card h3 { margin: 14px 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.icon svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.timeline > li {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 0 0 32px 28px;
  position: relative;
}
.timeline > li::before {
  content: "";
  position: absolute;
  left: -5px; top: 7px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}
.when { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 3px; }
.what h3 { margin: 0 0 4px; font-size: 18px; }
.what .at { color: var(--muted); font-weight: 400; }
.what p { margin: 0; color: var(--muted); }
.roles { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.roles li { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.roles .role { color: var(--text); }
.roles .dates { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.roles .past .role { color: var(--muted); }

/* Contact */
.contact {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
}
.contact-lede { color: var(--muted); font-size: 17px; margin: 0 0 28px; max-width: 36ch; }
.contact-alt { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.contact-links { display: flex; gap: 12px; flex-wrap: wrap; }

.contact-form {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 48px -24px rgb(0 0 0 / .45);
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 60%, var(--bg-2));
}
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.window-title { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

.window-body { display: grid; gap: 18px; padding: 24px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field span { font-size: 13px; font-weight: 500; color: var(--muted); }
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); opacity: .55; }
.field textarea { resize: vertical; min-height: 140px; }
.field input:hover,
.field textarea:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.contact-form .hp { position: absolute; left: -9999px; }

.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.contact-form button { cursor: pointer; font-family: inherit; }
.contact-form button:disabled { opacity: .6; cursor: wait; transform: none; }
.form-status { margin: 0; font-size: 13px; color: var(--muted); }
.form-status.ok { color: var(--accent); }
.form-status.err { color: #e5484d; }

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  padding-top: 64px;
  padding-bottom: 40px;
  color: var(--muted);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 64px; }
  .topology { max-width: 300px; order: -1; }
  .about, .cards { grid-template-columns: 1fr; }
  .timeline > li { grid-template-columns: 1fr; gap: 4px; }
  .contact, .field-row { grid-template-columns: 1fr; }
  .contact { gap: 32px; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .window-body { padding: 18px; }
  .form-actions .btn { width: 100%; text-align: center; }
  .nav nav { gap: 14px; }
  .nav nav a { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .prompt::after { animation: none; }
  .topology .packets { display: none; }
}
