/* Page layouts. Tokens and primitives live in tokens.css and base.css. */
.page { padding-top: calc(var(--nav-h) + clamp(32px, 6vw, 80px)); padding-bottom: clamp(64px, 10vw, 140px); }
h2 { font: 400 clamp(38px, 6.4vw, 112px)/.98 var(--sans); letter-spacing: -.05em; }
h3 { font: 500 clamp(20px, 2vw, 28px)/1.15 var(--sans); letter-spacing: -.02em; }

/* CV */
.cv-head { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(48px, 8vw, 96px); }
.cv-name { font: 400 clamp(44px, 8vw, 120px)/.92 var(--sans); letter-spacing: -.055em; }
html[lang="el"] .cv-name { font-size: clamp(36px, 6.8vw, 104px); }
.cv-label { font-size: clamp(18px, 1.6vw, 22px); }
.cv-summary { color: rgba(235, 229, 218, .78); max-width: 62ch; }
.cv-section { display: grid; gap: 24px; padding-block: clamp(28px, 4vw, 48px); border-top: 1px solid var(--line); }
.cv-section > h2.label { font: 500 12px/1 var(--mono); letter-spacing: .06em; }
.cv-list { display: grid; gap: 28px; }
.cv-entry { display: grid; gap: 6px; }
.cv-when { color: var(--muted); font-variant-numeric: tabular-nums; }
.cv-what { display: grid; gap: 4px; }
.cv-hl { display: grid; gap: 4px; margin-top: 6px; color: rgba(235, 229, 218, .78); }
.cv-hl li { padding-left: 16px; position: relative; }
.cv-hl li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 1px; background: var(--accent); }
.cv-plain { display: grid; gap: 10px; }
.cv-plain strong { font-weight: 500; }
.cv-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.cv-tags li { padding: 8px 14px; border-radius: 99px; box-shadow: inset 0 0 0 1px rgba(235, 229, 218, .16); font-size: 15px; }
@media (min-width: 860px) {
  .cv-section { grid-template-columns: 220px 1fr; align-items: start; }
  .cv-entry { grid-template-columns: 180px 1fr; gap: 24px; }
}

/* Footer [O] */
.footer { padding-bottom: 0; overflow: hidden; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.footer-row a { display: inline-flex; align-items: center; min-height: 44px; }
@media (hover: hover) { .footer-row a:hover { color: var(--bone); } }
.footer-social { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: -12px; padding: 0; }
.footer-social a { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 99px; color: var(--muted); fill: currentColor; transition: color .3s; }
.footer-social svg { width: 28px; height: 28px; fill: currentColor; }
@media (hover: hover) { .footer-social a:hover { color: var(--accent); } }
.footer-word { display: block; width: 100%; margin-top: -8px; fill: var(--ink-3); transform: translateY(14%); font: 500 120px/1 var(--sans); letter-spacing: -.06em; }
@media (max-width: 860px) {
  /* The studio keeps one line [O]; Greek is longer, so the row may wrap rather than clip. */
  .footer-row { gap: 4px 16px; font-size: min(12px, 3.1vw); }
}

/* View transitions between pages (spec §7). */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* Hero [O]: cloud canvas over a tinted CSS gradient fallback. */
.hero {
  position: relative; isolation: isolate; min-height: min(100svh, 980px); display: flex; align-items: flex-end;
  padding: calc(var(--nav-h) + 24px) 0 clamp(40px, 7vw, 96px); overflow: hidden;
  background:
    radial-gradient(70% 55% at 72% 34%, color-mix(in srgb, var(--cloud-glow) 34%, transparent), transparent 70%),
    radial-gradient(90% 70% at 60% 30%, var(--cloud-deep), transparent 75%),
    var(--ink);
}
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, transparent 55%, var(--ink)); }
.hero-cloud { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s var(--out); }
.hero.gl-on .hero-cloud { opacity: 1; }
.hero-inner { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.hero-meta { position: absolute; top: calc(var(--nav-h) + 8px); left: 0; right: 0; display: flex; justify-content: space-between; gap: 16px; padding-inline: var(--pad); max-width: calc(var(--max) + 2 * var(--pad)); margin-inline: auto; color: rgba(235, 229, 218, .7); }
.clock { font-variant-numeric: tabular-nums; }
.hero-title { font: 400 clamp(56px, 13vw, 200px)/.9 var(--sans); letter-spacing: -.055em; display: grid; }
html[lang="el"] .hero-title { font-size: clamp(46px, 10.4vw, 168px); }
.hero-line { display: block; overflow: hidden; padding: .02em 0 .1em; margin-bottom: -.1em; }
.hero-line > span { display: inline-block; }
.hero-statement { font: 400 clamp(22px, 3.4vw, 48px)/1.1 var(--sans); letter-spacing: -.03em; max-width: 22ch; text-wrap: pretty; }
.hero-statement em { letter-spacing: -.02em; }
.hero-alt { color: var(--muted); font-size: 15px; }

/* Intro: plays once per visit, added by the head script, never under reduced motion [O]. */
.intro .hero-line > span { transform: translateY(110%); animation: rise 1.1s var(--out) forwards; animation-delay: calc(.1s + var(--i, 0) * .09s); }
.intro .hero-fade { opacity: 0; animation: fade-up .9s var(--out) .45s forwards; }
@keyframes rise { to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* Reveals: .pre is added by motion.ts only. */
.pre { opacity: 0; }

/* Doors */
.doors { display: grid; gap: 12px; padding-block: clamp(24px, 4vw, 48px); }
@media (min-width: 860px) { .doors { grid-template-columns: 1fr 1fr; gap: 16px; } }
.door {
  position: relative; display: grid; gap: 14px; align-content: start; padding: clamp(24px, 3.4vw, 44px);
  border-radius: 28px; background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line);
  transition: translate .4s var(--out), box-shadow .4s var(--out);
}
.door-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; font: 400 clamp(36px, 5vw, 72px)/1 var(--sans); letter-spacing: -.045em; }
.door-main { display: inline-flex; align-items: center; min-height: 44px; }
.door-main::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.door-arrow { width: clamp(28px, 3vw, 40px); height: auto; fill: var(--accent); transition: translate .4s var(--out); flex: none; }
.door-sub { color: rgba(235, 229, 218, .78); max-width: 36ch; }
.door-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 4px; }
.door-links a { position: relative; z-index: 1; display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; color: var(--muted); font-size: 15px; transition: color .3s; }
.door-main:focus-visible { outline: none; }
.door:has(.door-main:focus-visible) { box-shadow: inset 0 0 0 1px var(--line), 0 0 0 2px var(--accent); }
@media (hover: hover) {
  .door:hover { translate: 0 -2px; box-shadow: inset 0 0 0 1px rgba(235, 229, 218, .18); }
  .door:hover .door-arrow { translate: 4px 0; }
  .door-links a:hover { color: var(--bone); text-decoration: underline; text-underline-offset: 4px; }
}

/* Outro [O] */
.outro { display: grid; gap: clamp(28px, 4vw, 48px); justify-items: center; text-align: center; padding-block: clamp(80px, 12vw, 180px); }
.outro h2 { font: 400 clamp(48px, 9vw, 150px)/.92 var(--sans); letter-spacing: -.06em; }
.outro h2 em { display: block; }
.outro .contact-actions { width: 100%; max-width: 520px; }
@media (min-width: 860px) { .outro .contact-actions { grid-template-columns: 1fr 1fr; max-width: 640px; } }
.footer-row a { min-width: 44px; }

/* Inner pages */
.page-head { display: grid; gap: 18px; max-width: 900px; margin-bottom: clamp(40px, 7vw, 88px); }
.page-head h1 { font: 400 clamp(52px, 10vw, 160px)/.92 var(--sans); letter-spacing: -.055em; }
html[lang="el"] .page-head h1 { font-size: clamp(42px, 8.4vw, 136px); }
.page-lead { font: 400 clamp(20px, 2.4vw, 30px)/1.25 var(--sans); letter-spacing: -.02em; color: rgba(235, 229, 218, .85); max-width: 32ch; text-wrap: pretty; }
.page-next { margin-top: clamp(48px, 8vw, 96px); }

/* Work */
.project-grid { display: grid; gap: 12px; }
@media (min-width: 860px) { .project-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } .project-grid > :first-child { grid-column: 1 / -1; } }
.project-link { display: grid; gap: 12px; height: 100%; padding: clamp(24px, 3.4vw, 44px); border-radius: 28px; background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); transition: translate .4s var(--out), box-shadow .4s var(--out); }
.project-link h2 { font: 400 clamp(34px, 4.6vw, 64px)/1 var(--sans); letter-spacing: -.045em; }
.project-summary { color: rgba(235, 229, 218, .78); max-width: 52ch; }
.project-period { margin-top: auto; }
@media (hover: hover) { .project-link:hover { translate: 0 -2px; box-shadow: inset 0 0 0 1px rgba(235, 229, 218, .18); } }
.archive { display: grid; gap: 16px; margin-top: clamp(40px, 6vw, 72px); padding-top: 28px; border-top: 1px solid var(--line); }
.archive ul { display: grid; gap: 16px; }
.archive-title { font-weight: 500; }
.project-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.project-section { display: grid; gap: 14px; padding-block: clamp(24px, 4vw, 44px); border-top: 1px solid var(--line); }
.project-body { display: grid; gap: 14px; max-width: 62ch; font-size: clamp(17px, 1.3vw, 19px); color: rgba(235, 229, 218, .88); }
@media (min-width: 860px) { .project-section { grid-template-columns: 220px 1fr; } }

/* Outside work */
.wrap.narrow { max-width: calc(760px + 2 * var(--pad)); }
@media (min-width: 860px) { .project-grid.three { grid-template-columns: repeat(3, 1fr); } .project-grid.three > :first-child { grid-column: auto; } }
.stats { display: grid; gap: 12px; margin-bottom: clamp(32px, 5vw, 64px); }
@media (min-width: 860px) { .stats { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.stat { display: grid; gap: 10px; align-content: start; padding: clamp(22px, 3vw, 36px); border-radius: 28px; background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.stat h2 { font: 400 clamp(26px, 2.8vw, 40px)/1.05 var(--sans); letter-spacing: -.035em; }
.stat .label { color: var(--accent); }

/* Map, click to load */
.map-embed { display: grid; gap: 10px; margin: 0; }
.map-placeholder, .map-embed iframe { aspect-ratio: 4 / 3; width: 100%; border: 0; border-radius: 20px; background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.map-placeholder { display: grid; place-content: center; justify-items: center; gap: 16px; padding: 24px; text-align: center; font-size: 15px; }
@media (min-width: 860px) { .map-placeholder, .map-embed iframe { aspect-ratio: 16 / 9; } }

/* Gallery + lightbox */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(16em, 46%), 1fr)); gap: 8px; }
.gallery-item { display: block; width: 100%; border-radius: 16px; overflow: hidden; background: var(--ink-2); }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: filter .3s; }
@media (hover: hover) { .gallery-item:hover img { filter: brightness(1.08); } }
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--bone); }
.lightbox[open] { display: grid; grid-template-columns: auto 1fr auto; align-items: center; }
.lightbox::backdrop { background: rgba(13, 12, 11, .94); }
.lb-figure { grid-column: 2; display: grid; gap: 12px; justify-items: center; margin: 0; padding: 56px 8px 24px; max-height: 100dvh; }
.lb-figure img { max-width: 100%; max-height: calc(100dvh - 140px); width: auto; object-fit: contain; border-radius: 8px; touch-action: none; }
.lb-caption { font-size: 14px; text-align: center; }
.lb-btn { display: grid; place-items: center; width: 48px; height: 48px; margin: 8px; border-radius: 99px; background: rgba(22, 21, 19, .8); box-shadow: inset 0 0 0 1px var(--line); font-size: 18px; }
.lb-close { position: fixed; top: max(8px, env(safe-area-inset-top)); right: max(8px, env(safe-area-inset-right)); }
@media (max-width: 600px) { .lb-prev, .lb-next { position: fixed; bottom: 8px; } .lb-prev { left: 8px; } .lb-next { right: 8px; } }
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] { animation: fade-in .2s var(--out); }
  @keyframes fade-in { from { opacity: 0; } }
}

/* Links */
/* Links: an inset grouped list. Tall rows, a greyed brand tile, label over handle; separators start after the tile. */
.links-list { display: grid; padding: 6px; border-radius: 28px; background: var(--ink-2); box-shadow: inset 0 0 0 1px rgba(235, 229, 218, .06); }
.links-list li { position: relative; }
.links-list li + li::before { content: ""; position: absolute; top: 0; left: 76px; right: 18px; height: 1px; background: var(--line); }
.links-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 18px; min-height: 88px; padding: 14px 18px; border-radius: 22px; transition: background-color .3s; -webkit-tap-highlight-color: transparent; }
.links-icon { display: grid; place-items: center; width: 40px; height: 40px; color: var(--muted); transition: color .3s; }
.links-icon svg { width: 30px; height: 30px; fill: currentColor; }
.links-text { display: grid; gap: 4px; min-width: 0; }
.links-label { font-size: clamp(18px, 2vw, 21px); font-weight: 500; letter-spacing: -.01em; }
.links-handle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font: 400 13px/1.3 var(--mono); letter-spacing: .02em; }
.links-arrow { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 99px; color: var(--muted); transition: translate .3s var(--out), color .3s; }
.links-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.links-row:active { background: var(--ink-3); }
.links-row:active .links-icon { color: var(--accent); }
@media (hover: hover) {
  .links-row:hover { background: rgba(235, 229, 218, .04); }
  .links-row:hover .links-icon, .links-row:hover .links-arrow { color: var(--accent); }
  .links-row:hover .links-arrow { translate: 3px -3px; }
}
.privacy-contact { margin-top: clamp(32px, 5vw, 56px); max-width: 520px; }

/* 320 px safety (Review Focus 1): grid children may shrink, long words wrap, long buttons wrap. */
.page-head > *, .project-section > *, .project-body > *, .cv-section > *, .door > *, .stat > * { min-width: 0; }
h1, h2, h3 { overflow-wrap: break-word; }
.page-head h1 { font-size: clamp(40px, 10vw, 160px); }
html[lang="el"] .page-head h1 { font-size: clamp(36px, 8.4vw, 136px); }
.project-actions .btn, .page-next .btn, .map-placeholder .btn { white-space: normal; text-align: center; line-height: 1.25; padding-block: 14px; max-width: 100%; }
