/* Elias Koutsoupias — personal page
   Layout: fixed profile sidebar (wide screens), stacked on phones.
   Styles the HTML that Org Mode's exporter produces from index.org. */

:root{
  --ink:#1d1d1f; --muted:#5d6470; --accent:#002147; /* Oxford blue */
  --link:#1a4f8b; --rule:#e2ded5; --bg:#fdfcf9; --side:#f3f0e8;
  --side-width:300px;
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink);
  font:18px/1.6 "Iowan Old Style","Palatino Linotype",Palatino,"Book Antiqua",Georgia,serif}
img{max-width:100%;height:auto}
a{color:var(--link);text-decoration:none}
a:hover{color:var(--accent);text-decoration:underline;text-underline-offset:.15em}

/* ---- profile / sidebar ---- */
#content{padding:0}
.profile{background:var(--side);border-right:1px solid var(--rule);padding:2.5rem 1.75rem}
.photo{width:150px;height:150px;border-radius:50%;object-fit:cover;display:block;margin-bottom:1.25rem}
.name{font-size:1.75rem;line-height:1.15;margin:0 0 .4rem;color:var(--accent);font-weight:600}
.role{margin:0 0 1rem;color:var(--muted);font-style:italic;font-size:.98rem}
.contact{font-size:.85rem;color:var(--muted);line-height:1.55;margin:0 0 1rem}
.links a{display:inline-block;margin:0 1rem .3rem 0;font-size:.92rem}
/* the menu is Org's table of contents (#+TOC in index.org) */
nav.sections{margin-top:1.5rem;border-top:1px solid var(--rule);padding-top:1rem}
nav.sections #table-of-contents > h2{display:none}
nav.sections ul{list-style:none;margin:0;padding:0}
nav.sections a{display:block;padding:.3rem 0;color:var(--accent);
  font-variant:small-caps;letter-spacing:.05em;font-size:1.05rem}
nav.sections ul ul{margin:0 0 .4rem .85rem;padding-left:.75rem;border-left:1px solid var(--rule)}
nav.sections ul ul a{font-variant:normal;letter-spacing:0;font-size:.88rem;line-height:1.35;padding:.2rem 0;color:var(--muted)}
nav.sections ul ul a:hover{color:var(--accent)}

/* ---- main content ---- */
.outline-2,#postamble{max-width:47rem;padding:0 3rem}
.profile + .outline-2{padding-top:1.25rem}
h2{font-size:1.6rem;color:var(--accent);margin:2.5rem 0 .8rem;font-weight:600;
  padding-bottom:.3rem;border-bottom:1px solid var(--rule)}
h3{font-size:1.2rem;margin:2rem 0 .4rem;font-weight:600}
h4{font-size:1.08rem;margin:1.6rem 0 .3rem;font-weight:600;font-style:italic}
ul.org-ul{padding-left:1.2em}
ul.org-ul li{margin:.35em 0}
#postamble{color:var(--muted);font-size:.85rem;padding-top:2.5rem;padding-bottom:3rem}
#postamble p{margin:0}
#postamble .validation,#postamble .creator,#postamble .author{display:none}

/* wide screens: sidebar stays put while content scrolls */
@media (min-width:960px){
  .profile{position:fixed;top:0;left:0;bottom:0;width:var(--side-width);overflow-y:auto}
  .outline-2,#postamble{margin-left:var(--side-width)}
}

/* narrow screens: profile becomes a header */
@media (max-width:959px){
  body{font-size:17px}
  .profile{border-right:0;border-bottom:1px solid var(--rule);display:grid;
    grid-template-columns:88px 1fr;gap:0 1.1rem;align-items:start;padding:1.75rem 1.25rem 1rem}
  .profile > *{grid-column:2}
  .photo{grid-column:1;grid-row:1 / span 4;width:88px;height:88px;margin:0}
  .name{font-size:1.5rem}
  .role{margin-bottom:.6rem}
  nav.sections{grid-column:1 / -1;margin-top:.75rem;padding-top:.6rem}
  nav.sections #text-table-of-contents > ul{display:flex;flex-wrap:wrap;gap:0 1.5rem}
  nav.sections ul ul{display:none}
  .outline-2,#postamble{padding:0 1.25rem}
  h2{scroll-margin-top:1rem}
}

@media print{
  .profile{position:static;border:0;background:none}
  nav.sections{display:none}
  .outline-2,#postamble{margin-left:0}
}
