/* ==========================================================================
   tinebrandt.com — shared stylesheet (DE + EN)
   Plain CSS, no build step. Restyle a sibling site by editing :root only.
   ========================================================================== */

:root {
  --bg:          #fdfbf7;
  --surface:     #ffffff;
  --text:        #2e2a26;
  --muted:       #6f665e;
  --accent:      #8a6a4f;
  --accent-dark: #6d5340;
  --border:      #e6ded2;

  --max:      1100px;
  --gap:      3rem;
  --aside-w:  300px;
  --radius:   6px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}

/* --- reset ---------------------------------------------------------------- */

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

body, h1, h2, h3, p, ul, figure { margin: 0; }

ul { padding: 0; list-style: none; }

img { max-width: 100%; height: auto; display: block; }

/* --- base ----------------------------------------------------------------- */

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  padding: 0 1.5rem;
}

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

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

.wrap { max-width: var(--max); margin-inline: auto; }

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

/* --- header --------------------------------------------------------------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.site-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.site-tagline {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.15rem;
}

/* --- language switcher ---------------------------------------------------- */

.lang-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lang-switch a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.25rem 0.1rem;
}

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

.lang-switch [aria-current="page"] {
  color: var(--text);
  border-bottom: 2px solid var(--accent);
}

.lang-switch .sep { color: var(--border); }

/* --- layout --------------------------------------------------------------- */

.layout {
  display: grid;
  grid-template-columns: 1fr var(--aside-w);
  /* Portrait and bio are separate items stacked in the right column, so the
     mobile layout can put the portrait on top and the bio at the bottom. */
  grid-template-areas:
    "content portrait"
    "content profile";
  gap: 0 var(--gap);
  align-items: start;
  padding: 3rem 0;
}

.portrait { grid-area: portrait; }
.content  { grid-area: content;  }
.profile  { grid-area: profile;  }

.intro {
  font-size: 1.15rem;
  max-width: 60ch;
}

.intro p + p { margin-top: 1rem; }

/* Contact line: a notch quieter than the intro it follows. */
.intro__contact {
  font-size: 1rem;
  color: var(--muted);
}

.intro__contact a { color: var(--accent); }

.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 3rem 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* --- book cards ----------------------------------------------------------- */

.books {
  display: grid;
  /* Capped rather than 1fr: full-width columns would blow the 2:3 covers up
     to ~550px tall and swamp the page. */
  grid-template-columns: repeat(auto-fit, minmax(160px, 220px));
  gap: 2rem;
}

.book__link {
  display: block;
  height: 100%;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.book__link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(46, 42, 38, 0.1);
}

/* The class sits on <picture>, which is inline by default. */
.book__cover {
  display: block;
  width: 100%;
  border-radius: 3px;
  margin-bottom: 0.9rem;
}

.book__cover img {
  width: 100%;
  border-radius: inherit;
}

/* The series name is the same on every card, so it reads as an overline
   rather than as part of each title. */
.book__series {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.book__title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.35;
}

.book__cta {
  display: block;
  margin-top: 0.45rem;
  color: var(--accent);
  font-size: 0.85rem;
}

.book__link:hover .book__cta { color: var(--accent-dark); }

/* --- profile aside -------------------------------------------------------- */

/* <picture> is inline by default, which would stop the image filling
   the column. */
.portrait picture { display: block; }

/* The portrait is a circular crop, so the frame is a ring rather than a box.
   This also hides whatever the source has in its corners. */
.portrait__img {
  width: 100%;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.profile__heading {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  margin-top: 1.25rem;
}

.profile__bio {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.6;
}

.profile__bio p + p { margin-top: 0.7rem; }

.profile__bio em { font-style: italic; color: var(--text); }

/* --- footer --------------------------------------------------------------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* --- mobile --------------------------------------------------------------- */

@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
    /* Portrait leads, then the books, then the biography. The bio is long
       enough that leaving it on top would bury the books. */
    grid-template-areas:
      "portrait"
      "content"
      "profile";
    gap: 2.5rem 0;
    padding: 2rem 0;
  }

  .portrait { max-width: 220px; }

  .profile__heading { margin-top: 0; }

  .books { grid-template-columns: 1fr; gap: 1.25rem; }

  /* Cover on the left, title and call-to-action stacked beside it. */
  .book__link {
    display: grid;
    grid-template-columns: 90px 1fr;
    column-gap: 1rem;
    align-content: center;
  }
  .book__cover {
    grid-area: 1 / 1 / 4 / 2;
    align-self: center;
    width: 90px;
    margin-bottom: 0;
  }
  .book__series { grid-column: 2; align-self: end; }
  .book__title  { grid-column: 2; }
  .book__cta    { grid-column: 2; align-self: start; }

  .section-title { margin-top: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .book__link { transition: none; }
  .book__link:hover { transform: none; }
}
