:root {
  color-scheme: dark;
  --text: #fff;
  --muted: rgba(255,255,255,.76);
  --accent: #ffd2ca;
  --cyan: #6e969e;
  --line: rgba(255,255,255,.9);
}

* { box-sizing: border-box; }
html { background: #000; }
html, body { min-height: 100%; }
body {
  margin: 0;
  overflow-x: hidden;
  background: #000;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  opacity: 0;
  transition: opacity 500ms linear;
  will-change: opacity;
}
html.rorich-page-ready body { opacity: 1; }
html.rorich-page-leaving body { opacity: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

/* The navigation is intentionally fixed above the document fade/particle layers. */
.site-header {
  position: fixed;
  z-index: 3100;
  inset: 0 0 auto;
  height: 96px;
  background: linear-gradient(180deg,rgba(0,0,0,.98) 0,rgba(0,0,0,.75) 54%,rgba(0,0,0,0) 100%);
  pointer-events: none;
}
.nav-links {
  position: absolute;
  top: 26px;
  left: 50%;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: auto;
}
.nav-links a {
  padding: 11px 18px;
  color: #fff;
  font-size: 16px;
  line-height: 26px;
  font-weight: 600;
  text-shadow: 0 0 6px rgba(255,255,255,.65), 0 2px 20px #000;
}
.nav-links a[aria-current="page"] {
  color: var(--accent);
  text-shadow: 0 0 6px rgba(255,210,202,.55), 0 2px 20px #000;
}

/* The custom homepage keeps a plain header element; anchor it identically. */
body > header:not(.site-header) {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 96px !important;
}

#particles.rorich-global-particles {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}
.page, .site-footer { position: relative; z-index: 2; }
.page {
  width: min(889px, calc(100% - 40px));
  min-height: calc(100vh - 105px);
  margin: 0 auto;
  padding: 157px 0 0;
}
.page-title {
  margin: 0;
  color: #fff;
  font-family: Inter, sans-serif;
  font-size: 84px;
  line-height: 86px;
  font-style: italic;
  font-weight: 200;
  letter-spacing: -4.2px;
}
.title-line {
  width: 220px;
  height: 2px;
  margin: 5px 0 20px;
  border: 0;
  background: #fff;
}
.intro-copy, .entry-copy, .page p, .page li {
  color: rgba(255,255,255,.9);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
}
.page strong { color: #fff; font-weight: 700; }

/* About */
.about-hero {
  display: grid;
  grid-template-columns: 507px 269px;
  column-gap: 124px;
  align-items: start;
}
.about-copy { min-width: 0; }
.about-copy .intro-copy p { margin: 0 0 22px; }
.portrait {
  width: 269px;
  height: 370px;
  margin-top: 97px;
  border-radius: 12px;
  object-fit: cover;
}
.about-meta {
  display: grid;
  grid-template-columns: 527px 248px;
  column-gap: 124px;
  margin-top: 55px;
}
.meta-title {
  margin: 0 0 30px;
  font-size: 30px;
  line-height: 39px;
  font-weight: 600;
  letter-spacing: 0;
}
.personal-grid {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 0;
}
.personal-grid ul, .languages ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.personal-grid ul:nth-child(3) { grid-column: 1 / -1; margin-top: 10px; }
.personal-grid li, .languages li {
  min-height: 40px;
  font-size: 18px;
  line-height: 30px;
}
.rorich-email-image-line { display: flex; align-items: center; gap: 18px; }
.rorich-email-image { width: 218px; height: 30px; }

/* Experience and education */
.timeline-layout {
  display: grid;
  grid-template-columns: 374px 441px;
  column-gap: 84px;
  align-items: start;
}
.timeline-intro .intro-copy { width: 314px; }
.timeline-intro .intro-copy p { margin: 20px 0 0; }
.timeline-entries { padding-top: 34px; }
.timeline-entry {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr;
  column-gap: 17px;
  padding: 0 0 120px;
}
.timeline-entry::before {
  content: "";
  position: absolute;
  left: 59px;
  top: 8px;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,.22);
}
.timeline-entry::after {
  content: "";
  position: absolute;
  left: 55px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
}
.timeline-entry:last-child::before { display: none; }
.entry-date {
  padding-right: 18px;
  color: rgba(255,255,255,.68);
  font-size: 13px;
  line-height: 20px;
  text-align: right;
}
.entry-content { padding-left: 0; }
.entry-heading {
  margin: 0 0 10px;
  color: #fff;
  font-size: 20px;
  line-height: 29px;
  font-weight: 200;
  letter-spacing: 0;
}
h3.entry-heading { font-size: 18px; line-height: 21px; font-weight: 100; }
.entry-copy p { margin: 13px 0 0; font-size: 16px; line-height: 1.55; }

/* Skills */
.page-skills { width: min(879px, calc(100% - 40px)); }
.skills-layout {
  display: grid;
  grid-template-columns: 334px 370px;
  column-gap: 130px;
  align-items: start;
}
.skill-groups { margin-top: 26px; }
.skill-groups h3 {
  margin: 46px 0 12px;
  color: #fff;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 0;
}
.skill-groups ul { margin: 0; padding-left: 19px; }
.skill-groups li { margin: 6px 0; font-size: 16px; line-height: 1.65; }
.skill-groups li > span:first-child:not(:only-child) { color: #fff; font-weight: 700; margin-right: .3em; }
.skill-groups li strong::after { content: " "; }
.skill-bars { padding: 102px 17px 0; }
.skill-bar { margin: 0 0 22px; }
.skill-bar h6 {
  margin: 0 0 9px;
  color: #fff;
  font-size: 14px;
  line-height: 16px;
  font-weight: 400;
  letter-spacing: 0;
}
.bar-track { width: 100%; height: 4px; background: rgba(255,255,255,.17); }
.bar-track span { display: block; width: var(--value); height: 100%; background: var(--cyan); }

/* Portfolios */
.page-portfolio { width: min(899px, calc(100% - 40px)); }
.portfolio-content > .section-title {
  margin: 44px 0 20px;
  color: #fff;
  font-size: 30px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -.4px;
}
.portfolio-content > .section-title + .section-title { margin-top: 18px; }
.portfolio-content > .section-copy {
  margin: -5px 0 31px;
  color: rgba(255,255,255,.78);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 300;
  letter-spacing: 0;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 8px;
  margin: 0 0 36px;
}
.gallery-single { grid-template-columns: 1fr; }
.gallery-single .gallery-item { aspect-ratio: 5 / 1; }
.gallery-item {
  display: block;
  aspect-ratio: 1.21;
  overflow: hidden;
  background: #070707;
  cursor: zoom-in;
}
.gallery-item[hidden] { display: none; }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity .2s ease, transform .35s ease;
}
.gallery-item:hover img { opacity: .85; transform: scale(1.015); }
.video-playlist {
  margin: 119px 0 104px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(145deg,rgba(255,255,255,.08),rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.12);
}
.video-headline { display: flex; justify-content: space-between; align-items: baseline; padding: 22px 26px 12px; }
.video-headline h2 { margin: 0; font-size: 28px; font-weight: 500; }
.video-headline span { color: rgba(255,255,255,.55); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.video-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; padding: 14px 34px 28px; }
.video-card { position: relative; overflow: hidden; background: rgba(0,0,0,.45); border-radius: 13px; }
.video-card video, .youtube-card { display: block; width: 100%; aspect-ratio: 16/9; border: 0; background: #050505; }
.video-card video { object-fit: cover; }
.hosted-video-open {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  width: 100%;
  aspect-ratio: 16/9;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.youtube-card { position: relative; padding: 0; cursor: pointer; }
.youtube-card img { width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 54px; height: 54px; transform: translate(-50%,-50%); border-radius: 50%; background: #fff; color: #000; font-size: 22px; }
.video-meta { position: relative; min-height: 74px; padding: 18px 15px 30px; }
.video-title { margin: 0; padding-right: 55px; color: #fff; font-size: 16px; line-height: 1.25; font-weight: 500; letter-spacing: 0; }
.duration { position: absolute; right: 15px; top: 13px; margin: 0; color: rgba(255,255,255,.55)!important; font-size: 12px!important; }

/* Legal */
.page-legal { width: min(900px, calc(100% - 40px)); }
.page-legal h1 { margin: 0 0 35px; font-size: 64px; line-height: 1; font-weight: 300; }
.page-legal h2 { margin: 36px 0 10px; font-size: 26px; line-height: 1.25; font-weight: 600; }
.page-legal h3 { margin: 26px 0 8px; font-size: 19px; }
.page-legal p, .page-legal li { max-width: 760px; font-size: 16px; line-height: 1.65; }
.page-legal hr { margin: 35px 0; border: 0; border-top: 1px solid rgba(255,255,255,.2); }
.page-legal .legal-card, .page-legal .legal-section { padding: 4px 0; }

/* Footer: same compact gradient and separate legal alignment as the live export. */
.site-footer {
  min-height: 105px;
  padding: 61px 24px 14px;
  background: linear-gradient(180deg,#000 0%,#05051c 39%,#4c7b86 100%);
  font-size: 16px;
}
.social-links { display: flex; justify-content: center; gap: 22px; }
.social-links a { color: #ffc4b8; }
.legal-links {
  position: absolute;
  right: 10px;
  bottom: 17px;
  display: flex;
  gap: 18px;
}
.legal-links a { color: #b6c7ef; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }

/* Custom media viewer */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  z-index: 5000;
  inset: 0;
  display: grid;
  grid-template-columns: 64px minmax(0,1fr) 64px;
  align-items: center;
  padding: 22px;
  background: rgba(0,0,0,.96);
}
.lightbox-stage { position: relative; width: 100%; height: calc(100vh - 120px); display: grid; place-items: center; overflow: hidden; }
.lightbox-stage img, .lightbox-stage video {
  width: auto;
  height: auto;
  max-width: min(100%, calc(100vw - 172px));
  max-height: calc(100vh - 120px);
  border: 0;
  object-fit: contain;
}
.lightbox-stage iframe { max-width: 100%; max-height: 100%; border: 0; object-fit: contain; }
.lightbox-stage iframe { width: min(90vw,1200px); aspect-ratio: 16/9; }
.lightbox button { border: 0; background: transparent; color: #fff; font-size: 54px; cursor: pointer; }
.lightbox-close { position: absolute; z-index: 2; right: 17px; top: 2px; }
.lightbox-fullscreen {
  position: absolute;
  z-index: 7;
  right: 70px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.28) !important;
  border-radius: 7px;
  background: rgba(0,0,0,.48) !important;
  font-size: 0 !important;
}
.lightbox-fullscreen:hover,
.lightbox-fullscreen:focus-visible { background: rgba(255,255,255,.14) !important; }
.lightbox-fullscreen svg { display: block; width: 100%; height: 100%; }
.lightbox-prev, .lightbox-next { visibility: hidden; }
.lightbox.has-multiple-media .lightbox-prev,
.lightbox.has-multiple-media .lightbox-next { visibility: visible; }
.lightbox-description {
  position: absolute;
  z-index: 2;
  left: 86px;
  right: 86px;
  bottom: 18px;
  color: rgba(255,255,255,.88);
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
}
.lightbox-description:empty { display: none; }
.lightbox-thumbs {
  position: absolute;
  z-index: 3;
  right: 76px;
  top: 50%;
  display: none;
  flex-direction: column;
  gap: 6px;
  max-height: 72vh;
  transform: translateY(-50%);
  overflow-y: auto;
}
.lightbox.has-grouped-gallery .lightbox-thumbs { display: flex; }
.lightbox.has-grouped-gallery .lightbox-stage img,
.lightbox.has-grouped-gallery .lightbox-stage video,
.lightbox.has-grouped-gallery .panorama-viewer { max-width: calc(100vw - 270px); }
.lightbox-thumbs button { width: 52px; height: 40px; padding: 0; opacity: .55; }
.lightbox-thumbs button.active { opacity: 1; outline: 1px solid #fff; }
.lightbox-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.lightbox-thumbs span { display: grid; place-items: center; width: 100%; height: 100%; color: #fff; background: #161616; font-size: 15px; }
.panorama-viewer {
  display: block;
  width: 100%;
  height: calc(100vh - 120px);
  cursor: grab;
  touch-action: none;
}
.panorama-viewer.is-dragging { cursor: grabbing; }
.panorama-hint {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  transform: translate(-50%, -50%) scale(1);
  color: rgba(255,255,255,.94);
  background: rgba(7,7,7,.56);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  box-shadow: 0 12px 34px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
  pointer-events: none;
  opacity: 1;
  transition: opacity .22s linear, transform .22s linear;
}
.panorama-hint svg { display: block; width: 58px; height: 58px; }
.panorama-hint.is-hidden { opacity: 0; transform: translate(-50%, -50%) scale(.84); }

/* Native browser fullscreen entered from each gallery tile's fullscreen button. */
.lightbox:fullscreen,
.lightbox.is-native-fullscreen {
  display: block;
  width: 100vw;
  height: 100vh;
  padding: 0;
  background: #000;
}
.lightbox:fullscreen .lightbox-stage,
.lightbox.is-native-fullscreen .lightbox-stage {
  width: 100vw;
  height: 100vh;
}
.lightbox:fullscreen .lightbox-stage img,
.lightbox:fullscreen .lightbox-stage video,
.lightbox:fullscreen.has-grouped-gallery .lightbox-stage img,
.lightbox:fullscreen.has-grouped-gallery .lightbox-stage video,
.lightbox.is-native-fullscreen .lightbox-stage img,
.lightbox.is-native-fullscreen .lightbox-stage video {
  width: auto;
  height: auto;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
}
.lightbox:fullscreen .lightbox-stage iframe,
.lightbox.is-native-fullscreen .lightbox-stage iframe {
  width: min(100vw, 177.78vh);
  max-width: 100vw;
  max-height: 100vh;
}
.lightbox:fullscreen .panorama-viewer,
.lightbox:fullscreen.has-grouped-gallery .panorama-viewer,
.lightbox.is-native-fullscreen .panorama-viewer {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
}
.lightbox:fullscreen .lightbox-prev,
.lightbox:fullscreen .lightbox-next,
.lightbox.is-native-fullscreen .lightbox-prev,
.lightbox.is-native-fullscreen .lightbox-next {
  position: absolute;
  z-index: 6;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox:fullscreen .lightbox-prev,
.lightbox.is-native-fullscreen .lightbox-prev { left: 8px; }
.lightbox:fullscreen .lightbox-next,
.lightbox.is-native-fullscreen .lightbox-next { right: 8px; }

@media (max-width: 920px) {
  .nav-links { top: 15px; width: calc(100% - 18px); justify-content: center; flex-wrap: wrap; }
  .nav-links a { padding: 6px 9px; font-size: 13px; line-height: 20px; }
  .site-header { height: 92px; }
  .page { width: min(100% - 30px, 680px); padding-top: 126px; }
  .page-title { font-size: clamp(52px,12vw,76px); line-height: 1; letter-spacing: -.045em; }
  .about-hero, .about-meta, .timeline-layout, .skills-layout { grid-template-columns: 1fr; column-gap: 0; }
  .portrait { grid-row: 1; width: min(269px,70vw); height: auto; margin: 0 auto 42px; }
  .about-copy { grid-row: 2; }
  .about-meta { row-gap: 45px; margin-top: 45px; }
  .timeline-intro .intro-copy { width: auto; }
  .timeline-entries { padding-top: 60px; }
  .skills-layout { row-gap: 35px; }
  .skill-bars { padding-top: 0; }
  .gallery { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 560px) {
  .page { width: calc(100% - 24px); padding-bottom: 60px; }
  .page-title { font-size: 50px; }
  .intro-copy, .entry-copy, .page p, .page li { font-size: 16px; }
  .gallery { gap: 5px; }

  .video-grid { grid-template-columns: 1fr; }
  .site-footer { padding-top: 48px; padding-bottom: 42px; }
  .social-links { gap: 10px 16px; flex-wrap: wrap; }
  .legal-links { left: 0; right: 0; bottom: 10px; justify-content: center; }
  .lightbox { grid-template-columns: 36px minmax(0,1fr) 36px; padding: 6px; }
  .lightbox button { font-size: 38px; }
  .lightbox-stage img, .lightbox-stage video { max-width: calc(100vw - 84px); }
  .lightbox-description { left: 48px; right: 48px; bottom: 12px; font-size: 13px; }
  .lightbox-thumbs { right: 45px; max-height: 62vh; }
  .lightbox.has-grouped-gallery .lightbox-stage img,
  .lightbox.has-grouped-gallery .lightbox-stage video,
  .lightbox.has-grouped-gallery .panorama-viewer { max-width: calc(100vw - 150px); }
}

@media (prefers-reduced-motion: reduce) {
  html, body, .gallery-item img { transition: none!important; }
}
