:root {
  --bg: #0b1220;
  --surface: #111a2c;
  --line: #1f2b44;
  --text: #e8edf7;
  --muted: #8f9bb3;
  --accent: #8fa8ff;
  --sand: #ecdcb8;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "DM Sans", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }

/* Scrollbar */
html { scrollbar-color: #2a3a5c var(--bg); scrollbar-width: thin; }
@supports selector(::-webkit-scrollbar) {
  html { scrollbar-color: auto; scrollbar-width: auto; }
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: var(--bg); }
  ::-webkit-scrollbar-thumb {
    background: #2a3a5c;
    border-radius: 999px;
    border: 2px solid var(--bg);
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--accent); }
}

html { color-scheme: dark; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }

/* Header */
header { padding: 1.5rem 0; }
header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.05rem; text-decoration: none; letter-spacing: 0.01em; }
.brand span { color: var(--accent); }
nav { display: flex; gap: 1.75rem; }
nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; transition: color .2s; }
nav a:hover { color: var(--text); }

/* Hero */
.hero {
  position: relative;
  padding: clamp(4rem, 12vw, 9rem) 0 clamp(4rem, 10vw, 7rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .35;
  mask-image: radial-gradient(ellipse 70% 80% at 30% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hello { color: var(--muted); margin-bottom: 1rem; font-size: 1.1rem; }
h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(4.5rem, 18vw, 13rem);
  line-height: .88;
  letter-spacing: -0.045em;
  background: linear-gradient(180deg, var(--text) 30%, #7f8fb8 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.tagline {
  margin-top: 2rem;
  max-width: 34ch;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  line-height: 1.3;
  color: var(--sand);
}
.hero-actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: .85rem; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.4rem;
  border-radius: 999px;
  font: 500 1rem var(--body);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .2s, border-color .2s, transform .2s;
}
.btn-primary { background: var(--accent); color: #0b1220; }
.btn-primary:hover { background: #a8bbff; }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); }

/* One orchestrated load moment */
.rise { opacity: 0; transform: translateY(18px); animation: rise .8s cubic-bezier(.2,.7,.2,1) forwards; }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .18s; } .d3 { animation-delay: .34s; } .d4 { animation-delay: .5s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Sections */
section { padding: clamp(4rem, 9vw, 7rem) 0; border-top: 1px solid var(--line); }
h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
}
.about-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about-copy p { max-width: 62ch; color: #c5cee0; }
.about-copy p + p { margin-top: 1.1rem; }

.facts {
  margin-top: 2.5rem;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.fact { background: var(--surface); padding: 1.25rem 1.4rem; }
.fact dt { color: var(--muted); font-size: .9rem; }
.fact dd { font-family: var(--display); font-weight: 700; font-size: 1.2rem; margin-top: .2rem; }

/* Contact */
.contact { background: var(--surface); }
.contact p.lead { color: var(--muted); max-width: 44ch; margin-bottom: 2.25rem; }
.email-line {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 6.2vw, 4rem);
  letter-spacing: -0.03em;
  text-decoration: none;
  overflow-wrap: anywhere;
  border-bottom: 2px solid var(--accent);
  padding-bottom: .15em;
  transition: color .2s;
}
.email-line:hover { color: var(--accent); }
.contact-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .85rem; align-items: center; }
#copyStatus { color: var(--accent); font-size: .95rem; min-height: 1.4em; }

footer { padding: 2rem 0 3rem; color: var(--muted); font-size: .92rem; border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .75rem; }

@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
  nav { gap: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* Tools */
.section-lead { color: var(--muted); max-width: 48ch; margin: -0.5rem 0 2.25rem; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.tool-card {
  display: flex; flex-direction: column; gap: .5rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  transition: border-color .2s, transform .2s;
}
.tool-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.tool-card h3 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; }
.tool-card p { color: var(--muted); font-size: .98rem; flex: 1; }
.tool-card .tool-link { color: var(--accent); font-size: .95rem; margin-top: .5rem; }
.tool-empty {
  grid-column: 1 / -1;
  padding: 2rem;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
}
