/* header */
.sidenav {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 200;
  top: 0;
  left: 0;
  background-color: #111;
  overflow-x: hidden;
  padding-top: 60px;
  transition: 0.5s;
}

.sidenav a {
  padding: 8px 8px 8px 32px;
  text-decoration: none;
  font-size: 25px;
  color: #818181;
  display: block;
  transition: 0.3s;
}

.sidenav a:hover {
  color: #f1f1f1;
}

.sidenav .closebtn {
  position: absolute; 
  top: 0;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
}

#main {
  transition: margin-left 0.5s;
  padding: 20px;
}

@media screen and (max-height: 450px) {
  .sidenav {
    padding-top: 15px;
  }
  .sidenav a {
    font-size: 18px;
  }
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  background: #141414;
  color: #fff;
  line-height: 1.6;
  position: relative;
}


/* Hero wrapper - sticky header only sticks within this container */
.heroWrapper {
  position: relative;
}

/* Header */
.mainHeader {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(10, 10, 10, 0.95);
  padding: 20px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;

  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.headerLogo {
  font-size: 1.4em;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.5px;
  text-decoration: none;
}

.headerNav {
  display: flex;
  gap: 40px;
  align-items: center;
}

.headerNav a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.95em;
  font-weight: 500;
  transition: color 0.3s;
}

.headerNav a:hover {
  color: #fff;
}

/* Rain lines background */
body::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('assets/rain.svg');
  background-size: cover;
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.6s ease;
}

body.no-rain::before {
  opacity: 0;
}

/* Rain toggle button */
.rainToggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 15, 15, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  padding: 8px 14px 8px 12px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: border-color 0.3s;
  user-select: none;
}

.rainToggle:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.rainToggleLabel {
  font-size: 0.75em;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.5px;
}

.rainToggleSwitch {
  width: 36px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  position: relative;
  transition: background 0.3s;
}

.rainToggleSwitch::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  transition: left 0.3s;
}

.rainToggleSwitch.on {
  background: #3b82f6;
}

.rainToggleSwitch.on::after {
  left: 19px;
}

/* Language Switcher */
.langSwitcher {
  display: flex;
  gap: 4px;
  align-items: center;
}

.langSwitcher a {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  font-size: 0.78em;
  font-weight: 600;
  padding: 4px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  transition: all 0.3s;
}

.langSwitcher a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.langSwitcher a.active {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
}

.gamesBtn {
  background: #3b82f6;
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.gamesBtn:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

/* Hero Section */
.heroSection {
  padding: 200px 60px 120px;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.heroContent {
  flex: 1;
}

.heroLogoLink {
  flex-shrink: 0;
}

.heroSection .heroLogoLink {
  align-self: flex-start;
  margin-top: 30px;
}

.heroLogo {
  width: 640px;
  opacity: 0.88;
  filter: drop-shadow(0 0 24px rgba(59, 130, 246, 0.35));
}

.heroTitle {
  font-size: 4em;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -2px;
  background: linear-gradient(135deg, #fff 0%, #999 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.heroTagline {
  font-size: 2.5em;
  margin-bottom: 20px;
  font-weight: 600;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 0%, #999 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border-bottom: 3px solid #3b82f6;
  display: inline-block;
  padding-bottom: 10px;
}

.heroDescription {
  font-size: 1.2em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 40px;
  max-width: 700px;
  line-height: 1.6;
}

.ctaGroup {
  display: flex;
  gap: 20px;
}

.ctaButton {
  display: inline-block;
  padding: 16px 32px;
  background: #3b82f6;
  color: #fff;
  text-decoration: none;
  font-size: 1em;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s;
}

.ctaButton:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(59, 130, 246, 0.3);
}

.ctaSecondary {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.ctaSecondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: none;
}

/* Sections */
.pageSection {
  padding: 80px 60px;
  max-width: 1400px;
  margin: 0 auto;
}

.sectionTitle {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 60px;
  letter-spacing: -1px;
  position: relative;
  z-index: 1;
}

/* About Section */
.aboutSection {
  padding: 80px 60px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.diagonalBg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 80px;
}

.diagonalLine {
  width: 200px;
  height: 120%;
  background: rgba(255, 255, 255, 0.02);
  transform: rotate(-15deg);
  flex-shrink: 0;
}

.diagonalLine:nth-child(1) {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.05) 0%,
    rgba(59, 130, 246, 0.02) 100%
  );
}

.diagonalLine:nth-child(2) {
  background: rgba(255, 255, 255, 0.02);
}

.diagonalLine:nth-child(3) {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.03) 0%,
    rgba(59, 130, 246, 0.01) 100%
  );
}

.diagonalLine:nth-child(4) {
  background: rgba(255, 255, 255, 0.015);
}

.diagonalLine:nth-child(5) {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.04) 0%,
    rgba(59, 130, 246, 0.01) 100%
  );
}

.aboutContent {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.aboutContent p {
  font-size: 1.2em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 20px;
  line-height: 1.8;
}

/* Projects Grid */
.projectsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 40px;
}

.projectCard {
  background: #111;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.projectCard:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.1);
}

.projectImage {
  width: 100%;
  height: 240px;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4em;
  position: relative;
  overflow: hidden;
}

.projectContent {
  padding: 30px;
}

.projectStatus {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  font-size: 0.8em;
  font-weight: 600;
  border-radius: 4px;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.projectCard h3 {
  font-size: 1.5em;
  margin-bottom: 12px;
  font-weight: 600;
}

.projectCard p {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 20px;
  line-height: 1.6;
}

.projectLink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  transition: gap 0.3s;
}

.projectLink:hover {
  gap: 12px;
}

.devLog {
  margin-top: 15px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid #3b82f6;
  border-radius: 0 6px 6px 0;
}

.devLogTitle {
  font-size: 0.75em;
  color: #3b82f6;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.devLogText {
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
  margin: 0;
}

/* Stats Section */
.statsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  padding: 80px 0;
  text-align: center;
}

.statItem {
  padding: 40px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.statNumber {
  font-size: 3em;
  font-weight: 700;
  color: #3b82f6;
  margin-bottom: 10px;
}

.statLabel {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1em;
}

/* Footer */
.mainFooter {
  background: #050505;
  padding: 60px 60px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footerContent {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 40px;
}

.footerBrand {
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 15px;
}

.footerDesc {
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
}

.footerSection h4 {
  margin-bottom: 20px;
  font-size: 1em;
  font-weight: 600;
}

.footerSection a {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  margin-bottom: 12px;
  transition: color 0.3s;
}

.footerSection a:hover {
  color: #fff;
}

.footerBottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9em;
}

/* Responsive — tablet */
@media (max-width: 768px) {
  /* Rain lines: use portrait-specific SVG */
  body::before {
    background-image: url('assets/rain-mobile.svg?v=4');
    background-size: cover;
    background-repeat: no-repeat;
  }

  /* Header: hide nav links, keep lang switcher + button */
  .mainHeader {
    padding: 12px 15px;
  }

  .headerLogo {
    font-size: 0.85em;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .headerNav {
    gap: 10px;
    flex-shrink: 0;
  }

  .gamesBtn {
    padding: 8px 10px;
    font-size: 0.85em;
  }

  .langSwitcher a {
    padding: 3px 4px;
  }

  .navHideMobile {
    display: none;
  }

  /* Sections */
  .pageSection,
  .aboutSection,
  .mainFooter {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Hero */
  .heroSection {
    padding: 100px 20px 70px;
    flex-direction: column;
  }

  .heroLogo {
    display: none;
  }

  .heroTitle {
    font-size: 2.2em;
    letter-spacing: -1px;
  }

  .heroTagline {
    font-size: 1.6em;
  }

  .heroDescription {
    font-size: 1em;
  }

  .ctaGroup {
    flex-direction: column;
    gap: 12px;
  }

  .ctaButton {
    text-align: center;
  }

  /* Section titles */
  .sectionTitle {
    font-size: 1.8em;
    margin-bottom: 40px;
  }

  /* Projects */
  .projectsGrid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Stats */
  .statsGrid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 40px 0;
  }

  /* Footer */
  .footerContent {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  /* Diagonal lines */
  .diagonalBg {
    gap: 40px;
  }

  .diagonalLine {
    width: 120px;
  }
}

/* Responsive — small phones */
@media (max-width: 480px) {
  .heroTitle {
    font-size: 1.8em;
  }

  .heroTagline {
    font-size: 1.3em;
  }

  .statsGrid {
    grid-template-columns: 1fr;
  }

  .statNumber {
    font-size: 2.2em;
  }
}

/* =============================================
   DEVLOG — page hero (slimmer than heroSection)
   ============================================= */
.pageHero {
  padding: 100px 60px 60px;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.pageHero .heroTitle {
  font-size: 2.8em;
}

.pageHero .heroTagline {
  font-size: 1.4em;
  margin-bottom: 24px;
}

/* =============================================
   DEVLOG — entry cards
   ============================================= */
.devlogEntry {
  background: #1a1a1a;
  border-left: 4px solid #3b82f6;
  padding: 28px 32px;
  margin-bottom: 28px;
}

.devlogEntryHeader {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #2a2a2a;
}

.devlogVersion {
  font-size: 1.3em;
  font-weight: 700;
  color: #3b82f6;
  letter-spacing: 1px;
}

.devlogDate {
  color: #555;
  font-size: 0.9em;
}

.devlogSection {
  margin-top: 20px;
}

.devlogSectionTitle {
  color: #555;
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.devlogChangedList {
  list-style: none;
  padding: 0;
  margin: 0;
}

.devlogChangedList li {
  color: #ccc;
  padding: 3px 0;
  font-size: 0.95em;
}

.devlogChangedList li::before {
  content: '+ ';
  color: #3b82f6;
  font-weight: bold;
}

.devlogNextText {
  color: #ffd700;
  font-style: italic;
  font-size: 0.95em;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .pageHero {
    padding: 80px 20px 40px;
  }

  .pageHero .heroTitle {
    font-size: 2em;
  }
}
