/* ===== Colours and fonts =====
   Change these values to change the look of the whole site. */
:root {
  --bg: #000000;
  --surface: #111111;
  --text: #f2f1ed;
  --muted: #a3a19a;
  --line: #262626;
  --accent: #e0875c;

  --font-title: "Bricolage Grotesque", system-ui, sans-serif;
  --font-text: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ===== Base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.6;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p, li { text-wrap: pretty; }

h2 { font-size: 2.2rem; margin-bottom: 28px; }

.label {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

section { padding: 64px 0; border-top: 1px solid var(--line); }

/* ===== Header ===== */
.header { border-bottom: 1px solid var(--line); }

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.brand {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.lang { display: flex; gap: 4px; font-size: 0.85rem; }

.lang a {
  text-decoration: none;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 6px;
}

.lang a:hover { color: var(--text); }
.lang a[aria-current="true"] { color: var(--text); background: var(--surface); }

/* ===== Intro ===== */
.intro { padding: 80px 0 64px; border-top: 0; }

.intro h1 {
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  margin: 8px 0 12px;
  display: flex;
  align-items: center;
  gap: 0.3em;
}

/* Photo sits next to the name, same height as the text */
.photo {
  height: 1em;
  width: auto;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.intro p + p { margin-top: 8px; }

/* ===== Featured project ===== */
.featured {
  display: block;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
  position: relative;
  transform: rotate(-1.2deg);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
  transition: border-color 0.2s, transform 0.3s ease;
}

.featured:hover { border-color: var(--accent); transform: rotate(0deg); }

/* Green push pin holding the card like a post-it */
.featured::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 24px;
  height: 24px;
  margin-left: -12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #b8f5c8 0 12%, #3fbf6b 38%, #1f7a3f 75%, #145229 100%);
  box-shadow: 0 5px 7px rgba(0, 0, 0, 0.6), inset 0 -2px 3px rgba(0, 0, 0, 0.3);
  z-index: 1;
}
.featured h3 { font-size: 2.6rem; margin: 10px 0 12px; }
.featured .more { display: inline-block; margin-top: 18px; font-weight: 500; color: var(--accent); }

/* ===== Project list (older articles) ===== */
.list { list-style: none; margin-top: 24px; }

.list a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.list a:hover h3 { color: var(--accent); }
.list h3 { font-size: 1.6rem; }

/* ===== Links ===== */
.links { display: flex; flex-wrap: wrap; gap: 20px; }

.links a {
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

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

/* ===== Article ===== */
.article { padding: 64px 0; }
.article .back { font-size: 0.9rem; color: var(--muted); text-decoration: none; }
.article .back:hover { color: var(--text); }
.article .label { margin-top: 32px; }
.article ul, .article ol { margin: 0 0 18px 22px; }
.article li { margin-bottom: 10px; padding-left: 4px; }
.article li::marker { color: var(--accent); }
.callout {
  margin-top: 48px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
}
.article .callout h2 { margin-top: 0; }
.article .callout .links { margin: 20px 0 0; }
.article h1 { font-size: clamp(2.6rem, 8vw, 4rem); margin: 24px 0 12px; }
.article .lead { font-size: 1.25rem; color: var(--muted); margin-bottom: 40px; }
.article h2 { font-size: 1.9rem; margin: 40px 0 14px; }
.article p { margin-bottom: 18px; }
.article .links { margin: 32px 0; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ===== Phone ===== */
@media (max-width: 600px) {
  .intro { padding: 48px 0 40px; }
  section { padding: 48px 0; }
  h2 { font-size: 1.9rem; }
  .featured { padding: 24px; }
  .featured h3 { font-size: 2.1rem; }
}

/* ===== Hero: intro left, latest article right ===== */
.hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero .featured h3 { font-size: 2.1rem; }

/* Article text on the home page: narrower column for easy reading */
.prose > * { max-width: 760px; }
.article .article-title { font-size: clamp(2.4rem, 6vw, 3.6rem); margin: 16px 0 12px; }
.article .prose > .label:first-child { margin-top: 0; }
.permalink { margin-top: 32px; font-size: 0.9rem; }
.permalink a { color: var(--muted); text-decoration: none; }
.permalink a:hover { color: var(--text); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
}

/* Tagline under the name */
.intro .tagline {
  font-family: var(--font-title);
  font-size: clamp(1.4rem, 3.6vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 8px 0 20px;
}
.intro .muted { max-width: 620px; }

/* ===== News ticker in the header ===== */
.ticker {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 28px;
  text-decoration: none;
  font-size: 0.9rem;
}

.ticker-badge {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 2px 9px;
}

.ticker-window {
  flex: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  animation: ticker 36s linear infinite;
}

.ticker-track span { padding-right: 72px; color: var(--muted); }
.ticker-track span::before { content: "◆"; color: var(--accent); font-size: 0.6em; margin-right: 14px; vertical-align: middle; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker:hover .ticker-track span { color: var(--text); }

@keyframes ticker { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .featured { transition: border-color 0.2s; }
  .ticker-track { animation: none; }
}

@media (max-width: 600px) {
  .ticker { margin: 0 12px; gap: 8px; }
  .ticker-badge { display: none; }
}

/* ===== Article + product panel side by side ===== */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.product {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 0.95rem;
}

.product-img {
  background: #ffffff;
  border-radius: 14px;
  padding: 10px 18px;
}

/* The logo image has wide white margins: crop to the logo itself */
.product-img img {
  width: 100%;
  aspect-ratio: 2.6 / 1;
  object-fit: cover;
  object-position: center;
}

.article .product p { margin: 0; color: var(--muted); }
.article .product .links { margin: 0; }

@media (max-width: 960px) {
  .article-layout { grid-template-columns: 1fr; }
  .product { position: static; max-width: 520px; }
}

/* Screenshot under the product summary (click opens full size) */
.product-shot img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  transition: border-color 0.2s;
}
.product-shot:hover img { border-color: var(--accent); }

/* Justified text with automatic hyphenation (language from <html lang>). */
main p:not(.label):not(.tagline):not(.permalink),
main li {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
/* Narrow side column on wide screens: justifying leaves gaps there */
@media (min-width: 861px) {
  main .product p {
    text-align: left;
    hyphens: manual;
    -webkit-hyphens: manual;
  }
}
