/* Plus Jakarta Sans (variable, weights 200–800), self-hosted. License: fonts/OFL.txt (SIL OFL 1.1). */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Dark theme is the default; light theme comes from the system setting or the toggle. */
:root {
  --bg: #0a0c0f;
  --surface: #161a20;
  --border: #242a33;
  --text: #e9ecef;
  --muted: #8d95a0;
  --accent: #5eead4;
  --btn-bg: #5eead4;
  --btn-ink: #062b26;
  --btn-shadow: rgba(94, 234, 212, 0.45);
  --chip-bg: rgba(10, 12, 15, 0.6);
  --dot: rgba(255, 255, 255, 0.045);
  --glow-core: rgba(255, 255, 255, 0.085);
  --glow-mid: rgba(94, 234, 212, 0.045);
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f4f5f7;
  --surface: #e6e9ed;
  --border: #d8dce2;
  --text: #0d1117;
  --muted: #5b6470;
  --accent: #0d9488;
  --btn-bg: #0f766e;
  --btn-ink: #ffffff;
  --btn-shadow: rgba(15, 118, 110, 0.35);
  --chip-bg: rgba(255, 255, 255, 0.7);
  --dot: rgba(15, 23, 42, 0.07);
  --glow-core: rgba(255, 255, 255, 0.95);
  --glow-mid: rgba(94, 234, 212, 0.08);
  color-scheme: light;
}

/* Without JavaScript: follow the system setting */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f4f5f7;
    --surface: #e6e9ed;
    --border: #d8dce2;
    --text: #0d1117;
    --muted: #5b6470;
    --accent: #0d9488;
    --btn-bg: #0f766e;
    --btn-ink: #ffffff;
    --btn-shadow: rgba(15, 118, 110, 0.35);
    --chip-bg: rgba(255, 255, 255, 0.7);
    --dot: rgba(15, 23, 42, 0.07);
    --glow-core: rgba(255, 255, 255, 0.95);
    --glow-mid: rgba(94, 234, 212, 0.08);
    color-scheme: light;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 0);
  background-size: 24px 24px;
  color: var(--text);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s, color 0.25s;
}

/* Soft round glow behind the wordmark */
body::before {
  content: "";
  position: fixed;
  left: 50%;
  top: 46%;
  width: min(92vmin, 780px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-core) 0%, var(--glow-mid) 38%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

::selection {
  background: rgba(94, 234, 212, 0.3);
}

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

/* Top bar: language switch and theme toggle */
.topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 20px 20px 0;
}

.lang {
  display: flex;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}

.lang a {
  color: var(--muted);
  text-decoration: none;
  padding: 7px 9px;
  border-radius: 6px;
}

.lang a:hover {
  color: var(--text);
}

.lang a[aria-current] {
  color: var(--text);
  background: var(--surface);
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--text);
}

.theme-toggle[hidden] {
  display: none;
}

/* Show the icon of the theme a click switches to */
.icon-moon,
:root[data-theme="light"] .icon-sun {
  display: none;
}

:root[data-theme="light"] .icon-moon {
  display: block;
}

/* Centre stack: wordmark, services, contact */
.page {
  flex: 1;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 16px 6vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.wordmark {
  margin: 0;
  font-weight: 800;
  font-size: clamp(4.5rem, 22vw, 9.5rem);
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.cursor {
  color: var(--accent);
  margin-left: 0.02em;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }

  body {
    transition: none;
  }
}

.services {
  list-style: none;
  margin: 28px 0 44px;
  padding: 0;
  max-width: 30rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.services li {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--chip-bg);
}

.btn {
  display: inline-block;
  min-width: 11rem;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--btn-ink);
  background: var(--btn-bg);
  text-decoration: none;
  border-radius: 999px;
  padding: 16px 28px;
  box-shadow: 0 10px 40px -12px var(--btn-shadow);
  transition: filter 0.15s, transform 0.15s;
}

.btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.email {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.email:hover {
  color: var(--text);
}

.footer {
  text-align: center;
  padding: 24px 16px 28px;
  color: var(--muted);
  font-size: 12px;
}

/* 404 page */
.lost p {
  color: var(--muted);
  margin: 20px 0 28px;
}

.lost a {
  color: var(--accent);
}
