/* ==========================================================================
   Chase Fiore, Ph.D. — resume site
   Visual language modelled on the Renuvo 128 resume template:
   dark textured backdrop, a floating portrait card, an icon rail on the left,
   and a scrollable content pane with big lowercase titles and red accents.
   ========================================================================== */

:root {
  --primary-dark: #1c1e1f;
  --paragraph-grey: #8d8e8f;
  --primary: #d62222;
  --primary-hover: #b81b1b;
  --dark-gray: #afafaf;
  --dark-gray-50: rgba(175, 175, 175, .5);
  --dark-gray-25: rgba(175, 175, 175, .25);
  --white: #ffffff;
  --gray: #e9e9e9;
  --bg: #0f1414;

  --rail-w: 80px;
  --portrait-w: 250px;
  --pane-w: 600px;
  --card-h: 84vh;

  --font-head: "Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-body: "Lato", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--primary-dark);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.25;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .3s, background-color .3s, border-color .3s; }
a:hover { color: var(--primary-hover); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; margin: 10px 0; }
p { font-family: var(--font-head); font-size: 15px; line-height: 1.5; color: var(--paragraph-grey); margin: 10px 0; }
sup { font-size: .7em; line-height: 0; }
ul { margin: 0; padding: 0; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.print-header { display: none; }

/* ---------- textured backdrop ---------- */
.site {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(28, 31, 31, .30), rgba(28, 31, 31, .30)),
    radial-gradient(120% 80% at 12% 0%, rgba(255, 255, 255, .075), transparent 55%),
    radial-gradient(90% 70% at 92% 100%, rgba(255, 255, 255, .06), transparent 55%),
    repeating-linear-gradient(-34deg, transparent 0 22px, rgba(255, 255, 255, .030) 22px 27px, transparent 27px 61px, rgba(255, 255, 255, .018) 61px 63px, transparent 63px 98px),
    repeating-linear-gradient(-31deg, transparent 0 150px, rgba(0, 0, 0, .30) 150px 240px, transparent 240px 330px),
    repeating-linear-gradient(-35deg, transparent 0 7px, rgba(255, 255, 255, .012) 7px 8px);
}
.site::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .30;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- card shell ---------- */
.card {
  position: relative;
  width: calc(var(--rail-w) + var(--portrait-w) + var(--pane-w));
  max-width: 100%;
  margin: 0 auto;
}
.card-inner {
  position: relative;
  display: flex;
  height: var(--card-h);
  min-height: 520px;
  overflow: hidden;
  background: var(--primary-dark);
}

/* ---------- icon rail ---------- */
.rail {
  position: relative;
  z-index: 5; /* above the portrait card, so hover labels are not hidden behind it */
  flex: none;
  width: var(--rail-w);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 0;
  background: var(--primary-dark);
}
/* the portrait's drop shadow used to fall on the rail; keep that look now that the rail sits above it */
.rail::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 30px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(to left, rgba(0, 0, 0, .42), rgba(0, 0, 0, 0));
}
/* monogram: a calligraphic script, centred in the rail */
.logo {
  z-index: 1;
  position: absolute;
  top: 16px;
  left: 0;
  width: var(--rail-w);
  text-align: center;
  text-indent: -5px; /* the F's flourish overshoots to the right; keep the pair visually centred */
  font: 400 44px/1 "Allura", "Snell Roundhand", "Apple Chancery", "Brush Script MT", cursive;
  color: var(--primary);
  letter-spacing: 0;
  text-shadow: 0 2px 12px rgba(214, 34, 34, .35);
  transition: color .3s, text-shadow .3s;
}
.logo:hover { color: var(--white); text-shadow: 0 2px 12px rgba(255, 255, 255, .25); }
/* interlocking monogram: the F sits 30% lower and 30% further left than its natural spot */
.logo span { display: inline-block; }
.logo-f { transform: translate(-30%, 30%); }
.rail-links { position: relative; z-index: 1; list-style: none; display: flex; flex-direction: column; align-items: center; }
.rail-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 28px;
  color: var(--paragraph-grey);
}
.rail-link svg {
  width: 22px;
  height: 22px;
  transition: transform .3s ease, color .3s ease;
}
.rail-link:hover { color: var(--primary); }
.rail-link[aria-current="page"] { color: var(--primary); }
.rail-link[aria-current="page"] svg { transform: scale(1.2); }
/* hover / focus label for the rail: one element, appended to .card by main.js and
   positioned there, so it sits above the portrait card in every browser */
.rail-tip {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  background: var(--primary);
  color: var(--white);
  font: 700 10px/1 var(--font-head);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 7px 10px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-6px, -50%);
  transition: opacity .2s, transform .2s;
}
.rail-tip.is-visible { opacity: 1; transform: translate(0, -50%); }
.rail-download {
  z-index: 1;
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: 0;
  color: var(--primary);
  cursor: pointer;
  padding: 8px;
  transition: color .3s, transform .3s;
}
.rail-download svg { width: 38px; height: 38px; }
.rail-download:hover { color: var(--white); transform: translateX(-50%) translateY(-2px); }

/* ---------- floating portrait ---------- */
.portrait {
  position: absolute;
  z-index: 4;
  top: -3vh;
  left: var(--rail-w);
  width: var(--portrait-w);
  height: 90vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--primary-dark);
  box-shadow: 0 0 30px rgba(0, 0, 0, .5);
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% 30%;
}
.portrait-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(28, 30, 31, .92), rgba(28, 30, 31, 0) 56%),
    linear-gradient(rgba(28, 30, 31, .10), rgba(28, 30, 31, .10));
}
.portrait-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px 50px;
}
.portrait-name { color: var(--white); font-size: 34px; margin: 0 0 8px; white-space: nowrap; }
.portrait-role { color: var(--primary); font: 400 15px/1.3 var(--font-head); margin-bottom: 18px; }
.socials { display: flex; gap: 30px; align-items: center; }
.socials a { display: inline-flex; color: var(--gray); }
.socials svg { width: 18px; height: 18px; fill: currentColor; }
.socials a:hover { color: var(--primary); }

/* ---------- scrollable pane ---------- */
.pane {
  position: relative;
  z-index: 2;
  flex: none;
  width: var(--pane-w);
  height: 100%;
  margin-left: var(--portrait-w);
  background: var(--primary-dark);
}
.pane-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 30px;
  scrollbar-width: thin;
  scrollbar-color: #3a3d3e transparent;
}
.pane-scroll::-webkit-scrollbar { width: 4px; }
.pane-scroll::-webkit-scrollbar-track { background: transparent; }
.pane-scroll::-webkit-scrollbar-thumb { background: #3a3d3e; border-radius: 2px; }
.pane-inner { padding: 50px 0 70px; }
.pane-fade {
  position: absolute;
  left: 0;
  right: 4px;
  height: 60px;
  pointer-events: none;
  z-index: 2;
}
.pane-fade.top { top: 0; background: linear-gradient(to bottom, var(--primary-dark) 10%, rgba(28, 30, 31, 0)); }
.pane-fade.bottom { bottom: 0; height: 70px; background: linear-gradient(to top, var(--primary-dark) 25%, rgba(28, 30, 31, 0)); }

/* ---------- tabs ---------- */
.tab { display: block; animation: fadeUp .45s ease both; }
.tab[hidden] { display: none; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.page-title {
  color: var(--white);
  font-size: 56px;
  margin: 0;
  text-transform: lowercase;
  outline: none;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 10px;
  margin: 20px 0 30px;
  font: italic 400 18px/1.3 var(--font-head);
  color: var(--primary);
}
.facts span + span::before {
  content: "/";
  color: var(--paragraph-grey);
  margin: 0 10px;
  font-style: normal;
  font-size: 20px;
}
.lead { margin: 0 0 15px; }
.divider { height: 1px; background: var(--dark-gray-50); margin: 50px 0; }
.section-title { color: var(--white); font-size: 36px; margin: 0 0 30px; }
.title-with-icon { display: flex; gap: 12px; align-items: flex-start; }
.title-with-icon svg { width: 26px; height: 26px; color: var(--primary); flex: none; margin-top: 8px; }

/* research focus cards (Renuvo "my services") */
.focus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.focus-card svg { width: 32px; height: 32px; color: var(--primary); margin-bottom: 10px; transition: transform .3s ease; }
.focus-card:hover svg { transform: translateY(-3px); }
.focus-card h5 { color: var(--white); font-size: 24px; margin: 10px 0; }
.focus-card p { margin: 10px 0 0; }

/* principal facts */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px 20px; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.stat-number { color: var(--primary); font: 700 26px/1 var(--font-head); font-variant-numeric: tabular-nums; }
.stat-label { color: var(--paragraph-grey); font: 700 13px/1.25 var(--font-head); }

/* research network (Renuvo "my clients") */
.network { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.network-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 78px;
  padding: 12px 8px;
  border: 1px solid var(--dark-gray-25);
  color: var(--gray);
  font: 700 12px/1.3 var(--font-head);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  opacity: .6;
  transition: opacity .2s, border-color .2s;
}
.network-item small { font: 400 11px/1.3 var(--font-head); letter-spacing: 0; text-transform: none; color: var(--paragraph-grey); }
.network-item:hover { opacity: 1; border-color: var(--dark-gray-50); }

/* skills */
.skill-group { margin-bottom: 24px; }
.skill-group:last-child { margin-bottom: 0; }
.skill-group h6 { color: var(--white); font-size: 15px; margin: 0 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.chips li {
  font: 400 13px/1 var(--font-head);
  color: var(--gray);
  border: 1px solid rgba(175, 175, 175, .35);
  padding: 8px 12px;
  transition: border-color .3s, color .3s;
}
.chips li:hover { border-color: var(--primary); color: var(--white); }

/* education / experience */
.work-wrapper { display: flex; gap: 40px; align-items: flex-start; }
.work-block { display: flex; flex-direction: column; gap: 30px; width: 100%; min-width: 0; }
.work-title { display: flex; align-items: center; gap: 15px; }
.work-title svg { width: 26px; height: 26px; color: var(--primary); flex: none; }
.work-title h4 { color: var(--white); font-size: 28px; margin: 0; }
.work-item { display: flex; flex-direction: column; gap: 10px; }
.work-when, .pub-year, .news-kicker {
  color: var(--primary);
  font: 700 12px/1.3 var(--font-head);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.work-item h5 { color: var(--white); font-size: 20px; margin: 0; }
.work-where { color: var(--paragraph-grey); font: 400 12px/1.4 var(--font-head); }
.work-item p { margin: 0; }

/* publications */
.pub-list { list-style: none; display: flex; flex-direction: column; gap: 34px; }
.pub { display: flex; flex-direction: column; gap: 8px; }
.pub h5 { color: var(--white); font-size: 20px; margin: 0; }
.pub h5 a { color: var(--white); }
.pub h5 a:hover { color: var(--primary); }
.pub-venue { color: var(--paragraph-grey); font: 400 13px/1.5 var(--font-head); }
.pub-venue i { color: var(--gray); font-style: italic; }
.pub-authors { color: var(--dark-gray); font: 400 13px/1.6 var(--font-head); }
.pub-authors b { color: var(--white); font-weight: 700; }
.pub-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 10px;
  padding: 5px 8px;
  border: 1px solid rgba(175, 175, 175, .35);
  color: var(--gray);
  font: 700 10px/1 var(--font-head);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* buttons */
.btn-outline, .btn-primary {
  display: inline-block;
  padding: 12px 22px;
  border: 1px solid var(--primary);
  font: 700 10px/1 var(--font-head);
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all .3s;
  cursor: pointer;
}
.btn-outline { color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-primary { color: var(--white); background: var(--primary); }
.btn-primary:hover { background: var(--white); border-color: var(--white); color: var(--primary); }
.btn-sm { padding: 8px 12px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

/* news */
.figure { margin: 0 0 30px; }
.figure img { width: 100%; height: auto; }
.figure figcaption { color: var(--paragraph-grey); font: italic 400 13px/1.5 var(--font-head); margin-top: 10px; }
.news-title { color: var(--white); font-size: 26px; margin: 8px 0; }
.news-title a { color: var(--white); }
.news-title a:hover { color: var(--primary); }
.byline { color: var(--paragraph-grey); font: 400 13px/1.5 var(--font-head); }
blockquote {
  margin: 30px 0;
  padding: 6px 0 6px 20px;
  border-left: 3px solid var(--primary);
  color: var(--gray);
  font: italic 400 17px/1.55 var(--font-body);
}
blockquote p { color: var(--gray); font: inherit; margin: 0; }
blockquote cite { display: block; margin-top: 12px; color: var(--paragraph-grey); font: 400 13px/1.4 var(--font-head); font-style: normal; }
.mentor-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  padding: 20px;
  border: 1px solid var(--dark-gray-25);
}
.mentor-card svg { width: 26px; height: 26px; color: var(--primary); margin-top: 2px; }
.mentor-card h6 { color: var(--white); font-size: 16px; margin: 0 0 6px; }
.mentor-card p { margin: 0; font-size: 14px; }

/* contact */
.contact-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--dark-gray-25);
  color: inherit;
  transition: border-color .3s, transform .3s;
}
a.contact-item:hover { border-color: var(--primary); transform: translateY(-2px); }
.contact-item svg { width: 24px; height: 24px; color: var(--primary); }
.contact-item strong { color: var(--white); font: 700 15px/1.3 var(--font-head); }
.contact-item span { color: var(--paragraph-grey); font: 400 13px/1.45 var(--font-head); overflow-wrap: anywhere; }
address { font-style: normal; }
address p { margin: 0; }
.footnote { margin-top: 40px; color: var(--paragraph-grey); font: 400 12px/1.6 var(--font-head); }
.footnote a { color: var(--dark-gray); }
.footnote a:hover { color: var(--primary); }

/* mobile-only hero (portrait is hidden on phones, as in the template) */
.mobile-hero { display: none; }

/* ---------- breakpoints (mirroring the template) ---------- */
@media screen and (min-width: 1280px) {
  :root { --portrait-w: 460px; }
  .page-title { font-size: 70px; }
  .portrait-name { font-size: 48px; margin-bottom: 10px; }
  .portrait-role { font-size: 18px; margin-bottom: 20px; }
  .portrait img { object-position: 20% 30%; }
}
@media screen and (max-width: 991px) {
  .card { width: 90vw; }
  .pane { flex: 1; width: auto; min-width: 0; }
  .focus-grid { grid-template-columns: 1fr; }
  .stats, .network { grid-template-columns: 1fr 1fr; }
  .work-wrapper { flex-direction: column-reverse; }
  .contact-list { grid-template-columns: 1fr; }
  .facts { flex-direction: column; align-items: flex-start; row-gap: 6px; font-size: 16px; }
  .facts span + span::before { content: none; margin: 0; }
}
@media screen and (max-width: 767px) {
  :root { --rail-w: 76px; }
  .card { width: 100vw; }
  .card-inner { height: 100vh; height: 100dvh; min-height: 0; }
  .portrait { display: none; }
  .pane { margin-left: 0; }
  .pane-scroll { padding: 0 20px; }
  .pane-inner { padding-top: 40px; }
  .page-title { font-size: 48px; text-align: center; }
  .facts { justify-content: center; align-items: center; text-align: center; }
  .lead, .tab > p { text-align: center; }
  .focus-card { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .mobile-hero {
    display: block;
    position: relative;
    aspect-ratio: 2 / 3;
    max-height: 64vh;
    margin: 0 0 30px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 0, 0, .5);
  }
  .mobile-hero img { width: 100%; height: 100%; object-fit: cover; object-position: 6% 15%; }
  .mobile-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(28, 30, 31, .92), rgba(28, 30, 31, 0) 60%);
  }
  .mobile-hero-info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 0 16px 18px; text-align: center; }
  .mobile-hero-name { color: var(--white); font: 700 30px/1.2 var(--font-head); }
  .mobile-hero-role { color: var(--primary); font: 400 15px/1.3 var(--font-head); margin-top: 4px; }
  .mobile-hero .socials { justify-content: center; margin-top: 12px; gap: 22px; }
  .rail-tip { display: none; }
}
@media screen and (max-width: 479px) {
  .rail { justify-content: flex-start; padding-top: 100px; }
  .facts { align-items: center; }
  .pane-inner { padding-bottom: 100px; }
  .stats, .network { grid-template-columns: 1fr; }
  .page-title { font-size: 42px; }
  .section-title { font-size: 30px; }
  .rail-link { padding: 12px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- print: the "Download CV" button prints every tab as one document ---------- */
@media print {
  @page { margin: 16mm; }
  html, body { background: #fff !important; color: #111; }
  .site { display: block; min-height: 0; background: #fff !important; overflow: visible; }
  .site::before { display: none; }
  .card { width: auto; max-width: none; }
  .card-inner { display: block; height: auto; min-height: 0; overflow: visible; background: #fff; }
  .rail, .portrait, .pane-fade, .mobile-hero, .rail-download { display: none !important; }
  .pane { width: auto; margin: 0; background: #fff; }
  .pane-scroll { height: auto; overflow: visible; padding: 0; }
  .pane-inner { padding: 0; }
  .print-header { display: block; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 2px solid #111; }
  .print-header h1 { font-size: 30px; margin: 0; color: #111; }
  .print-header p { margin: 4px 0 0; color: #333; }
  .tab { display: block !important; animation: none; break-inside: avoid; margin-bottom: 28px; }
  .tab[hidden] { display: block !important; }
  .page-title { font-size: 26px; color: #111 !important; text-transform: uppercase; letter-spacing: 1px; }
  .facts { color: #b31b1b !important; font-size: 14px; margin: 8px 0 14px; }
  .divider { margin: 22px 0; background: #ddd; }
  .section-title { font-size: 20px; color: #111 !important; margin-bottom: 14px; }
  .focus-card h5, .work-item h5, .work-title h4, .pub h5, .pub h5 a, .news-title, .news-title a,
  .contact-item strong, .skill-group h6, .mentor-card h6, .network-item { color: #111 !important; }
  p, .pub-authors, .pub-venue, .work-where, .byline, blockquote, blockquote p, figcaption, .contact-item span, .footnote { color: #333 !important; }
  .pub-authors b { color: #111 !important; }
  .stat-number, .work-when, .pub-year, .news-kicker { color: #b31b1b !important; }
  .stat-label { color: #333 !important; }
  .chips li, .network-item, .contact-item, .mentor-card { border-color: #ccc; color: #111; opacity: 1; }
  .badge { color: #333 !important; border-color: #999; }
  .network-item small, .work-where, .pub-venue i { color: #555 !important; }
  .pub-links, .btn-row, .rail-tip { display: none !important; }
  .focus-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .stats { gap: 10px; }
  .figure { max-width: 420px; }
  a { color: #111; }
  .contact-item span::after { content: ""; }
}
