/* dennie.se: a minimal take on the 2018 v04 design.
   Dark page, large light type, pink accent, underlined links. */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0b0b;
  --text: #ffffff;
  --muted: #a3a3a3;
  --accent: #f441a9;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.19, 1, .22, 1);
}

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

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

body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 3rem 1rem;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

main {
  width: 100%;
  max-width: 62rem;
  margin: 0 auto;
}

h1 {
  font-size: clamp(1.75rem, 1rem + 3.4vw, 3.25rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
  max-width: 22ch;
}

.lead {
  margin-top: 2rem;
  max-width: 38rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem);
}

.links {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.25rem;
  padding: 0;
  list-style: none;
  font-size: 1.05rem;
}

.links li:first-child::before {
  content: "\203A\203A";
  color: var(--accent);
  margin-right: 0.75rem;
}

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: color 0.6s var(--ease), border-color 0.6s var(--ease);
}

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

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-bottom-color: transparent;
}

/* Fade in, like v04. Content stays visible without JavaScript. */
@media (prefers-reduced-motion: no-preference) {
  main {
    animation: fade-in 2s var(--ease) both;
  }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(0.5rem); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 480px) {
  .links {
    flex-direction: column;
    gap: 0.75rem;
  }
  .links li:first-child::before {
    content: none;
  }
}
