/* ==========================================================================
   alpennec.com — shared stylesheet
   Sober and plain. Light + dark. No web fonts, no frameworks.
   ========================================================================== */

/* --- Design tokens -------------------------------------------------------
   Light is the default. Dark is the one override block immediately below,
   keyed on [data-theme="dark"] rather than a media query on purpose: the
   inline script in <head> resolves "auto" against the device setting and
   writes a concrete data-theme before first paint, so there is no flash of
   the wrong colours and the device setting is never queried twice. */

:root {
  color-scheme: light;

  --bg:        #fbfbfd;
  --text:      #16161a;
  --muted:     #62626e;
  --faint:     #6b6b77;
  --border:    #e5e5ec;
  --border-2:  #d4d4de;   /* outlines around controls; still decorative */
  --accent:    #0a58ca;
  --code-bg:   #f2f2f6;
  --chip:      #ececf2;   /* selected theme button */

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
          Helvetica, Arial, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg:      #0d0d10;
  --text:    #f1f1f4;
  --muted:   #a2a2ae;
  --faint:   #82828f;
  --border:  #292930;
  --border-2:#3c3c46;
  --accent:  #7fb0ff;
  --code-bg: #1e1e24;
  --chip:    #26262e;
}

/* --- Base ---------------------------------------------------------------- */

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

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

body {
  margin: 0;
  padding: 0 1.25rem;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 780px;
  margin: 0 auto;
}

img { max-width: 100%; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover { text-decoration-thickness: 2px; }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Header -------------------------------------------------------------- */

header { padding: 4.5rem 0 0; }

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

h1 {
  margin: 0;
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  font-weight: 620;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.tagline {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

/* --- Theme switch --------------------------------------------------------
   Light | Auto | Dark. Hidden without JS so it can never present as a dead
   control; the page is fully readable either way. */

.theme-switch {
  display: none;
  flex: none;
  align-items: center;
  gap: 1px;
  padding: 2px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
}

.js .theme-switch { display: flex; }

.theme-opt {
  display: grid;
  place-items: center;
  width: 28px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.theme-opt:hover { color: var(--text); }

.theme-opt svg { width: 15px; height: 15px; }

.theme-opt[aria-pressed="true"] {
  color: var(--accent);
  background: var(--chip);
}

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

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.foot {
  margin: 0;
  font-size: 0.9375rem;
}

/* --- Sections ------------------------------------------------------------ */

section {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

h2 {
  margin: 0 0 1.25rem;
  font-size: 0.75rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--faint);
}

/* --- App list ------------------------------------------------------------ */

.apps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.apps > li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

.apps > li:last-child { border-bottom: 0; }

.app-icon {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.app-text { flex: 1 1 auto; min-width: 0; }

.app-name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.008em;
}

.app-note {
  margin: 0.1rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.app-site {
  flex: none;
  font-size: 0.8125rem;
  color: var(--faint);
  text-decoration: none;
  white-space: nowrap;
}
.app-site:hover { color: var(--text); text-decoration: underline; }

/* --- Shortcut rows ------------------------------------------------------- */

.shorts {
  margin: 0;
  padding: 0;
  list-style: none;
}

.shorts > li {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.shorts > li:first-child { padding-top: 0; }
.shorts > li:last-child { border-bottom: 0; padding-bottom: 0; }

.shorts img {
  flex: none;
  width: 180px;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

/* standalone screenshot */
.shot {
  display: block;
  width: 280px;
  height: auto;
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.short-text { flex: 1 1 auto; min-width: 0; }

.short-text h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.008em;
}

.short-text p {
  margin: 0.3rem 0 0.8rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* --- Button -------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  background: var(--text);
  color: var(--bg);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 7px;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; opacity: 0.85; }

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

footer {
  margin-top: 3.5rem;
  padding: 1.5rem 0 3rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--faint);
}
footer p { margin: 0.3rem 0; }

/* --- Small screens ------------------------------------------------------- */

@media (max-width: 560px) {
  header { padding-top: 3rem; }
  .apps > li { flex-wrap: wrap; gap: 0.75rem; }
  .app-text { flex-basis: calc(100% - 58px); }
  .app-site { flex-basis: 100%; padding-left: 58px; }
  .shorts > li { flex-direction: column; gap: 1rem; }
  .shorts img { width: 160px; }
}