/* ============================================================
   cyber.css — Root site styles
   Media queries at the bottom into 4 categories:
     Cat 4: > 1024px
     Cat 3: 768–1024px
     Cat 2: 431–767px
     Cat 1: ≤ 430px
   ============================================================ */

/* ── CSS Variables (from global.css) ────────────────────── */

:root {
  --cyber-blue: #00ffff;
  --cyber-blue-mid: #00c3ff;
  --cyber-blue-dark: #0073ff;
  --cyber-yellow: #ffd54f;
  --cyber-green: #6cff4f;
  --cyber-yellow-light: #fff176;
  --text-color: #ffffff;
  --font-base: 'Orbitron', 'Rajdhani', sans-serif;
  --bg-overlay: rgba(0, 0, 0, 0.50);
}

body.allow-scroll {
  height: auto !important;
  min-height: 100%;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: auto;
}

.lang-flag {
  width: 25px;
  height: 18px;
  object-fit: contain;
  cursor: pointer;
  border-radius: 3px;
  border: 2px solid transparent;
}
.lang-flag.active {
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.15);
}
.lang-select {
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 10000;
  background: transparent;
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  box-shadow: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Variables & reset ───────────────────────────────────── */

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: var(--font-base);
  font-size: 14px;
  color: var(--text-color);
  position: relative;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("../images/digital.jpg") center/cover no-repeat;
  z-index: -2;
  background-attachment: scroll;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: -1;
  pointer-events: none;
}

/* ── Typography ──────────────────────────────────────────── */

h1, h2, h3, p, a {
  color: var(--cyber-blue);
}
a {
  font-weight: bold;
  text-decoration: none;
  transition: transform 0.3s ease, color 0.3s ease;
}
a:hover {
  transform: scale(1.1);
  text-decoration: none;
}
a:focus {
  outline: 3px solid rgba(0, 195, 255, 0.6);
  outline-offset: 4px;
}

/* ── Keyframes ───────────────────────────────────────────── */

@keyframes cyberGlow {
  0%, 100% {
    text-shadow: 0 0 2px var(--cyber-blue), 0 0 4px var(--cyber-blue-mid), 0 0 8px var(--cyber-blue-dark);
  }
  50% {
    text-shadow: 0 0 4px var(--cyber-blue-mid), 0 0 8px var(--cyber-blue), 0 0 16px var(--cyber-blue-mid);
  }
}
@keyframes yellowGlow {
  0%, 100% {
    box-shadow: 0 0 8px var(--cyber-yellow), 0 0 16px var(--cyber-yellow-light), 0 0 32px var(--cyber-yellow);
  }
  50% {
    box-shadow: 0 0 16px var(--cyber-yellow-light), 0 0 32px var(--cyber-yellow), 0 0 48px var(--cyber-yellow-light);
  }
}
@keyframes fadeInOnly {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes goldenPulse {
  0%, 100% {
    filter: drop-shadow(0 0 10px var(--cyber-yellow)) drop-shadow(0 0 20px var(--cyber-yellow-light));
  }
  50% {
    filter: drop-shadow(0 0 25px var(--cyber-yellow-light)) drop-shadow(0 0 45px var(--cyber-yellow));
  }
}

/* ── Brand / Top content ─────────────────────────────────── */

.top_content {
  position: relative;
  width: 100%;
  height: auto;
}
.brand-row {
  position: absolute;
  top: 20px;
  left: 30px;
  display: flex;
  align-items: flex-start;
}
.brand-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.logo img {
  margin-top: 0px;
  height: 50px;
  width: auto;
  border: none;
  border-radius: 8px;
  box-shadow: 0 0 4px var(--cyber-blue);
  animation: cyberGlow 3s infinite ease-in-out;
  will-change: transform, box-shadow;
}
.slogan {
  margin-top: 8px;
  margin-left: 4px;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  white-space: nowrap;
  color: var(--cyber-blue);
  text-shadow: 0 0 10px var(--cyber-blue), 0 0 20px var(--cyber-blue-mid);
}

/* ── CyberSoftware / About ───────────────────────────────── */

.cyber_soft {
  position: absolute;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  transition: top 0.4s ease;
}
.cyber_soft a {
  font-size: clamp(2.3rem, 5vw, 3rem);
  letter-spacing: 2px;
  color: var(--cyber-blue);
  text-shadow: 0 0 10px var(--cyber-blue), 0 0 20px var(--cyber-blue-mid), 0 0 30px var(--cyber-blue-dark);
  display: inline-block;
  animation-delay: 0.1s;
}
.cyber_soft a:hover {
  text-decoration: none;
}
.about_cyber {
  position: relative;
  top: calc(105px + 4.5rem);
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 150px;
  transition: top 0.4s ease;
}
.about_cyber a {
  font-size: clamp(1rem, 2.3vw, 1.5rem);
  letter-spacing: 1.2px;
  color: var(--cyber-blue);
  text-shadow: 0 0 10px var(--cyber-blue), 0 0 20px var(--cyber-blue-mid), 0 0 30px var(--cyber-blue-dark);
  display: inline-block;
  transition: transform 0.25s ease;
  animation-delay: 0.1s;
}
.about_cyber a:hover {
  transform: scale(1.15);
  text-decoration: none;
}
.about_cyber a:focus {
  transform: scale(1.15);
}
.about_cyber p {
  width: 100%;
  text-align: center;
  margin: 0;
}
.about_cyber .dev-title,
.about_cyber .social-links-left {
  text-align: left;
  margin-left: 0;
}
.about_cyber,
.about_cyber a {
  position: relative;
  z-index: 9999;
  pointer-events: auto;
  cursor: pointer;
}
.about_cyber .social-links-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.about_cyber .social-links-left a {
  display: block;
  text-align: left;
  margin-bottom: 4px;
}
.cyber_soft a,
.slogan,
.about_cyber a {
  color: #fff;
}
.cyber_soft_about_wrapper {
  margin-bottom: 0.5em;
}

/* ── Follow link ─────────────────────────────────────────── */

.x-follow-link {
  display: inline-block;
  color: var(--cyber-yellow);
  font-size: 1.18em;
  margin-top: 18px;
  margin-bottom: 22px;
  text-decoration: underline;
  font-weight: 400;
}
.x-follow-link:hover {
  color: #b3e6ff;
  text-decoration: underline;
}
.x-follow-link + .center_content_2 {
  margin-top: 0;
}

/* ── Center content ──────────────────────────────────────── */

.center_content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: clamp(30px, 8vh, 60px);
  margin-bottom: 10px;
}
.center_content_2 {
  margin-top: clamp(80px, 20vh, 230px);
  margin-bottom: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--cyber-yellow);
  text-shadow: 0 0 10px var(--cyber-blue), 0 0 20px var(--cyber-blue-mid), 0 0 30px var(--cyber-blue-dark);
}
.center_content_3 {
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--cyber-green);
  text-shadow: 0 0 10px var(--cyber-blue), 0 0 20px var(--cyber-blue-mid), 0 0 30px var(--cyber-blue-dark);
}
.center_bottom_about {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
}
.center_bottom_about a {
  display: inline-block;
  padding: 12px 28px;
  font-size: 1rem;
  border: 2px solid var(--cyber-blue);
  border-radius: 12px;
  color: var(--cyber-blue);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 12px var(--cyber-blue);
  animation: cyberGlow 3s infinite ease-in-out;
  transition: all 0.3s ease;
}
.center_bottom_about a:hover {
  color: var(--cyber-blue-mid);
  transform: scale(1.08);
  box-shadow: 0 0 16px var(--cyber-blue), 0 0 32px var(--cyber-blue-mid);
  background: rgba(255, 255, 255, 0.05);
}
.center_bottom_about a:focus {
  outline: 3px solid rgba(0, 195, 255, 0.18);
  outline-offset: 4px;
}
.top_left_about {
  position: static;
}

/* ── Main links ──────────────────────────────────────────── */

.main-links {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12vw;
  margin-top: 140px;
  margin-bottom: 30px;
  position: relative;
}
.main-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 10px;
  position: relative;
}
.main-item p {
  font-weight: bold;
  font-style: italic;
  font-size: clamp(1.2rem, 3.5vw, 1.6em);
  margin-top: 140px;
  margin-bottom: 30px;
  color: var(--cyber-blue);
  text-shadow: 0 0 10px var(--cyber-blue-mid);
}
.main-item .main-image,
.main-item .twitch-frame {
  width: 100%;
  max-width: 360px;
  height: 202px;
  border: 2px solid var(--cyber-blue);
  border-radius: 12px;
  box-shadow: 0 0 20px var(--cyber-blue);
  background: rgba(0, 0, 0, 0.6);
  overflow: hidden;
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.main-item .main-image:hover,
.main-item .twitch-frame:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px var(--cyber-blue-mid);
}
.main-item:nth-of-type(1),
.main-item:nth-of-type(3) {
  transform: translateY(100px);
  transition: transform 0.3s ease;
}
.main-item:nth-of-type(1) .main-image,
.main-item:nth-of-type(1) .twitch-frame {
  max-width: 420px;
  height: 236px;
  border-color: var(--cyber-yellow);
  box-shadow: 0 0 25px var(--cyber-yellow), 0 0 50px var(--cyber-yellow-light);
}

/* ── HH container / slogans ──────────────────────────────── */

.hh-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.main-item .hh-slogan-left,
.main-item .hh-slogan-right {
  font-family: "Dancing Script", "Brush Script MT", cursive;
  font-style: italic;
  color: #fff;
  letter-spacing: 1px;
  font-weight: 700;
  text-shadow: 0 0 12px #222, 0 0 20px #000;
  white-space: nowrap;
  pointer-events: none;
}
.main-item .hh-slogan-left {
  text-align: left;
  margin-left: 0;
  margin-right: auto;
  width: 100%;
}
.main-item .hh-slogan-right {
  text-align: right;
  margin-right: 0;
  margin-left: auto;
  width: 100%;
}

/* ── Twitch frame ────────────────────────────────────────── */

.twitch-frame {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 16 / 9;
  border: 2px solid var(--cyber-blue);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 20px var(--cyber-blue);
  background: rgba(0, 0, 0, 0.6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 0 auto 2rem auto;
}
.twitch-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}
.twitch-frame:hover {
  transform: scale(1.03);
  box-shadow: 0 0 30px var(--cyber-blue-mid);
}
.twitch-frame .iframe-link {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: transparent;
  cursor: pointer;
  pointer-events: none;
}

/* ── Sponsor section ─────────────────────────────────────── */

.sponsor-section {
  display: grid;
  grid-template-columns: repeat(4, 200px);
  justify-content: center;
  gap: 30px 40px;
  width: 75%;
  max-width: 1100px;
  margin: 10px auto;
  padding: 0 10px;
  box-sizing: border-box;
  text-align: center;
}
.sponsor-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 240px;
  max-width: 100%;
  gap: 12px;
}
.sponsor-item p {
  flex: 1;
  display: flex;
  align-items: flex-end;
  font-weight: bold;
  color: var(--cyber-yellow);
  text-shadow: 0 0 10px var(--cyber-yellow-light), 0 0 20px var(--cyber-yellow);
}
.sponsor-image {
  width: 160px;
  height: 120px;
  object-fit: cover;
  border: 2px solid var(--cyber-yellow);
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(255, 213, 79, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 10px;
  will-change: transform, box-shadow;
}
.sponsor-image:hover,
.sponsor-image:focus {
  transform: scale(1.05);
  animation: yellowGlow 2.5s infinite ease-in-out;
  outline: none;
}
.sponsor-image:focus {
  box-shadow: 0 0 18px rgba(255, 213, 79, 0.6);
}

/* ── Section divider / footer ────────────────────────────── */

.section-divider {
  border: none;
  height: 1.5px;
  margin: 30px auto 30px;
  width: 75%;
  background-color: var(--cyber-blue);
  border-radius: 4px;
  box-shadow: 0 0 12px var(--cyber-blue), 0 0 24px var(--cyber-blue-mid);
}
footer {
  text-align: center;
  margin-top: 80px;
  margin-bottom: 10px;
  color: var(--text-color);
  font-size: 0.9em;
  opacity: 0.9;
}

/* ── About page ──────────────────────────────────────────── */

body.about-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: auto;
  padding-top: 56px;
}
.about-page a {
  font-size: 1em;
  margin-top: 1px;
}
.about-page > p:first-of-type {
  text-align: left;
  width: 100%;
  max-width: 95%;
  margin: 8px auto;
  color: var(--cyber-blue);
  font-weight: 600;
  position: relative;
  top: 0;
  z-index: 10;
}
.dev-title {
  text-align: left;
  margin-left: 0;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--cyber-blue);
  animation: cyberGlow 3s infinite ease-in-out;
  margin-top: 50px;
  margin-bottom: 50px;
}
.social-links-left {
  text-align: left;
  margin-left: 0;
  margin-top: 10px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.social-links-left a {
  display: block;
  text-align: left;
  margin-bottom: 4px;
}
.developer {
  background: rgba(0, 0, 0, 0.7);
  padding: 30px 50px;
  border-radius: 16px;
  border: 2px solid var(--cyber-blue);
  box-shadow: 0 0 20px var(--cyber-blue);
  max-width: 400px;
  text-align: center;
  backdrop-filter: blur(6px);
  margin-bottom: 40px;
}
.developer h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 6px;
  margin-bottom: 25px;
  color: var(--cyber-blue-mid);
}
.developer a {
  display: block;
  margin: 6px auto;
  color: var(--cyber-blue);
  text-align: center;
}
.developer a:focus {
  outline: 3px solid rgba(0, 195, 255, 0.16);
  outline-offset: 3px;
}

/* ── Skills list ─────────────────────────────────────────── */

.skills {
  list-style: none;
  margin: 1.2rem 0 2rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, 160px);
  justify-content: center;
  justify-items: center;
  align-items: center;
  gap: 0.7rem 1rem;
  max-width: 900px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
.skills li {
  text-align: center;
  background: rgba(0, 200, 255, 0.15);
  border: 1px solid rgba(0, 200, 255, 0.4);
  color: #00c8ff;
  font-family: "Orbitron", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  white-space: normal;
  will-change: transform, box-shadow, background;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 36px;
  box-sizing: border-box;
}
.skills li:hover,
.skills li:focus {
  background: rgba(0, 200, 255, 0.25);
  box-shadow: 0 0 10px rgba(0, 200, 255, 0.6);
  transform: scale(1.05);
}

/* ── Main button ─────────────────────────────────────────── */

.main-button {
  text-align: center;
  margin: 40px auto;
}
.main-button a {
  display: inline-block;
  padding: 12px 28px;
  border: 2px solid var(--cyber-blue);
  border-radius: 12px;
  color: var(--cyber-blue);
  font-weight: 700;
  font-size: 1.1em;
  text-decoration: none;
  animation: cyberGlow 3s infinite ease-in-out;
  box-shadow: 0 0 10px var(--cyber-blue);
  background: rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
  will-change: transform, box-shadow;
}
.main-button a:hover {
  color: var(--cyber-blue-mid);
  box-shadow: 0 0 16px var(--cyber-blue), 0 0 32px var(--cyber-blue-mid);
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.05);
}
.main-button a:focus {
  outline: 3px solid rgba(0, 195, 255, 0.16);
  outline-offset: 4px;
}

/* ── Cyber skull ─────────────────────────────────────────── */

.cyber_skull_ {
  text-align: center;
  font-family: var(--font-base);
  font-weight: 700;
  font-size: 1.5rem;
  font-style: italic;
  margin-top: -25px;
}

/* ============================================================
   Cat 4: > 1024px   Cat 3: 768-1024px   Cat 2: 431-767px   Cat 1: <= 430px
   Larger screens first - mobile cascade wins last
   ============================================================ */

/* CATEGORY 4: Large Screens (min-width: 1025px) */

@media (min-width: 1025px) {
  body::before {
    background-attachment: fixed;
  }
  .brand-row {
    position: absolute;
    top: -120px;
    left: 30px;
    display: flex;
    align-items: flex-start;
    width: auto;
    margin: 0;
    z-index: 20;
  }
  .brand-left {
    align-items: center;
  }
  .about_cyber {
    margin-bottom: 16px;
  }
  .about_cyber a {
    margin-right: 48px;
  }
  .cyber_soft {
    position: static !important;
    left: auto !important;
    transform: none !important;
    margin-left: 0 !important;
    width: 100%;
    text-align: center;
    margin-top: 150px !important;
    margin-bottom: 0.1rem !important;
  }
  .cyber_soft a {
    font-size: 2.5rem !important;
  }
  .dev-title {
    font-size: 0.8rem;
  }
  .center_content {
    margin-top: -20px;
  }
  .center_content_2 {
    margin: 32px auto 10px auto;
    text-align: center;
    display: block;
  }
  .slogan {
    margin: 8px 0 0 0;
    margin-left: 0;
    text-align: center;
    display: block;
  }
  .twitch-frame {
    margin: 0 auto 32px auto;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .x-follow-link {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    margin-top: 80px !important;
    margin-bottom: 150px !important;
  }
  .section-divider {
    width: 66%;
    min-width: 880px;
  }
  .sponsor-section {
    grid-template-columns: repeat(4, 200px);
    width: 93%;
  }
  .hh-container {
    position: relative;
    display: inline-block;
    top: -30px;
  }
  .hh-container .hh-link {
    order: 1;
  }
  .hh-container .hh-slogan-left {
    position: absolute;
    left: 0;
    top: 20%;
    transform: translateX(calc(-100% - 50px)) translateY(-50%);
    font-size: 2.8rem;
    font-weight: 600;
    letter-spacing: 1.1px;
    line-height: 1.3;
    opacity: 0;
    z-index: 60;
    animation: fadeInOnly 1.3s ease-out 0.2s forwards;
  }
  .hh-container .hh-slogan-right {
    position: absolute;
    left: 100%;
    top: 65%;
    transform: translateX(50px) translateY(-50%);
    font-size: 2.8rem;
    font-weight: 600;
    letter-spacing: 1.1px;
    line-height: 1.3;
    opacity: 0;
    z-index: 60;
    animation: fadeInOnly 1.3s ease-out 0.6s forwards;
  }
  .main-links {
    margin-top: 20px;
  }
}

/* CATEGORY 3: Medium Screens (min-width: 768px and max-width: 1024px) */

@media (min-width: 768px) and (max-width: 1024px) {
  body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow-x: hidden;
  }
  .top_content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    gap: 6px;
    position: static;
    margin-top: 20px;
    padding-top: 10px;
    width: 100%;
  }
  .brand-row {
    position: static;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
    margin: 0;
    box-sizing: border-box;
    left: auto;
    top: auto;
  }
  .logo img {
    height: 60px;
    width: auto;
    margin: 0 auto;
  }
  .cyber_soft {
    position: static !important;
    left: auto !important;
    transform: none !important;
    margin-left: 0 !important;
    width: 100%;
    text-align: center;
    margin-top: 28px !important;
    margin-bottom: 0.1rem !important;
  }
  .cyber_soft a {
    font-size: 2rem !important;
  }
  .about_cyber {
    margin-bottom: 0.8rem;
    text-align: center;
    top: 0.5rem !important;
  }
  .about_cyber a {
    font-size: 1.1rem;
    display: inline-block;
    margin: 0 auto;
    cursor: pointer;
  }
  .center_content {
    margin: 5px auto 10px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
  }
  .center_content_2 {
    margin-top: 10px;
  }
  .main-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 5px auto 20px;
    padding: 0;
    width: 100%;
  }
  .main-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    transform: none;
  }
  .main-item p {
    margin: 4px 0;
    font-size: 1.1rem;
  }
  .main-item img.main-image {
    width: 100%;
    height: auto;
    max-width: 240px;
    transform: scale(1.05);
    margin: 0;
  }
  .main-item:nth-of-type(1),
  .main-item:nth-of-type(3) {
    transform: none;
  }
  .main-item:nth-of-type(1) {
    margin-top: 40px;
    margin-bottom: 40px;
  }
  .main-item .main-image,
  .main-item .twitch-frame {
    max-width: 300px;
    height: 170px;
  }
  .main-item:nth-of-type(1) .main-image,
  .main-item:nth-of-type(1) .twitch-frame {
    max-width: 330px;
    height: 190px;
  }
  .twitch-frame {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 16 / 9;
    border: 2px solid var(--cyber-blue);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 20px var(--cyber-blue);
    background: rgba(0, 0, 0, 0.6);
  }
  .twitch-frame iframe {
    width: 100%;
    height: 100%;
    display: block;
  }
  .sponsor-section {
    display: grid;
    grid-template-columns: repeat(2, 200px);
    justify-content: center;
    gap: 30px 40px;
    width: 85%;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
  }
  .sponsor-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
  }
  .sponsor-item p {
    margin: 4px 0;
    font-size: 1rem;
  }
  .sponsor-item img {
    height: 120px;
    width: 160px;
    object-fit: cover;
  }
  .section-divider {
    width: 85%;
    margin: 15px auto;
  }
  footer {
    text-align: center;
    font-size: 0.85em;
    margin: 50px auto 20px;
    width: 100%;
  }
  .developer {
    width: 90%;
    padding: 16px;
    margin: 10px auto;
  }
  .skills {
    grid-template-columns: repeat(auto-fill, 150px);
    gap: 0.4rem;
    padding: 0 10px;
  }
  .skills li {
    width: 150px;
    height: 36px;
    font-size: 0.9rem;
    padding: 0.3rem 0.5rem;
  }
  .main-button {
    margin: 20px 0;
  }
  .main-button a {
    font-size: 1rem;
    padding: 10px 22px;
  }
  .x-follow-link {
    margin-bottom: 5.5em !important;
    margin-top: -20px !important;
  }

  /* Mirror the category 4 hero layout on medium screens. */
  .top_content {
    position: relative;
    display: block;
    margin-top: 0;
    padding-top: 0;
    width: 100%;
    height: auto;
  }
  .brand-row {
    position: absolute;
    top: 30px;
    left: 30px;
    display: flex;
    align-items: flex-start;
    width: auto;
    margin: 0;
    padding: 0;
    z-index: 20;
  }
  .brand-left {
    align-items: center;
  }
  .logo img {
    height: 50px;
    width: auto;
    margin: 0;
  }
  .slogan {
    margin: 8px 0 0 0;
    margin-left: 0;
    text-align: center;
    display: block;
  }
  .cyber_soft {
    margin-top: 150px !important;
    margin-bottom: 0.1rem !important;
  }
  .cyber_soft a {
    font-size: 2.5rem !important;
  }
  .center_content {
    margin-top: -20px;
  }
  .main-links {
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12vw;
    margin: 20px auto 30px;
    width: auto;
    position: relative;
  }
  .main-item {
    width: auto;
    max-width: none;
    margin: 10px 0 0;
    text-align: center;
    position: relative;
  }
  .main-item:nth-of-type(1),
  .main-item:nth-of-type(3) {
    transform: translateY(100px);
    transition: transform 0.3s ease;
  }
  .main-item:nth-of-type(1) {
    margin-top: 10px;
    margin-bottom: 0;
  }
  .main-item .main-image,
  .main-item .twitch-frame {
    max-width: 360px;
    height: 202px;
  }
  .main-item img.main-image {
    width: 100%;
    height: 202px;
    max-width: 360px;
    transform: none;
    margin: 0;
    box-sizing: border-box;
    object-fit: cover;
  }
  .main-item:nth-of-type(1) .main-image,
  .main-item:nth-of-type(1) .twitch-frame,
  .main-item:nth-of-type(1) img.main-image {
    max-width: 420px;
    height: 236px;
    border-color: var(--cyber-yellow);
    box-shadow: 0 0 25px var(--cyber-yellow), 0 0 50px var(--cyber-yellow-light);
  }
  .x-follow-link {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    margin-top: 110px !important;
    margin-bottom: 150px !important;
  }
  .hh-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hh-container .hh-slogan-left {
    order: 2;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    text-align: center;
  }
  .hh-container .hh-slogan-right {
    order: 3;
  }
  .main-item .hh-slogan-left,
  .main-item .hh-slogan-right {
    position: static;
    display: block;
    white-space: normal;
    text-align: center;
    margin: 1.4rem 0;
    font-size: clamp(1.6rem, 4.5vw, 2.0rem);
    line-height: 1.25;
    opacity: 1;
  }
}

/* CATEGORY 2: Small Screens (min-width: 431px and max-width: 767px) */

@media (min-width: 431px) and (max-width: 767px) {
  .lang-flag {
    width: 20px !important;
    height: 14px !important;
  }
  body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow-x: hidden;
  }
  .top_content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    position: static;
    margin-top: 20px;
    padding-top: 8px;
  }
  .brand-row {
    position: static;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .brand-left {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .logo img {
    display: none !important;
  }
  .cyber_soft {
    position: static !important;
    left: auto !important;
    transform: none !important;
    margin-left: 0 !important;
    width: 100%;
    text-align: center;
    margin-top: 20px !important;
    margin-bottom: 0.1rem !important;
  }
  .cyber_soft a {
    font-size: 2rem !important;
  }
  .about_cyber {
    position: static;
    left: auto;
    transform: none;
    margin-top: 4px !important;
    margin-bottom: 0.8rem;
    text-align: center;
  }
  .about_cyber a {
    font-size: 1.1rem;
    margin-top: 0.5rem;
    display: block;
  }
  .center_content {
    margin: -70px auto 10px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .center_content_2 {
    margin-top: 10px;
  }
  .main-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 13px;
    margin: 6px auto;
    padding: 0;
    width: 100%;
  }
  .main-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 280px;
    margin: 90px auto 0;
    transform: none !important;
  }
  .main-item p {
    margin-top: 10px;
    margin-bottom: 30px;
  }
  .main-item img.main-image {
    width: 100%;
    height: auto !important;
    max-width: 220px !important;
    max-height: none !important;
    margin: 0;
    box-sizing: border-box;
    object-fit: contain;
  }
  .hh-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hh-container .hh-link {
    order: 1;
  }
  .hh-container .hh-slogan-left {
    order: 2;
    margin-top: 0.2em;
    margin-bottom: 0.2em;
  }
  .hh-container .hh-slogan-right {
    order: 3;
    margin-top: -5px;
  }
  .main-item .hh-slogan-left,
  .main-item .hh-slogan-right {
    position: static;
    display: block;
    white-space: normal;
    text-align: center;
    margin: 1.4rem 0;
    font-size: clamp(1.6rem, 4.5vw, 2.0rem);
    line-height: 1.25;
    opacity: 1;
  }
  .sponsor-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 85%;
    margin: 15px auto;
    padding: 0;
  }
  .sponsor-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
  }
  .sponsor-item p {
    margin: 4px 0;
    font-size: 1rem;
  }
  .sponsor-item img {
    height: 120px;
    width: 160px;
    object-fit: cover;
  }
  .section-divider {
    width: 85%;
    margin: 8px auto;
  }
  footer {
    text-align: center;
    font-size: 0.85em;
    margin: 40px auto 10px;
    width: 100%;
  }
  .developer {
    width: 90%;
    padding: 16px;
    margin: 10px auto;
  }
  .skills {
    grid-template-columns: 1fr;
    gap: 0.5rem 0.7rem;
    padding: 0 10px;
  }
  .skills li {
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
  }
  .main-button {
    margin: 20px 0;
  }
  .main-button a {
    font-size: 1rem;
    padding: 10px 22px;
  }
  .slogan, .slogan p {
    margin-top: -0.5rem !important;
    margin-bottom: 6px;
  }
  .slogan {
    align-self: stretch;
    text-align: left !important;
    padding-left: 0 !important;
    width: 100%;
    box-sizing: border-box;
  }
  .twitch-frame {
    max-width: 380px;
    margin-bottom: 6px;
  }
  .x-follow-link {
    margin-top: 20px;
    margin-bottom: 100px;
  }
  .x-follow-link + .center_content_2 {
    margin-top: 0;
  }
  body.about-page {
    justify-content: flex-start;
    align-items: center;
    padding-top: 20px;
    min-height: auto;
  }
  .dev-title {
    display: block;
    margin-top: 20px;
    margin-bottom: 15px;
    font-size: 1.6rem;
    color: var(--cyber-blue);
    z-index: 9999;
  }
  .developer {
    padding: 18px 20px;
    max-width: 95%;
    box-shadow: 0 0 14px var(--cyber-blue);
  }
}

/* CATEGORY 1: Very Small Screens (max-width: 430px) */

@media (max-width: 430px) {
  .lang-flag {
    width: 18px !important;
    height: 13px !important;
  }
  body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow-x: hidden;
  }
  .top_content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    position: static;
    margin-top: 20px;
    padding-top: 8px;
  }
  .brand-row {
    position: static;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .brand-left {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .logo img {
    display: none;
  }
  .cyber_soft,
  .about_cyber {
    position: static !important;
    left: auto !important;
    transform: none !important;
    margin-left: 0 !important;
    width: 100%;
    text-align: center;
  }
  .cyber_soft {
    margin-top: 20px !important;
    margin-bottom: 0.1rem !important;
  }
  .about_cyber {
    margin-top: 0 !important;
    margin-bottom: 0.8rem !important;
  }
  .about_cyber a {
    margin-top: 0.5rem;
    display: block;
  }
  .center_content {
    margin-top: -100px !important;
    margin-bottom: -40px !important;
    gap: 0 !important;
  }
  .center_content_2 {
    margin-top: 10px;
  }
  .main-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    padding: 0;
    width: 100%;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  .main-item {
    margin-top: 100px;
    padding-bottom: 0 !important;
    transform: none !important;
  }
  .hh-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  .hh-container .hh-link {
    order: 1;
  }
  .hh-container .hh-slogan-left {
    order: 2;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    text-align: center;
  }
  .hh-container .hh-slogan-right {
    order: 3;
  }
  .main-image {
    width: 55% !important;
    height: auto !important;
    max-height: none !important;
    box-sizing: border-box;
    object-fit: contain;
  }
  .sponsor-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 85%;
    margin: 15px auto;
    padding: 0;
  }
  .sponsor-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
  }
  .section-divider {
    width: 85%;
    margin: 8px auto;
  }
  footer {
    margin-top: 20px;
    margin-bottom: 30px;
  }
  .developer {
    box-sizing: border-box;
    width: calc(100% - 24px);
    margin: 8px 12px;
    padding: 12px;
    overflow-wrap: break-word;
    word-break: break-word;
  }
  .skills {
    grid-template-columns: repeat(auto-fill, 130px);
    gap: 6px;
    padding: 0 8px;
  }
  .skills li {
    width: 130px;
    height: 36px;
    font-size: 0.95rem;
    max-width: 140px;
    padding: 8px 8px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .main-button {
    margin: 20px 0;
  }
  .main-button a {
    font-size: 1rem;
    padding: 10px 22px;
  }
  .slogan {
    font-size: 0.85rem !important;
    align-self: stretch;
    text-align: left !important;
    padding-left: 0 !important;
    width: 100%;
    box-sizing: border-box;
  }
  .slogan, .slogan p {
    margin-top: -0.5rem !important;
    margin-bottom: 6px;
  }
  .cyber_soft a {
    font-size: 1.8rem !important;
  }
  .x-follow-link {
    display: inline-block;
    color: var(--cyber-yellow);
    font-style: normal;
    font-size: 0.95em;
    margin-top: 1.5rem;
    margin-bottom: 3rem;
    text-decoration: underline;
    font-weight: 400;
  }
  .x-follow-link + .center_content_2 {
    margin-top: 2.5rem;
  }
  body .slogan {
    margin-top: -1rem;
    margin-left: 0;
  }
  body.about-page {
    justify-content: flex-start;
    align-items: center;
    padding-top: 20px;
    min-height: auto;
  }
  .dev-title {
    display: block;
    margin-top: 20px;
    margin-bottom: 15px;
    font-size: 1.6rem;
    color: var(--cyber-blue);
    z-index: 9999;
  }
  .developer {
    padding: 18px 20px;
    max-width: 95%;
    box-shadow: 0 0 14px var(--cyber-blue);
  }
  .twitch-frame {
    max-width: 260px;
  }
  .cyber_soft_about_wrapper {
    display: block;
    width: 100%;
    text-align: center;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  body > header {
    width: 100% !important;
    align-self: stretch;
  }
  .top_content {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    min-height: 205px !important;
  }
  .brand-row {
    position: absolute !important;
    top: 20px !important;
    left: 24px !important;
    transform: none !important;
    width: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 20;
  }
  .brand-left {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: max-content !important;
  }
  .logo {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
  }
  .logo img {
    margin: 0 auto !important;
  }
  .slogan {
    display: block !important;
    margin: 8px auto 0 !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    text-align: center !important;
    align-self: center !important;
    width: max-content !important;
  }
  .cyber_soft_about_wrapper {
    width: 100% !important;
    padding-top: 120px !important;
  }
  .cyber_soft {
    margin-top: 0 !important;
  }
}

@media (max-width: 767px) {
  body > header {
    width: 100% !important;
    align-self: stretch;
  }
  .top_content,
  .brand-row,
  .brand-left {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
  }
  .brand-row {
    left: 0 !important;
  }
  .slogan {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    align-self: stretch !important;
    margin-left: 0 !important;
    padding-left: 0.5rem !important;
    padding-right: 0 !important;
    box-sizing: border-box;
    text-align: left !important;
  }
}

/* ── Accessibility: respect user motion preferences ─────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Print stylesheet ─────────────────────────────────────────────────────── */
@media print {
  body { background: #fff !important; color: #000 !important; }
  a { color: #000 !important; text-decoration: underline; }
  .main-button, iframe, .twitch-frame, .x-follow-link { display: none !important; }
}
