/* ====================================
   TOKENS / DESIGN VARIABLES
==================================== */
:root {
  /* Layout widths */
  --screen-max-width: min(60vw, 1100px);
  --textbox-max-width: min(60vw, 850px);

  /* Spacing */
  --screen-gap: 0.5rem;
  --screen-stack-gap: 0.5rem;
  --screen-top-pad: 6vh;
  --screen-vertical-pad: 6vh;
  --screen-text-pad: 2rem;
  --screen-footer-offset: 2vh;

  /* Textbox */
  --textbox-padding-x: 2rem;
  --textbox-padding-y: 0.0rem;
  --textbox-radius: 16px;
  --textbox-bg: transparent;
  --textbox-color: #ffffff;
  --textbox-shadow: 0 2px 16px rgba(0,0,0,0);
  --textbox-font-size-lg: 1.25rem;
  --textbox-font-size: 1.15rem;
  --textbox-max-height: 20vh;

  /* Colors */
  --color-accent: #ff9400;
  --color-accent-rgba: 255,148,0;
  --color-text-light: #ffffff;
  --color-bg-dark-1: #252525;
  --color-bg-dark-2: #1e1e1e;

  /* Media */
  --media-aspect-ratio: 16 / 9;
  --play-button-size: 64px;

  /* Timeline */
  --timeline-x: 12.5vw;
  --timeline-line-width: 3px;
  --timeline-line-half: calc(var(--timeline-line-width) / 2);
  --timeline-label-offset: 4vh;
}

/* ====================================
   GLOBAL / RESET
==================================== */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background: transparent;
  overflow-x: hidden;
  font-family: 'Roboto', Arial, sans-serif;
  color: var(--color-text-light);
}

body {
  min-height: 600vh; /* enough scroll for 6 screens */
  min-width: 100vw;
}

#bg {
  position: fixed;
  inset: 0;
  display: block;
  z-index: -1;
}

/* ====================================
   HERO / FIRST SCREEN CONTENT
==================================== */
.content {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  text-align: center;
  z-index: 2;
}

.centered-name {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  font-size: clamp(4rem, 10vw, 7rem);
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 800;
  color: #eaeef7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100vw;
}

.below-center {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  text-align: center;
  color: var(--color-accent);
  font-size: 2rem;
  margin: 0 0 1.5rem 0;
}

/* Resume button (hero only) */
.resume-button {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  z-index: 50;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.55em 1.15em;
  border-radius: 24px;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.resume-button:hover {
  background: var(--color-accent);
  color: #111;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

/* ====================================
   SCROLL INDICATOR / TIMELINE
==================================== */
.scroll-indicator-wrapper {
  position: relative;
  left: calc(var(--timeline-x) + var(--timeline-line-half));
  height: 100vh;
  z-index: 100;
  pointer-events: none;
  width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 0;
  pointer-events: none;
}

.scroll-line {
  margin-top: 60vh;
  width: var(--timeline-line-width);
  height: 80px;
  background: var(--color-accent);
  border-radius: 2px;
  margin-bottom: 1vh;
}

.scroll-text {
  color: var(--color-accent);
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  user-select: none;
  margin-bottom: 0.75rem;
}

.scroll-line-extend {
  position: fixed;
  left: var(--timeline-x);
  width: var(--timeline-line-width);
  background: var(--color-accent);
  border-radius: 2px;
  z-index: 99;
  pointer-events: none;
  margin-top: 1rem;
}

/* Timeline labels */
.timeline-label-left,
.timeline-label-right {
  position: absolute;
  left: var(--timeline-x);
  display: flex;
  align-items: center;
  gap: 0;
  pointer-events: none;
  z-index: 200;
  top: var(--timeline-label-offset);
}

.timeline-label-left {
  transform: translateX(0);
}

.timeline-label-left .circle,
.timeline-label-right .circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent);
}

.timeline-label-left .circle {
  transform: translateX(calc(50% - var(--timeline-line-half)));
}

.timeline-label-right .circle {
  transform: translateX(calc(-50% + var(--timeline-line-half)));
}

.timeline-label-left .label-text,
.timeline-label-right .label-text {
  pointer-events: auto;
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  border-radius: 16px;
  padding: 0.4em 1em;
  white-space: nowrap;
  font: 1rem 'Roboto', Arial, sans-serif;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-left: 0;
  margin-right: 0;
}

/* ====================================
   SHARED SCREEN STRUCTURE
==================================== */
.screen {
  position: relative;
  width: 100vw;
  box-sizing: border-box;
}

.screen-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--screen-gap);
  padding-top: var(--screen-vertical-pad);
  width: 100%;
  box-sizing: border-box;
}

/* Footer link */
.screen-link {
  position: absolute;
  bottom: var(--screen-footer-offset);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  text-decoration: none;
  border: 2px solid var(--color-accent);
  padding: 0.55em 1.2em;
  border-radius: 24px;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(3px);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  pointer-events: auto;
  z-index: 210;
}

.screen-link:hover {
  background: var(--color-accent);
  color: #111;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

/* ====================================
   SCREENS (VERTICAL STACK)
==================================== */
.osrs-screen,
.charcoal-screen {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: var(--color-bg-dark-1);
  z-index: 10;
}

.grad-screen,
.art-screen,
.chessai-screen {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: var(--color-bg-dark-2);
  z-index: 10;
  overflow: hidden;
}

.grad-research-content,
.osrs-content,
.art-content,
.charcoal-content,
.chessai-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--screen-gap);
  height: 100%;
  width: 100%;
  position: relative;
  z-index: 1;
}

.grad-research-imagebox,
.osrs-imagebox,
.art-imagebox,
.charcoal-imagebox,
.chessai-imagebox {
  position: relative;
  width: var(--screen-max-width);
  max-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
}

.grad-research-textbox,
.osrs-textbox,
.art-textbox,
.charcoal-textbox,
.chessai-textbox {
  width: 100%;
  max-width: var(--textbox-max-width);
  background: var(--textbox-bg);
  color: var(--textbox-color);
  padding: var(--textbox-padding-y) var(--textbox-padding-x);
  border-radius: var(--textbox-radius);
  box-shadow: var(--textbox-shadow);
  font-size: var(--textbox-font-size-lg);
  text-align: justify;
  max-height: var(--textbox-max-height);
  overflow-y: hidden;
}

.osrs-textbox {
  font-size: var(--textbox-font-size);
}

/* ====================================
   MEDIA FRAMES
==================================== */
.media-frame {
  position: relative;
  width: 100%;
  aspect-ratio: var(--media-aspect-ratio);
  border-radius: 16px;
  /* box-shadow: 0 2px 16px rgba(255, 0, 0, 1); */
  overflow: hidden;
  background: transparent;
}

.media-cover,
.media-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  border-radius: 16px;
  object-fit: contain;
}

.osrs-imagebox .media-frame:hover .media-cover {
  filter: brightness(1.05);
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(var(--color-accent-rgba), 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: var(--play-button-size);
  height: var(--play-button-size);
  font-size: 2.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: background 0.2s;
  z-index: 2;
  opacity: 0.65;
}

.play-button:hover {
  background: var(--color-accent);
  opacity: 1;
}

/* ====================================
   ART GALLERY
==================================== */
.art-gallery,
.charcoal-gallery {
  position: relative;
  width: var(--screen-max-width);
  /* clamp keeps gallery responsive while staying within bounds */
  height: clamp(260px, 80vh, 740px);
  display: flex;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.35);
  background: #000;
}

.art-gallery__cols,
.charcoal-gallery__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  height: 100%;
}

.art-gallery__cols img,
.charcoal-gallery__cols img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  margin: 0;
  padding: 0;
}

.art-gallery__nav,
.charcoal-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(0,0,0,0.35);
  color: var(--color-accent);
  font-size: clamp(1.8rem, 4vw, 3rem);
  width: 56px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  backdrop-filter: blur(4px);
  transition: background 0.2s, color 0.2s;
}

.art-gallery__nav--prev,
.charcoal-gallery__nav--prev { left: 0; }
.art-gallery__nav--next,
.charcoal-gallery__nav--next { right: 0; }

.art-gallery__nav:hover,
.charcoal-gallery__nav:hover {
  background: rgba(var(--color-accent-rgba), 0.85);
  color: #111;
}

@media (max-width: 900px) {
  .art-gallery,
  .charcoal-gallery {
    height: clamp(200px, 50vh, 500px);
  }
}

@media (max-width: 650px) {
  .art-gallery__nav,
  .charcoal-gallery__nav {
    width: 48px;
    height: 60px;
    font-size: 2rem;
  }
}

/* ====================================
   MISC
==================================== */
.mouse-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.5rem;
  color: var(--color-accent);
}

.mouse-icon svg {
  width: 24px;
  height: 36px;
}

