/* Dimitrios Halatsis — personal site
   Hand-rolled, no build step, no dependencies. */

:root {
  --bg:      #fcfcfa;
  --surface: #f4f3ef;
  --text:    #1c1c1a;
  --muted:   #6e6d67;
  --line:    #e4e2db;
  --accent:  #1b6b73;
  --accent-soft: #1b6b731a;
  --maxw: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #121311;
    --surface: #1b1c19;
    --text:    #e8e7e2;
    --muted:   #9c9b94;
    --line:    #2c2d29;
    --accent:  #6fc3ca;
    --accent-soft: #6fc3ca1f;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern" 1, "liga" 1;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

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

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

/* ---------- nav ---------- */

nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg); /* fallback where color-mix is unsupported */
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}

nav .wrap {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  height: 3.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}
nav .wrap::-webkit-scrollbar { display: none; }

nav a {
  color: var(--muted);
  font-size: .875rem;
  letter-spacing: .01em;
  white-space: nowrap;
}
nav a:hover { color: var(--text); text-decoration: none; }
nav .brand { color: var(--text); font-weight: 600; margin-right: auto; }

/* ---------- hero ---------- */

header.hero { padding: 4rem 0 2.5rem; }

.hero-top {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.hero-top img {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

h1 {
  font-size: 2.1rem;
  line-height: 1.15;
  margin: 0 0 .4rem;
  letter-spacing: -.022em;
  font-weight: 650;
}

.role { margin: 0; color: var(--muted); font-size: 1.02rem; }
.role strong { color: var(--text); font-weight: 550; }

.status {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: .85rem;
  padding: .3rem .7rem;
  border: 1px solid var(--line);
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: .82rem;
  color: var(--text);
}
.status .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}

/* ---------- link row ---------- */

.links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.6rem;
}

.links a {
  padding: .34rem .8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: .87rem;
  color: var(--text);
  background: var(--surface);
}
.links a:hover {
  text-decoration: none;
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- sections ---------- */

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

h2 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 1.5rem;
}

h3 { font-size: 1.02rem; font-weight: 600; margin: 0 0 .3rem; letter-spacing: -.005em; }

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

.lede { font-size: 1.06rem; }

/* ---------- research themes ---------- */

.themes { display: grid; gap: 1.6rem; }

.theme p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ---------- publications ---------- */

.year {
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  margin: 2rem 0 .9rem;
  font-variant-numeric: tabular-nums;
}
.year:first-of-type { margin-top: 0; }

.pub { margin-bottom: 1.5rem; }
.pub-title { font-weight: 550; margin: 0 0 .2rem; line-height: 1.4; }
.pub-authors { margin: 0 0 .2rem; font-size: .9rem; color: var(--muted); line-height: 1.5; }
.pub-authors .me { color: var(--text); font-weight: 600; }
.pub-venue { margin: 0; font-size: .875rem; color: var(--muted); font-style: italic; }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .45rem; }
.tags a {
  font-size: .74rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: .15rem .5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
}
.tags a:hover { text-decoration: none; color: var(--accent); border-color: var(--accent); }

/* ---------- projects ---------- */

.project { margin-bottom: 1.75rem; }
.project:last-child { margin-bottom: 0; }
.project p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- background list ---------- */

.timeline { display: grid; gap: .85rem; }

.row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  align-items: baseline;
}
.row .when {
  color: var(--muted);
  font-size: .84rem;
  font-variant-numeric: tabular-nums;
}
.row .what { font-size: .95rem; }
.row .what span { color: var(--muted); }

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

footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 3.5rem;
  color: var(--muted);
  font-size: .84rem;
}

/* ---------- responsive ---------- */

@media (max-width: 560px) {
  body { font-size: 16px; }
  header.hero { padding: 2.5rem 0 2rem; }
  .hero-top { flex-direction: column; align-items: flex-start; gap: 1.1rem; }
  .hero-top img { width: 140px; height: 140px; }
  h1 { font-size: 1.7rem; }
  .row { grid-template-columns: 1fr; gap: .1rem; }
}

/* ---------- added: badges, sub-headings, gallery ---------- */

.badge {
  display: inline-block;
  margin-left: .4rem;
  padding: .05rem .4rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  font-size: .68rem;
  font-style: normal;
  letter-spacing: .06em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.footnote { margin-top: 2rem; font-size: .87rem; color: var(--muted); }

h3.sub {
  margin: 2.25rem 0 1rem;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  font-weight: 600;
}

p.muted { color: var(--muted); font-size: .95rem; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .75rem;
  margin-top: 1.75rem;
}

.gallery figure { margin: 0; }

.gallery img {
  display: block;
  width: 100%;
  height: auto;          /* beats the height="" presentational hint */
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.gallery figcaption {
  margin-top: .4rem;
  font-size: .8rem;
  color: var(--muted);
}

.photo-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 4;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: .82rem;
  background: var(--surface);
}
