/*
  Title: martinmaga.com stylesheet
  Author: Martin Maga (M.A.)
  Date: 2026-09-06
  Creation time: 2026-09-06T17:40:00+02:00
  Version: 2026-09-08, immediate stillness and punctuation placement

  Design system: three colors only. Noble black, warm white, vibrant orange.
  Grays are derived mixes. Orange never carries running text.
  The breathing full stop offers a pause; the page recedes around it.
*/

@font-face {
  font-family: 'Libertinus Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/libertinus-serif-400-italic.woff2') format('woff2');
}

@font-face {
  font-family: 'Libertinus Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/libertinus-serif-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Libertinus Serif';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/libertinus-serif-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Libertinus Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/libertinus-serif-display-400.woff2') format('woff2');
}

:root {
  --paper: #FAF7F1;
  --ink: #141419;
  --heading: #141419;
  --gray: #73737B;
  --orange: #F97316;
  --black: #141419;
  --pause-duration: 6000ms;
  --pause-return-duration: 180ms;
  --pause-easing: cubic-bezier(.08, .5, .8, .55);
  --pause-return-easing: cubic-bezier(.2, .45, .92, .5);
  color-scheme: light dark;
}

/* Fallback without JavaScript: follow the system preference. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="day"]) {
    --paper: #141419;
    --ink: #E9E7E1;
    --heading: #FAF7F1;
    --gray: #A6A6AD;
  }
}

/* With JavaScript, the visitor's own sun decides (see main.js). */
:root[data-theme="night"] {
  --paper: #141419;
  --ink: #E9E7E1;
  --heading: #FAF7F1;
  --gray: #A6A6AD;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Libertinus Serif', Georgia, 'Times New Roman', serif;
  font-size: 19px;
  line-height: 1.68;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

::selection { background: var(--orange); color: var(--black); }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

a:hover {
  background: var(--orange);
  color: var(--black);
  text-decoration: none;
}

/* Header */

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 32px;
  padding: 40px clamp(24px, 4.5vw, 64px) 0;
}

.wordmark {
  font-variant: small-caps;
  letter-spacing: 0.22em;
  font-size: 16px;
  color: var(--heading);
  text-decoration: none;
  transition: color 0.5s ease;
}

.wordmark:hover { background: none; color: var(--heading); }

header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px clamp(20px, 3vw, 44px);
  font-variant: small-caps;
  letter-spacing: 0.16em;
  font-size: 15px;
}

header nav a { color: var(--gray); text-decoration: none; }
header nav a:hover { background: none; color: var(--orange); }
header nav a[aria-current="page"] { color: var(--heading); }

/* Content column: left of center on wide screens, comfortable elsewhere */

main {
  max-width: 708px;
  padding: 0 24px 96px;
}

@media (min-width: 1100px) {
  main { margin-left: min(15vw, 240px); }
}

h1 {
  margin: 0;
  font-family: 'Libertinus Serif Display', 'Libertinus Serif', Georgia, serif;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.005em;
  color: var(--heading);
}

h2 {
  margin: 56px 0 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--heading);
}

p { margin: 18px 0 0; max-width: 620px; }

.muted { color: var(--gray); }

/* Front page */

.hero { padding-top: clamp(96px, 18vh, 180px); }
.hero h1 { font-size: clamp(44px, 5.5vw, 80px); }
@media (max-width: 600px) {
  .hero { padding-top: 72px; }
}
.hero p { font-size: 20px; }
.hero-copy { margin-top: 42px; }
.hero-copy > p:first-child { margin-top: 0; }

.cta-row { margin-top: 28px; }

.cta {
  display: inline-block;
  padding: 13px 30px;
  background: var(--orange);
  border: 1px solid var(--orange);
  color: var(--black);
  font-variant: small-caps;
  letter-spacing: 0.18em;
  font-size: 17px;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.cta:hover { background: var(--black); color: var(--orange); }

/* Inner pages */

.page { padding-top: clamp(64px, 12vh, 110px); }
.page h1 { font-size: clamp(36px, 4vw, 56px); }

/* The closing button on inner pages sits on the section rhythm (56px),
   like a section of its own, instead of hugging the last paragraph. */
.page .cta-row { margin-top: 56px; }
.accent-stop { color: var(--orange); }

/* Notes */

.placeholder { margin-top: 64px; font-style: italic; color: var(--gray); }

.note-list {
  list-style: none;
  margin: 64px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.note-list a { font-size: 22px; text-decoration: none; color: var(--heading); }
.note-list a:hover { background: none; color: var(--orange); }

.note-date {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  color: var(--gray);
  font-variant: small-caps;
  letter-spacing: 0.12em;
}

/* The SVG box stays anchored in the sentence. The group only translates;
   the breathing core changes radius, never scale (decision 0002). */

.dot {
  display: inline-block;
  position: relative;
  z-index: 3;
  min-width: 24px;
  margin: 0 0 0 -0.02em;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  vertical-align: baseline;
  color: var(--orange);
  -webkit-text-fill-color: transparent;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.dot:enabled {
  cursor: pointer;
  touch-action: manipulation;
}

/* A generous fixed target without enlarging the mark or moving the text. */
.dot:enabled::before {
  content: "";
  position: absolute;
  left: calc(50% - 22px);
  top: calc(75% - 22px);
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

h1 .dot::selection {
  background: transparent;
  color: transparent;
  text-shadow: none;
}

.dot-circle {
  display: block;
  position: absolute;
  left: 50%;
  top: 75%;
  width: 0.24em;
  height: 0.24em;
  margin: -0.12em 0 0 -0.12em;
  overflow: visible;
  pointer-events: none;
}

.dot-position {
  transform: translate(0px, 0px);
  transition: transform 140ms ease-out;
}

/* Enable radius transitions only for the finite fade/return. Keeping one on
   the ordinary SMIL breath would also interpolate its sampled radius values. */
.dot-shape.radius-transition {
  transition: r var(--pause-return-duration) var(--pause-return-easing);
}

/* Only a captured mouse pointer is substituted, never touch or keyboard focus.
   JS adds a finite capture offset; settled tracking has no interpolation. */
html.dot-merged .dot-position { transition-duration: 0ms; }
html.dot-merged, html.dot-merged * { cursor: none !important; }

.dot:focus-visible { outline: none; }
.dot:focus-visible::before {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* A paper-colored veil closes from the periphery toward the visible dot.
   Its registered progress animates natively, sharing the radius-growth curve.
   It never receives input or changes layout or the accessibility tree. */
@property --pause-progress {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}

.pause-veil {
  --pause-progress: 0;
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  visibility: hidden;
  background: radial-gradient(circle at var(--pause-x, 50%) var(--pause-y, 50%),
    transparent calc((1 - var(--pause-progress)) * var(--pause-extent, 200vmax) - var(--pause-feather, 160px)),
    var(--paper) calc((1 - var(--pause-progress)) * var(--pause-extent, 200vmax)));
  transition: --pause-progress var(--pause-return-duration) var(--pause-return-easing),
    visibility 0ms linear var(--pause-return-duration);
}

.pause-open .pause-veil {
  --pause-progress: 1;
  visibility: visible;
  transition-duration: var(--pause-duration), 0ms;
  transition-timing-function: var(--pause-easing), linear;
  transition-delay: 0ms;
}
.pause-open .dot-shape {
  transition-duration: var(--pause-duration);
  transition-timing-function: var(--pause-easing);
}

/* The ring shares the core's translated group, so their centers cannot drift.
   Only the ring scales. JS removes it after its animation. */
.dot-ripple {
  fill: none;
  transform-origin: 10px 10px;
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  /* JS pauses the SVG clock; stillness and activity use instant state changes. */
  .pause-veil, .dot-position, .dot-shape.radius-transition { transition: none; }
}

/* Footer: the two legally required links, nothing else */

footer {
  display: flex;
  gap: 32px;
  padding: 48px clamp(24px, 4.5vw, 64px) 40px;
  font-variant: small-caps;
  letter-spacing: 0.16em;
  font-size: 13px;
}

footer a { color: var(--gray); text-decoration: none; }
footer a:hover { background: none; color: var(--orange); }

/* Clicking trades orange and ink on interactive accents for this visit. */
.inverted .dot { color: var(--heading); }
.inverted ::selection { background: var(--heading); color: var(--paper); }
.inverted a { text-decoration-color: var(--heading); }
.inverted a:hover { background: var(--heading); color: var(--paper); }
.inverted .wordmark { color: var(--orange); }
.inverted .wordmark:hover { background: none; color: var(--orange); }
.inverted header nav a:hover { background: none; color: var(--heading); }
.inverted header nav a[aria-current="page"] { color: var(--orange); }
.inverted footer a:hover { background: none; color: var(--heading); }
.inverted .cta { background: var(--heading); border-color: var(--heading); color: var(--orange); }
.inverted .cta:hover { background: var(--orange); border-color: var(--orange); color: var(--black); }
