/* =========================
   RESET
========================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* =========================
   BASE
========================= */
body {
  font-family: "Inter", Arial, sans-serif;
  background-color: #f6f7fb;
  color: #1f2937;
  line-height: 1.7;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.header {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: white;
  padding: 60px 20px;
}

.main {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

.card {
  background: white;
  padding: 30px;
  margin-bottom: 30px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.footer {
  text-align: center;
  padding: 30px;
  font-size: 14px;
  color: #6b7280;
}

.header-content {
  max-width: 1000px;
  margin: 0 auto;
}

/* =========================
   HERO
========================= */
.hero {
  min-height: 75vh;
  padding: 120px 20px 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

/* video background */
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
  filter: brightness(1.05) contrast(1.15) saturate(0.95);
  opacity: .8;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(to bottom, rgba(5, 10, 25, 0), rgba(5, 10, 25, 1));
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 8, 20, 0.65), rgba(3, 8, 20, 0.9));
  z-index: 1;
}

/* content wrapper */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 20px 160px;
  animation: heroFade 0.8s ease-out forwards;
  opacity: 0;
  background: rgba(2,6,23,.28);
  border: 1px solid rgba(148,163,184,.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(0,0,0,.45);

  /* żeby rzeczy nie nachodziły na siebie */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

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

.hero-content h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* ===== THEME TOGGLE (glass icon) ===== */
.theme-toggle {
  all: unset; /* resetuje button styles */
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;
  border-radius: 50%;

  font-size: 16px;
  line-height: 1;

  color: rgba(226, 232, 240, 0.7);
  background: rgba(2, 6, 23, 0.35);

  border: 1px solid rgba(148, 163, 184, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    opacity 0.2s ease;

  opacity: 0.65;
}

/* hover – delikatny, utility look */
#themeToggle:hover {
  opacity: 1;
  color: #e5e7eb;
  background: rgba(59, 130, 246, 0.18);
  box-shadow:
    0 0 0 1px rgba(96, 165, 250, 0.25),
    0 8px 24px rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

/* active click */
#themeToggle:active {
  transform: scale(0.96);
}

/* focus (accessibility) */
#themeToggle:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(96, 165, 250, 0.5),
    0 0 0 6px rgba(96, 165, 250, 0.15);
}

/* dark mode – subtelnie jaśniejszy */
body.dark #themeToggle {
  background: rgba(2, 6, 23, 0.55);
  color: rgba(226, 232, 240, 0.8);
}


/* =========================
   NAV (FIX + MODERN LOOK)
   Najważniejsze zmiany:
   - nav NIE jest absolute (nie nachodzi na tytuł)
   - navFade nie używa translateX(-50%)
========================= */
.nav {
  position: relative;
  inset: auto;
  transform: none;
  z-index: 5;

  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;

  margin-top: 4px;
  margin-bottom: 6px;
  animation: navFade 0.55s ease-out forwards;
  opacity: 0;
}

@keyframes navFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hamburger {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  color: #e5e7eb;
  cursor: pointer;
}

/* ✅ pill container */
.nav-links {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;

  padding: 10px 14px;
  border-radius: 999px;

  background: rgba(2, 6, 23, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

/* ✅ linki: nowocześniej (bez krzyczącego uppercase) */
.nav-links a {
  position: relative;
  font-size: 13px;
  font-weight: 650;
  color: rgba(226, 232, 240, 0.85);
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  letter-spacing: 0.02em;
  text-transform: none; /* ✅ było uppercase – wyglądało "staro" */
  opacity: 1;
}

.nav-links a:hover {
  background: rgba(59, 130, 246, 0.18);
  color: #e5e7eb;
  transform: translateY(-1px);
}

/* aktywny stan – “glow” */
.nav-links a.active {
  color: #e5e7eb;
  background: rgba(59, 130, 246, 0.22);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.35),
              0 12px 30px rgba(37, 99, 235, 0.22);
}

/* (zostawiam kompatybilność, jeśli gdzieś używałeś .nav-link) */
.nav-link.active {
  color: #e5e7eb;
  background: rgba(59, 130, 246, 0.22);
}

/* =========================
   MOBILE NAV
========================= */
@media (max-width: 768px) {
  .profile {
    flex-direction: column;
    text-align: center;
  }

  .nav {
    justify-content: center;
    margin-top: 10px;
  }

  .hamburger {
    display: block;
    position: absolute;
    right: 12px;
    top: 0;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 44px;
    right: 12px;

    flex-direction: column;
    gap: 8px;

    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  }

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

  .hero-profile {
    flex-direction: column;
    text-align: center;
    margin-top: 34px;
  }

  .hero-stack {
  margin-top: 6px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(226, 232, 240, 0.65);
  }

  .hero-profile .profile-image {
    width: 140px;
    height: 140px;
  }

  .hero-video {
    display: none;
    filter: blur(6px) saturate(0.9);
  }

  .hero {
    background-image: url("https://images.pexels.com/photos/1054397/pexels-photo-1054397.jpeg");
    background-size: cover;
    background-position: center;
  }
}

/* =========================
   TERMINAL
========================= */
.terminal-section {
  padding: 120px 0;
  margin-bottom: 120px;
}

.terminal {
  width: 100%;
  max-width: 900px;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 1));
  border-radius: 24px;
  padding: 32px;
  margin-bottom: 120px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.terminal-active {
  box-shadow: 0 0 0 2px #2563eb, 0 20px 60px rgba(37, 99, 235, 0.4);
  transition: box-shadow 0.3s ease;
}

.terminal-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #020617;
  border-bottom: 1px solid #1e293b;
}

.terminal-title {
  margin-left: 12px;
  font-size: 13px;
  color: #9ca3af;
}

.terminal-body {
  padding: 20px;
  min-height: 240px;
  max-width: 760px;
  font-size: 14px;
  line-height: 1.6;
}

#terminalInput {
  width: 100%;
  padding: 14px 16px;
  background: #020617;
  color: #e5e7eb;
  border: none;
  border-top: 1px solid #1e293b;
  font-family: "JetBrains Mono", monospace;
  caret-color: #22c55e;
}

#terminalInput:focus {
  outline: none;
  caret-color: #22c55e;
}

#terminalInput::selection {
  background: #2563eb;
  color: white;
}

#terminalInput::placeholder {
  color: #64748b;
  font-style: italic;
}

.terminal-heading {
  text-align: center;
  margin-bottom: 24px;
  font-size: 26px;
  font-weight: 600;
  color: #e5e7eb;
}

/* ===== TERMINAL TEXT ===== */
.terminal-line {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  line-height: 1.6;
  color: #e5e7eb;
  margin-bottom: 6px;
}

.terminal-output {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  line-height: 1.6;
  color: #9ca3af;
  margin-left: 22px;
  margin-bottom: 8px;
  white-space: pre-wrap;
}

/* ===== PROMPT ===== */
.terminal-prompt { color: #22c55e; margin-right: 6px; }
.terminal-host { color: #60a5fa; margin-right: 6px; }
.terminal-path { color: #facc15; margin-right: 6px; }
.terminal-command { color: #e5e7eb; }

/* =========================
   SCROLL HINT
========================= */

/* @keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
} */


@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}


.scroll-hint {
  display: block;
  margin-top: 16px;
  font-size: 12px;
  opacity: 0.7;
  animation: pulse 2s infinite, float 2.5s ease-in-out infinite;
  
}

/* =========================
   ANIMATIONS ON SCROLL
========================= */
.animate {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   PROFILE (shared)
========================= */
.profile {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 60px;
}

.profile-image {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 20px;

  border: 1px solid rgba(96, 165, 250, 0.35);
  box-shadow:
    0 0 0 4px rgba(96, 165, 250, 0.08),
    0 12px 40px rgba(0, 0, 0, 0.5);

  filter: saturate(0.9) contrast(1.05) brightness(0.95);
  transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
}

.profile-image:hover {
  transform: translateY(-2px) scale(1.01);
  filter: saturate(1) contrast(1.07) brightness(1.02);
  box-shadow:
    0 0 0 6px rgba(96, 165, 250, 0.10),
    0 18px 55px rgba(0, 0, 0, 0.55);
}

.profile-text h2 {
  margin-bottom: 8px;
}

.profile-role {
  font-weight: 600;
  color: #4f46e5;
  margin-bottom: 12px;
}

/* =========================
   HERO PROFILE
========================= */
.hero-profile {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 26px;
  flex-direction: column;
  text-align: center;
  position: relative;
  isolation: isolate;
  overflow: visible;
}

/* ✅ tylko rozmiar w hero (jedno miejsce) */
.hero-profile .profile-image {
  width: 240px;
  height: 240px;
  border-radius: 28px;
  position: relative;
  z-index: 2;

  /* ring + separacja od tła + glow */
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow:
    0 0 0 6px rgba(2, 6, 23, 0.60),        /* odcina od tła */
    0 0 0 11px rgba(96, 165, 250, 0.22),   /* ring */
    0 0 48px rgba(96, 165, 250, 0.28),     /* glow */
    0 24px 80px rgba(0, 0, 0, 0.55);       /* cień */

  filter: saturate(1.02) contrast(1.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
}

.hero-profile .profile-text h2 {
  margin-bottom: 8px;
  font-size: 28px;
}

.hero-profile .profile-role {
  font-weight: 700;
  color: #60a5fa;
  margin-bottom: 12px;
}

.hero-profile p {
  max-width: 600px;
  font-size: 15px;
  letter-spacing: .01em;
  line-height: 1.7;
  color: rgba(226,232,240,.92);
}

/* ring za zdjęciem */
.hero-profile::before {
  content: "";
  position: absolute;
  top: 64px; /* dopasuj jeśli trzeba */
  width: 260px;
  height: 260px;
  border-radius: 32px;
  background: radial-gradient(circle at 30% 30%, rgba(96,165,250,.35), rgba(129,140,248,.15), transparent 70%);
  filter: blur(10px);
  opacity: .9;
  z-index: 0;
}

.hero-profile::after{
  border: 0;
  background: conic-gradient(
    from 200deg,
    rgba(96,165,250,.0),
    rgba(96,165,250,.35),
    rgba(129,140,248,.25),
    rgba(96,165,250,.0)
  );
  mask: radial-gradient(circle, transparent 62%, #000 64%);
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 64%);
  box-shadow: 0 0 70px rgba(96,165,250,.25);
}

/* CTA */
.hero-cta {
  margin-top: 18px;
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  background-color: #2563eb;
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 14px 40px rgba(37,99,235,.35);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 55px rgba(37,99,235,.45);
}

/* =========================
   STACK
========================= */
.stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.stack-group {
  padding: 20px;
  border-radius: 16px;
  background: #f9fafb;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stack-group:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.stack-group h3 {
  margin-bottom: 12px;
  font-size: 16px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  padding: 6px 12px;
  border-radius: 999px;
  background-color: #eef2ff;
  color: #4f46e5;
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.badge:hover {
  transform: scale(1.05);
  background-color: #2563eb;
  color: #fff;
}

.stack-intro {
  margin-bottom: 20px;
  color: #6b7280;
}

.highlight {
  color: #4f46e5;
  font-weight: 600;
}

/* =========================
   PROJECTS
========================= */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.project {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.project h3 { margin-bottom: 10px; }

.project-links { margin-top: 16px; }

.project-links a {
  display: inline-block;
  margin-right: 12px;
  font-weight: 700;
  color: #4f46e5;
  text-decoration: none;
}

.project-links a:hover { text-decoration: underline; }

.project--placeholder {
  opacity: 0.6;
  font-style: italic;
}

/* =========================
   CONTACT
========================= */
.contact-links {
  margin-top: 20px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-button {
  padding: 12px 20px;
  border-radius: 999px;
  background-color: #4f46e5;
  color: white;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.contact-link {
  align-self: center;
  font-weight: 700;
  color: #4f46e5;
  text-decoration: none;
}

.contact-link:hover { text-decoration: underline; }

/* =========================
   YOUTUBE LINK
========================= */
.youtube-link {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 20px;
  border-radius: 12px;
  background-color: #111827;
  color: white;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.youtube-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* =========================
   DARK MODE
========================= */
body.dark {
  background-color: #0f172a;
  color: #e5e7eb;
}

body.dark .header {
  background: linear-gradient(135deg, #020617, #020617);
}

body.dark .card {
  background-color: #020617;
  box-shadow: none;
}

body.dark #themeToggle {
  background-color: #1e293b;
  color: #e5e7eb;
}

body.dark .project { border-color: #1e293b; }

body.dark .project-links a { color: #818cf8; }

body.dark .contact-button { background-color: #6366f1; }

body.dark .contact-link { color: #818cf8; }

body.dark .hamburger { color: #e5e7eb; }

body.dark .stack-group { background-color: #020617; }

body.dark .badge {
  background-color: #1e293b;
  color: #818cf8;
}

body.dark .youtube-link { background-color: #020617; }

/* =========================
   SMALL TWEAKS
========================= */
#about { padding: 40px; }

