/* Launier Central — site styles. Design tokens live in :root / [data-theme="dark"]. */

:root {
  color-scheme: light;
  --bg: #dfe6ea;
  --surface: #ffffff;
  --ink: #16232c;
  --muted: #5d6d78;
  --accent: #0e7490;
  --accent-dark: #0b5569;
  --accent-soft: #e7f4f7;
  --accent-active: #d4ebf0;
  --on-accent: #ffffff;
  --border: #e3e9ed;
  --avatar-frame: #ffffff;
  --avatar-bg: #dce5ea;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow-md: 0 6px 12px -4px rgba(16, 24, 40, 0.12), 0 16px 32px -12px rgba(16, 24, 40, 0.18);
  --radius: 16px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f171d;
  --surface: #182229;
  --ink: #e4ecf1;
  --muted: #8fa1ad;
  --accent: #3fb3d1;
  --accent-dark: #8fd7e8;
  --accent-soft: #14303b;
  --accent-active: #1c3f4d;
  --on-accent: #062028;
  --border: #27343e;
  --avatar-frame: #182229;
  --avatar-bg: #22313b;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 12px -4px rgba(0, 0, 0, 0.45), 0 16px 32px -12px rgba(0, 0, 0, 0.55);
}

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

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

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection { background: var(--accent); color: var(--on-accent); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: url("/images/niagara.jpg") center 32% / cover no-repeat #0b3c4c;
  color: #fff;
  text-align: center;
  padding: clamp(3rem, 9vw, 5.25rem) 1.5rem 5.5rem;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
    rgba(7, 29, 39, 0.74) 0%,
    rgba(7, 29, 39, 0.48) 55%,
    rgba(7, 29, 39, 0.68) 100%);
}

.hero-content { max-width: 44rem; margin: 0 auto; }

.hero h1 {
  margin: 0;
  font-size: clamp(2.15rem, 4.5vw + 1rem, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
}

.tagline {
  margin: 0.9rem auto 0;
  max-width: 40rem;
  font-size: clamp(1rem, 1.2vw + 0.7rem, 1.2rem);
  color: rgba(255, 255, 255, 0.88);
  text-wrap: balance;
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: 66rem;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
  flex: 1;
}

.avatar {
  display: block;
  width: min(260px, 64vw);
  height: auto;
  aspect-ratio: 577 / 336;
  object-fit: cover;
  margin: -4rem auto 0;
  position: relative;
  z-index: 1;
  border: 5px solid var(--avatar-frame);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  background: var(--avatar-bg);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2.5vw, 1.6rem);
  margin: clamp(1.75rem, 4vw, 2.75rem) 0;
}

@media (min-width: 900px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .card--wide { grid-column: 1 / -1; }
}

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.05rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.card-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 0.7rem;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.card-icon svg { width: 1.2rem; height: 1.2rem; }

.card h2 {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---------- Link rows ---------- */

.links {
  list-style: none;
  margin: 0;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.card--wide .links { display: grid; gap: 0.15rem 0.5rem; }

@media (min-width: 640px) {
  .card--wide .links { grid-template-columns: 1fr 1fr; }
}

.link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 3rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.98rem;
  transition: background-color 0.15s ease;
}

.link-icon {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  color: var(--muted);
  transition: color 0.15s ease;
}

.link-label { flex: 1; min-width: 0; }

.link-ext {
  flex: none;
  width: 1rem;
  height: 1rem;
  color: var(--accent);
  opacity: 0.45;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.link:hover { background: var(--accent-soft); }
.link:hover .link-icon { color: var(--accent-dark); }
.link:hover .link-label { color: var(--accent-dark); }
.link:hover .link-ext { opacity: 1; transform: translate(1px, -1px); }

.link:active { background: var(--accent-active); }

.link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  background: var(--accent-soft);
}

/* ---------- Theme toggle ---------- */

.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover { color: var(--accent-dark); border-color: var(--accent); }

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

.theme-toggle svg { width: 1.15rem; height: 1.15rem; }

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

/* ---------- Footer ---------- */

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0.5rem 1rem 2.25rem;
}

.footer p { margin: 0; }

/* ---------- Entrance animation ---------- */

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

.hero-content { animation: rise 0.6s ease both; }
.avatar { animation: rise 0.6s 0.08s ease both; }
.grid > :nth-child(1) { animation: rise 0.55s 0.12s ease both; }
.grid > :nth-child(2) { animation: rise 0.55s 0.2s ease both; }
.grid > :nth-child(3) { animation: rise 0.55s 0.28s ease both; }

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

/* ---------- Small screens ---------- */

@media (max-width: 480px) {
  .hero { padding: 2.6rem 1.25rem 4.75rem; }
  .avatar { margin-top: -3.5rem; border-width: 4px; border-radius: 14px; }
  .card-head { padding: 0.95rem 1.05rem; }
  .link { min-height: 3.1rem; }
}
