:root {
  --bg: #0a0b0f;
  --bg-card: #12141c;
  --bg-card-hover: #181b26;
  --text: #e8eaf0;
  --text-muted: #8b90a0;
  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --accent-glow: rgba(108, 92, 231, 0.35);
  --discord: #5865f2;
  --mc: #55c355;
  --apps: #00b894;
  --border: rgba(255, 255, 255, 0.06);
  --radius: 16px;
  --font: 'Outfit', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Background effects */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 70%);
}

.bg-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 1.5rem;
  background: rgba(10, 11, 15, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--accent-light);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0 auto;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.btn-nav {
  background: var(--accent);
  color: white !important;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  transition: background 0.2s, transform 0.15s !important;
}

.btn-nav:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 1.5rem 4rem;
  text-align: center;
}

.hero-content {
  max-width: 720px;
}

.hero-tag {
  font-size: 1rem;
  color: var(--accent-light);
  font-weight: 500;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.22;
  margin-bottom: 1.25rem;
  padding: 0.12em 0.05em;
  background: linear-gradient(135deg, #fff 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  overflow: visible;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 0 30px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(108, 92, 231, 0.08);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stat-num {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-light);
  background: rgba(108, 92, 231, 0.15);
  padding: 0.3rem 0.75rem;
  border-radius: 8px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: 5rem 1.5rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  text-align: center;
}

.section-desc {
  text-align: center;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 3rem;
  font-size: 1.05rem;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: rgba(108, 92, 231, 0.3);
  background: var(--bg-card-hover);
}

.skill-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 1.1rem;
  border-radius: 12px;
  position: relative;
  background: rgba(108, 92, 231, 0.12);
  border: 1px solid rgba(108, 92, 231, 0.25);
}

/* Custom CSS icons */
.icon-frontend::before {
  content: "";
  position: absolute;
  inset: 12px 10px 10px 10px;
  border: 2px solid var(--accent-light);
  border-radius: 3px;
}
.icon-frontend::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  height: 4px;
  background: var(--accent-light);
  border-radius: 2px 2px 0 0;
}

.icon-backend::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid var(--accent-light);
  border-radius: 4px;
  box-shadow: 8px 0 0 -2px var(--accent-light), -8px 0 0 -2px var(--accent-light);
}

.icon-minecraft::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--accent-light);
  border-radius: 2px;
}

.icon-roblox::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2.5px solid var(--accent-light);
  border-radius: 5px;
}
.icon-roblox::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--accent-light);
  border-radius: 2px;
}

.icon-bots::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 12px;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  border: 2px solid var(--accent-light);
  border-radius: 4px 4px 2px 2px;
}
.icon-bots::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-light);
  border-radius: 50%;
  box-shadow: -8px -4px 0 -1px var(--accent-light), 8px -4px 0 -1px var(--accent-light);
}

.icon-deploy::before {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 12px solid var(--accent-light);
}
.icon-deploy::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 8px;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-light);
}

.skill-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.skill-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-tags span {
  font-size: 0.75rem;
  font-family: var(--mono);
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 0.25s, border-color 0.25s;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(108, 92, 231, 0.25);
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 0.5rem;
}

.project-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: rgba(108, 92, 231, 0.2);
  color: var(--accent-light);
}

.project-badge.discord {
  background: rgba(88, 101, 242, 0.2);
  color: #8b9cff;
}

.project-badge.mc {
  background: rgba(85, 195, 85, 0.15);
  color: #7ddea0;
}

.project-badge.roblox {
  background: rgba(226, 35, 26, 0.18);
  color: #ff6b6b;
}

.project-status {
  font-size: 0.7rem;
  font-weight: 500;
  color: #7ddea0;
  background: rgba(85, 195, 85, 0.12);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.project-status.soon {
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
}

.project-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.project-tech {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.8;
}

/* Learning */
.learning-list {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.learning-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.learning-bar {
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
}

.learning-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 999px;
  transition: width 0.6s ease;
}

.learning-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.learning-name {
  font-size: 0.95rem;
  font-weight: 500;
}

.learning-pct {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.contact-icon-mail {
  width: 22px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 3px;
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}
.contact-icon-mail::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 1px;
  right: 1px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-left: 2px solid transparent;
  border-right: 2px solid transparent;
  transform: scaleY(0.9);
}

/* About */
.about-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.about-text .section-title {
  text-align: center;
  margin-bottom: 1.25rem;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1.1rem;
  line-height: 1.75;
}

/* Contact */
.contact {
  text-align: center;
}

.contact-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 480px;
  margin: 0 auto;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-link:hover {
  color: var(--accent-light);
}

.contact-icon {
  font-size: 1.4rem;
}

.contact-note {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-sub {
  margin-top: 0.35rem;
  font-size: 0.8rem !important;
  opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 11, 15, 0.98);
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    z-index: 10;
  }

  .nav-inner {
    min-height: 42px;
  }
}

/* Hero extras */
.hero-content {
  max-width: 980px;
}

.hero-content > .hero-tag,
.hero-content > .hero-title,
.hero-content > .about-inline,
.hero-content > .stat-row,
.hero-content > .hero-cta {
  animation: rise 0.7s ease both;
}

.hero-content > .hero-title { animation-delay: 0.08s; }
.hero-content > .about-inline { animation-delay: 0.16s; }
.hero-content > .stat-row { animation-delay: 0.24s; }
.hero-content > .hero-cta { animation-delay: 0.32s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.about-inline {
  max-width: 640px;
  margin: 0 auto 0.25rem;
}

.about-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 0.75rem;
}

.about-inline p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0 1.75rem;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 0.6rem;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.stat-box strong {
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  letter-spacing: -0.03em;
  color: #fff;
}

.stat-box span {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.lang-flag {
  width: 22px;
  height: 15px;
  border-radius: 2px;
  display: block;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.flag-pl {
  background: linear-gradient(#ffffff 0 50%, #dc143c 50% 100%);
}

.flag-en {
  background-color: #012169;
  background-image:
    linear-gradient(transparent 46%, #c8102e 46% 54%, transparent 54%),
    linear-gradient(90deg, transparent 42%, #c8102e 42% 58%, transparent 58%),
    linear-gradient(transparent 38%, #fff 38% 62%, transparent 62%),
    linear-gradient(90deg, transparent 34%, #fff 34% 66%, transparent 66%);
}

.lang-switch .is-on {
  color: #fff;
}

.lang-sep {
  opacity: 0.4;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: none;
}

.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease, transform 0.55s ease, border-color 0.25s, background 0.25s;
}

.field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  text-align: left;
  margin-bottom: 0.9rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.field input,
.field textarea {
  width: 100%;
  background: #0c0e14;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  padding: 0.75rem 0.9rem;
  outline: none;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(108, 92, 231, 0.7);
}

.contact-box form {
  margin-bottom: 1.25rem;
}

.contact-box .btn {
  width: 100%;
  margin-top: 0.25rem;
}

.form-success {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: #fff;
}

.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

#to-top {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 90;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(18, 20, 28, 0.92);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
}

#to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.missing {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.25rem;
}

.missing h1 {
  max-width: 680px;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.25;
  margin-bottom: 0.8rem;
}

.missing p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .stat-row {
    gap: 0.4rem;
  }

  .stat-box {
    min-height: 92px;
    padding: 0.7rem 0.3rem;
  }

  .stat-box span {
    font-size: 0.62rem;
  }

  .hero {
    padding-top: 6rem;
  }
}

.skill-card.reveal.in:hover,
.project-card.reveal.in:hover {
  transform: translateY(-4px);
}
