/* Iraklis Kyriakidis - irakliskyriakidis.eu
   Hand-rolled, no framework. Mint accent carried over from the 2015 site. */

:root {
  --bg:        #ffffff;
  --surface:   #f5f7f6;
  --text:      #14181b;
  --muted:     #59636e;
  --line:      #e2e6e4;
  --accent:    #0d8f5f;   /* readable mint on light */
  --accent-ink:#0a6e49;
  --mint:      #42dca3;   /* original brand mint, used on dark only */

  --font-head: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: Lora, Georgia, "Times New Roman", serif;

  --wrap: 1100px;
  --narrow: 46rem;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0e1113;
    --surface:   #15191c;
    --text:      #e7ecef;
    --muted:     #9aa5b0;
    --line:      #252b30;
    --accent:    #42dca3;
    --accent-ink:#6ee7bd;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
}

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

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

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: #fff; padding: 0.6rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

.wrap {
  width: 100%; max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}
.narrow { max-width: calc(var(--narrow) + 5rem); }

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

.nav {
  position: sticky; top: 0; z-index: 50;
  transition: background-color .25s ease, border-color .25s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4rem;
}
.nav nav {
  display: flex; gap: clamp(0.9rem, 2.5vw, 1.75rem);
  margin-left: auto;   /* no brand in the bar — links sit right */
}
.nav nav a {
  font-family: var(--font-head); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
}
.nav nav a:hover { color: var(--accent); }

.nav nav a { position: relative; padding-block: 0.4rem; }

/* current page / section */
.nav nav a[aria-current] { color: var(--accent); }
.nav nav a[aria-current]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; border-radius: 2px; background: currentColor;
}

/* all four items stay on a phone; tighten instead of hiding */
@media (max-width: 34rem) {
  .nav nav { gap: 0.9rem; }
  .nav nav a { font-size: 0.7rem; letter-spacing: 0.04em; }
}

/* home page: nav floats over the hero until scrolled */
.home .nav { position: fixed; inset-inline: 0; }
.home .nav:not(.is-stuck) nav a { color: rgba(255,255,255,.85); }
.home .nav:not(.is-stuck) nav a:hover,
.home .nav:not(.is-stuck) nav a[aria-current] { color: var(--mint); }

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

.hero {
  position: relative;
  min-height: 100svh;
  display: grid; align-items: center;
  isolation: isolate;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg,
    rgba(6,10,12,.72) 0%, rgba(6,10,12,.55) 45%, rgba(6,10,12,.85) 100%);
}
.hero-inner { padding-block: 8rem 6rem; text-align: center; }
.hero-hello {
  font-family: var(--font-head); font-weight: 600;
  font-size: 0.85rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--mint); margin: 0 0 1rem;
}
.hero-name {
  font-size: clamp(2.75rem, 9vw, 6rem);
  margin: 0 0 0.35em; color: #fff;
  text-wrap: balance;
}
.hero-tagline {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,.92); margin: 0 0 1rem;
}
.hero-sub {
  color: rgba(255,255,255,.72);
  max-width: 34rem; margin: 0 auto;
  font-size: clamp(1rem, 2vw, 1.1rem);
  text-wrap: balance;
}
.hero-cue {
  display: inline-grid; place-items: center;
  width: 3rem; height: 3rem; margin-top: 3rem;
  border: 1px solid rgba(255,255,255,.35); border-radius: 50%;
  color: rgba(255,255,255,.85);
  animation: bob 2.4s ease-in-out infinite;
}
.hero-cue:hover { border-color: var(--mint); color: var(--mint); }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}
@media (prefers-reduced-motion: reduce) { .hero-cue { animation: none; } }

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

.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section.alt { background: var(--surface); }
.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2.125rem);
  margin-bottom: 1.25em;
  position: relative; padding-bottom: 0.5em;
}
.section-title::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 3rem; height: 3px; border-radius: 2px; background: var(--accent);
}
.section p { max-width: var(--narrow); }
.lead { font-size: 1.15em; }
.narrow-p { max-width: var(--narrow); }

/* capability cards */
.cards {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  margin-top: 2.5rem;
}
.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.65rem;
  background: var(--bg);
}
.card h3 {
  font-size: 1.05rem; margin: 0 0 0.6rem;
  padding-left: 0.85rem; position: relative;
}
.card h3::before {
  content: ""; position: absolute; left: 0; top: 0.15em;
  width: 3px; height: 1em; border-radius: 2px; background: var(--accent);
}
.card p { margin: 0; font-size: 0.97em; color: var(--muted); max-width: none; }
.bio-note {
  margin-top: 2rem; padding-left: 1.1rem;
  border-left: 3px solid var(--accent);
  font-style: italic; color: var(--muted);
}

.tags {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  list-style: none; padding: 0; margin: 2rem 0 0;
}
.tags li {
  font-family: var(--font-head); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.4rem 0.7rem; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); background: var(--bg);
}

/* experience timeline */
.timeline { list-style: none; padding: 0; margin: 2.5rem 0 2rem; }
.timeline li {
  position: relative;
  padding: 0 0 2rem 1.75rem;
  border-left: 1px solid var(--line);
}
.timeline li::before {
  content: ""; position: absolute; left: -5px; top: 0.45rem;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--surface);
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-when {
  font-family: var(--font-head); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 0.3rem;
}
.tl-what { font-size: 1.05rem; margin: 0 0 0.5rem; }
.tl-what span {
  display: block; font-weight: 600; font-size: 0.92rem;
  color: var(--accent); letter-spacing: 0;
}
.timeline p:not(.tl-when) { margin: 0; color: var(--muted); font-size: 0.97em; }

.facts { list-style: none; padding: 0; margin: 0; max-width: var(--narrow); }
.facts li { position: relative; padding-left: 1.6rem; margin-bottom: 0.9rem; }
.facts li::before {
  content: ""; position: absolute; left: 0; top: 0.72em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}

.quote { margin: 2.5rem 0 1.5rem; padding: 0; max-width: var(--narrow); }
.quote p {
  font-size: clamp(1.25rem, 3vw, 1.6rem); font-style: italic;
  line-height: 1.45; margin: 0 0 0.6rem; text-wrap: balance;
}
.quote cite {
  font-family: var(--font-head); font-style: normal; font-weight: 600;
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
.closing { color: var(--muted); font-style: italic; }

/* ---------- post lists ---------- */

.post-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.post-list li + li { border-top: 1px solid var(--line); }
.post-list a {
  display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem;
  align-items: baseline; padding: 1rem 0;
  text-decoration: none; color: var(--text);
}
.post-list a:hover span { color: var(--accent); }
.post-list time {
  font-family: var(--font-head); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
@media (max-width: 34rem) {
  .post-list a { grid-template-columns: 1fr; gap: 0.15rem; }
}

.more-link {
  font-family: var(--font-head); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
}
.more-link:hover { text-decoration: underline; }

/* ---------- articles ---------- */

.article {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  max-width: calc(var(--narrow) + 5rem);
}
.article-head { margin-bottom: 2.5rem; }
.article-head h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); text-wrap: balance; }
.eyebrow {
  font-family: var(--font-head); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 0.75rem;
}
.eyebrow a { text-decoration: none; }
.article-meta {
  font-family: var(--font-head); font-size: 0.8rem;
  color: var(--muted); margin: 0;
}

.prose > * + * { margin-top: 1.25em; }
.prose h2 { font-size: 1.5rem; margin-top: 2.5em; }
.prose h3 { font-size: 1.2rem; margin-top: 2em; }
.prose img {
  border-radius: var(--radius); border: 1px solid var(--line);
  margin-block: 1.75em;
}
.prose blockquote {
  margin: 1.75em 0; padding-left: 1.25rem;
  border-left: 3px solid var(--accent); color: var(--muted); font-style: italic;
}
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em; background: var(--surface);
  padding: 0.15em 0.4em; border-radius: 4px; border: 1px solid var(--line);
}
.prose pre {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.15rem;
  overflow-x: auto; font-size: 0.85rem; line-height: 1.6;
}
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.92em; }
.prose th, .prose td {
  text-align: left; padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--line);
}
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: 0.4em; }

.article-nav {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  margin-top: 4rem; padding-top: 1.75rem; border-top: 1px solid var(--line);
}
.article-nav a {
  display: grid; gap: 0.2rem; text-decoration: none;
  max-width: 20rem; font-family: var(--font-head); font-size: 0.95rem;
}
.article-nav .next { text-align: right; margin-left: auto; }
.article-nav span {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}

.archive { list-style: none; padding: 0; margin: 0; }
.archive li { padding-block: 1.5rem; border-bottom: 1px solid var(--line); }
.archive time {
  display: block; font-family: var(--font-head); font-size: 0.72rem;
  font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.3rem;
}
.archive a {
  font-family: var(--font-head); font-size: 1.15rem; font-weight: 600;
  text-decoration: none;
}
.archive a:hover { text-decoration: underline; }
.archive p { color: var(--muted); font-size: 0.95rem; margin: 0.4rem 0 0; }

.error-page { text-align: center; padding-block: clamp(4rem, 12vw, 8rem); }
.error-page .eyebrow { font-size: 1rem; letter-spacing: 0.3em; }
.error-links { display: flex; gap: 1.5rem; justify-content: center; margin-top: 2rem; }

/* ---------- contact + footer ---------- */

.contact-actions {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  margin: 2rem 0;
}
.btn {
  display: inline-block;
  font-family: var(--font-head); font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.85rem 1.5rem; border-radius: var(--radius);
  text-decoration: none;
  background: var(--accent); color: var(--bg);
  border: 1px solid var(--accent);
  transition: opacity .15s ease;
}
.btn:hover { opacity: 0.85; color: var(--bg); }
.btn-ghost {
  background: transparent; color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}
.btn-ghost:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
.mail-fallback { color: var(--muted); margin: 0 0 1.5rem; }
.social {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  list-style: none; padding: 0; margin: 0;
}
.social a {
  font-family: var(--font-head); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
}
.social a:hover { text-decoration: underline; }

.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding-block: 2.25rem;
}
.footer-meta { color: var(--muted); font-size: 0.85rem; margin: 0; }

/* ---------- CV page ---------- */

.cv-doc { padding-block: clamp(2.5rem, 6vw, 4rem) 4rem; }

.cv-head { padding-bottom: 1.75rem; border-bottom: 2px solid var(--accent); margin-bottom: 2.5rem; }
.cv-head h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin: 0 0 0.35rem; }
.cv-role {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(1rem, 2.2vw, 1.15rem); color: var(--accent);
  margin: 0 0 0.35rem;
}
.cv-strap { color: var(--muted); font-size: 0.95rem; margin: 0 0 1.1rem; }
.cv-contact {
  display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem;
  list-style: none; padding: 0; margin: 0;
  font-family: var(--font-head); font-size: 0.85rem; color: var(--muted);
}
.cv-contact a { text-decoration: none; }
.cv-contact a:hover { text-decoration: underline; }
.print-hint { font-size: 0.8rem; color: var(--muted); font-style: italic; margin: 1rem 0 0; }

.cv-section { margin-bottom: 2.75rem; }
.cv-section > h2 {
  font-size: 0.85rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 1.35rem;
  padding-bottom: 0.5rem; border-bottom: 1px solid var(--line);
}
.cv-section > p { max-width: none; }

.cv-job { margin-bottom: 1.9rem; }
.cv-job:last-child { margin-bottom: 0; }
.cv-job h3 { font-size: 1.05rem; margin: 0 0 0.2rem; }
.cv-org {
  font-family: var(--font-head); font-weight: 600; font-size: 0.92rem;
  color: var(--accent); margin: 0 0 0.15rem; max-width: none;
}
.cv-org span { color: var(--muted); font-weight: 400; }
.cv-dates {
  font-family: var(--font-head); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 0.7rem; max-width: none;
}
.cv-job p { max-width: none; }
.cv-job ul { margin: 0.5rem 0 0; padding-left: 1.15rem; }
.cv-job li { margin-bottom: 0.35rem; color: var(--muted); font-size: 0.97em; }

.cv-cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.cv-cols h2 { margin-top: 0; }
.cv-cols > div > * + h2 { margin-top: 2rem; }
.cv-list { list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: 0.95em; }
.cv-list li { margin-bottom: 0.3rem; }
.cv-cols .tags { margin-top: 0; }

/* ---------- print: the CV should come out as a clean document ---------- */

@media print {
  :root {
    --bg: #ffffff; --surface: #ffffff; --text: #000000;
    --muted: #333333; --line: #cccccc; --accent: #0a6e49;
  }
  .no-print, .nav, .footer, .skip, .print-hint { display: none !important; }

  body { font-size: 10.5pt; line-height: 1.42; }
  .wrap { max-width: none; padding-inline: 0; }
  .cv-doc { padding-block: 0; }

  .cv-head { border-bottom-width: 1.5pt; margin-bottom: 14pt; padding-bottom: 10pt; }
  .cv-head h1 { font-size: 20pt; }
  .cv-role { font-size: 11pt; }
  .cv-strap, .cv-contact { font-size: 8.5pt; }

  .cv-section { margin-bottom: 14pt; }
  .cv-section > h2 { font-size: 8.5pt; margin-bottom: 8pt; }
  .cv-job { margin-bottom: 10pt; }
  .cv-job h3 { font-size: 10.5pt; }
  .cv-org, .cv-dates { font-size: 8.5pt; }
  .cv-job li { font-size: 9.5pt; margin-bottom: 1.5pt; }

  /* never split a role across a page boundary */
  .cv-job, .cv-section > h2 { break-inside: avoid; page-break-inside: avoid; }
  .cv-section > h2 { break-after: avoid; page-break-after: avoid; }

  /* spell out link targets, since a printed page cannot be clicked */
  .cv-contact a::after { content: ""; }
  a { color: var(--text); text-decoration: none; }

  .tags li { border-color: #bbbbbb; font-size: 8pt; padding: 2pt 5pt; }
}

@page { margin: 14mm; }
