/* Lukas Häußler - personal site
   Editorial / print-inspired, warm light palette. No frameworks, no network
   fonts: system serif for display, system sans for body. */

:root {
  --paper:      #f5efe3;   /* warm paper */
  --paper-edge: #e6ddca;   /* rules */
  --ink:        #1c1a15;   /* warm near-black */
  --ink-soft:   #4f483d;   /* body / secondary */
  --ink-faint:  #8a7f6d;   /* labels, years */
  --accent:     #b34a26;   /* terracotta */
  --accent-dk:  #8f3617;
  --accent-wash:#ece0cd;   /* soft backer */

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans:  ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:  ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;

  --measure: 40rem;
  --gutter:  2rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { max-width: 100%; overflow-x: hidden; }
img { max-width: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(179, 74, 38, 0.35);
  transition: border-color 120ms ease, color 120ms ease;
}
a:hover { color: var(--accent-dk); border-color: var(--accent-dk); }

.page {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter) 4rem;
}

/* thin accent bar across the very top */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  z-index: 10;
}

/* ---------- Intro ---------- */

.intro { padding-bottom: 2.2rem; }

.intro-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  /* reserves room below the photo for the "that's me!" note at every width,
     so the intro text always starts below it */
  margin-bottom: 4.4rem;
}

.eyebrow {
  margin: 0 0 0.6rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 8vw, 4rem);
  line-height: 1.0;
  letter-spacing: -0.015em;
}

.lede {
  margin: 0 0 1.6rem;
  max-width: 60ch;
  font-size: 1.16rem;
  color: var(--ink-soft);
}
.lede strong { color: var(--ink); font-weight: 700; }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.3rem;
  font-size: 0.98rem;
}
.links a { border-bottom-width: 0; }
.links a:hover { border-bottom-width: 1px; }
.links .cv {
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 0.12rem 0.7rem;
}
.links .cv:hover { background: var(--accent); border-color: var(--accent); }

.portrait {
  position: relative;
  margin: 0;
  flex: none;
  padding: 7px;
  background: #fbf7ee;
  border: 1px solid var(--paper-edge);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(28, 26, 21, 0.07);
}

/* Hand-drawn "that's me!" annotation, anchored under the photo and left-aligned
   so it always stays within the photo's own width - identical at every size,
   regardless of whether the photo sits at the right (desktop) or left (mobile). */
.thats-me {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  color: var(--accent);
  pointer-events: none;
}
.thats-me-arrow { display: block; flex: none; width: 52px; height: 48px; }
.thats-me-label {
  font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", "Chalkboard SE", "Marker Felt", "Comic Neue", cursive;
  font-size: 1.22rem;
  line-height: 1;
  white-space: nowrap;
  transform: rotate(-3deg);
}
.portrait img {
  display: block;
  width: 170px;
  height: 170px;
  object-fit: cover;
  object-position: 50% 28%;
  border-radius: 2px;
}

/* ---------- Blocks ---------- */

.block {
  padding: 2rem 0 2.2rem;
}

.block-head {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin: 0 0 1.4rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--ink);
}
.block h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.block-body { max-width: 100%; min-width: 0; }
.lede, .beyond-lede, .beyond-note { overflow-wrap: break-word; }

/* Beyond work */
.beyond-lede { margin: 0 0 1.1rem; color: var(--ink-soft); }

/* Interactive globe */
.globe { margin: 2rem 0 0; }
.globe-stage {
  position: relative;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
}
#globe-canvas {
  display: block;
  margin: 0;
  touch-action: none;
  cursor: grab;
}
#globe-canvas:active { cursor: grabbing; }
.globe-zoom {
  position: absolute;
  right: 2px;
  bottom: 2px;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.globe-zoom button {
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--paper-edge);
  background: rgba(246, 239, 224, 0.82);
  color: var(--ink-soft);
  border-radius: 4px;
  font: 600 1.05rem/1 var(--sans);
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}
.globe-zoom button:hover { color: var(--ink); border-color: var(--ink-faint); }
.globe-tip {
  position: absolute;
  transform: translate(-50%, -145%);
  z-index: 2;
  pointer-events: none;
  white-space: nowrap;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.8rem;
  line-height: 1;
  padding: 0.4rem 0.6rem;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(28, 26, 21, 0.18);
}
.globe-tip[hidden] { display: none; }
.globe-tip strong { font-weight: 700; }
.globe-caption {
  margin: 0.7rem 0 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}
.interests {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.interests li {
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--accent-wash);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
}
.beyond-note {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.06rem;
  max-width: 48ch;
}

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

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-faint);
}
.foot p { margin: 0; }
.foot a { border-bottom: 0; }
.foot a:hover { border-bottom: 1px solid var(--accent-dk); }
.foot-links a { margin-left: 1.2rem; }
.foot-links a:first-child { margin-left: 0; }

/* ---------- Responsive ---------- */

/* Wider desktop layout: on roomy screens the section labels move out into a
   left margin rail, so the page fills more horizontal space while body text
   keeps a comfortable reading measure instead of stretching edge to edge. */
@media (min-width: 900px) {
  :root {
    --rail: 11rem;
    --rail-gap: 3rem;
    --indent: calc(var(--rail) + var(--rail-gap));
  }

  .page { max-width: 62rem; }

  /* Intro stays a full-width masthead: name left, portrait right. */
  .portrait img { width: 190px; height: 190px; }

  /* Section labels move into a left rail and the reading content sits in a
     body column, so the page uses the extra width while line length stays
     comfortable. */
  .foot { margin-left: var(--indent); }

  .block {
    display: grid;
    grid-template-columns: var(--rail) 1fr;
    column-gap: var(--rail-gap);
    align-items: start;
    border-top: 1px solid var(--paper-edge);
    padding-top: 2.2rem;
  }
  .block-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    border-bottom: 0;
    position: sticky;
    top: 2.5rem;
  }
  .block-body { max-width: 44rem; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .intro-top { flex-direction: column; align-items: flex-start; gap: 1.2rem; margin-bottom: 4rem; }
  .portrait img { width: 96px; height: 96px; }
  .thats-me-arrow { width: 46px; height: 42px; }
  .thats-me-label { font-size: 1.05rem; }
  .block { grid-template-columns: 1fr; gap: 0.9rem; }
}
