/* ========================================
   KennyDEV — Clean multi-page portfolio
   ======================================== */

:root {
  --primary: #0571f8;
  --primary-hover: #0460d4;
  --primary-soft: rgba(5, 113, 248, 0.12);
  --bg: #ffffff;
  --bg-elevated: #f8fafc;
  --text: #0e2431;
  --text-muted: #5a6a7a;
  --border: rgba(14, 36, 49, 0.08);
  --header-bg: rgba(255, 255, 255, 0.88);
  --footer-bg: #0e2431;
  --card-shadow: 0 4px 20px rgba(14, 36, 49, 0.06);
  --card-shadow-hover: 0 10px 32px rgba(14, 36, 49, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 4.4rem;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --font: "Poppins", system-ui, -apple-system, sans-serif;
  --max: 960px;
}

[data-theme="dark"] {
  --primary: #6a8ef9;
  --primary-hover: #8aa6fb;
  --primary-soft: rgba(106, 142, 249, 0.15);
  --bg: #0c0f14;
  --bg-elevated: #141922;
  --text: #f0f4f8;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.08);
  --header-bg: rgba(12, 15, 20, 0.88);
  --footer-bg: #06080c;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 10px 32px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.55rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background-color var(--transition), color var(--transition);
  overflow-x: hidden;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, p, figure, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: color var(--transition); }
img { max-width: 100%; height: auto; display: block; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

.no-scroll { overflow: hidden; }

.bd-grid {
  width: min(100% - 2.4rem, var(--max));
  margin-inline: auto;
}

/* ========== HEADER ========== */
.header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  height: var(--header-h);
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.header__logo {
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  flex-shrink: 0;
}

.header__logo--light { font-weight: 300; opacity: 0.65; }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.menu-btn {
  position: relative;
  width: 30px; height: 26px;
  background: none; border: none; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
}

.menu-btn__icon,
.menu-btn__icon::before,
.menu-btn__icon::after {
  position: absolute;
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.28s ease;
}
.menu-btn__icon::before, .menu-btn__icon::after { content: ""; left: 0; }
.menu-btn__icon::before { transform: translateY(-6px); }
.menu-btn__icon::after { transform: translateY(6px); }
.menu-btn.open .menu-btn__icon { background: transparent; }
.menu-btn.open .menu-btn__icon::before { transform: rotate(45deg); }
.menu-btn.open .menu-btn__icon::after { transform: rotate(-45deg); }

.nav__menu {
  position: fixed;
  top: var(--header-h);
  right: 0;
  width: min(78%, 300px);
  height: calc(100dvh - var(--header-h));
  padding: 2.4rem 2rem;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  z-index: 99;
}
.nav__menu.show { transform: translateX(0); }
.nav__item { margin-bottom: 1.6rem; }
.nav__link {
  position: relative;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.3rem 0;
  display: inline-block;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--primary);
  transition: width 0.22s ease;
}
.nav__link:hover::after,
.nav__link.active::after { width: 100%; }

/* Theme switcher */
.theme-switcher {
  --w: 3em; --h: 1.7em; --icon: 1.15em; --offset: 0.26em;
  position: relative; display: block;
  width: var(--w); height: var(--h); cursor: pointer;
}
.theme-switcher input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0;
  background: #e4e4e7; border-radius: 999px; transition: 0.3s;
}
.slider::before {
  content: "";
  position: absolute;
  height: var(--icon); width: var(--icon);
  left: var(--offset); top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  background: linear-gradient(40deg, #ff0080, #ff8c00 70%);
  transition: 0.3s;
}
input:checked + .slider { background: #303136; }
input:checked + .slider::before {
  left: calc(100% - (var(--icon) + var(--offset)));
  background: #303136;
  box-shadow: inset -3px -2px 5px -2px #8983f7, inset -10px -4px 0 0 #a3dafb;
}

/* ========== MAIN ========== */
main {
  flex: 1;
  padding-top: var(--header-h);
  width: 100%;
}

/* ========== HERO (centered, no image) ========== */
.hero {
  min-height: calc(100dvh - var(--header-h) - 7rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.2rem 0 2.4rem;
}

.hero--centered .hero-content {
  text-align: center;
  max-width: 52rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-eyebrow {
  font-size: 1.4rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.wave {
  display: inline-block;
  animation: wave-anim 2.5s infinite;
  transform-origin: 70% 70%;
}
@keyframes wave-anim {
  0%, 60%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}

.hero-title {
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
}

.hero-subtitle {
  font-size: clamp(1.45rem, 2.2vw, 1.7rem);
  color: var(--text-muted);
  max-width: 40ch;
  margin-bottom: 2rem;
  line-height: 1.65;
}

.text-primary { color: var(--primary); }
.text-primary--bold { font-weight: 600; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.2rem;
  font-size: 1.45rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}
.primary-button:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(5, 113, 248, 0.28);
  transform: translateY(-1px);
}

/* ========== STATUS BADGE ========== */
.status-badge {
  margin-top: 0.4rem;
  width: 100%;
  max-width: 320px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  margin-bottom: 1.8rem;
}
.status-badge.loaded { opacity: 1; transform: translateY(0); }

.status-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.status-header { display: flex; align-items: center; gap: 1rem; }
.status-avatar-wrap { position: relative; flex-shrink: 0; }
.status-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border);
}
.status-dot {
  position: absolute; bottom: 0; right: 0;
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 2.5px solid var(--bg-elevated);
}
.status-info { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.status-name {
  font-weight: 600; font-size: 1.4rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.status-presence { font-size: 1.2rem; color: var(--text-muted); }

.status-activity {
  display: flex; align-items: center; gap: 0.9rem;
  padding-top: 0.3rem;
  border-top: 1px solid var(--border);
}
.status-album {
  width: 42px; height: 42px;
  border-radius: 6px; object-fit: cover; flex-shrink: 0;
}
.status-activity-icon {
  width: 42px; height: 42px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; flex-shrink: 0;
}
.status-activity-text {
  display: flex; flex-direction: column; gap: 0.1rem;
  min-width: 0; font-size: 1.25rem;
}
.status-activity-text strong {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600;
}
.status-activity-type {
  font-size: 1.1rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 0.3rem;
}
.status-muted {
  color: var(--text-muted); font-size: 1.2rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.status-idle-msg { font-size: 1.25rem; color: var(--text-muted); margin: 0; }

/* ========== GITHUB STATS ========== */
.github-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem 1.6rem;
  margin: 0.4rem 0 1.6rem;
}

.gh-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 6.5rem;
  padding: 0.9rem 1.2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--card-shadow);
}

.gh-num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.gh-label {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* ========== SECTIONS / PAGES ========== */
.page-hero {
  padding: 5.5rem 0 1.6rem;
  text-align: center;
}
.page-hero .section-title { margin-bottom: 0.6rem; }
.page-hero .section-lead { margin-bottom: 0; }

.section { padding: 2rem 0 3.2rem; }

.section-title {
  font-size: clamp(2.2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  letter-spacing: -0.02em;
}
.section-title::after {
  content: "";
  display: block;
  width: 40px; height: 3px;
  background: var(--primary);
  margin: 0.8rem auto 0;
  border-radius: 2px;
}

.section-lead {
  text-align: center;
  color: var(--text-muted);
  max-width: 44ch;
  margin: 0 auto 2.4rem;
  font-size: 1.45rem;
}

/* Projects */
.project-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.8rem;
  justify-content: center;
}

.project-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  max-width: 420px;
  margin-inline: auto;
  width: 100%;
}
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

.project-picture {
  background: #0e2431;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.project-picture img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.project-card:hover .project-picture img { transform: scale(1.03); }

.project-body {
  padding: 1.6rem 1.6rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.project-card__title {
  font-size: 1.7rem;
  font-weight: 600;
}

.project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.project-tags span {
  font-size: 1.15rem;
  font-weight: 500;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
}

.project-description__text {
  font-size: 1.35rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.project-links { display: flex; gap: 1.4rem; }
.project-links__anchor {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--primary);
}
.project-links__anchor:hover { color: var(--primary-hover); }

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  max-width: 640px;
  margin-inline: auto;
}

.skill-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.6rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  transition: transform var(--transition), border-color var(--transition);
  font-weight: 500;
  font-size: 1.3rem;
}
.skill-chip i { font-size: 2.8rem; color: var(--primary); }
.skill-chip:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

/* About */
.about__container { max-width: 560px; margin-inline: auto; }
.about-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.4rem 2rem;
  box-shadow: var(--card-shadow);
  text-align: center;
}
.about__subtitle {
  font-size: 1.85rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
}
.about__text {
  color: var(--text-muted);
  font-size: 1.45rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}
.about__text:last-child { margin-bottom: 0; }

/* ========== FOOTER (compact + alyosha-style icons) ========== */
.footer {
  margin-top: auto;
  background: var(--footer-bg);
  color: #fff;
  text-align: center;
}

.footer--compact {
  padding: 1.6rem 0 1.4rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
}

/* Alyosha-inspired large social icons */
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  height: 3.2rem;
  font-size: 2.4rem;
  color: rgba(255, 255, 255, 0.75);
  transition: transform 0.3s ease, color 0.3s ease;
  border-radius: 0.4rem;
}
.social-btn:hover {
  transform: scale(1.2);
  color: #fff;
}
.social-btn--discord:hover { color: #5865F2; }
.social-btn--github:hover { color: #fff; }

.footer-description {
  font-size: 1.25rem;
  opacity: 0.55;
  margin: 0;
}

/* ========== RESPONSIVE ========== */
@media (min-width: 55em) {
  .menu-btn { display: none; }
  .nav__menu {
    position: static;
    width: auto; height: auto;
    padding: 0;
    background: transparent;
    border: none;
    transform: none;
  }
  .nav__list { display: flex; gap: 2.4rem; }
  .nav__item { margin: 0; }
  .nav__link { font-size: 1.4rem; }

  .hero { min-height: calc(100dvh - var(--header-h) - 6rem); }
  .project-container {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
  .project-card { max-width: none; }
  .skills-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 65em) {
  .bd-grid { width: min(100% - 3.2rem, var(--max)); }
}

/* Prevent zoom/layout issues on mobile */
@media (max-width: 360px) {
  .github-stats { gap: 0.6rem; }
  .gh-stat { min-width: 5.5rem; padding: 0.7rem 0.8rem; }
  .hero-title { font-size: 2.4rem; }
}

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

/* Secondary page buttons + hero socials */
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition), transform var(--transition);
}
.secondary-button:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-1px);
}

.hero-cta {
  margin-bottom: 1.4rem;
}

.hero-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.hero-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 2.1rem;
  transition: all var(--transition);
}

.hero-social a:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-2px);
}

@media (max-width: 400px) {
  .hero-cta {
    flex-direction: column;
    width: 100%;
    max-width: 22rem;
  }
  .hero-cta .primary-button,
  .hero-cta .secondary-button {
    width: 100%;
  }
}
