/* ============================================================
   Wizytówka — Patryk Tyrański
   Ciemny, technologiczny styl. Czysty CSS, bez zależności.
   ============================================================ */

:root {
  --bg:        #0a0e14;
  --bg-soft:   #11161f;
  --surface:   #151b26;
  --border:    #232c3b;
  --text:      #e6edf6;
  --text-dim:  #9aa7b8;
  --text-mute: #6b7888;

  --accent:    #38e1c4;  /* neon cyan */
  --accent-2:  #7c6cff;  /* violet */
  --accent-glow: rgba(56, 225, 196, 0.35);

  --radius: 14px;
  --maxw: 1080px;

  --font-sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Courier New', monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Tło canvas */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  pointer-events: none;
}

/* Delikatny gradient-poświata na tle */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(60% 50% at 70% 0%, rgba(124, 108, 255, 0.10), transparent 70%),
    radial-gradient(50% 50% at 10% 100%, rgba(56, 225, 196, 0.08), transparent 70%);
  pointer-events: none;
}

main, .nav, .footer { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===================== NAV ===================== */
.nav {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 5vw, 3rem);
  background: rgba(10, 14, 20, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 14, 20, 0.85);
}
.nav__logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 1px;
}
.nav__logo-dot { color: var(--accent); }
.nav__links { display: flex; gap: clamp(0.75rem, 2vw, 2rem); }
.nav__link {
  font-size: 0.95rem;
  color: var(--text-dim);
  position: relative;
  padding: 0.25rem 0;
  white-space: nowrap;
  transition: color 0.25s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.nav__link:hover,
.nav__link.active { color: var(--text); }
.nav__link.active::after { width: 100%; }

/* ===================== HERO ===================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem clamp(1rem, 5vw, 3rem) 4rem;
  position: relative;
}
.hero__inner { max-width: 880px; }
.hero__eyebrow {
  font-family: var(--font-mono);
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}
.hero__title {
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -1px;
}
.hero__accent {
  display: block;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__subtitle {
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-size: clamp(0.95rem, 2.2vw, 1.25rem);
  margin-top: 1.75rem;
  min-height: 1.6em;
}
.cursor {
  color: var(--accent);
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.3s var(--ease),
    background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn--primary {
  background: var(--accent);
  color: #06211c;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}
.btn--ghost {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}
.btn--ghost:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}
.hero__scroll-mouse {
  display: block;
  width: 24px; height: 38px;
  border: 2px solid var(--text-mute);
  border-radius: 14px;
  position: relative;
}
.hero__scroll-mouse::before {
  content: "";
  position: absolute;
  top: 7px; left: 50%;
  width: 4px; height: 7px;
  margin-left: -2px;
  background: var(--accent);
  border-radius: 2px;
  animation: scroll-dot 1.6s var(--ease) infinite;
}
@keyframes scroll-dot {
  0% { opacity: 0; transform: translateY(0); }
  40% { opacity: 1; }
  80% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 0; }
}

/* ===================== SEKCJE ===================== */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 7rem) clamp(1rem, 5vw, 3rem);
}
.section__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.section__num {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1rem;
}
.section__title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* O mnie */
.about {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: start;
}
.about__text-col { display: grid; gap: 1.5rem; max-width: 720px; }

/* Zdjęcie / placeholder */
.about__photo {
  position: sticky;
  top: 100px;
  justify-self: center;
}
.about__img,
.about__avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 6px rgba(56, 225, 196, 0.08),
    0 12px 40px rgba(124, 108, 255, 0.25);
}
.about__avatar {
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent);
  background: linear-gradient(135deg, var(--surface), var(--bg-soft));
}

.about__lead { font-size: clamp(1.15rem, 2.5vw, 1.5rem); color: var(--text); }
.about__text { color: var(--text-dim); font-size: 1.05rem; }
.about strong { color: var(--accent); font-weight: 600; }
.about__statement {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  color: var(--text-dim);
  font-size: 1.05rem;
}

/* Dlaczego AI-assisted działa */
.proof {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 5vw, 3rem);
}
.proof__inner {
  background: linear-gradient(135deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 5vw, 3rem);
  position: relative;
  overflow: hidden;
}
.proof__inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 120% at 100% 0%, rgba(124, 108, 255, 0.12), transparent 60%);
  pointer-events: none;
}
.proof__kicker {
  font-family: var(--font-mono);
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 0.75rem;
}
.proof__lead {
  font-size: clamp(1.3rem, 3.5vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 1.75rem;
}
.proof__lead strong { color: var(--accent); }
.proof__stat {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.proof__num {
  font-family: var(--font-mono);
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  flex-shrink: 0;
}
.proof__caption { color: var(--text-dim); font-size: 0.98rem; }
.proof__caption strong { color: var(--text); font-weight: 600; }
.proof__punch {
  font-size: 1.1rem;
  color: var(--text-dim);
}
.proof__punch strong { color: var(--accent); font-weight: 600; }
@media (max-width: 520px) {
  .proof__stat { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

/* Karty (jak pracuję) */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-2);
}
.card__title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text);
}
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tags li {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
}

/* Projekty */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.project {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}
.project::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 0% 0%, rgba(56, 225, 196, 0.08), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.project:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}
.project:hover::before { opacity: 1; }
.project__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.project__title { font-size: 1.25rem; }
.project__status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.project__status--live {
  color: var(--accent);
  border-color: var(--accent);
}
.project__desc { color: var(--text-dim); font-size: 0.98rem; margin-bottom: 1rem; }
.project__meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--font-mono);
}
.project__meta li {
  font-size: 0.78rem;
  color: var(--text-mute);
}
.project__meta li::before { content: "# "; color: var(--accent-2); }

/* Wyróżniony projekt flagowy */
.project--featured {
  grid-column: 1 / -1;
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--surface), rgba(124, 108, 255, 0.06));
}
.project--featured::before { opacity: 0.6; }
.project__badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #06211c;
  background: var(--accent);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}
.project--featured .project__title { font-size: 1.6rem; }
.project--featured .project__desc { font-size: 1.05rem; max-width: 70ch; }
.project__link {
  display: inline-flex;
  align-items: center;
  margin-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
    transform 0.2s var(--ease);
  position: relative;
  z-index: 1;
}
.project__link:hover {
  background: var(--accent);
  color: #06211c;
  transform: translateY(-2px);
}

/* Kontakt */
.section--contact { text-align: center; }
.section--contact .section__head { justify-content: center; }
.contact__lead { color: var(--text-dim); font-size: 1.15rem; margin-bottom: 1rem; }
.contact__mail {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(1.3rem, 4vw, 2.2rem);
  font-weight: 500;
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.2rem;
  transition: color 0.25s var(--ease);
}
.contact__mail:hover { color: var(--accent); }
.contact__links { margin-top: 1.75rem; display: flex; justify-content: center; gap: 1rem; }
.contact__link {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
}
.contact__link--disabled { opacity: 0.5; cursor: not-allowed; }

/* Footer */
.footer {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* ===================== ANIMACJE WEJŚCIA ===================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

/* ===================== RESPONSYWNOŚĆ ===================== */
@media (max-width: 720px) {
  .about { grid-template-columns: 1fr; }
  .about__photo { position: static; top: auto; }
}
@media (max-width: 560px) {
  .nav__links { gap: 0.85rem; }
  .nav__link { font-size: 0.85rem; }
  .hero__cta { width: 100%; }
  .btn { flex: 1; text-align: center; }
}

/* ===================== DOSTĘPNOŚĆ: mniej ruchu ===================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
