:root {
  --bg: #f4f4f2;
  --glow-a: rgba(120,150,255,0.16);
  --glow-b: rgba(255,190,140,0.14);
  --ink: #1b1b19;
  --ink-2: #4a4a45;
  --ink-3: #66665f;
  --card: rgba(255,255,255,0.62);
  --card-hover: rgba(255,255,255,0.86);
  --hairline: rgba(0,0,0,0.10);
  --hairline-strong: rgba(0,0,0,0.18);
  --chip: rgba(0,0,0,0.05);
  --accent: oklch(0.52 0.14 248);
  --shadow: 0 1px 1px rgba(0,0,0,0.04), 0 6px 18px -8px rgba(0,0,0,0.16);
  --shadow-hover: 0 1px 1px rgba(0,0,0,0.05), 0 16px 34px -14px rgba(0,0,0,0.26);

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.22,0.9,0.3,1);
  --glass: saturate(180%) blur(20px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101012;
    --glow-a: rgba(90,120,255,0.20);
    --glow-b: rgba(255,150,90,0.10);
    --ink: #f2f2ef;
    --ink-2: #b6b6b0;
    --ink-3: #97978f;
    --card: rgba(255,255,255,0.055);
    --card-hover: rgba(255,255,255,0.10);
    --hairline: rgba(255,255,255,0.11);
    --hairline-strong: rgba(255,255,255,0.22);
    --chip: rgba(255,255,255,0.09);
    --accent: oklch(0.76 0.13 248);
    --shadow: 0 1px 1px rgba(0,0,0,0.5), 0 10px 26px -12px rgba(0,0,0,0.7);
    --shadow-hover: 0 1px 1px rgba(0,0,0,0.55), 0 20px 40px -16px rgba(0,0,0,0.8);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #101012;
  --glow-a: rgba(90,120,255,0.20);
  --glow-b: rgba(255,150,90,0.10);
  --ink: #f2f2ef;
  --ink-2: #b6b6b0;
  --ink-3: #97978f;
  --card: rgba(255,255,255,0.055);
  --card-hover: rgba(255,255,255,0.10);
  --hairline: rgba(255,255,255,0.11);
  --hairline-strong: rgba(255,255,255,0.22);
  --chip: rgba(255,255,255,0.09);
  --accent: oklch(0.76 0.13 248);
  --shadow: 0 1px 1px rgba(0,0,0,0.5), 0 10px 26px -12px rgba(0,0,0,0.7);
  --shadow-hover: 0 1px 1px rgba(0,0,0,0.55), 0 20px 40px -16px rgba(0,0,0,0.8);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }

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

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

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

/* Layout */

.page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(24px,5vw,72px) clamp(20px,5vw,48px) 72px;
  display: flex;
  justify-content: center;
}

.glow {
  position: absolute;
  top: -260px;
  left: 50%;
  transform: translateX(-58%);
  width: 900px;
  height: 640px;
  background:
    radial-gradient(48% 46% at 40% 40%, var(--glow-a) 0%, transparent 70%),
    radial-gradient(42% 40% at 68% 30%, var(--glow-b) 0%, transparent 72%);
  filter: blur(26px);
  pointer-events: none;
}

.container {
  position: relative;
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: clamp(36px,6vw,64px);
  animation: riseIn 0.6s var(--ease) both;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.glass {
  background: var(--card);
  border: 1px solid var(--hairline);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  box-shadow: var(--shadow);
}

/* Theme switch */

.toolbar { display: flex; justify-content: flex-end; }

.theme-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
}

.theme-switch button {
  appearance: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--ink-3);
  background: transparent;
  transition: background 0.25s ease, color 0.25s ease;
}

/* Enlarge the touch area without changing how the switch looks */
.theme-switch button { position: relative; }
.theme-switch button::after { content: ""; position: absolute; inset: -9px 0; }

.theme-switch button[aria-pressed="true"] {
  font-weight: 600;
  color: var(--ink);
  background: var(--card-hover);
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}

/* Header */

.intro { display: flex; flex-direction: column; gap: 24px; }

.identity { display: flex; align-items: center; gap: 16px; }

.avatar {
  width: 76px;
  height: 76px;
  flex: none;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
  object-fit: cover;
}

h1 {
  margin: 0;
  font-size: clamp(32px,5.6vw,52px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.028em;
  text-wrap: pretty;
  max-width: 18ch;
}

@media (max-width: 359px) {
  h1 { font-size: 29px; }
}

.lede {
  margin: 0;
  font-size: clamp(17px,2.2vw,19.5px);
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 56ch;
  text-wrap: pretty;
}

/* Sections */

.main,
.container { gap: clamp(36px,6vw,64px); }

.main { display: flex; flex-direction: column; }

.section { display: flex; flex-direction: column; gap: 18px; }

.section-heading { margin: 0; font-weight: 400; }

.lift {
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease, background 0.3s ease;
}

.lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  background: var(--card-hover);
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 420px) {
  .cards { gap: 10px; }
  .cards .card { padding: 16px 16px 18px; }
}

.card {
  border-radius: 18px;
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-icon { height: 22px; display: flex; align-items: center; color: var(--accent); }
.card-icon svg { flex: none; }

.card-title { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.012em; }

.card-text,
.link-text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-3);
  text-wrap: pretty;
}

.links { display: flex; flex-direction: column; gap: 12px; }

.link-card {
  display: flex;
  align-items: center;
  gap: 18px;
  border-radius: 20px;
  padding: 22px 24px;
  color: inherit;
}

.link-card:hover { color: inherit; }

.app-icon {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 12px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.18));
}

.link-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }

.link-heading { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.link-title { font-size: 17.5px; font-weight: 600; letter-spacing: -0.015em; }

.link-url {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--chip);
  border-radius: 999px;
  padding: 4px 10px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

@media (max-width: 520px) {
  .link-card { flex-direction: column; align-items: flex-start; gap: 12px; }

  /* App cards: icon + name as a header row, description and URL full width below */
  .link-card.has-icon {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 14px;
    row-gap: 0;
    align-items: center;
  }
  .link-card.has-icon .link-body { display: contents; }
  .link-card.has-icon .app-icon { width: 44px; height: 44px; border-radius: 10px; }
  .link-card.has-icon .link-text { grid-column: 1 / -1; margin-top: 14px; }
  .link-card.has-icon .link-url { grid-column: 1 / -1; margin-top: 12px; }
}

/* Footer */

.footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-top: 1px solid var(--hairline);
  padding-top: 28px;
}

.pills { display: flex; flex-wrap: wrap; gap: 10px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 16px;
  transition: transform 0.25s var(--ease), background 0.25s ease, box-shadow 0.25s ease;
}

.pill svg { flex: none; color: var(--ink-2); }

.pill:hover {
  color: var(--ink);
  transform: translateY(-1px);
  background: var(--card-hover);
  box-shadow: var(--shadow-hover);
}

.nowrap { white-space: nowrap; }

@media (pointer: coarse) {
  .pill { padding-block: 12px; }
}

.copyright { margin: 8px 0 0; font-size: 13px; color: var(--ink-3); }
