/* ==========================================================================
   berkaymutlu.com — bio page (design 1a, Quiet Center)
   Plain CSS, no build step. Light + dark via prefers-color-scheme.
   ========================================================================== */

/* ---- Fonts ----------------------------------------------------------------
   Self-hosted DM Sans (D-03), latin subset, variable weight axis 100-900.
   One woff2 file covers 400/500/700. No external font requests.
--------------------------------------------------------------------------- */
@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans-latin-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---- Design tokens ------------------------------------------------------ */
:root {
  color-scheme: light dark;

  /* Light palette */
  --bg: #fafafa;
  --text: #313131;            /* locked body color (L3) */
  --muted: #6b6b6b;           /* 5.6:1 on bg, AA */
  --accent: #0e73c9;          /* 4.9:1 on bg, AA */
  --accent-hover: #0a5aa0;
  --accent-tint: rgba(14, 115, 201, 0.12);

  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark palette: intentional, not inverted */
    --bg: #131316;
    --text: #e8e8ea;
    --muted: #9a9aa2;         /* 5.9:1 on bg, AA */
    --accent: #57a9f2;        /* 7.4:1 on bg, AA */
    --accent-hover: #7cbcf6;
    --accent-tint: rgba(87, 169, 242, 0.16);
  }
}

/* ---- Base ---------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

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

::selection {
  background: var(--accent-tint);
}

/* ---- Layout: single centered hero ---------------------------------------- */
main {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
}

/* ---- Bio sentence (the h1, per D-08) -------------------------------------- */
.bio {
  font-size: clamp(1.4rem, 1rem + 2.2vw, 1.8125rem);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
  max-width: 34ch;
  margin: 0;
  text-wrap: pretty; /* progressive enhancement; safe to ignore where unsupported */
}

/* ---- Social links ---------------------------------------------------------
   Icon + label pairs, min 44px hit areas. Wraps to two rows on narrow phones.
--------------------------------------------------------------------------- */
.social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 30px;
  margin-top: 2.25rem; /* 36px */
}

.social a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 8px;
  transition: color 0.15s ease, transform 0.15s ease;
}

.social svg {
  width: 19px;
  height: 19px;
  display: block;
}

/* Hover only on devices that actually hover (no sticky hover on touch) */
@media (hover: hover) {
  .social a:hover {
    color: var(--accent);
    transform: translateY(-2px);
  }
}

.social a:active {
  color: var(--accent-hover);
}

/* Visible keyboard focus, invisible for mouse */
.social a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Reduced motion -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .social a {
    transition: none;
  }
  @media (hover: hover) {
    .social a:hover {
      transform: none;
    }
  }
}

/* ---- Back-home link (404 page) ------------------------------------------- */
.home-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 2.25rem; /* 36px, matches .social spacing */
  color: var(--accent);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
}

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

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