/* Toli theme — golden hour over the Bridge of Arta */
:root {
  --ink: #2c1f2e;          /* dusk plum */
  --ink-2: #3b2a3b;
  --text: #33262f;
  --muted: #7a6670;
  --line: #eedfcf;
  --bg: #fdf7ef;           /* warm limestone */
  --card: #fffdf9;
  --accent: #b5521f;       /* terracotta (AA on white) */
  --accent-2: #f0a84b;     /* gold */
  --accent-soft: #fbead2;
  --sea: #1f5f7a;          /* Aegean */
  --sea-soft: #e2eff3;
  --radius: 16px;
  --wrap: 1120px;
  --display: 'Fraunces', Georgia, serif;
  --body: 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); color: var(--text); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(44,31,46,.9); backdrop-filter: blur(8px); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: .06em; color: #fff; text-decoration: none; }
.brand span { color: var(--accent-2); }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a { color: #eadbd6; text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 14px; border-radius: 999px; }
.nav a:hover, .nav a.is-active { color: #fff; background: rgba(255,255,255,.1); }
.nav .nav__cta { background: var(--accent-2); color: var(--ink); font-weight: 600; }
.nav .nav__cta:hover { background: #ffc46e; color: var(--ink); }

/* ============================================================
   HERO
   Bounds  = the <section class="hero"> box: full width × --hero-height.
   The image is stretched to fill those bounds (object-fit: cover);
   anything that doesn't fit is cropped.
   Visible area = --hero-focus: which point of the image stays in view
   when it gets cropped ("50% 50%" = centre, "50% 100%" = bottom edge).
   Both values come from pages/01.home/home.md.
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  min-height: var(--hero-height, 460px);          /* BOUNDS: hero height (desktop) */
  display: flex; align-items: center;             /* content vertically centred */
  padding: 40px 0;
  background: linear-gradient(180deg, #fcecd0 0%, #f9dcae 38%, #f5bf86 66%, #eb9d6c 86%, #e48a62 100%);
}
.hero__bg {
  position: absolute; inset: 0;                   /* BOUNDS: image fills the hero box */
  width: 100%; height: 100%;
  object-fit: cover;                              /* fill, crop the overflow (use 'contain' to never crop) */
  object-position: var(--hero-focus, 50% 50%);    /* VISIBLE AREA (desktop) */
}
.hero .scene { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 250px; display: block; }
/* Dark wash behind the text so it stays readable on a photo.
   Tweak the alphas (.75 / .45 / 0), or delete this rule for no wash. */
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(30,18,26,.75) 0%, rgba(30,18,26,.45) 45%, rgba(30,18,26,0) 75%);
}
/* On a photo the text switches to light colours */
.hero--image .hero__name,
.hero--image .hero__role { color: #fff6ea; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.hero--image .hero__meta { color: #f3dcc6; }
.hero--image .eyebrow { color: var(--accent-2); }
.hero:not(.hero--image) .hero__scrim { display: none; }
.hero__inner { position: relative; z-index: 2; display: grid; grid-template-columns: auto 1fr; gap: 52px; align-items: center; width: 100%; }
.hero__portrait { margin: 0; width: 260px; aspect-ratio: 4 / 5; border-radius: 25px; overflow: hidden; border: 2px solid #000; box-shadow: 0 30px 60px rgba(92,48,40,.35); transform: rotate(0deg); }
.hero__portrait img { width: 100%; height: 100%; object-fit: cover; }
.eyebrow { margin: 0 0 6px; color: var(--accent); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; }
.hero__name { margin: 0; font-family: var(--display); line-height: .98; color: var(--ink); }
.hero__name span { display: block; font-weight: 300; font-size: clamp(36px, 5vw, 60px); letter-spacing: .06em; text-transform: uppercase; }
.hero__name strong { display: block; font-weight: 700; font-size: clamp(52px, 7.2vw, 88px); letter-spacing: .02em; text-transform: uppercase; }
.hero__role { font-size: 19px; color: #4d3843; margin: 14px 0 2px; max-width: 44ch; }
.hero__meta { color: #6c5560; margin: 0; }
.hero__caption { position: absolute; right: 24px; bottom: 10px; margin: 0; z-index: 2; font-size: 12px; letter-spacing: .08em; color: rgba(255,240,220,.85); text-shadow: 0 1px 3px rgba(0,0,0,.4); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--ink); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; transition: .15s; background: transparent; }
.btn:hover { background: var(--ink); color: #fff; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); }
.btn--ghost { border-color: transparent; color: var(--accent); padding-left: 6px; padding-right: 6px; }
.btn--ghost:hover { background: transparent; color: var(--ink); }
.lock { font-size: 12px; }

/* Sections */
.section { padding-top: 64px; padding-bottom: 8px; }
.section--tight { padding-top: 16px; padding-bottom: 72px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.section__title { font-family: var(--body); font-weight: 700; text-transform: uppercase; letter-spacing: .28em; font-size: 15px; margin: 0 0 20px; color: var(--ink); display: flex; align-items: center; gap: 12px; }
.section__title::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.section__title--spaced { margin-top: 36px; }
.link-more { font-weight: 600; text-decoration: none; }
.prose { max-width: 72ch; font-size: 17px; }
.prose h2 { font-family: var(--display); font-weight: 600; font-size: 24px; margin-top: 36px; color: var(--ink); }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose code { background: var(--accent-soft); padding: 2px 6px; border-radius: 6px; font-size: .92em; }
.about { font-size: 18px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.timeline { border-left: 3px solid var(--accent-2); padding: 2px 0 2px 16px; margin-bottom: 20px; }
.timeline h3 { margin: 0; font-size: 17px; color: var(--ink); }
.timeline p { margin: 2px 0; }
.chips, .tags, .langs, .certs { list-style: none; margin: 0; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--ink); color: #fff3e4; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; }
.langs li { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 10px 0; }
.langs span { color: var(--muted); }
.certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; padding-bottom: 72px; }
.certs li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.certs__issuer { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }

/* Project cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; transition: .2s; position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--sea)); opacity: 0; transition: .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(120,64,40,.12); border-color: #e4cdb6; }
.card:hover::before { opacity: 1; }
.card[hidden] { display: none; }
.card__top { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 13px; }
.card__course { color: var(--muted); font-weight: 500; }
.status { padding: 3px 10px; border-radius: 999px; font-weight: 600; font-size: 12px; background: #eee; color: #555; white-space: nowrap; }
.status--completed { background: var(--sea-soft); color: var(--sea); }
.status--in-progress { background: #fff0d4; color: #8a5200; }
.card__title { margin: 0; font-family: var(--display); font-weight: 600; font-size: 21px; line-height: 1.25; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--accent); }
.card__summary { margin: 0; color: #5a4650; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 12px; font-weight: 600; color: #8a4a1c; background: var(--accent-soft); padding: 3px 10px; border-radius: 6px; }
.card__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.card__links .btn { padding: 7px 14px; font-size: 13px; }
.card__links .btn--ghost:first-child { padding-left: 0; }
.card__links--page { margin: 18px 0 8px; }

/* Inner pages: a slim golden band */
body:not(.home) main::before { content: ""; display: block; height: 8px; background: linear-gradient(90deg, #f9dcae, #f0a84b, #e48a62, #b5521f); }
.page-head { padding-top: 56px; }
.page-title { font-family: var(--display); font-weight: 700; font-size: clamp(34px, 4.4vw, 50px); margin: 6px 0 8px; color: var(--ink); line-height: 1.12; }
.lead { font-size: 18px; color: #5a4650; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px; }
.chip { font: 600 14px var(--body); padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.project-page { padding-bottom: 72px; }
.back { text-decoration: none; font-weight: 600; display: inline-block; margin-bottom: 18px; }

/* Footer */
.footer { background: var(--ink); color: #cdb9b8; padding: 28px 0; font-size: 14px; border-top: 4px solid var(--accent-2); }
.footer__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer__links { display: flex; gap: 18px; }
.footer a { color: #fff; text-decoration: none; }

/* Responsive */
@media (max-width: 860px) {
  /* Tablet/phone: own height + own visible area */
  .hero { min-height: var(--hero-height-m, 520px); padding: 28px 0; align-items: flex-start; }
  .hero__bg { object-position: var(--hero-focus-m, 50% 50%); }   /* VISIBLE AREA (mobile) */
  .hero__scrim { background: linear-gradient(180deg, rgba(30,18,26,.1) 0%, rgba(30,18,26,.5) 45%, rgba(30,18,26,.8) 100%); }
  .hero__inner { grid-template-columns: 1fr; gap: 14px; justify-items: center; text-align: center; }
  .hero__portrait { width: 170px; }
  .hero__role { margin-left: auto; margin-right: auto; }
  .cols { grid-template-columns: 1fr; gap: 16px; }
  .nav a { padding: 8px 10px; }
}
@media (max-width: 520px) {
  .nav { overflow-x: auto; }
  .nav a { font-size: 14px; padding: 6px 9px; white-space: nowrap; }
  .brand { font-size: 20px; margin-right: 8px; }
  .hero__caption { left: 0; right: 0; text-align: center; }
}

/* Photo gallery (photos.html.twig) */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gallery__item { position: relative; display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: var(--line); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 10px; font-size: 13px; color: #fff; background: linear-gradient(transparent, rgba(30,18,26,.75)); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 92vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(20,12,18,.88); }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 10px; display: block; }
.lightbox__caption { color: #f3e6d8; text-align: center; margin: 10px 0 0; }
.lightbox__close { position: fixed; top: 16px; right: 20px; font-size: 34px; line-height: 1; color: #fff; background: none; border: 0; cursor: pointer; }
