/* =========================================================
   Portfolio Bartek - Royal Blue / Granatowy Professional
   Pure CSS - ready for Apache2 hosting
   ========================================================= */

:root {
  --navy-950: #02040a;
  --navy-900: #0a1628;
  --navy-800: #0f2140;
  --navy-700: #152d54;
  --navy-600: #1e3a6b;
  --royal:    #2e5cb8;
  --royal-light: #4a7fd9;
  --accent:   #60a5fa;
  --accent-glow: rgba(96, 165, 250, 0.25);
  --gold:     #d4b572;
  --text:     #eef3fb;
  --text-dim: #a6b8d4;
  --text-mute: #7d92b5;
  --border:   rgba(96, 165, 250, 0.15);
  --border-strong: rgba(96, 165, 250, 0.3);
  --card-bg:  rgba(15, 33, 64, 0.6);
  --card-bg-hover: rgba(21, 45, 84, 0.8);
  --mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; background: #02040a; }

body {
  font-family: var(--sans);
  background: #02040a;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  cursor: none;
}

/* Subtle grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(96, 165, 250, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(circle at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 0%, black 30%, transparent 75%);
}

/* Ambient glow */
body::after {
  content: '';
  position: fixed;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(46, 92, 184, 0.12), transparent 65%);
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
}

a { color: inherit; text-decoration: none; cursor: none; }
button { cursor: none; font-family: inherit; }

/* ====================== Custom cursor ====================== */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  box-shadow: 0 0 15px var(--accent);
}
.cursor-ring {
  width: 32px; height: 32px;
  border: 1.5px solid var(--accent);
  transition: width 0.2s ease, height 0.2s ease, background 0.2s ease;
}
.cursor-ring.hover {
  width: 48px; height: 48px;
  background: rgba(96, 165, 250, 0.1);
}
.trail-dot {
  position: fixed;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
}

/* ====================== Navbar ====================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(2, 4, 10, 0.75);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.logo .bracket { color: var(--accent); }
.logo .cursor-blink {
  display: inline-block;
  width: 8px; height: 18px;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-dim);
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
  position: relative;
}
.nav-links a:hover { color: var(--text); background: rgba(96, 165, 250, 0.08); }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 14px; right: 14px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 22px; }

/* ====================== Sections ====================== */
section {
  position: relative;
  padding: 120px 32px 80px;
  max-width: 1200px;
  margin: 0 auto;
  z-index: 1;
}
.section-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.section-label::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--accent);
}
.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 50px;
  color: var(--text);
}
.section-title .accent { color: var(--accent); }

/* ====================== Hero ====================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 80px;
  padding-bottom: 40px;
}
.hero-greeting {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: 1px;
}
.hero h1 {
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 18px;
  color: var(--text);
}
.hero h1 .name {
  background: linear-gradient(120deg, #7cb8ff 0%, #bfe0ff 40%, #f5d483 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 20px rgba(124, 184, 255, 0.25));
}
.hero h2 {
  font-family: var(--mono);
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 28px;
  min-height: 1.5em;
}
.typed-text { color: var(--accent); }
.typed-cursor {
  display: inline-block;
  width: 12px; height: 1.1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 3px;
  animation: blink 1s step-end infinite;
}
.hero-desc {
  max-width: 620px;
  color: var(--text-dim);
  font-size: 16px;
  margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--royal);
  color: white;
  box-shadow: 0 4px 20px rgba(46, 92, 184, 0.4);
}
.btn-primary:hover {
  background: var(--royal-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(74, 127, 217, 0.5);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: rgba(96, 165, 250, 0.08);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  margin-top: 70px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.stat-item .stat-value {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -1px;
}
.stat-item .stat-label {
  font-size: 12px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 4px;
}

/* ====================== About ====================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: start;
}
.about-text p {
  color: var(--text-dim);
  margin-bottom: 16px;
  font-size: 15.5px;
  line-height: 1.75;
}
.about-text p strong { color: var(--text); font-weight: 600; }
.interests {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.tag {
  padding: 6px 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.tag:hover { border-color: var(--accent); background: rgba(96, 165, 250, 0.1); }

.about-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}
.about-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.about-card h3 {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 18px;
  letter-spacing: 1px;
}
.info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}
.info-row:last-child { border-bottom: none; }
.info-row .key { color: var(--text-dim); font-family: var(--mono); font-size: 13px; }
.info-row .val { color: var(--text); font-weight: 500; }

/* ====================== Projects ====================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.project-card {
  background: var(--card-bg);
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  padding: 40px 28px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.project-card.placeholder {
  color: var(--text-mute);
}
.project-card.placeholder .icon {
  width: 48px; height: 48px;
  border: 2px dashed var(--border-strong);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 700;
}
.project-card.placeholder h3 {
  color: var(--text-dim);
  font-size: 16px;
  margin-bottom: 8px;
}
.project-card.placeholder p {
  font-size: 13px;
  color: var(--text-mute);
  font-family: var(--mono);
}
.project-card:hover {
  border-color: var(--accent);
  background: var(--card-bg-hover);
  transform: translateY(-4px);
}

/* ====================== Links ====================== */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.link-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
  min-width: 0;
  width: 100%;
}
.link-card:hover {
  border-color: var(--accent);
  background: var(--card-bg-hover);
  transform: translateX(4px);
}
.link-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(46, 92, 184, 0.2);
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.link-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.link-info .name {
  font-weight: 600;
  color: var(--text);
  font-size: 14.5px;
  margin-bottom: 4px;
  display: block;
}
.link-info .handle {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-mute);
  word-break: break-all;
  overflow-wrap: anywhere;
  display: block;
}
.link-arrow {
  color: var(--text-mute);
  transition: color 0.2s ease, transform 0.2s ease;
}
.link-card:hover .link-arrow { color: var(--accent); transform: translateX(3px); }

/* ====================== Sprzet ====================== */
.hardware-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.hw-category {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.2s ease;
}
.hw-category:hover { border-color: var(--border-strong); }
.hw-category h3 {
  font-size: 14px;
  color: var(--accent);
  font-family: var(--mono);
  letter-spacing: 1px;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.hw-category ul { list-style: none; }
.hw-category li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
}
.hw-category li:last-child { border-bottom: none; }
.hw-category li .part { color: var(--text-dim); font-family: var(--mono); font-size: 12px; }
.hw-category li .model { color: var(--text); text-align: right; font-weight: 500; }

/* ====================== Panel ====================== */
.panel-wrap {
  text-align: center;
  padding: 60px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  backdrop-filter: blur(10px);
}
.panel-wrap h3 {
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--text);
}
.panel-wrap p {
  color: var(--text-dim);
  margin-bottom: 30px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ====================== Pliki ====================== */
.files-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.tab-btn {
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  font-family: var(--sans);
}
.tab-btn:hover { color: var(--text); border-color: var(--border-strong); }
.tab-btn.active {
  background: var(--royal);
  color: white;
  border-color: var(--royal);
  box-shadow: 0 2px 10px rgba(46, 92, 184, 0.4);
}

.files-list { display: grid; gap: 10px; }
.file-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.file-item:hover {
  border-color: var(--accent);
  background: var(--card-bg-hover);
  transform: translateX(4px);
}
.file-icon {
  width: 36px; height: 36px;
  background: rgba(46, 92, 184, 0.2);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.file-info { min-width: 0; }
.file-name { color: var(--text); font-weight: 500; font-size: 14px; margin-bottom: 2px; word-break: break-word; }
.file-meta { font-family: var(--mono); font-size: 11.5px; color: var(--text-mute); }
.file-size {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
}
.file-dl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.file-dl:hover { background: var(--royal); border-color: var(--royal); }

.files-empty {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-mute);
  font-family: var(--mono);
  font-size: 14px;
  border: 1px dashed var(--border);
  border-radius: 10px;
}

/* ====================== Changelog ====================== */
.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}
.timeline-item {
  position: relative;
  padding-bottom: 28px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px; top: 6px;
  width: 13px; height: 13px;
  background: var(--navy-950);
  border: 2px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.15);
}
.timeline-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.timeline-title {
  font-size: 16px;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 8px;
}
.timeline-item ul {
  list-style: none;
  padding-left: 0;
}
.timeline-item li {
  font-size: 13.5px;
  color: var(--text-dim);
  padding: 3px 0 3px 18px;
  position: relative;
}
.timeline-item li::before {
  content: '+';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
}

/* ====================== Footer ====================== */
footer {
  margin-top: 60px;
  padding: 40px 32px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-mute);
  font-size: 13px;
  font-family: var(--mono);
  position: relative;
  z-index: 1;
}
footer .heart { color: #ef4444; }

/* ====================== Konami overlay ====================== */
.konami-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 10, 0.95);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 20px;
}
.konami-overlay.show { display: flex; animation: fadeIn 0.4s ease; }
.konami-overlay canvas { position: absolute; inset: 0; }
.konami-content {
  position: relative;
  z-index: 2;
  background: var(--card-bg);
  border: 1px solid var(--accent);
  border-radius: 14px;
  padding: 40px 50px;
  backdrop-filter: blur(12px);
}
.konami-content h2 {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 32px;
  margin-bottom: 10px;
  letter-spacing: 2px;
}
.konami-content p {
  color: var(--text);
  font-size: 15px;
  margin-bottom: 24px;
}
.konami-close {
  padding: 10px 24px;
  background: var(--royal);
  border: none;
  color: white;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ====================== Reveal animation ====================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ====================== Responsive ====================== */
@media (max-width: 820px) {
  body { cursor: auto; }
  a, button { cursor: pointer; }
  .cursor-dot, .cursor-ring, .trail-dot { display: none; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: rgba(5, 11, 26, 0.97);
    flex-direction: column;
    padding: 12px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; border-radius: 6px; }
  .nav-toggle { display: block; }
  section { padding: 100px 20px 60px; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero h1 { letter-spacing: -1px; }
  .file-item { grid-template-columns: auto 1fr; }
  .file-size, .file-dl { grid-column: 2 / 3; justify-self: start; }
  .file-dl { margin-top: 4px; }
}
