/* Κατερίνα Παπατουκάκη — στυλ σελίδας
   Χρώματα και γραμματοσειρά ορίζονται μία φορά στο :root. */

@font-face {
  font-family: "Commissioner";
  src: url("../fonts/commissioner-greek.woff2") format("woff2");
  font-weight: 100 900;
  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: "Commissioner";
  src: url("../fonts/commissioner-latin.woff2") format("woff2");
  font-weight: 100 900;
  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;
}

:root {
  --taupe: #B9A89C;       /* το χρώμα του λογοτύπου */
  --taupe-soft: #E7E0DA;
  --chalk: #FAF9F7;
  --ink: #2B2526;
  --ink-soft: #655A57;
  --plum: #5A3A4A;
  --plum-deep: #43293A;

  --rail: 17rem;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --measure: 38rem;
  --flare: "FLAR" 100, "VOLM" 0;

  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font: 400 1.125rem/1.6 "Commissioner", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 480;
  font-variation-settings: var(--flare);
  line-height: 1.15;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
  max-width: var(--measure);
  text-wrap: pretty;
}
p:last-child { margin-bottom: 0; }

a { color: var(--plum); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--plum-deep); text-decoration-thickness: 2px; }

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

img { max-width: 100%; }

.skip {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--chalk);
}
.skip:focus { top: 0.5rem; }

/* ---------- Πλευρική στήλη / πάνω μπάρα ---------- */

.rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 0.75rem;
  padding: 0.75rem var(--gutter);
  background: var(--chalk);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.25;
}
.brand:hover { color: var(--ink); }
.brand img { display: block; flex: none; width: 2.75rem; height: 2.75rem; }
.brand small { display: block; font-size: 0.875rem; font-weight: 400; color: var(--ink-soft); }

.menu-btn {
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}
html:not(.js) .menu-btn { display: none; }

.nav { grid-column: 1 / -1; }
.js .nav { display: none; }
.js .rail[data-open] .nav { display: block; }

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0.75rem 0 0.25rem;
}
.nav a {
  display: block;
  padding: 0.55rem 0;
  color: var(--ink);
  text-decoration: none;
}
.nav a:hover { text-decoration: underline; }
.nav a[aria-current] { color: var(--plum); font-weight: 500; }

/* ---------- Αρχική ενότητα ---------- */

.hero {
  display: grid;
  gap: 0.75rem;
  overflow: hidden;
  padding: 1.5rem var(--gutter) 3rem;
  background: var(--taupe);
}

.hero h1 {
  font-size: clamp(2.5rem, 1.6rem + 4.2vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.hero__role {
  margin: 1rem 0 0;
  font-size: 1.125rem;
  font-weight: 500;
}

.hero__lead {
  margin: 1.25rem 0 0;
  max-width: 26rem;
  font-size: 1.3125rem;
  line-height: 1.45;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.25rem;
  border: 1.5px solid var(--plum);
  border-radius: 2px;
  background: var(--plum);
  color: var(--chalk);
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--plum-deep); border-color: var(--plum-deep); color: var(--chalk); }

.mark {
  display: block;
  order: -1;
  justify-self: end;
  width: min(9.5rem, 42%);
  height: auto;
  color: var(--chalk);
}
.mark path {
  fill: none;
  stroke: currentColor;
  stroke-width: 0.5;
  stroke-linecap: round;
}
.mark circle { fill: currentColor; }

/* Η μία κίνηση της σελίδας: το σχέδιο του λογοτύπου ζωγραφίζεται μία φορά. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .mark path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 1.5s cubic-bezier(0.5, 0, 0.2, 1) forwards;
    animation-delay: calc(var(--d, 0) * 1s);
  }
  .mark circle {
    opacity: 0;
    animation: dot 0.5s ease-out forwards;
    animation-delay: calc(2.1s + var(--i, 0) * 0.07s);
  }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes dot { to { opacity: 1; } }

/* ---------- Ενότητες ---------- */

.section {
  padding: clamp(3.5rem, 8vw, 6.5rem) var(--gutter);
  scroll-margin-top: 1rem;
}
.section--tint { background: var(--taupe-soft); }

.section__title {
  margin-bottom: 1.75rem;
  font-size: clamp(1.875rem, 1.5rem + 1.5vw, 2.5rem);
}

.split {
  display: grid;
  gap: 2.5rem clamp(2rem, 5vw, 4.5rem);
}

.photo { margin: 0; max-width: 32rem; }
.photo img { display: block; width: 100%; height: auto; }

/* Σπουδές και εμπειρία */

.cv { max-width: 54rem; }
.cv__group {
  display: grid;
  gap: 0.75rem 2rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--taupe);
}
.cv__group:last-child { padding-bottom: 0; }
.cv__group h3 {
  font-size: 1.125rem;
  font-weight: 500;
  font-variation-settings: normal;
  line-height: 1.6;
}
.cv ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.cv li { max-width: var(--measure); }
.cv li > span { display: block; color: var(--ink-soft); font-size: 1rem; }

/* Υπηρεσίες */

.services {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 56rem;
  display: grid;
  gap: 2rem 3.5rem;
}
.services h3 { margin-bottom: 0.4rem; font-size: 1.3125rem; }
.services p { max-width: 24rem; }

/* Χώρος: έξι φωτογραφίες, η τελευταία όρθια.
   Κινητό: 1 + 2 + 2 + 1. Φαρδύτερες οθόνες: μία μεγάλη με δύο μικρές δίπλα,
   και από κάτω δύο μεσαίες δίπλα στην όρθια. */

.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 60rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.gallery li { position: relative; aspect-ratio: 3 / 2; }
.gallery li:nth-child(1) { grid-column: span 2; }
.gallery li:nth-child(6) { grid-column: span 2; aspect-ratio: 3 / 4; }
.gallery img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Επικοινωνία */

.contact { margin: 0; }
.contact > div + div { margin-top: 1.5rem; }
.contact dt { color: var(--ink-soft); font-size: 1rem; }
.contact dd { margin: 0; }
.contact__cta { margin-top: 2rem; }

/* ---------- Υποσέλιδο ---------- */

.footer {
  padding: 2.5rem var(--gutter);
  border-top: 1px solid var(--taupe-soft);
  font-size: 1rem;
}
.footer p { max-width: 42rem; }
.footer__meta { color: var(--ink-soft); }

/* ---------- Μεσαία πλάτη ---------- */

@media (min-width: 40rem) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; }
  /* Οι μικρές φωτογραφίες ορίζουν το ύψος των γραμμών· η μεγάλη και η όρθια απλώνονται σε δύο γραμμές. */
  .gallery li:nth-child(1) { grid-column: 1 / 9; grid-row: 1 / 3; aspect-ratio: auto; }
  .gallery li:nth-child(2) { grid-column: 9 / 13; grid-row: 1; }
  .gallery li:nth-child(3) { grid-column: 9 / 13; grid-row: 2; }
  .gallery li:nth-child(4) { grid-column: 1 / 7; grid-row: 3; }
  .gallery li:nth-child(5) { grid-column: 1 / 7; grid-row: 4; }
  .gallery li:nth-child(6) { grid-column: 7 / 13; grid-row: 3 / 5; aspect-ratio: auto; }
}

@media (min-width: 48rem) {
  .cv__group { grid-template-columns: 12rem minmax(0, 1fr); }
  .contact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content));
    gap: 1.75rem 4.5rem;
  }
  .contact > div + div { margin-top: 0; }
}

/* ---------- Υπολογιστής: σταθερή πλευρική στήλη ---------- */

@media (min-width: 60rem) {
  body.home {
    display: grid;
    grid-template-columns: var(--rail) minmax(0, 1fr);
  }

  .rail {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 2rem 1.75rem;
    border-right: 1px solid var(--taupe-soft);
    overflow-y: auto;
  }

  .brand { flex-direction: column; align-items: flex-start; gap: 1rem; font-size: 1.125rem; }
  .brand img { width: 4rem; height: 4rem; }

  .menu-btn { display: none; }

  .nav,
  .js .nav { display: block; margin-top: 2.5rem; }
  .nav ul { padding: 0; }
  .nav a { padding: 0.35rem 0; }

  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: end;
    gap: 2rem;
    min-height: min(44rem, 100vh);
    padding-top: 3.5rem;
    padding-bottom: 4rem;
  }
  .mark {
    order: 0;
    align-self: center;
    width: min(30rem, 112%);
    margin-right: -3rem;
  }

  .section { scroll-margin-top: 0; }
}

@media (min-width: 75rem) {
  .split--photo {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: start;
  }
  .split--photo .photo { margin-top: 0.5rem; }
}
