/* ------------------------------------------------------------------
   Shared styles — index / experience / awards
   No webfonts on purpose: zero external requests, nothing to block.
   ------------------------------------------------------------------ */

:root {
  --bg:      #eae9e6;   /* warm off-white, never pure #fff */
  --surface: #f1f0ed;
  --text:    #1a1d23;
  --muted:   #5f656e;
  --faint:   #8b9098;
  --rule:    rgba(26, 29, 35, .15);
  --accent:  #2f4468;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Source Serif 4", Georgia, serif;
  --sans:  system-ui, -apple-system, "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;

  --col: 640px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;                 /* so the footer can sit at the bottom */
  display: flex;
  flex-direction: column;
}

.wrap {
  max-width: var(--col);
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* a sticky child cannot stick inside an overflow-clipping flex column */
body:has(.page-head) .wrap { display: block; }

a { color: inherit; }

.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* ---------- shared type ---------- */

h2.section-title {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .01em;
  margin: 0 0 9px;
}

section { padding: 15px 0; }

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 30px 0 16px;
}

.masthead .name {
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.15;
  margin: 0;
  flex: 1;
}
.masthead .name a { text-decoration: none; }

/* what Ivan does, and the languages he speaks — same treatment, stacked */
.masthead .role,
.masthead .speaks {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
  margin: 8px 0 0;
}
.masthead .speaks { margin-top: 4px; }

/* CV lives right under the name block, not among the icons */
.masthead .cv-link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  margin-top: 11px;
  transition: opacity .15s ease;
}
.masthead .cv-link:hover { opacity: .62; }
.masthead .cv-link .arrow { color: var(--faint); font-weight: 400; }

/* avatar — sits flush right in the masthead */
.avatar {
  width: 124px;
  height: 124px;
  flex: none;
  margin-left: auto;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface);
  border: 1px solid var(--rule);
  display: block;
}

/* ---------- contact strip (top of home page) ---------- */

.contact-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 20px;
  padding: 9px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 13.5px;
  list-style: none;
  margin: 0;
}

.contact-strip a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--muted);
  padding: 3px 0;
  transition: color .15s ease, opacity .15s ease;
}
.contact-strip a:hover { color: var(--text); }

/* monochrome icons — they inherit colour from the link */
.contact-strip svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  display: block;
}
.contact-strip .icon { opacity: .72; }
.contact-strip .icon:hover { opacity: 1; }

/* CV is the one entry that stays a word */
.contact-strip .cv { font-size: 13.5px; letter-spacing: .02em; }

.contact-strip .lang-slot { margin-left: auto; }

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

.lang {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 13px;
}

.lang button {
  font-family: var(--sans);
  font-size: 13px;
  background: none;
  border: 0;
  padding: 3px 0;
  color: var(--faint);
  cursor: pointer;
  transition: color .15s ease;
}
.lang button:hover { color: var(--text); }
.lang button[aria-current="true"] { color: var(--text); font-weight: 600; }

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

/* ---------- intro ---------- */

.intro {
  font-size: 26px;
  line-height: 1.34;
  letter-spacing: -.005em;
  margin: 0;
  padding: 18px 0 16px;
}
.intro .dim { color: var(--faint); }

/* unilume.ai in the intro — a link, underlined only on hover */
.intro-link {
  color: inherit;
  text-decoration: none;
  transition: color .15s ease;
}
.intro-link:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- compact rows (home page lists) ---------- */

.row {
  display: block;
  text-decoration: none;
  padding: 15px 0;
  border-top: 1px solid var(--rule);
}
.row:first-of-type { border-top: 0; }

.row-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.row-name {
  font-family: var(--sans);
  font-size: 15.5px;
  font-weight: 600;
  margin: 0;
}

.row-meta {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--faint);
  margin-left: auto;
  white-space: nowrap;
}

.row-sub {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--accent);
  margin: 3px 0 0;
}

.row p.desc {
  margin: 5px 0 0;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- awards: one-line rows ---------- */

.award {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
}
.award:first-of-type { border-top: 0; }

.award-name {
  font-family: var(--sans);
  font-size: 14.5px;
  margin: 0;
  font-weight: 500;
}

.award-note {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--faint);
  margin: 0 0 0 auto;
  white-space: nowrap;
}

/* ---------- expandable entry (native <details>, works without JS) ---------- */

.item {
  border-top: 1px solid var(--rule);
}
.item:first-of-type { border-top: 0; }

.item > summary {
  cursor: pointer;
  padding: 13px 0;
  list-style: none;                       /* hide the default triangle */
  display: block;
}
.item > summary::-webkit-details-marker { display: none; }
.item > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.item-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.item-name {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
/* the legal / long-form half of an organisation name */
.dim-sm {
  font-weight: 400;
  font-size: 12.5px;
  color: var(--faint);
  letter-spacing: 0;
}

.item-date {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--faint);
  margin-left: auto;
  white-space: nowrap;
}

/* chevron sits after the date and turns when the row opens */
.chev {
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--faint);
  border-bottom: 1.5px solid var(--faint);
  transform: rotate(45deg);
  transform-origin: center;
  margin-left: 2px;
  margin-bottom: 3px;
  transition: transform .18s ease;
}
.item[open] .chev { transform: rotate(-135deg); margin-bottom: 0; }

.item-role {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--accent);
  margin: 4px 0 0;
}

.item-summary {
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--muted);
  margin: 6px 0 0;
}

.item-body { padding: 2px 0 15px; }

.bullets {
  margin: 0;
  padding: 0 0 0 18px;
  list-style: none;
}
.bullets li {
  position: relative;
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 9px;
}
.bullets li:last-child { margin-bottom: 0; }
.bullets li::before {
  content: "—";
  position: absolute;
  left: -18px;
  color: var(--faint);
}

/* ---------- one-line rows (brief project / award lists) ---------- */

.line {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 8px 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
}
.line:first-of-type { border-top: 0; }

.line-name {
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 500;
  margin: 0;
  flex: 0 1 auto;        /* may shrink and wrap so the note stays in the column */
  min-width: 0;
}

.line-desc {
  font-size: 14.5px;
  color: var(--muted);
  margin: 0;
}

.line-note {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--faint);
  margin: 0 0 0 auto;
  white-space: nowrap;
  padding-left: 16px;
  flex: none;
  align-self: flex-start;
  padding-top: 2px;      /* sits level with the first line of a wrapped name */
}

/* a row that links through to its full entry */
a.line { transition: opacity .15s ease; }
a.line:hover { opacity: .6; }

/* the Currently rows read as one group — no rules between them */
#now .line { border-top: 0; padding: 6px 0; }

.line-arrow {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--faint);
  margin-left: auto;      /* holds the right edge whether or not a date is shown */
  padding-left: 12px;
  flex: none;
}

/* ---------- skills ---------- */

.skills { margin: 0; }

/* one block per area: title, a sentence, then the tech chips */
.skill-block {
  padding: 11px 0;
}
.skill-block:first-of-type { padding-top: 0; }

.skill-title {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 3px;
}

.skill-desc {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 6px;
}

/* ---------- tech marquee (same idea as react-fast-marquee on the old site:
   an endless strip of badges that pauses when you hover it) ---------- */

.marquee {
  overflow: hidden;
  padding: 0;
  /* fade the strip out at both edges instead of cutting it hard */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent);
          mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track { animation-play-state: paused; }

/* two identical sets side by side; shifting by half the track loops seamlessly */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.marquee-set {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0 22px 0 0;
  list-style: none;
}

.badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 2px 0;
  transition: color .2s ease;
}
.badge svg {
  width: 15px;
  height: 15px;
  fill: currentColor;          /* monochrome, matches the text */
  flex: none;
  opacity: .75;
}
.badge:hover { color: var(--text); }
.badge:hover svg { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .marquee { overflow-x: auto; }
}

/* ---------- section buttons ---------- */

#sections { padding: 14px 0 0; }

.buttons {
  display: flex;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  padding: 9px 15px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  transition: border-color .15s ease, color .15s ease;
}
.btn:hover { border-color: var(--text); color: var(--text); }
.btn .arrow { color: var(--faint); }
.btn:hover .arrow { color: var(--text); }

/* ---------- "see everything" links ---------- */

.more {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--accent);
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  transition: opacity .15s ease;
}
.more:hover { opacity: .62; }
.more .arrow { margin-left: auto; color: var(--faint); }


/* ---------- detail pages ---------- */

.backlink {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  padding: 26px 0 0;
}
.backlink:hover { color: var(--text); }

/* sticks to the top; whatever scrolls beneath it blurs out */
.page-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin: 0 -24px;
  padding: 0 24px 12px;
  background: rgba(234, 233, 230, .72);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
          backdrop-filter: blur(12px) saturate(120%);
}
.page-head .lang { margin-left: auto; padding-top: 26px; }

/* soft edge so the blur fades instead of ending on a hard line */
.page-head::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: 16px;
  background: linear-gradient(to bottom, rgba(234, 233, 230, .72), rgba(234, 233, 230, 0));
  -webkit-backdrop-filter: blur(5px);
          backdrop-filter: blur(5px);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent);
          mask-image: linear-gradient(to bottom, #000, transparent);
}

.page-title {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.2;
  margin: 16px 0 0;
}

.page-intro {
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
  margin: 10px 0 0;
  padding-bottom: 20px;
}

/* full entry (experience / awards detail) */

.entry {
  padding: 20px 0;
  border-top: 1px solid var(--rule);
}

.entry-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 4px;
}

.entry-title {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}
.entry-title a { text-decoration: none; }
.entry-title a:hover { opacity: .65; }
.entry-title .arrow { color: var(--faint); font-weight: 400; margin-left: 4px; }

.entry-date {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--faint);
  margin-left: auto;
  white-space: nowrap;
}

.entry-role {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 10px;
}

.entry p {
  margin: 0 0 12px;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--muted);
}
.entry p:last-of-type { margin-bottom: 0; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 2px 8px;
}

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

footer {
  margin-top: auto;                  /* pushes the footer to the bottom */
  padding: 16px 0 0;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--faint);
}

.footer-note {
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 10px;
  max-width: 34em;
}
.footer-note a {
  color: var(--accent);
  text-decoration: none;
}
.footer-note a:hover { opacity: .7; }

.footer-bottom {
  display: flex;
  gap: 16px;
  align-items: baseline;
}
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--text); }

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

@media (max-width: 560px) {
  .masthead { padding-top: 26px; gap: 18px; }
  .masthead .name { font-size: 23px; }
  .masthead .role,
  .masthead .speaks { font-size: 13px; }
  .avatar { width: 96px; height: 96px; }

  .contact-strip { gap: 4px 16px; font-size: 12.5px; }
  .buttons { gap: 6px; }
  .btn { font-size: 13px; padding: 8px 10px; gap: 6px; flex: 1; justify-content: center; }
  .lang { gap: 6px; font-size: 12.5px; }
  .lang button { font-size: 12.5px; }

  .intro { font-size: 22px; padding: 30px 0 26px; }
  .page-title { font-size: 27px; }
  .page-intro { font-size: 16.5px; }

  section { padding: 14px 0; }

  .row-head, .entry-head { flex-wrap: wrap; }
  .row-meta, .entry-date { margin-left: 0; width: 100%; }

  .award { flex-wrap: wrap; gap: 2px; }
  .award-note { margin-left: 0; width: 100%; }

  /* keep the chevron on the title row; the date drops below it */
  .item-head { flex-wrap: wrap; }
  .item-name { flex: 1; }
  .chev { order: 2; margin-left: auto; margin-bottom: 4px; }
  .item[open] .chev { margin-bottom: 0; }
  .item-date { order: 3; width: 100%; margin-left: 0; margin-top: 2px; }

  .line { flex-wrap: wrap; gap: 2px; }
  .line-note { margin-left: 0; padding-left: 0; width: 100%; }

  .skill-row { flex-direction: column; gap: 3px; }
  .skill-key { width: auto; padding-top: 0; }

}
