/* Transitrix — GitHub Pages */
:root {
  --bg: #0c0f12;
  --surface: #14191f;
  --border: #243040;
  --text: #e8eef4;
  --muted: #8b99ab;
  --accent: #3dd6c8;
  --accent-dim: #2a9d8f;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
}

[data-theme="light"] {
  --bg: #f0f4f8;
  --surface: #ffffff;
  --border: #c8d4df;
  --text: #1c2b3a;
  --muted: #5a6a7a;
  --accent: #2a9d8f;
  --accent-dim: #1d7a6e;
}

[data-theme="light"] body {
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -40%, rgba(42, 157, 143, 0.06), transparent),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(29, 122, 110, 0.04), transparent);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -40%, rgba(61, 214, 200, 0.12), transparent),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(42, 157, 143, 0.08), transparent);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--text);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.wrap {
  width: min(56rem, 92vw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  padding: 1.75rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(0.875rem * 1.65 + 0.7rem);
  height: calc(0.875rem * 1.65 + 0.7rem);
  padding: 0;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}

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

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

.gateway-theme-toggle {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 10;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

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

.lang-switch {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.lang-switch a {
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
}

.lang-switch a[aria-current="true"] {
  border-color: var(--accent-dim);
  color: var(--accent);
  background: rgba(61, 214, 200, 0.08);
}

.lang-switch a:hover:not([aria-current="true"]) {
  border-color: var(--muted);
  color: var(--text);
}

main {
  padding: 3rem 0 4rem;
}

.hero {
  margin-bottom: 3.5rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 550;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  max-width: 20ch;
}

.lede {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 38rem;
  margin: 0;
}

.lede-sub {
  font-size: 1rem;
  color: var(--muted);
  max-width: 38rem;
  margin: 0.75rem 0 0;
  opacity: 0.8;
}

.section-intro {
  font-size: 1rem;
  color: var(--muted);
  margin: -0.75rem 0 1.5rem;
}

section {
  margin-bottom: 3rem;
}

section h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
  color: var(--text);
}

section > p {
  color: var(--muted);
  max-width: 44rem;
  margin: 0 0 1rem;
}

.project-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

.stack-grid {
  display: grid;
  gap: 1.25rem;
}

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

.card-meta {
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.35rem 1.35rem 1.5rem;
  height: 100%;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: rgba(61, 214, 200, 0.35);
  transform: translateY(-2px);
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
  color: var(--accent);
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.card .soon {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.85;
}

.site-footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Language gateway */
.gateway {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.25rem;
}

.gateway h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.gateway .tag {
  color: var(--muted);
  font-size: 1rem;
  margin: 0 0 2.5rem;
  max-width: 28rem;
}

.gateway-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.gateway-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 10rem;
  padding: 0.95rem 1.5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.gateway-links a:hover {
  border-color: var(--accent-dim);
  background: rgba(61, 214, 200, 0.07);
}

.gateway-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
