/* === breakneck.su — landing card ===
   Color tokens mirror cv.breakneck.su (swiss palette).
   Light by default, [data-theme="dark"] flips to dark. */

:root,
[data-theme="light"] {
  --bg: #fafaf7;
  --fg: #0f0f0f;
  --accent: #bd451f;       /* darkened from #d1502b → contrast 5.0:1 (was 4.10) */
  --rule: #e8e4db;
  --mono: #6a665e;
  --mono-faded: #706a64;   /* darkened from #7a7470 → contrast 5.1:1 (was 4.32) */
  --pill-bg: #0f0f0f;
  --pill-fg: #fafaf7;
  --contact-underline: #c8c2b4;
}

[data-theme="dark"] {
  --bg: #0f0e0c;
  --fg: #ededeb;
  --accent: #e86a3e;
  --rule: #2a2822;
  --mono: #a8a39a;
  --mono-faded: #8a8680;
  --pill-bg: #ededeb;
  --pill-fg: #0f0e0c;
  --contact-underline: #3d3a36;
}

* {
  box-sizing: border-box;
}

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

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

body {
  /* white frame around the page card (matches cv.breakneck.su). */
  background: #ffffff;
  padding: 8px;
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 14px;
  line-height: 1.55;
}

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

/* === Layout === */

.page {
  background: var(--bg);
  color: var(--fg);
  border-radius: 6px;
  overflow: hidden;
  min-height: calc(100vh - 16px);
  min-height: calc(100dvh - 16px);
  display: grid;
  place-items: center;
  padding: 64px 24px;
  position: relative;
  transition: background 0.2s ease, color 0.2s ease;
}

.card {
  text-align: center;
  max-width: 640px;
  width: 100%;
}

/* === Role line ("System administrator <for_hiring>") === */

.role {
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mono-faded);
  margin: 0 0 16px;
}

.role .tag {
  color: var(--accent);
  font-weight: 500;
  margin-left: 4px;
  display: inline-block;
  border-bottom: 1px dashed transparent;
  padding: 6px 6px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.role .tag:hover,
.role .tag:focus-visible {
  border-bottom-color: var(--accent);
}

/* === Name === */

.name {
  font-size: clamp(40px, 9vw, 88px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  word-spacing: 0.1em;
  font-weight: 700;
  margin: 0 0 32px;
  color: var(--fg);
}

/* === Big numeric code (404 etc.) === */

.code {
  font-size: clamp(96px, 22vw, 220px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--fg);
  font-feature-settings: "ss01", "tnum" 1;
}

/* === Contact links === */

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 8px;
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--contact-underline);
  color: var(--fg);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  border-radius: 2px;
}

.links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* === Theme toggle === */

.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
  background: var(--bg);
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.theme-toggle button {
  background: transparent;
  border: 0;
  padding: 10px 12px;
  min-height: 40px;
  color: var(--mono);
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}

.theme-toggle button[aria-pressed="true"] {
  background: var(--fg);
  color: var(--bg);
}

.theme-toggle button:hover:not([aria-pressed="true"]) {
  color: var(--fg);
}

.theme-toggle button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* === Mobile === */

@media (max-width: 480px) {
  .page {
    padding: 48px 20px;
  }

  .theme-toggle {
    top: 12px;
    right: 12px;
  }

  .role {
    font-size: 11px;
    letter-spacing: 0.14em;
  }

  .name {
    margin-bottom: 28px;
  }

  .links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid var(--rule);
  }

  .links a {
    justify-content: center;
    border-bottom: 1px solid var(--rule);
    padding: 14px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
