/* ============================================================
   halvardskagen.com — author site
   Restrained, literary, single-page; tries not to look "designed"
   ============================================================ */

:root {
  --bg-cream:  #f6f1e6;
  --bg-cream-2:#efe9da;
  --bg-dark:   #0c0c0d;
  --bg-dark-2: #16161a;
  --ink:       #1a1817;
  --ink-soft:  #4a4642;
  --ink-faint: #7d776e;
  --rule:      #d6cfbf;
  --accent:    #a32a1c;

  --serif:     "Lora", Georgia, "Times New Roman", serif;
  --sans:      "Oswald", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-cream);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px;
    text-underline-offset: 3px; transition: color 120ms; }
a:hover { color: var(--accent); }

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

.container { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 24px; }

/* ---- Topbar ------------------------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(246, 241, 230, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--rule);
}
.topbar-inner {
  max-width: 1100px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.brand {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-decoration: none;
  font-size: 14px;
}
.topbar nav { display: flex; gap: 26px; }
.topbar nav a {
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  text-decoration: none;
}

/* ---- Hero -------------------------------------------------- */
.hero {
  background: var(--bg-dark);
  color: #ece4d4;
  padding: 110px 24px 90px;
  border-bottom: 1px solid #000;
  position: relative;
  overflow: hidden;
}
.hero::after {
  /* faint vignette */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center top, rgba(255,255,255,0.04), transparent 60%);
}
.hero-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.kicker {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.36em;
  font-size: 12px;
  color: #cfc4ad;
  margin: 0 0 28px;
}
.hero h1 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 1.02;
  margin: 0 0 24px;
  text-transform: uppercase;
}
.byline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: #cfc4ad;
  margin: 0 0 36px;
}
.byline .author { font-style: normal; font-weight: 600; letter-spacing: 0.04em; }
.hero-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: #d8cfb9;
  margin: 0 0 32px;
}
.hero-meta {
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: 0.32em;
  font-size: 11px;
  color: #8a8268;
  margin: 0 0 40px;
}
.hero-cta {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 12px;
  text-decoration: none;
  color: #ece4d4;
  border-bottom: 1px solid #6a6354;
  padding-bottom: 4px;
}
.hero-cta:hover { color: #fff; border-bottom-color: #fff; }

/* ---- Book section ----------------------------------------- */
.book-section {
  background: var(--bg-cream);
  padding: 96px 0 80px;
}
.book-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 56px;
  align-items: start;
}
.book-cover img {
  box-shadow: 0 8px 28px rgba(0,0,0,0.18), 0 1px 0 rgba(0,0,0,0.05);
  background: #000;
}
.book-text h2 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 36px;
  margin: 0 0 18px;
  text-transform: uppercase;
}
.book-text .lead {
  font-size: 18px;
  margin: 0 0 18px;
}
.book-text p { margin: 0 0 16px; }
.book-text .pullquote {
  font-style: italic;
  color: var(--ink-soft);
  border-left: 2px solid var(--rule);
  padding: 4px 0 4px 18px;
  margin: 24px 0;
  font-size: 16px;
}
.book-text .dets {
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: 0.1em;
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 28px;
}
.book-text .dets.sub { margin-top: 4px; }

/* ---- About ------------------------------------------------- */
.about-section {
  background: var(--bg-cream-2);
  padding: 88px 0 88px;
  border-top: 1px solid var(--rule);
}
.about-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}
.portrait img {
  width: 240px; height: 300px; object-fit: cover;
  filter: grayscale(20%) contrast(1.05);
  background: #1a1a1a;
}
.portrait figcaption {
  margin-top: 8px;
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 10px;
  color: var(--ink-faint);
}
.about-text h2 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 30px;
  margin: 0 0 18px;
  text-transform: uppercase;
}
.about-text p { margin: 0 0 16px; }

/* ---- Events ------------------------------------------------ */
.events-section {
  background: var(--bg-cream);
  padding: 80px 0 70px;
  border-top: 1px solid var(--rule);
}
.events-section h2 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 24px;
  margin: 0 0 24px;
  text-transform: uppercase;
}
.events-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.events-list li {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.events-list li:last-child { border-bottom: none; }
.ev-date {
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--ink-faint);
  padding-top: 3px;
}

/* ---- Contact ----------------------------------------------- */
.contact-section {
  background: var(--bg-cream-2);
  padding: 80px 0 90px;
  border-top: 1px solid var(--rule);
}
.contact-section h2 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 24px;
  margin: 0 0 18px;
  text-transform: uppercase;
}
.contact-block {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.8;
  margin: 22px 0;
}
.contact-section .small {
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: 0.06em;
  font-size: 13px;
  color: var(--ink-faint);
}

/* ---- Footer ------------------------------------------------ */
.site-footer {
  background: var(--bg-dark);
  color: #948a73;
  padding: 36px 0;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: 0.16em;
  font-size: 11px;
  text-transform: uppercase;
}
.footer-inner p { margin: 0; }
.footer-inner .imprint strong { color: #d6cdb6; font-weight: 400; letter-spacing: 0.22em; }

/* ---- Long-form pages (writing, blog, essays) --------------- */
.long-container {
  max-width: 720px;
  padding: 80px 24px 100px;
}
.page-header {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 36px;
  margin-bottom: 36px;
}
.kicker-light {
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: 0.32em;
  font-size: 11px;
  color: var(--ink-faint);
  margin: 0 0 18px;
  text-transform: uppercase;
}
.long-container h1 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 48px;
  line-height: 1.05;
  margin: 0 0 18px;
  text-transform: uppercase;
}
.page-lead {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 18px;
  margin: 0;
}

.essays { list-style: none; padding: 0; margin: 0; }
.essay-item {
  padding: 30px 0;
  border-bottom: 1px solid var(--rule);
}
.essay-item:last-child { border-bottom: none; }
.essay-meta {
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: var(--ink-faint);
  margin: 0 0 8px;
  text-transform: uppercase;
}
.essay-item h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.15;
  margin: 0 0 6px;
}
.essay-item h2 a { text-decoration: none; }
.essay-item h2 a:hover { color: var(--accent); }
.essay-dek {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  margin: 0;
}

/* The essay page itself */
.essay {
  max-width: 680px;
  margin: 0 auto;
  padding: 70px 24px 90px;
}
.essay-head {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 30px;
  margin-bottom: 36px;
}
.essay-head h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 42px;
  line-height: 1.1;
  margin: 0 0 14px;
}
.essay-head .dek {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--ink-soft);
  margin: 0 0 18px;
}
.essay-byline {
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin: 0;
}
.essay-byline strong {
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.18em;
}

.essay-body { font-size: 17.5px; line-height: 1.72; }
.essay-body p { margin: 0 0 20px; }
.essay-body h2 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 22px;
  text-transform: uppercase;
  margin: 44px 0 18px;
}
.essay-body .dropcap::first-letter {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 56px;
  float: left;
  line-height: 0.9;
  padding: 6px 10px 0 0;
}
.essay-pullquote {
  font-style: italic;
  font-size: 19px;
  color: var(--ink-soft);
  border-left: 2px solid var(--rule);
  margin: 32px 0;
  padding: 6px 0 6px 22px;
}
.essay-foot {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.essay-publication {
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: 0.06em;
  font-size: 13px;
  color: var(--ink-faint);
  margin: 0 0 14px;
}
.essay-back a {
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  text-decoration: none;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--ink-soft);
  padding-bottom: 2px;
}
.essay-back a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* Blog posts are slightly less formal than essays */
.essay-blog .essay-head h1 { font-size: 36px; }
.essay-blog .essay-body { font-size: 17px; }

/* Note in the about-text linking to Norwegian writing */
.lang-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-soft);
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

/* ---- Responsive -------------------------------------------- */
@media (max-width: 760px) {
  .topbar nav { gap: 14px; }
  .topbar nav a { font-size: 11px; letter-spacing: 0.08em; }
  .brand { font-size: 12px; letter-spacing: 0.14em; }

  .hero { padding: 80px 24px 64px; }
  .hero h1 { font-size: clamp(40px, 12vw, 64px); }

  .book-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .book-cover { max-width: 240px; margin: 0 auto; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .portrait { margin: 0 auto; }
  .portrait img { width: 200px; height: 250px; }

  .events-list li { grid-template-columns: 1fr; gap: 4px; }
  .ev-date { padding-top: 0; }

  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}
