/* ==========================================================================
   Pantelis Avgousti: portfolio
   Mobile-first. All colours live in :root: change --accent to re-theme.
   Cache-busting: bump the ?v= number on style.css / main.js in the HTML
   whenever you edit this file (assets are cached for a year).
   ========================================================================== */

/* ---------- Fonts (self-hosted, see /assets/fonts) ---------- */

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-greek-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-greek-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Design tokens ---------- */
:root {
  /* Colours */
  --bg: #F3EFE7;
  --text: #17181C;
  --muted: #5B5A55;
  --border: #D9D3C7;
  --card: #FBF9F5;
  --placeholder: #E7E1D5;
  --accent: #B4471F;            /* change this to re-theme the site */
  --accent-on-dark: #E8956F;    /* small labels on dark backgrounds */
  --on-accent: #FFFFFF;
  --dark: #17181C;
  --dark-text: #F3EFE7;
  --dark-muted: #BDB8AE;
  --dark-border: #34353B;

  /* Type */
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Layout */
  --radius: 18px;
  --radius-sm: 10px;
  --max: 1160px;
  --gutter: 20px;
  --section-y: 72px;
  --header-h: 64px;
  --tap: 44px;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; --section-y: 104px; --header-h: 72px; }
}
@media (min-width: 1100px) {
  :root { --section-y: 128px; }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (min-width: 768px) {
  body { font-size: 1.0625rem; }
}

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

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h3 { font-family: var(--font-sans); font-weight: 600; letter-spacing: 0; line-height: 1.3; }

p { margin: 0; }
p + p { margin-top: 1em; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul[role="list"], ol[role="list"] { list-style: none; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
[tabindex="-1"]:focus-visible { outline: none; }
.section--dark :focus-visible,
.strip :focus-visible { outline-color: var(--accent-on-dark); }

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

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: absolute;
  left: 12px; top: -100px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--text);
  color: var(--bg);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--bg); }

[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ---------- Small shared pieces ---------- */
.label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.section--dark .label, .strip .label { color: var(--accent-on-dark); }

.muted { color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.75em 1.5em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 86%, #000); color: var(--on-accent); }
.btn--secondary { border-color: var(--text); color: var(--text); background: transparent; }
.btn--secondary:hover { background: var(--text); color: var(--bg); }
.section--dark .btn--secondary { border-color: var(--dark-text); color: var(--dark-text); }
.section--dark .btn--secondary:hover { background: var(--dark-text); color: var(--dark); }
.btn--small { min-height: var(--tap); padding: 0.55em 1.2em; font-size: 0.9375rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}
@media (min-width: 768px) { .card { padding: 36px 32px; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.brand:hover { color: var(--text); }
.monogram {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  flex: none;
}

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: var(--tap); height: var(--tap);
  margin-right: -8px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 22px; height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .25s ease, background-color .25s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu panel */
.site-nav {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  padding: 8px var(--gutter) 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 16px 32px -24px rgba(23, 24, 28, .35);
}
.site-nav[hidden] { display: none; }
.nav-list a {
  display: flex;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-serif);
  font-size: 1.75rem;
  text-decoration: none;
}
.nav-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}


@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .site-nav,
  .site-nav[hidden] {
    display: flex;
    align-items: center;
    gap: 28px;
    position: static;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .nav-list { display: flex; gap: 4px; }
  .nav-list a {
    min-height: var(--tap);
    padding-inline: 12px;
    border: 0;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 400;
  }
  .nav-extra { margin: 0; gap: 16px; flex-wrap: nowrap; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section + .section:not(.section--dark) { border-top: 1px solid var(--border); }
.section-head { max-width: 720px; margin-bottom: 40px; }
@media (min-width: 768px) { .section-head { margin-bottom: 56px; } }
.section-head .label { margin-bottom: 16px; }
.section-head h2 { font-size: clamp(2.25rem, 7vw, 3.75rem); }
.section-head p { margin-top: 20px; font-size: 1.0625rem; color: var(--muted); max-width: 600px; }
@media (min-width: 768px) { .section-head p { font-size: 1.1875rem; } }

.section--dark {
  background: var(--dark);
  color: var(--dark-text);
}
.section--dark .muted { color: var(--dark-muted); }
.section--dark a:hover { color: var(--accent-on-dark); }

/* ---------- Hero ---------- */
.hero { padding-block: 40px var(--section-y); }
@media (min-width: 768px) { .hero { padding-top: 72px; } }

.hero-grid { display: grid; gap: 48px; }
@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 64px; align-items: center; }
}

.hero .label { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.hero h1 { font-size: clamp(2.6rem, 10.5vw, 5.25rem); line-height: 1.02; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-text {
  margin-top: 24px;
  max-width: 580px;
  font-size: 1.125rem;
  color: var(--muted);
}
@media (min-width: 768px) { .hero-text { font-size: 1.25rem; } }
.hero .btn-row { margin-top: 32px; }
@media (max-width: 419px) {
  .hero .btn-row .btn { flex: 1 1 100%; }
}

.stack-card .label { color: var(--muted); margin-bottom: 8px; }
.stack-list > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding-block: 14px;
  border-bottom: 1px solid var(--border);
}
.stack-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.stack-list dt { font-weight: 600; font-size: 0.9375rem; }
.stack-list dd { color: var(--muted); font-size: 0.9375rem; }
@media (min-width: 420px) {
  .stack-list > div { grid-template-columns: 7.5rem 1fr; gap: 16px; align-items: baseline; }
}

/* ---------- Services ---------- */
.services-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .services-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

.service { display: flex; flex-direction: column; }
.service-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.service-icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--accent);
}
.service-icon svg { width: 26px; height: 26px; }
.service-num { font-family: var(--font-mono); font-weight: 500; font-size: 0.8125rem; color: var(--muted); }
.service h3 { font-family: var(--font-serif); font-weight: 400; font-size: 1.875rem; line-height: 1.1; }
.service p { margin-top: 12px; color: var(--muted); }
.check-list { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 26px; font-size: 0.9375rem; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.5em;
  width: 12px; height: 7px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
@media (min-width: 900px) { .service .check-list { margin-top: auto; } .service p { margin-bottom: 24px; } }

.strip {
  display: grid;
  gap: 16px;
  margin-top: 20px;
  padding: 32px 24px;
  border-radius: var(--radius);
  background: var(--dark);
  color: var(--dark-text);
}
.strip h3 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(2rem, 6vw, 2.75rem); line-height: 1.05; }
.strip p { color: var(--dark-muted); max-width: 560px; }
@media (min-width: 900px) {
  .strip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px 48px; align-items: end; padding: 48px; }
  .strip .label { grid-column: 1 / -1; }
}

/* ---------- Work ---------- */
.projects { display: grid; gap: 64px; }
@media (min-width: 900px) { .projects { gap: 96px; } }

.project { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) {
  .project { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 64px; }
  /* Every second project flips sides automatically. */
  .project:nth-child(even) .project-media { order: 2; }
}

.browser {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 24px 48px -32px rgba(23, 24, 28, .35);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.browser-dots { display: flex; gap: 6px; flex: none; }
.browser-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.browser-url {
  flex: 1;
  min-width: 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browser-screen { aspect-ratio: 16 / 10; background: var(--placeholder); }
.browser-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* Logo panels: each project shows its brand logo on the brand's own colour. */
a.browser { text-decoration: none; transition: transform .25s ease, box-shadow .25s ease; }
a.browser:hover { transform: translateY(-4px); box-shadow: 0 32px 56px -32px rgba(23, 24, 28, .45); }
.logo-screen { display: grid; place-items: center; padding: 10%; container-type: inline-size; }
.logo-screen img { width: min(100%, 380px); height: auto; object-fit: contain; }
.logo-screen--nevora { background: #1B1B1B; }
.logo-screen--eventhub { background: #080C16; }
.wordmark-eventhub { font-family: var(--font-serif); font-size: 17cqi; line-height: 1; letter-spacing: -0.01em; color: #F8FAFC; }
.wordmark-eventhub span { color: #FBC02D; }


.project-body .label { margin-bottom: 14px; }
.project-body h3 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(2rem, 6vw, 2.75rem); line-height: 1.05; }
.project-body p { margin-top: 16px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tags li {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
}
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  margin-top: 16px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.text-link:hover { text-decoration-color: currentColor; }

/* ---------- Process ---------- */
.steps { display: grid; gap: 32px; counter-reset: step; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); gap: 40px 32px; } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { padding-top: 20px; border-top: 2px solid var(--text); }
.step-num { display: block; margin-bottom: 20px; font-family: var(--font-mono); font-weight: 500; font-size: 0.8125rem; color: var(--accent); }
.step h3 { font-family: var(--font-serif); font-weight: 400; font-size: 1.875rem; line-height: 1.1; }
.step p { margin-top: 10px; color: var(--muted); }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 24px; }
@media (min-width: 900px) {
  .about-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 72px; align-items: start; }
}
.about-head .label { margin-bottom: 16px; }
.about-head h2 { font-size: clamp(2.25rem, 7vw, 3.75rem); }
.about-body .prose { font-size: 1.0625rem; color: var(--muted); }
@media (min-width: 768px) { .about-body .prose { font-size: 1.125rem; } }

.facts { display: grid; gap: 0; margin-top: 32px; border-top: 1px solid var(--border); }
.facts > div { display: grid; gap: 4px; padding-block: 16px; border-bottom: 1px solid var(--border); }
.facts dt { font-family: var(--font-mono); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.facts dd { font-weight: 600; }
@media (min-width: 560px) {
  .facts { grid-template-columns: repeat(3, 1fr); gap: 24px; border-top: 0; }
  .facts > div { border-bottom: 0; border-top: 1px solid var(--border); }
}

/* ---------- Contact + footer ---------- */
.contact { padding-bottom: 12px; }
.contact h2 { font-size: clamp(2.75rem, 11vw, 6.5rem); line-height: 1; max-width: 12ch; }
.contact .label { margin-bottom: 20px; }
.contact-text { margin-top: 24px; max-width: 560px; font-size: 1.125rem; color: var(--dark-muted); }
@media (min-width: 768px) { .contact-text { font-size: 1.25rem; } }
.contact .btn-row { margin-top: 36px; }
@media (max-width: 479px) { .contact .btn-row .btn { flex: 1 1 100%; } }

.contact-info {
  display: grid;
  gap: 20px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--dark-border);
}
@media (min-width: 720px) { .contact-info { grid-template-columns: repeat(2, max-content); gap: 24px 64px; } }
.contact-info dt { margin-bottom: 4px; }
.contact-info dd a { display: inline-flex; align-items: center; min-height: var(--tap); text-decoration: none; overflow-wrap: anywhere; }
.contact-info dd a:hover { text-decoration: underline; }
.contact-info dd span { display: inline-flex; align-items: center; min-height: var(--tap); }

.site-footer-wrap { background: var(--dark); color: var(--dark-muted); }
.site-footer-wrap :focus-visible { outline-color: var(--accent-on-dark); }
.site-footer-wrap a:hover { color: var(--accent-on-dark); }
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}
.site-footer::before {
  content: "";
  flex: 1 0 100%;
  height: 1px;
  margin-bottom: 12px;
  background: var(--dark-border);
}
.site-footer { padding-block: 44px 24px; font-size: 0.875rem; }

/* ---------- 404 ---------- */
.notfound { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding-block: 48px; }
.notfound .label { margin-bottom: 20px; }
.notfound h1 { font-size: clamp(3rem, 12vw, 6rem); }
.notfound p { margin-top: 20px; font-size: 1.125rem; color: var(--muted); max-width: 520px; }
.notfound .btn-row { margin-top: 32px; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

