/* ------------------------------------------------------------------
   Taidemaalari Päivi Jokinen — static site
   ------------------------------------------------------------------ */
:root {
  --ink: #2a2622;
  --ink-soft: #5c574f;
  --paper: #faf7f2;
  --paper-raised: #ffffff;
  --line: #e4ddd2;
  --accent: #8a3b2e;
  --accent-soft: #c98a3a;
  --max-w: 1180px;
  --radius: 6px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Georgia", "Iowan Old Style", "Palatino Linotype", serif;
  line-height: 1.6;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- header ---- */
.site-header {
  background: var(--paper-raised);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.brand small {
  display: block;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 2px;
}
nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
nav.main-nav a { color: var(--ink-soft); }
nav.main-nav a.active,
nav.main-nav a:hover { color: var(--accent); text-decoration: none; }

/* ---- hero ---- */
.hero {
  padding: 64px 0 40px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 10px;
  font-weight: 400;
}
.hero p.lede {
  max-width: 640px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 1.08rem;
}
.hero-figure {
  margin: 40px auto 0;
  max-width: 560px;
}
.hero-figure img {
  border-radius: var(--radius);
  box-shadow: 0 18px 40px -22px rgba(40, 30, 20, 0.45);
}

.placeholder-note {
  max-width: 640px;
  margin: 22px auto 0;
  padding: 12px 16px;
  border: 1px dashed var(--accent-soft);
  border-radius: var(--radius);
  background: #fff8ec;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: left;
}

/* ---- section headings ---- */
.section-head {
  text-align: center;
  margin: 10px 0 34px;
}
.section-head h2 {
  font-weight: 400;
  font-size: 1.7rem;
  margin: 0 0 8px;
}
.section-head p {
  color: var(--ink-soft);
  margin: 0;
  font-size: 0.98rem;
}

main { padding-bottom: 60px; }

/* ---- gallery grid ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
  margin-top: 10px;
}
.gallery-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -18px rgba(40,30,20,.35);
}
.gallery-card .thumb-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #efe9df;
}
.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-card .cap {
  padding: 12px 14px 14px;
  font-family: "Helvetica Neue", Arial, sans-serif;
}
.gallery-card .cap .t {
  font-size: 0.92rem;
  color: var(--ink);
  display: block;
}
.gallery-card .cap .m {
  font-size: 0.76rem;
  color: var(--ink-soft);
  display: block;
  margin-top: 3px;
}

/* ---- exhibitions timeline ---- */
.timeline {
  border-left: 2px solid var(--line);
  margin-left: 6px;
  padding-left: 26px;
}
.timeline-item {
  position: relative;
  padding: 4px 0 28px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-soft);
}
.timeline-item .yr {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
}
.timeline-item h3 {
  margin: 4px 0 4px;
  font-weight: 400;
  font-size: 1.15rem;
}
.timeline-item .place {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 0 0 10px;
}
.timeline-item .thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.timeline-item .thumbs img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  cursor: pointer;
}

/* ---- cv ---- */
.cv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 34px;
  align-items: start;
}
.cv-section h3 {
  font-weight: 400;
  font-size: 1.05rem;
  margin: 0 0 10px;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.cv-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.cv-section li {
  padding: 3px 0;
  border-bottom: 1px dotted var(--line);
}
.cv-section li:last-child { border-bottom: none; }

/* ---- contact ---- */
.contact-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}
.contact-card p { margin: 6px 0; }

/* ---- lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 12, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox figure {
  margin: 0;
  max-width: 92vw;
  max-height: 88vh;
  text-align: center;
}
.lightbox img {
  max-width: 92vw;
  max-height: 76vh;
  border-radius: 4px;
  margin: 0 auto;
}
.lightbox figcaption {
  color: #f2ece1;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9rem;
  margin-top: 14px;
}
.lightbox .lb-close,
.lightbox .lb-prev,
.lightbox .lb-next {
  position: absolute;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.35);
  color: #f2ece1;
  font-size: 1.4rem;
  line-height: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox .lb-close { top: 24px; right: 24px; }
.lightbox .lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-close:hover,
.lightbox .lb-prev:hover,
.lightbox .lb-next:hover { background: rgba(255,255,255,0.2); }

/* ---- footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-align: center;
}

@media (max-width: 640px) {
  nav.main-nav ul { gap: 16px; font-size: 0.76rem; }
  .site-header .wrap { justify-content: center; text-align: center; }
  .timeline-item .thumbs img { width: 100px; height: 74px; }
}
