:root {
  --sheet: #dce6ef;
  --ink: #1a3348;
  --muted: #5a7388;
  --line: #a9c0d2;
  --grid: rgba(36, 88, 138, 0.09);
  --accent: #24629a;
  --fill: rgba(255, 255, 255, 0.38);
  --max-width: 880px;
  --font: "Overpass", "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  --sheet: #0c2a4a;
  --ink: #e8f3fa;
  --muted: #9bb8cc;
  --line: #3d6f94;
  --grid: rgba(150, 210, 235, 0.08);
  --accent: #8fd0ea;
  --fill: rgba(8, 32, 58, 0.4);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--sheet);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  transition: background-color 0.45s ease, color 0.45s ease;
}

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

.sheet {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
}

.page {
  position: relative;
  z-index: 1;
  margin: 14px;
  min-height: calc(100vh - 28px);
  border: 1px solid var(--line);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.6rem 1.5rem 0.4rem;
}

.logo {
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.theme-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
}

.theme-opt {
  padding: 0.45rem 0.75rem;
  transition: background-color 0.25s ease, color 0.25s ease;
}

[data-theme="light"] .theme-opt-light,
[data-theme="dark"] .theme-opt-dark {
  background: var(--accent);
  color: var(--sheet);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}

.hero {
  padding: 3.4rem 0 3rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
  clip-path: inset(0 100% 0 0);
  animation: plot-name 1s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.tagline {
  font-size: 1.2rem;
  max-width: 36rem;
  margin: 0 0 0.55rem;
  animation: rise 0.7s ease 0.35s both;
}

.hero-sub {
  color: var(--muted);
  max-width: 34rem;
  margin: 0 0 1.8rem;
  animation: rise 0.7s ease 0.5s both;
}

.cta {
  display: inline-block;
  color: var(--sheet);
  background: var(--accent);
  text-decoration: none;
  font-weight: 600;
  padding: 0.7rem 1.25rem;
  animation: rise 0.7s ease 0.65s both;
}

.cta:hover {
  filter: brightness(1.06);
}

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

.section h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 1.35rem;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 920px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--fill);
  border: 1px solid var(--line);
  padding: 1.15rem 1.1rem 1.2rem;
  animation: rise 0.55s ease calc(0.06s * var(--i) + 0.05s) both;
}

.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.04rem;
  font-weight: 600;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.card:hover {
  border-color: var(--accent);
}

.note {
  max-width: 40rem;
  margin: 0;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  margin: 0;
}

.contact-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.contact-links a:hover {
  text-decoration: underline;
}

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

@keyframes plot-name {
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

  .hero h1,
  .tagline,
  .hero-sub,
  .cta,
  .card {
    animation: none;
    clip-path: none;
    opacity: 1;
    transform: none;
  }
}
