/* Self-hosted Manrope (latin subset, variable 200-800). Served locally with
   preload so no render-blocking request to Google Fonts is needed. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("assets/fonts/manrope-latin.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;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  color-scheme: dark;
  --bg-dark: oklch(0.1 0 264);
  --bg: oklch(0.2 0 264);
  --bg-light: oklch(0.3 0 264);
  --text: oklch(0.96 0 264);
  --text-muted: oklch(0.76 0 264);
  --primary: oklch(0.9 0.17 100);
  --shadow-highlight: #ffffff30;
  --shadow-black: #00000030;

  --shadow-small: inset 0 1px 2px var(--shadow-highlight), 0 1px 2px var(--shadow-black), 0 2px 4px #00000015;
  --shadow-medium: inset 0 1px 2px #ffffff50, 0 2px 4px var(--shadow-black), 0 4px 8px #00000015;
}

html.light {
  color-scheme: light;
  --bg-dark: oklch(0.92 0 264);
  --bg: oklch(0.96 0 264);
  --bg-light: oklch(1 0 264);
  --text: oklch(0.15 0 264);
  --text-muted: oklch(0.4 0 264);
  --primary: oklch(0.55 0.15 264);
  --shadow-highlight: #ffffff80;
  --shadow-black: #00000015;
}

html {
  background: var(--bg-dark);
}

body {
  font-family:
    "Manrope",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  background: var(--bg-dark);
  color: var(--text-muted);
  max-width: min(90vw, 1200px);
  margin: 1rem auto;
  line-height: 1.6;
  font-size: 1rem;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text);
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

/* Visible focus ring for keyboard users (uses the accent colour). */
:where(a, button):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.wrapper {
  min-height: 95vh;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  border-radius: 0.5rem;
}

.wordmark img {
  width: 1.5rem;
  height: 2rem;
  object-fit: contain;
}

.wordmark h1 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}

.theme-toggle {
  position: relative;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  background: var(--bg);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-small);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background 0.3s ease-in-out;
}

/* Expands the touch target to 44px without changing the visual size. */
.theme-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.75rem;
  height: 2.75rem;
  transform: translate(-50%, -50%);
}

.theme-toggle:hover {
  background: var(--bg-light);
}

.theme-toggle svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Only one icon is rendered at a time, so the correct one shows before JS runs. */
.theme-toggle .icon-moon {
  display: none;
}

html.light .theme-toggle .icon-sun {
  display: none;
}

html.light .theme-toggle .icon-moon {
  display: block;
}

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.social-card {
  background: var(--bg);
  border-radius: 1.25rem;
  padding: 3.5rem 2rem;
  box-shadow: var(--shadow-medium);
  text-align: center;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease;
}

.social-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 16px 32px var(--shadow-black),
    inset 0 1px 2px var(--shadow-highlight);
}

html.light .social-card:hover {
  box-shadow:
    0 16px 32px #00000015,
    inset 0 1px 2px var(--shadow-highlight);
}

.social-card h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.social-card p {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

.social-icons {
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(0.35rem, 2vw, 1.25rem);
  justify-content: center;
  width: 100%;
}

.social-icon {
  --brand: var(--text-muted);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  position: relative;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  padding: 0.35rem;
  border-radius: 0.5rem;
}

/* Natural brand colors */
.icon-github {
  --brand: #e6edf3;
}
.icon-discord {
  --brand: #5865f2;
}
.icon-chess {
  --brand: #81b64c;
}
.icon-proton {
  --brand: #6d4aff;
}
.icon-spotify {
  --brand: #1db954;
}
.icon-youtube {
  --brand: #ff0033;
}

html.light .icon-github {
  --brand: #1f2328;
}

.social-icon svg,
.social-icon img {
  width: 1.8rem;
  height: 1.8rem;
  object-fit: contain;
  fill: currentColor;
  transition:
    transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
    filter 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 4px 6px var(--shadow-black));
}

.social-icon.icon-github img {
  width: 2.1rem;
  height: 2.1rem;
}

/* Gentle lift on hover/focus. Only the inner artwork moves so the link keeps
   its entrance animation and the existing brand-colour glow. */
/* The resting transition is overridden while hovering for a snappier lift,
   and the slower base transition eases the artwork back home. */

.social-icon:hover,
.social-icon:focus-visible {
  color: var(--brand);
  transform: none;
}

.social-icon:hover svg,
.social-icon:hover img,
.social-icon:focus-visible svg,
.social-icon:focus-visible img {
  transform: translateY(-4px) scale(1.08);
  transition: transform 0.18s ease-out;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--brand) 70%, transparent));
}

/* Staggered entrance */
@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.85);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.social-icon {
  animation: pop-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.social-icon:nth-child(1) {
  animation-delay: 0.05s;
}
.social-icon:nth-child(2) {
  animation-delay: 0.12s;
}
.social-icon:nth-child(3) {
  animation-delay: 0.19s;
}
.social-icon:nth-child(4) {
  animation-delay: 0.26s;
}
.social-icon:nth-child(5) {
  animation-delay: 0.33s;
}
.social-icon:nth-child(6) {
  animation-delay: 0.4s;
}

footer {
  text-align: center;
  padding-bottom: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 599px) {
  body {
    max-width: 90vw;
  }

  .social-card {
    width: 100%;
    padding: 3rem 1rem;
  }

  .social-icons {
    gap: 0.3rem;
  }

  .social-icon svg,
  .social-icon img {
    width: 1.55rem;
    height: 1.55rem;
  }

  .social-icon.icon-github img {
    width: 1.8rem;
    height: 1.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .social-card:hover {
    transform: none;
  }

  .social-icon:hover,
  .social-icon:focus-visible {
    transform: none;
  }

  .social-icon:hover svg,
  .social-icon:hover img {
    transform: none;
    filter: none;
  }
}
