@font-face {
  font-family: "Minecraft";
  src: url(/assets/fonts/Minecraft.otf) format("opentype");
  font-display: swap;
}

@font-face {
  font-family: "Minecraft-Bold";
  src: url(/assets/fonts/Minecraft-Bold.otf) format("opentype");
  font-weight: bold;
  font-display: swap;
}
@font-face {
  font-family: "Valorant";
  src: url(/assets/fonts/Valorant.ttf) format("truetype");
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: 'Poppins', sans-serif;
  color: var(--ink-2);
  line-height: 1.6;
  background-color: var(--bg);
}

footer {
  margin-top: auto;
  text-align: center;
  padding: 1rem;
  background: var(--bg);
  color: var(--ink-2);
}


header {
  background: var(--header-bg);
  color: var(--ink-2);
  padding: 1.5rem;
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 650px;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 6px var(--shadow),
    0 0 0 0.25px var(--header-ring);
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.nav-links {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  padding: 0.3rem 1rem;
  border-radius: 8px;
  transition: color 0.3s, background 0.3s;
  font-size: clamp(0.9rem, 2vw, 1rem);
  white-space: nowrap;
  text-align: center;
  font-family: "Poppins", sans-serif;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-text);
  background: var(--nav-hover-bg);
}


.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 10px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
}

.hamburger .line {
  width: 25px;
  height: 3px;
  background: var(--ink-2);
  margin: 4px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active .line1 {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active .line2 {
  opacity: 0;
}

.hamburger.active .line3 {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: var(--header-bg-open);
    backdrop-filter: blur(10px);
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 6px var(--shadow);
    z-index: 1000;
    margin-top: 0;
    padding-top: 0;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    text-align: center;
    margin: 10px 0;
  }

  .nav-links a {
    padding: 10px;
    display: block;
  }
  
  header {
    flex-direction: column;
    padding: 0.5rem;
  }
}


#experience,
#content-creation,
#thumbnails {
  padding: 4rem 2rem;
  background: var(--bg);
  text-align: center;
}

.video-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  justify-content: center;
  margin-top: 4rem;
  padding: 0 2rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 1680px;
  margin-left: auto;
  margin-right: auto;
}

.video-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 15px;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16/9;
  box-shadow: 0 4px 6px var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  position: relative;
}

.video-card .video-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.video-card img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover; /* also crops the black bars off YouTube's 4:3 preview images */
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 1));
}

.play-button::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-left: 25px solid white;
  border-bottom: 15px solid transparent;
  margin-left: 5px;
}


@media (hover: hover) {
  .server-card:hover,
  .video-card:hover,
  .thumbnail-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 6px 8px var(--shadow-hover);
    cursor: auto;
    animation: none;
  }
}

.video-card:hover {
  cursor: pointer;
}

.thumbnail-card:hover {
  cursor: zoom-in;
}


.thumbnail-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  justify-content: center;
  margin-top: 4rem;
  padding: 0 2rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 1680px;
  margin-left: auto;
  margin-right: auto;
}

.thumbnail-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 15px;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16/9;
  box-shadow: 0 4px 6px var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.thumbnail-card img {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
  object-fit: cover;
}

.thumbnail-card .video-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.thumbnail-card .video-title {
  position: absolute;
  bottom: 20px;
  left: 20px;
  font-weight: bold;
  color: #fff;
  text-shadow:
    0 2px 16px rgba(0,0,0,1),
    0 0px 4px rgba(0,0,0,0.9),
    0 0px 32px rgba(0,0,0,0.7);
  transition: opacity 0.4s cubic-bezier(0.4,0,0.2,1);
}

.thumbnail-card:hover .video-title {
  opacity: 0;
}


.server-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr)); /* a column may shrink below 350px on narrow phones */
  gap: 2rem;
  justify-content: center;
  margin-top: 4rem; /* was 8rem: the section's own 4rem padding now applies (see the #experience id fix) */
  padding: 0 2rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 1680px;
  margin-left: auto;
  margin-right: auto;
}

.server-card {
  font-family: "Minecraft", sans-serif;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 15px;
  padding: 1.5rem;
  width: 100%;
  aspect-ratio: 4/5;
  box-shadow: 0 4px 6px var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.server-card.custom-font, .server-card.custom-font h2, .server-card.custom-font .server-ip, .server-card.custom-font .server-role {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
}

.server-card a:link {
  color: var(--link);
  text-decoration: none;
}
.server-card a:visited {
  color: var(--link);
  text-decoration: none;
}
.server-card a:hover {
  color: var(--link-hover);
  text-decoration: none;
}

.server-card .server-icon {
  height: auto;
  width: 80%;
  max-height: 120px;
  object-fit: contain;
  margin-bottom: 1rem;
  margin-left: auto;
  margin-right: auto;
}

.server-card h2 {
  margin-top: 1em; /* same top margin the old <h3> had */
  font-family: "Minecraft-Bold", sans-serif;
  font-size: 1.5rem;
  background: var(--heading-gradient);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.1rem;
}

.server-card .server-ip {
  font-family: "Minecraft", sans-serif;
  text-transform: uppercase;
  font-size: 1.3rem;
  color: var(--ink-1);
  margin-top: -0.3rem;
}

.server-card .server-role {
  font-family: "Minecraft", sans-serif;
  font-size: 1.1rem;
  color: var(--ink-4);
  margin-top: -1.3rem;
}

.server-card:nth-child(1),
.server-card:nth-child(1) h2,
.server-card:nth-child(1) .server-ip,
.server-card:nth-child(1) .server-role {
  font-family: "Valorant", sans-serif;
}

@media (max-width: 768px) {
  .server-cards,
  .video-cards,
  .thumbnail-cards {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  }
}

@media (max-width: 600px) {
  /* Experience cards: the section already pads 2rem, the extra 2rem inside the grid left them too narrow for their titles on phones */
  .server-cards {
    padding: 0;
  }
}

@media (max-width: 480px) {
  .server-cards,
  .video-cards,
  .thumbnail-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .server-card,
  .video-card,
  .thumbnail-card {
    margin: 0 auto;
  }
}

@media print {
  .nav-links,
  .hamburger {
    display: none;
  }
}

/* ---- Clickable cards: transparent button covering the whole card ---- */
.card-hit {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: inherit;
}

.card-hit:focus-visible {
  outline-offset: -4px;
}

.server-card,
.video-card,
.thumbnail-card {
  position: relative;
}

/* ---- Lightbox: one native <dialog> (built by lightbox.js) for thumbnails and videos ---- */
.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--overlay-scrim);
  backdrop-filter: blur(5px);
  color: #fff;
  touch-action: none;
}

.lightbox[open] {
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox::backdrop {
  background: transparent;
}

.lightbox[data-kind="video"] {
  background: var(--overlay-scrim-strong);
  backdrop-filter: blur(8px);
  animation: lightbox-fade 0.25s ease;
}

@keyframes lightbox-fade {
  from {
    opacity: 0;
  }
}

/* the dialog starts with focus here (not on the close button), so no focus ring flashes on open */
.lightbox-stage:focus {
  outline: none;
}
.lightbox-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-stage img {
  max-width: 80vw;
  max-height: 80vh;
  box-shadow: 0 4px 10px var(--modal-shadow);
}

.lightbox-stage iframe {
  width: min(92vw, 1400px);
  max-height: 88vh;
  aspect-ratio: 16 / 9;
  display: block;
  border: none;
  box-shadow: 0 25px 80px var(--lightbox-shadow);
}

.lightbox .close,
.lightbox .arrow {
  position: absolute;
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}

.lightbox .close {
  top: 10px;
  right: 20px;
  z-index: 2001;
}

.lightbox .arrow {
  top: 50%;
  transform: translateY(-50%);
  user-select: none;
  z-index: 1001;
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox .prev-arrow {
  left: 1rem;
}

.lightbox .next-arrow {
  right: 1rem;
}

.lightbox [hidden] {
  display: none;
}

/* ---- Document page (yrQVj.html): this CSS used to be an inline <style> in the page ---- */
.page-document .hamburger { display: none !important; }
.page-document .nav-links {
  display: flex !important;
  position: static !important;
  flex-direction: row !important;
  background: none !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  width: auto !important;
  top: auto !important;
  left: auto !important;
  padding: 0 !important;
}

.page-document header { max-width: 250px; }

#k7Mv2x {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 7rem 1.5rem 3rem;
  gap: 0;
}

.n3Wp9q {
  width: 100%;
  max-width: 860px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 15px;
  overflow-y: auto;
  max-height: 80vh;
  box-shadow: 0 0 0 0.5px rgba(228, 155, 15, 0.25),
              0 8px 32px var(--shadow-soft);
  -webkit-user-select: none;
  user-select: none;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) var(--surface);
}

.n3Wp9q::-webkit-scrollbar {
  width: 6px;
}

.n3Wp9q::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

.n3Wp9q::-webkit-scrollbar-thumb {
  background-color: var(--gold);
  border-radius: 10px;
}

#pdf-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  background: var(--bg-elevated);
}

/* pdf-render.js reserves each page's final height up front and paints its canvas when it scrolls near the viewport */
#pdf-container .pdf-page {
  width: 100%;
  margin-bottom: 4px;
  background: #fff;
}

#pdf-container .pdf-page:last-child { margin-bottom: 0; }

#pdf-container canvas {
  display: block;
  width: 100%;
  height: auto;
}

#pdf-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem 2rem;
  color: var(--ink-4);
  font-size: 0.9rem;
  width: 100%;
  min-height: 300px;
  background: var(--bg-elevated);
  box-sizing: border-box;
}

.pdf-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(228, 155, 15, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

#pdf-error {
  display: none;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--ink-4);
  font-size: 0.9rem;
  background: var(--bg-elevated);
}

/* Ctrl+P used to be intercepted by a script; printing the page now just prints this notice */
@media print {
  .page-document #k7Mv2x { display: none; }
  .page-document::before {
    content: "Printing is disabled for this page.";
    display: block;
    padding: 2rem;
    color: #000;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
