/* dusanjov.com
   One stylesheet, no framework. Geist for reading, Geist Mono for labels and code.
   Flat, dark and monochrome; the accent (js/accent.js) is the only colour. */

:root {
  --accent: #22eaaa;
  --accent-hover: #4ff0bd;
  --accent-rgb: 34, 234, 170;

  --bg: #0d0d0d;
  --surface: #161616;
  --line: #262626;
  --line-strong: #3a3a3a;
  --text: #cfcfcf;
  --strong: #f4f4f4;
  --muted: #8f8f8f;

  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --page: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --label-col: minmax(0, 3fr);
  --body-col: minmax(0, 9fr);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

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

h1, h2, h3, h4 { color: var(--strong); font-weight: 400; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
strong, b { color: var(--strong); font-weight: 600; }

a {
  color: var(--strong);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color .15s, text-decoration-color .15s;
}
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

code, pre, kbd { font-family: var(--mono); }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }

/* Small uppercase mono text: kickers, labels, meta */
.label, .kicker {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.5;
}
.kicker { color: var(--accent); margin: 0 0 20px; }

/* ---------- Header ---------- */

.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.logo {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--strong);
  text-decoration: none;
  margin-right: auto;
}
.logo:hover { color: var(--accent); }
.nav { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; }
.nav a {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--strong); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; }

/* "#" steps to the next accent colour (js/accent.js) */
.accent-btn {
  width: 30px; height: 30px; padding: 0; flex: none;
  border: 1px solid var(--line-strong); border-radius: 0;
  background: transparent; color: var(--accent);
  font: 500 15px/1 var(--mono); cursor: pointer;
}
.accent-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }

@media (max-width: 640px) {
  .site-head .wrap { flex-wrap: wrap; row-gap: 0; padding-top: 14px; padding-bottom: 12px; min-height: 0; }
  .nav { order: 3; width: 100%; gap: 20px; padding-top: 10px; }
  .nav a { font-size: 13px; }
}

/* ---------- Page heads ---------- */

.page-head { padding-top: clamp(56px, 10vw, 128px); padding-bottom: clamp(40px, 6vw, 72px); }
/* Old site photos behind the main page heads, darkened so the text stays readable */
.has-photo { position: relative; isolation: isolate; text-shadow: 0 1px 12px rgba(0, 0, 0, .6); }
.has-photo::before {
  content: "";
  position: absolute; z-index: -1;
  top: 0; bottom: 0; left: 50%;
  width: 100vw; transform: translateX(-50%);
  background:
    linear-gradient(rgba(13, 13, 13, .18), rgba(13, 13, 13, .28) 70%, var(--bg)),
    var(--photo) center / cover no-repeat;
}
.has-photo[data-photo="1"] { --photo: url(../img/slider_1.jpg); }
.has-photo[data-photo="2"] { --photo: url(../img/slider_2.jpg); }
.has-photo[data-photo="3"] { --photo: url(../img/slider_3.jpg); }

.page-head h1 {
  font-size: clamp(44px, 7.4vw, 96px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.035em;
  max-width: 14ch;
}
.page-head h1.long { max-width: 20ch; font-size: clamp(38px, 5.6vw, 72px); line-height: 1.05; }
.page-head .lead { margin: 28px 0 0; max-width: 38ch; }
.lead {
  font-size: clamp(22px, 2.3vw, 28px);
  line-height: 1.4;
  font-weight: 300;
  color: var(--strong);
  letter-spacing: -0.01em;
}
.page-head .tags { margin-top: 28px; }

/* Home hero: name and tagline on the left, facts on the right */
.hero { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 32px 64px; align-items: end; }
.hero h1 { font-size: clamp(52px, 9.6vw, 136px); max-width: none; line-height: 0.92; }
.hero h1 span { display: block; }
.hero h1 span + span { padding-left: 0.6em; }
.hero .lead { max-width: 24ch; }
.facts { margin: 0; padding: 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.facts dd { margin: 0; font-size: 17px; line-height: 1.45; color: var(--strong); }
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero h1 span + span { padding-left: 0; }
}

/* ---------- Sections: mono label left, content right ---------- */

.band { padding: clamp(48px, 7vw, 96px) 0; border-top: 1px solid var(--line); }
.split { display: grid; grid-template-columns: var(--label-col) var(--body-col); gap: 24px 48px; }
.split > .label { position: sticky; top: 24px; align-self: start; padding-top: 6px; }
.split + .split { margin-top: clamp(48px, 6vw, 80px); }
@media (max-width: 800px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split > .label { position: static; padding-top: 0; }
}

.prose { max-width: 40em; }
.prose p, .prose li { color: var(--text); }
.prose > :last-child { margin-bottom: 0; }
.big { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.4; font-weight: 300; color: var(--strong); letter-spacing: -0.01em; max-width: 30ch; }
.big + .big { margin-top: 0.6em; }

.more { font-family: var(--mono); font-size: 14px; margin: 32px 0 0; }

/* ---------- Index lists (projects, notes) ---------- */

.index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); counter-reset: idx; }
.index > li { border-bottom: 1px solid var(--line); counter-increment: idx; }
.index-row {
  display: grid;
  grid-template-columns: 3.2em minmax(0, 4fr) minmax(0, 6fr) 9em;
  gap: 8px 32px;
  align-items: baseline;
  padding: 22px 0;
  color: inherit;
  text-decoration: none;
}
.index-row::before {
  content: counter(idx, decimal-leading-zero);
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
a.index-row:hover .index-title { color: var(--accent); }
.index-title { font-size: clamp(24px, 2.4vw, 30px); line-height: 1.2; letter-spacing: -0.015em; color: var(--strong); transition: color .15s; }
.index-desc { font-size: 17px; line-height: 1.5; color: var(--text); }
.index-meta { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); text-align: right; }
.index-meta.live { color: var(--accent); }
@media (max-width: 900px) {
  .index-row { grid-template-columns: 2.6em minmax(0, 1fr); }
  .index-row::before { grid-row: 1; }
  .index-title { grid-column: 2; }
  .index-desc, .index-meta { grid-column: 2; text-align: left; }
  .index-meta { order: -1; grid-row: auto; }
}

/* Projects page: three columns, picture on top */
.works { list-style: none; margin: 0; padding: 0 0 clamp(48px, 6vw, 80px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 40px; }
.work { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 20px; }
.work-pic { display: block; border: 1px solid var(--line); background: var(--surface); margin-bottom: 20px; }
.work-pic img { width: 100%; aspect-ratio: 1900 / 1146; object-fit: cover; transition: opacity .2s; }
.work-pic:hover img { opacity: .85; }
.work h2 { font-size: clamp(24px, 2.2vw, 30px); line-height: 1.15; letter-spacing: -0.02em; margin: 8px 0 12px; }
.work h2 a { text-decoration: none; }
.work h2 a:hover { color: var(--accent); }
.work p { font-size: 16px; line-height: 1.6; margin: 0; }
.work .label, .bench .label { font-size: 12px; line-height: 1.5; }
@media (max-width: 1000px) { .works { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .works { grid-template-columns: minmax(0, 1fr); } }

/* Plain list of things in progress */
.bench { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px 40px; }
.bench h3 { font-size: 24px; letter-spacing: -0.015em; margin: 8px 0 10px; }
.bench p { font-size: 17px; margin: 0; }

/* Tags */
.tags { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.tags li { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tags li::before { content: "#"; color: var(--accent); margin-right: 1px; }

/* Scratchpad notes list */
.notes { list-style: none; margin: 0; padding: 0; counter-reset: idx; }
.notes > li { counter-increment: idx; display: grid; grid-template-columns: 3.2em minmax(0, 1fr); gap: 0 24px; padding: 32px 0; border-top: 1px solid var(--line); }
.notes > li::before { content: counter(idx, decimal-leading-zero); font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 12px; }
.notes h2 { font-size: clamp(26px, 2.8vw, 36px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 12px; max-width: 22ch; }
.notes h2 a { text-decoration: none; }
.notes h2 a:hover { color: var(--accent); }
.notes p { max-width: 40em; margin: 0; }

/* Skill rows: group on the left, items as running text */
.rows { margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows > div { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: 6px 32px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.rows dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 6px; }
.rows dd { margin: 0; font-size: 19px; line-height: 1.55; color: var(--strong); }
.rows dd p { color: var(--text); margin: 4px 0 0; font-size: 17px; }
.rows dd h3 { font-size: 22px; letter-spacing: -0.01em; }
.inline-list { list-style: none; margin: 0; padding: 0; }
.inline-list li { display: inline; }
.inline-list li:not(:last-child)::after { content: " / "; color: var(--line-strong); }
@media (max-width: 640px) { .rows > div { grid-template-columns: minmax(0, 1fr); } }

/* Big closing line */
.closing .big { max-width: 22ch; font-size: clamp(30px, 4.4vw, 56px); line-height: 1.1; letter-spacing: -0.03em; }
.closing .mail { font-family: var(--mono); font-size: clamp(16px, 1.8vw, 20px); margin: 28px 0 0; }

/* ---------- Articles and project write-ups ---------- */

.article { display: grid; grid-template-columns: var(--label-col) var(--body-col); gap: 32px 48px; padding: clamp(40px, 6vw, 72px) 0 clamp(64px, 8vw, 120px); border-top: 1px solid var(--line); }
.article .body { max-width: 40em; grid-column: 2; }
.article .body > :first-child { margin-top: 0; }
.article .body h2 { font-size: clamp(26px, 2.6vw, 32px); line-height: 1.2; letter-spacing: -0.02em; margin: 2em 0 0.6em; }
.article .body h3 { font-size: 22px; line-height: 1.3; letter-spacing: -0.01em; margin: 1.8em 0 0.5em; }
.article .body h2 code, .article .body h3 code { font-size: 0.8em; background: none; border: 0; padding: 0; }
.article ul, .article ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.article li { margin-bottom: 0.45em; }
.article li::marker { color: var(--muted); font-family: var(--mono); font-size: 0.8em; }
.article .steps li { margin-bottom: 0.9em; }
.article .back { font-family: var(--mono); font-size: 14px; margin-top: 3em; }
@media (max-width: 800px) {
  .article { grid-template-columns: minmax(0, 1fr); }
  .article .body { grid-column: 1; }
}

:not(pre) > code {
  font-size: 0.8em;
  padding: 0.1em 0.35em;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--strong);
  overflow-wrap: anywhere;
}
pre {
  margin: 0 0 1.4em;
  padding: 18px 20px;
  background: var(--surface);
  border-left: 2px solid var(--accent);
  overflow-x: auto;
}
pre { font-size: 13.5px; line-height: 1.65; }
pre code { font-size: inherit; color: var(--strong); white-space: pre; }

.table-scroll { overflow-x: auto; margin: 0 0 1.4em; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 16px; margin: 0 0 1.4em; }
.table-scroll .spec-table { margin: 0; min-width: 520px; }
.spec-table th, .spec-table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec-table th { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--line-strong); }
.spec-table td + td, .spec-table th + th { text-align: right; font-variant-numeric: tabular-nums; }
.spec-table.plain td + td, .spec-table.plain th + th { text-align: left; }
.spec-table.plain td:last-child { white-space: nowrap; }

.model-list { margin: 0 0 1.4em; }
.model-list dt { margin-top: 1em; color: var(--strong); font-weight: 600; }
.model-list dt span { display: block; font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--muted); }
.model-list dd { margin: 0.25em 0 0; }

/* Side notes for project pages: open, no accordions */
.aside { grid-column: 1; grid-row: 1; align-self: start; position: sticky; top: 24px; display: grid; gap: 28px; }
.aside section { border-top: 1px solid var(--line-strong); padding-top: 12px; }
.aside .label { margin: 0 0 8px; }
.aside p, .aside li { font-size: 16px; line-height: 1.55; }
.aside ul { padding-left: 1.1em; margin: 0; }
.aside li { margin-bottom: 0.35em; }
.aside p:last-child { margin-bottom: 0; }
.aside .label { font-size: 12px; line-height: 1.5; }
.aside .tags { padding: 0; margin: 0; }
.aside .tags li { font-size: 12px; margin: 0; }
.aside .note { font-family: var(--mono); font-size: 12px; color: var(--muted); line-height: 1.6; }
@media (max-width: 800px) {
  .aside { grid-row: auto; position: static; order: 2; }
}

/* Apps embedded in a frame get the full width under the head */
.app { padding-bottom: clamp(48px, 6vw, 80px); }
.vc-frame { display: block; width: 100%; height: 420px; border: 0; border-top: 1px solid var(--line); background: transparent; color-scheme: dark; } /* must match the dark apps, or the browser paints the frame an opaque grey */
.app-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 28px; margin: 24px 0 0; font-family: var(--mono); font-size: 14px; }
.app-actions .note { font-size: 12px; color: var(--muted); }

/* Buttons: flat, square, mono */
.btn {
  display: inline-block;
  padding: 12px 20px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  line-height: 1;
}
.btn:hover { background: transparent; color: var(--accent); }

/* Videos (pizza oven) */
.media { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 2em; }
.media figure { flex: 1 1 220px; max-width: 300px; margin: 0; }
.media video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #000; }
.media figcaption { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.5; }

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

.site-foot { border-top: 1px solid var(--line); padding: 40px 0 48px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.site-foot .wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 20px 48px; }
.site-foot p { margin: 0; line-height: 1.7; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 24px; }
.site-foot a { color: var(--text); text-decoration: none; }
.site-foot a:hover { color: var(--accent); }
.site-foot .foot-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
@media (max-width: 800px) { .site-foot .wrap { grid-template-columns: minmax(0, 1fr); } }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Scroll reveal (js/reveal.js): once, GPU-friendly opacity and transform only */
.reveal {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; will-change: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
