/* Γιώργος Στράντζαλης
   Academic and quiet: warm paper, dark ink, one deep oxblood accent.
   Literata for reading and titles, IBM Plex Sans for small labels, years and counts. */

:root {
  --paper: #FAF8F4;
  --card: #FFFFFF;
  --ink: #1C1B1F;
  --muted: #5F5A54;        /* secondary text, AA on paper */
  --line: #E6E0D7;
  --accent: #7A1F2B;       /* oxblood */
  --accent-soft: #F4EAE7;
  --serif: "Literata", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --gutter: clamp(18px, 4vw, 56px);
  --ease: cubic-bezier(.23, 1, .32, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--paper); -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--serif); font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a, button { touch-action: manipulation; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { font-weight: 400; text-wrap: balance; }
p { text-wrap: pretty; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 12px; top: -80px; background: var(--ink); color: var(--paper); padding: 10px 14px; z-index: 50; text-decoration: none; }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { font: 500 .85rem/1.4 var(--sans); color: var(--accent); letter-spacing: .01em; }
.eyebrow a { text-decoration: none; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: rgba(250,248,244,.94); position: sticky; top: 0; z-index: 20; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { font: 500 1.15rem/1.2 var(--serif); text-decoration: none; letter-spacing: -.005em; }
.nav { display: flex; gap: clamp(14px, 2.4vw, 32px); font: 500 .92rem/1 var(--sans); }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 0; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1.5px no-repeat; transition: color .2s ease, background-size .35s var(--ease); }
.nav a[aria-current] { color: var(--ink); background-size: 100% 1.5px; }
@media (hover: hover) and (pointer: fine) { .nav a:hover { color: var(--ink); background-size: 100% 1.5px; } }

/* Home: portrait and name */
.hero { padding: clamp(40px, 8vh, 96px) 0 clamp(48px, 9vh, 104px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.portrait { position: relative; isolation: isolate; }
.portrait img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.portrait::after { content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 1px solid var(--accent); border-radius: 4px; z-index: -1; opacity: .5; }
.hero-text h1 { font-size: clamp(2.6rem, 5.4vw, 4.4rem); line-height: 1.02; letter-spacing: -.02em; margin-top: 14px; font-weight: 400; }
.role { font-size: clamp(1.2rem, 2vw, 1.5rem); color: var(--accent); font-style: italic; margin-top: 10px; }
.intro { margin-top: 22px; max-width: 52ch; color: var(--muted); font-size: 1.1rem; }
.gates { display: grid; gap: 12px; margin-top: clamp(28px, 4vh, 40px); max-width: 560px; }
.gate { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 16px; padding: 18px 20px 18px 22px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; text-decoration: none; transition: border-color .2s ease, transform .2s var(--ease), box-shadow .3s ease; }
.gate-title { font-size: 1.35rem; line-height: 1.2; }
.gate-meta { grid-column: 1; font: 400 .88rem/1.4 var(--sans); color: var(--muted); }
.gate svg { grid-column: 2; grid-row: 1 / span 2; width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; transition: transform .3s var(--ease); }
.gate:active { transform: scale(.99); }
@media (hover: hover) and (pointer: fine) {
  .gate:hover { border-color: var(--accent); box-shadow: 0 10px 30px -18px rgba(122,31,43,.45); }
  .gate:hover svg { transform: translateX(4px); }
}

/* Home: curriculum vitae */
.cv { padding: clamp(56px, 10vh, 110px) 0; border-top: 1px solid var(--line); background: var(--card); }
.section-title { font-size: clamp(2rem, 3.6vw, 2.8rem); letter-spacing: -.015em; margin-bottom: clamp(28px, 5vh, 48px); }
.cv-block { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 12px clamp(24px, 4vw, 64px); padding: 22px 0; border-top: 1px solid var(--line); }
.cv-block h3 { font: 600 .95rem/1.5 var(--sans); color: var(--accent); padding-top: 3px; }
.cv-block ul { list-style: none; display: grid; gap: 10px; }
.cv-block li { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.cv-block .when { flex: none; font: 400 .9rem/1.5 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tags { display: flex !important; flex-wrap: wrap; gap: 8px !important; }
.tags li { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: 500 .88rem/1.3 var(--sans); }

/* Inner pages */
.page-head { padding: clamp(40px, 8vh, 88px) 0 clamp(28px, 5vh, 44px); }
.page-head h1 { font-size: clamp(2.6rem, 5vw, 4rem); letter-spacing: -.02em; margin-top: 10px; line-height: 1.05; }
.lead { margin-top: 16px; font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.aside-link { margin-top: 14px; font: 500 .9rem/1.4 var(--sans); }
.aside-link a { color: var(--accent); text-underline-offset: 3px; }

/* Publications */
.pub-tools { position: sticky; top: 68px; z-index: 10; background: rgba(250,248,244,.96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.tools-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding-top: 12px; padding-bottom: 12px; }
.search { flex: 1 1 280px; display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; }
.search:focus-within { border-color: var(--accent); }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; background: none; font: 400 16px/1.4 var(--sans); padding: 11px 0; color: var(--ink); }
.search input:focus { outline: none; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button { font: 500 .88rem/1 var(--sans); padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); min-height: 40px; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.filters button span { font-variant-numeric: tabular-nums; opacity: .75; margin-left: 2px; }
.filters button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.filters button:active { transform: scale(.97); }
.result { font: 400 .88rem/1.4 var(--sans); color: var(--muted); flex-basis: 100%; min-height: 1.2em; }
.pubs { padding: clamp(24px, 4vh, 40px) 0 clamp(64px, 12vh, 120px); }
.year { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 0 clamp(20px, 3vw, 44px); border-top: 1px solid var(--line); padding: 20px 0 8px; }
.year-label { font: 600 1.4rem/1.3 var(--sans); color: var(--accent); font-variant-numeric: tabular-nums; position: sticky; top: 150px; align-self: start; }
.year ol { list-style: none; display: grid; gap: 14px; }
.year li { font-size: 1rem; line-height: 1.6; max-width: 78ch; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.year li:last-child { border-bottom: 0; }
.year li[hidden], .year[hidden] { display: none; }
mark.me { background: none; color: var(--accent); font-weight: 600; }
mark.hit { background: #F8E7A6; color: inherit; border-radius: 2px; padding: 0 1px; }
.none { padding: 40px 0; color: var(--muted); }

/* Finances: under construction */
.soon { padding: clamp(24px, 5vh, 56px) 0 clamp(80px, 16vh, 160px); }
.soon-card { max-width: 640px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: clamp(28px, 5vw, 48px); }
.soon-mark { display: block; width: 56px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--accent) 0 40%, var(--line) 40%); margin-bottom: 22px; }
.soon-card h2 { font-size: 1.7rem; }
.soon-card p { margin-top: 10px; color: var(--muted); }
.soon-links { display: flex; gap: 20px; font: 500 .92rem/1.4 var(--sans); margin-top: 22px !important; }
.soon-links a { color: var(--accent); text-underline-offset: 3px; }

/* Footer */
.foot { border-top: 1px solid var(--line); background: var(--paper); padding-top: 40px; font: 400 .92rem/1.6 var(--sans); color: var(--muted); }
.foot-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; padding-bottom: 28px; }
.foot-name { font: 500 1.15rem/1.3 var(--serif); color: var(--ink); margin-bottom: 4px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; align-self: end; }
.foot nav a { color: var(--ink); text-decoration: none; }
.foot-legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; padding-top: 16px; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); font-size: .82rem; }
.credit { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.credit .heart { display: inline-block; vertical-align: -.22em; margin: 0 .3em; width: 1.15em; height: 1.15em; fill: var(--accent); animation: beat 1.8s ease-in-out infinite; transform-origin: 50% 60%; }
@keyframes beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.16); } 24% { transform: scale(1); } 36% { transform: scale(1.1); } 48% { transform: scale(1); } }
@media (hover: hover) and (pointer: fine) { .foot nav a:hover, .credit:hover { color: var(--accent); } }

/* Phones */
@media (max-width: 860px) {
  .top .wrap { flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 12px; padding-bottom: 8px; }
  .nav { gap: 18px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 420px; }
  .portrait::after { inset: 10px -10px -10px 10px; }
  .cv-block { grid-template-columns: 1fr; gap: 10px; }
  .cv-block li { flex-direction: column; gap: 0; }
  .pub-tools { top: 96px; }
  .year { grid-template-columns: 1fr; gap: 8px; }
  .year-label { position: static; }
}
@media (prefers-reduced-motion: reduce) { .credit .heart { animation: none; } * { transition: none !important; } }
