/* ==========================================================================
   syhr.io — personal homepage
   ========================================================================== */

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

:root {
  color-scheme: light;

  --bg: #f6f7f9;
  --bg-soft: #ffffff;
  --fg: #13161b;
  --muted: #576072;
  --faint: #8a93a4;
  --line: rgba(12, 16, 28, 0.10);
  --accent: #0d9488;
  --accent-soft: rgba(13, 148, 136, 0.12);
  --glow: rgba(13, 148, 136, 0.13);

  --radius: 14px;
  --maxw: 44rem;
  --maxw-wide: 52rem;

  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  margin: 0;
  min-height: 100svh;
  background:
    radial-gradient(80% 55% at 50% -12%, var(--glow), transparent 68%),
    var(--bg);
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--fg); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--fg);
  color: var(--bg);
  border-radius: 0 0 var(--radius) 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

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

.site {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

main { flex: 1; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.wrap--wide { max-width: var(--maxw-wide); }

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

.hero {
  padding: clamp(3.5rem, 14vh, 7.5rem) 0 clamp(2rem, 6vh, 3.25rem);
  text-align: center;
}

.tagline {
  max-width: 34rem;
  margin: 1.75rem auto 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 2.4vw, 1.16rem);
}
.tagline strong { color: var(--fg); font-weight: 600; }

.aside {
  margin: 0.6rem auto 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

/* The morphing wordmark --------------------------------------------------- */

.morph {
  --morph-ms: 950ms;
  /* Eases in and out gently, so glyphs accelerate and settle smoothly
     instead of snapping out of place. Symmetric: zero velocity at both ends. */
  --morph-ease: cubic-bezier(0.4, 0, 0.2, 1);

  position: relative;
  display: inline-block;
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(2.1rem, 12vw, 5.25rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  white-space: pre;
  color: var(--fg);
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.morph .ghost {
  position: absolute;
  top: 0;
  left: 0;
  visibility: hidden;
  white-space: pre;
  pointer-events: none;
}

.morph .glyph {
  position: absolute;
  top: 0;
  left: 0;
  white-space: pre;
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform: translate(-200vw, -200vw);
  transition:
    transform var(--morph-ms) var(--morph-ease),
    opacity calc(var(--morph-ms) * 0.6) var(--morph-ease);
}

.morph .glyph.dot { color: var(--accent); }

.morph.no-anim .glyph { transition: none; }

/* Content sections -------------------------------------------------------- */

.section {
  padding: clamp(2.5rem, 7vh, 3.75rem) 0;
  border-top: 1px solid var(--line);
}

.section h2 {
  margin: 0 0 1.25rem;
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.prose p {
  max-width: 38rem;
  margin: 0 0 1rem;
  color: var(--muted);
}
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--fg); font-weight: 600; }

/* Links ------------------------------------------------------------------- */

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

.links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--fg);
  font-size: 0.9rem;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}
.links a:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.link-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
  color: var(--muted);
  transition: color 0.2s ease;
}
.links a:hover .link-icon { color: var(--accent); }

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

.site-footer {
  padding: 1.75rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.85rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
.footer-note { font-family: var(--mono); font-size: 0.78rem; }

/* 404 --------------------------------------------------------------------- */

.notice {
  padding: clamp(3rem, 14vh, 7rem) 0;
  text-align: center;
}
.notice .code {
  display: block;
  font-family: var(--mono);
  font-size: clamp(3rem, 14vw, 6rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--accent);
}
.notice p { color: var(--muted); }
.notice a { color: var(--fg); }

/* Motion preferences ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .morph .glyph { transition: none; }
  .links a:hover { transform: none; }
}
