/* ==========================================================
   turbohand.com — shared styles
   Every page links to this one file, so a change here
   changes the look of the whole site.
   ========================================================== */

/* ---------- 1. Colors and fonts (change these to restyle) ---------- */
:root {
  --paper:  #EEF2F7;   /* page background: pale blue-grey */
  --ink:    #16233D;   /* main text: deep navy */
  --muted:  #5A6882;   /* dates and small notes */
  --line:   #C9D3E2;   /* thin dividing lines */
  --link:   #942923;   /* links: the dark red from the logo */
  --marker: #FFD500;   /* yellow highlighter: the yellow from the logo */

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body:    "Source Serif 4", Georgia, serif;
}

/* Dark mode: used automatically when the visitor's device is set to dark */
@media (prefers-color-scheme: dark) {
  :root {
    --paper:  #111A2C;
    --ink:    #E6ECF5;
    --muted:  #93A1BA;
    --line:   #2A3754;
    --link:   #FF9C8F;   /* lighter red so it's readable on dark */
    --marker: #7A6000;   /* darker gold so light text stays readable on it */
  }
}

/* ---------- 2. Page basics ---------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
}

/* Keeps text in a comfortable column, about 70 characters wide */
.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

a { color: var(--link); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--marker); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* ---------- 3. The logo and big "turbohand" name at the top ---------- */
.brand {
  display: flex;
  flex-wrap: wrap;          /* on narrow phones the name drops below the logo */
  align-items: center;
  gap: 1rem 1.5rem;
  margin-bottom: 1.25rem;
}

.logo {
  width: clamp(5rem, 16vw, 8.5rem);
  height: auto;
  border-radius: 14%;       /* matches the logo's rounded corners */
  transform: rotate(-4deg); /* a slight tilt, like a sticker */
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.25rem, 14vw, 6.25rem); /* grows with screen width */
  letter-spacing: -0.045em;
  line-height: 0.9;
  margin: 0;
}

/* The yellow highlighter stripe behind the name */
.wordmark span {
  background: linear-gradient(transparent 62%, var(--marker) 62%, var(--marker) 88%, transparent 88%);
  padding: 0 0.05em;
}

.intro {
  font-size: 1.3rem;
  max-width: 34rem;
  margin: 0;
}

/* Small site name used on inner pages (like posts) */
.site-link {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.site-link img { border-radius: 14%; }
.site-link:hover { background: var(--marker); }

/* ---------- 4. Sections on the homepage ---------- */
section { margin-top: 3.5rem; }

section > h2 {
  font-size: 1.6rem;
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ink);
}

/* A simple list of posts or apps, separated by thin lines */
.entries {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entries li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.entries h3 {
  font-size: 1.3rem;
  margin: 0 0 0.25rem;
}

.entries h3 a { color: var(--ink); text-decoration: none; }
.entries h3 a:hover { background: var(--marker); }

.entries p { margin: 0; }

.date {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--muted);
  display: block;
  margin-bottom: 0.15rem;
}

/* Shown when a section has nothing in it yet */
.empty {
  color: var(--muted);
  font-style: italic;
  padding: 1rem 0;
  margin: 0;
}

/* ---------- 5. Post pages ---------- */
.post h1 {
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  margin: 2.5rem 0 0.5rem;
}

.post h2 { font-size: 1.5rem; margin-top: 2.25rem; }

.post mark {
  background: var(--marker);
  color: #16233D;
}

/* ---------- 6. Footer ---------- */
footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--muted);
}
