/* Aaron Bisig — personal site
   Dark editorial layout: left rail, fixed portrait panel, serif headlines. */

:root {
  --bg: #181917;
  --panel: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.7);
  --strong: #ffffff;
  --muted: rgba(255, 255, 255, 0.5);
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "BDO Grotesk", "Helvetica Neue", Arial, sans-serif;
  --rail: 56px;
  --portrait: min(30vw, 420px);
  --pad: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--strong); text-decoration: none; }
p a, li a { text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); text-underline-offset: 3px; }
p a:hover, li a:hover { text-decoration-color: #fff; }
:focus-visible { outline: 1px solid #fff; outline-offset: 4px; }

.label {
  font: 500 13px/1.3 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--strong);
}
.serif { font-family: var(--serif); font-weight: 400; }
em, .italic { font-style: italic; }

/* ---------- Left rail ---------- */
.rail {
  position: fixed; inset: 0 auto 0 0; z-index: 30;
  width: var(--rail);
  border-right: 1px solid var(--line);
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 20px 0 28px;
}
.menu-btn {
  width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-content: center; gap: 6px;
}
.menu-btn span { display: block; width: 24px; height: 1px; background: #fff; transition: transform .3s, opacity .3s; }
body.menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
body.menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.rail-name {
  writing-mode: vertical-rl; transform: rotate(180deg);
  white-space: nowrap;
}

/* ---------- Menu overlay ---------- */
.menu {
  position: fixed; inset: 0 0 0 var(--rail); z-index: 25;
  display: flex;
  visibility: hidden; opacity: 0;
  transition: opacity .35s ease, visibility 0s linear .35s;
}
body.menu-open .menu { visibility: visible; opacity: 1; transition: opacity .35s ease; }
.menu-panel {
  width: min(560px, 100%);
  background: var(--bg);
  border-right: 1px solid var(--line);
  padding: 28px 40px;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow-y: auto;
}
.menu-scrim { flex: 1; background: rgba(24,25,23,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.menu-links { display: flex; flex-direction: column; }
.menu-links a {
  font: 400 clamp(36px, 4.4vw, 54px)/1.12 var(--serif);
  color: var(--text);
  transition: color .2s;
}
.menu-links a:hover, .menu-links a[aria-current="page"] { color: #fff; }
.menu-links a[aria-current="page"] { font-style: italic; }
.menu-foot { display: flex; gap: 24px; font-size: 13px; color: var(--muted); padding-top: 32px; }
.menu-foot a { color: var(--strong); }

/* ---------- Portrait panel ---------- */
.portrait {
  position: fixed; top: 0; bottom: 0; left: var(--rail); z-index: 1;
  width: var(--portrait);
  overflow: hidden;
  border-right: 1px solid var(--line);
}
.portrait img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 20%;
  filter: grayscale(1) contrast(1.08) brightness(.72);
}
.portrait::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0;
  height: calc(var(--portrait) + 2px);
  background:
    linear-gradient(to bottom, rgba(24,25,23,0) 35%, rgba(24,25,23,.6) 75%, var(--bg) 99%),
    linear-gradient(to right, rgba(24,25,23,.35), rgba(24,25,23,0) 30%, rgba(24,25,23,0) 70%, rgba(24,25,23,.35));
  pointer-events: none;
}
.portrait-caption {
  position: absolute; left: 28px; right: 28px; bottom: 28px;
  font-size: 14px; line-height: 1.55; color: var(--muted);
}
.portrait-caption .label { display: block; margin-bottom: 8px; }

/* ---------- Main column ---------- */
main, .site-footer {
  margin-left: calc(var(--rail) + var(--portrait));
  padding: 0 var(--pad);
}
main { padding-top: 22px; min-height: 100vh; }
.inner { max-width: 980px; }

.breadcrumb { display: flex; gap: 8px; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover, .breadcrumb [aria-current] { color: #fff; }

.title-huge {
  font: 400 clamp(56px, 6.4vw, 92px)/1 var(--serif);
  color: #fff; margin: 120px 0 28px; letter-spacing: -.01em;
}
.lede { font-size: 18px; line-height: 1.6; max-width: 640px; margin: 0 0 24px; }
.title-medium { font: 400 clamp(28px, 2.7vw, 38px)/1.1 var(--serif); color: var(--text); margin: 0; }
.title-medium .white { color: #fff; }

/* ---------- Home ---------- */
.home { display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding-top: 48px; padding-bottom: 0; }
.statement {
  font: 400 clamp(36px, 3.8vw, 54px)/1.1 var(--serif);
  color: var(--text); margin: 0 0 32px; max-width: 820px;
}
.statement strong { font-weight: 400; color: #fff; }
.statement em { color: #fff; }
.home .lede { font-size: 16px; max-width: 520px; }
.link-list { list-style: none; margin: 72px calc(var(--pad) * -1) 0; padding: 0; }
.link-list li { border-top: 1px solid var(--line); }
.link-list a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding: 22px var(--pad);
  text-decoration: none;
  transition: background .2s, padding-left .25s;
}
.link-list a:hover { background: var(--panel); padding-left: calc(var(--pad) + 8px); }
.link-list .hint { font-size: 14px; color: var(--muted); text-align: right; }

/* ---------- Content sections ---------- */
.section {
  display: grid; grid-template-columns: 240px 1fr; gap: 48px;
  padding: 56px 0; border-top: 1px solid var(--line);
}
.section:first-of-type { margin-top: 64px; }
.section-side .meta { font-size: 14px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.section-body > :first-child { margin-top: 0; }
.section-body p { margin: 0 0 18px; max-width: 640px; }
.section-body h3 { font: 400 28px/1.15 var(--serif); color: #fff; margin: 40px 0 6px; }
.section-body h3:first-child { margin-top: 0; }
.section-body .meta { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
ul.list { list-style: none; padding: 0; margin: 0 0 8px; max-width: 680px; }
ul.list li { position: relative; padding: 0 0 0 22px; margin: 0 0 10px; }
ul.list li::before { content: ""; position: absolute; left: 0; top: .78em; width: 10px; height: 1px; background: rgba(255,255,255,.45); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; color: var(--text); }

.photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 48px 0 8px; }
.photo-pair img, .wide-photo { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; filter: grayscale(.25); }
.wide-photo { aspect-ratio: 10 / 3; margin-top: 48px; }
.dogs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 24px; max-width: 560px; }
.dogs img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 6px; }

.role { padding: 32px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 200px 1fr; gap: 32px; }
.role:first-child { border-top: 0; padding-top: 0; }
.role .when { font-size: 14px; color: var(--muted); line-height: 1.5; }
.role .when .label { display: block; margin-bottom: 6px; }
.role h3 { margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer { padding-top: 64px; padding-bottom: 28px; }
.cta {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 32px; display: flex; flex-direction: column; gap: 56px; max-width: 1040px;
}
.cta a.italic { color: #fff; border-bottom: 1px solid rgba(255,255,255,.3); transition: border-color .2s; }
.cta a.italic:hover { border-color: #fff; }
.cta-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 13px; }
.cta-row nav { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 24px; font-size: 13px; color: var(--muted); max-width: 1040px; }

/* ---------- Load-in motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise .8s cubic-bezier(.2,.7,.2,1) backwards; }
  .reveal.d1 { animation-delay: .08s; } .reveal.d2 { animation-delay: .16s; } .reveal.d3 { animation-delay: .24s; }
  .portrait img { animation: fade 1.4s ease backwards; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
  @keyframes fade { from { opacity: 0; } }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  :root { --pad: 40px; }
  .section { grid-template-columns: 1fr; gap: 20px; }
  .role { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 820px) {
  :root { --rail: 0px; --portrait: 0px; --pad: 16px; }
  .rail {
    inset: 0 0 auto 0; width: auto; height: 56px;
    flex-direction: row-reverse; padding: 0 16px;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .rail-name { writing-mode: horizontal-tb; transform: none; }
  .menu { inset: 56px 0 0 0; }
  .menu-panel { width: 100%; border-right: 0; padding: 24px 16px; }
  .menu-scrim { display: none; }
  .portrait {
    position: relative; left: 0; width: 100%; height: auto;
    margin-top: 56px; border-right: 0;
  }
  .portrait img { aspect-ratio: 4 / 3; object-position: center 25%; }
  .portrait::after { height: 100%; }
  .portrait-caption { display: none; }
  body.inner-page .portrait { display: none; }
  body.inner-page main { padding-top: 80px; }
  .home { min-height: 0; padding-top: 8px; }
  .title-huge { margin-top: 56px; }
  .link-list { margin-top: 40px; }
  .link-list a { flex-direction: column; gap: 4px; }
  .link-list .hint { text-align: left; }
  .photo-pair { grid-template-columns: 1fr; }
  .dogs { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 40px 0; }
  .section:first-of-type { margin-top: 40px; }
  .cta { padding: 24px 20px; gap: 40px; }
}

/* Full-width section (label above, content below) */
.section.stack { grid-template-columns: 1fr; gap: 32px; }
.section.stack .role { grid-template-columns: 240px 1fr; gap: 48px; }
@media (max-width: 1100px) { .section.stack .role { grid-template-columns: 1fr; gap: 10px; } }

/* Certifications and education */
.creds { list-style: none; margin: 0; padding: 0; max-width: 680px; }
.creds li { display: grid; grid-template-columns: 200px 1fr auto; gap: 4px 24px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.creds li:first-child { padding-top: 0; }
.cred-name { font: 400 22px/1.2 var(--serif); color: #fff; }
.cred-note { font-size: 13px; color: var(--muted); white-space: nowrap; }
.section-body strong { font-weight: 500; color: #fff; }

/* Career timeline */
.career { list-style: none; margin: 0; padding: 0; }
.career li { display: grid; grid-template-columns: 240px 1fr 220px; gap: 6px 48px; align-items: baseline; padding: 18px 0; border-top: 1px solid var(--line); }
.career li:first-child { border-top: 0; padding-top: 0; }
.career-when { font: 500 13px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #fff; }
.career-role { font: 400 24px/1.2 var(--serif); color: #fff; }
.career-note { display: block; font: 400 14px/1.5 var(--sans); color: var(--muted); margin-top: 6px; }
.career-where { font-size: 14px; color: var(--muted); }

@media (max-width: 1100px) {
  .career li { grid-template-columns: 1fr; gap: 4px; }
  .creds li { grid-template-columns: 1fr; gap: 2px; }
  .cred-note { white-space: normal; }
}

/* ---------- Larger reading sizes ---------- */
body { font-size: 17px; line-height: 1.65; }
.label, .career-when { font-size: 14px; }
.lede { font-size: 20px; max-width: 680px; }
.home .lede { font-size: 18px; max-width: 580px; }
.link-list .hint { font-size: 15px; }
.section-side .meta, .section-body .meta, .role .when { font-size: 15px; }
.section-body h3 { font-size: 31px; }
.tags span { font-size: 15px; }
.portrait-caption { font-size: 15px; }
.cred-name { font-size: 24px; }
.cred-note, .career-where { font-size: 15px; }
.career-role { font-size: 27px; }
.career-note { font-size: 15px; }
.cta-row, .footer-bottom, .menu-foot { font-size: 14px; }
@media (max-width: 820px) {
  body { font-size: 16.5px; }
  .lede { font-size: 18px; }
  .home .lede { font-size: 17px; }
  .section-body h3 { font-size: 27px; }
  .career-role { font-size: 24px; }
}
