/* ===========================================================
   Vít Peterek — Modern Tech Professional
   =========================================================== */

:root {
  --bg: #0b1120;
  --bg-alt: #0e1729;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.3);
  --text: #e6edf7;
  --text-dim: #94a3b8;
  --text-faint: #64748b;
  --accent: #38bdf8;
  --accent-2: #2f6fed;
  --accent-3: #34d399;
  --brand-blue: #0b4aa2;
  --accent-grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --font-head: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --shadow-glow: 0 0 40px rgba(56, 189, 248, 0.15);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }

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

ul { list-style: none; margin: 0; padding: 0; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.accent { color: var(--accent); }

/* ---------- Background FX ---------- */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -3;
  opacity: 0.55;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -4;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

.bg-circuit {
  position: fixed;
  inset: 0;
  z-index: -6;
  opacity: 0.5;
  background-repeat: repeat;
  background-size: 260px 260px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cg fill='none' stroke='rgba(56,189,248,0.14)' stroke-width='1.5'%3E%3Cpath d='M0 40 H70 V110 H180 V40 H260'/%3E%3Cpath d='M0 180 H50 V220 H140 V150 H260'/%3E%3Cpath d='M190 0 V60 H130 V130'/%3E%3C/g%3E%3Cg fill='rgba(129,140,248,0.22)'%3E%3Ccircle cx='70' cy='40' r='3'/%3E%3Ccircle cx='180' cy='110' r='3'/%3E%3Ccircle cx='50' cy='180' r='3'/%3E%3Ccircle cx='140' cy='220' r='3'/%3E%3Ccircle cx='190' cy='60' r='3'/%3E%3Ccircle cx='130' cy='130' r='3'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: radial-gradient(ellipse 90% 80% at 50% 20%, #000 30%, transparent 100%);
}

.code-rain {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
.code-snippet {
  position: absolute;
  top: 100%;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(56, 189, 248, 0.4);
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
  white-space: nowrap;
  animation-name: code-float;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}
@keyframes code-float {
  0% { transform: translateY(0); opacity: 0; }
  8% { opacity: 0.55; }
  92% { opacity: 0.55; }
  100% { transform: translateY(-130vh); opacity: 0; }
}

.bg-glow {
  position: fixed;
  z-index: -5;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  pointer-events: none;
}
.bg-glow--a { top: -200px; left: -160px; background: var(--accent); }
.bg-glow--b { top: 30%; right: -220px; background: var(--accent-2); }

/* ---------- Loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}
.loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { text-align: center; }
.loader-logo-img {
  width: 240px;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 0 28px rgba(56, 189, 248, 0.4));
}
.loader-bar {
  width: 220px;
  height: 3px;
  background: var(--surface-strong);
  border-radius: 4px;
  margin: 20px auto 12px;
  overflow: hidden;
}
.loader-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent-grad);
  transition: width 0.2s linear;
}
.loader-text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  letter-spacing: 0.5px;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.3s var(--ease), padding 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  padding: 12px 0;
  background: rgba(11, 17, 32, 0.75);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo {
  height: 84px;
  width: auto;
  object-fit: contain;
  transition: height 0.3s var(--ease);
  filter: drop-shadow(0 0 22px rgba(56, 189, 248, 0.35));
}
.site-header.is-scrolled .brand-logo { height: 62px; }
.nav {
  display: flex;
  gap: 30px;
  font-size: 0.92rem;
  color: var(--text-dim);
}
.nav a { position: relative; padding: 4px 0; transition: color 0.2s; }
.nav a:hover { color: var(--text); }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--accent-grad);
  transition: width 0.25s var(--ease);
}
.nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.lang-btn {
  background: none;
  border: none;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-btn.is-active { background: var(--accent-grad); color: #06111f; font-weight: 600; }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px; height: 34px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.burger span { display: block; height: 2px; width: 16px; margin: 0 auto; background: var(--text); transition: 0.3s; }
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, border-color 0.25s;
}
.btn--primary { background: var(--accent-grad); color: #06111f; box-shadow: 0 8px 24px rgba(56, 189, 248, 0.25); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(56, 189, 248, 0.4); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--border-strong); background: var(--surface-strong); transform: translateY(-2px); }
.btn--sm { padding: 9px 18px; font-size: 0.82rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-3);
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 26px;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 10px;
  font-weight: 600;
}
.hero-name {
  display: block;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-role {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--text-dim);
  margin: 0 0 22px;
  min-height: 1.6em;
}
.typewriter { color: var(--text); }
.cursor-blink { color: var(--accent); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-lead {
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 0 34px;
  font-size: 1.02rem;
}
.hero-cta { display: flex; gap: 16px; margin-bottom: 44px; flex-wrap: wrap; }

.hero-stack {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
}
.hero-stack span {
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
}

.hero-visual {
  position: relative;
  height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}
.photo-group {
  position: relative;
  width: 280px;
  height: 280px;
  transform-style: preserve-3d;
  will-change: transform;
}
.photo-frame {
  position: relative;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  overflow: visible;
  filter: drop-shadow(0 0 40px rgba(56, 189, 248, 0.2));
  transition: filter 0.3s ease;
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(56,189,248,0.12), rgba(11,17,32,0.4));
  position: relative;
  z-index: 1;
  transition: transform 0.35s ease;
}
.photo-frame-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--accent-grad) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.85;
  animation: spin-slow 12s linear infinite;
  transition: opacity 0.3s ease, filter 0.3s ease;
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---- orbiting tech icons around the profile photo ---- */
.tech-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 336px;
  height: 336px;
  margin: -168px 0 0 -168px;
  pointer-events: none;
  animation: spin-cw 20s linear infinite;
}
.orbit-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  transform: rotate(var(--angle)) translate(168px) rotate(calc(-1 * var(--angle)));
}
.orbit-dot .icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  color: var(--accent);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.15);
  animation: spin-ccw 20s linear infinite;
}
@keyframes spin-cw {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes spin-ccw {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}
.photo-group:hover .tech-orbit,
.photo-group:hover .orbit-dot .icon-wrap {
  animation-duration: 7s;
}
.photo-group:hover .orbit-dot .icon-wrap {
  color: var(--accent-2);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
  border-color: rgba(56, 189, 248, 0.5);
}
.photo-group:hover .photo-frame-ring {
  opacity: 1;
  filter: brightness(1.3);
}
.photo-group:hover .photo-frame img {
  transform: scale(1.035);
}
.orbit-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font-mono);
  animation: float 5s ease-in-out infinite;
}
.orbit-card--1 { top: 4%; left: -4%; animation-delay: 0s; }
.orbit-card--2 { bottom: 10%; left: -8%; animation-delay: 1.2s; }
.orbit-card--3 {
  top: 8%; right: -6%;
  flex-direction: row; align-items: center; gap: 8px;
  font-size: 0.75rem; color: var(--text-dim);
  animation-delay: 2s;
}
.terminal-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-3); }
.orbit-label { font-size: 0.68rem; color: var(--text-faint); }
.orbit-value { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.orbit-suffix { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; color: var(--accent); }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-17px); }
}

/* ---- extra floating stat badges around the photo ---- */
.orbit-card--mini {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}
.orbit-card--mini .orbit-label {
  max-width: 84px;
  line-height: 1.15;
}
.orbit-card--mini .orbit-value { font-size: 1.05rem; }
.orbit-card--mini .orbit-suffix { font-size: 0.85rem; }

.orbit-card--4 {
  /* fixed pixel offset from the (flex-centered) photo, so the gap to the
     photo stays correct no matter how wide the hero column is */
  top: 42%; left: 50%; margin-left: -260px;
  animation: float 6.5s ease-in-out infinite;
  animation-delay: 0.6s;
}
.orbit-card--5 {
  bottom: -10%; left: 6%;
  animation: float 5.5s ease-in-out infinite;
  animation-delay: 1.8s;
}
.orbit-card--6 {
  top: 44%; left: 50%; margin-left: 170px;
  animation: float 6s ease-in-out infinite;
  animation-delay: 2.6s;
}
.orbit-card--7 {
  bottom: -10%; right: 0%;
  animation: float 5s ease-in-out infinite;
  animation-delay: 0.9s;
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid var(--border-strong);
  border-radius: 20px;
}
.scroll-cue span {
  display: block;
  width: 4px; height: 8px;
  background: var(--accent);
  border-radius: 4px;
  margin: 6px auto 0;
  animation: scrollcue 1.8s infinite;
}
@keyframes scrollcue {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- Sections ---------- */
.section { padding: 120px 0; position: relative; }
.section--alt { background: linear-gradient(180deg, transparent, rgba(255,255,255,0.015), transparent); }
.section-kicker {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  margin: 0 0 10px;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 600;
  margin: 0 0 20px;
}
.section-lead { color: var(--text-dim); max-width: 640px; margin: -8px 0 40px; }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: start;
  margin-top: 44px;
}
.about-text p { color: var(--text-dim); margin: 0 0 18px; }
.about-motto {
  font-family: var(--font-head);
  font-style: italic;
  color: var(--text);
  font-size: 1.05rem;
  padding-left: 18px;
  border-left: 2px solid var(--accent);
}
.about-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.tag {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
}
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  /* pull the numbers up so their top edge lines up with the section
     heading rather than with the paragraph text beside them */
  margin-top: -108px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.stat-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.stat-value {
  font-family: var(--font-head);
  font-size: 2.1rem;
  font-weight: 700;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-suffix { font-size: 1.4rem; color: var(--accent); font-weight: 700; }
.stat-card p { margin: 6px 0 0; color: var(--text-faint); font-size: 0.85rem; }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin-top: 50px; padding-left: 28px; border-left: 1px solid var(--border); }
.timeline-item { position: relative; padding-bottom: 46px; padding-left: 30px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -35px;
  top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}
.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.timeline-card:hover { border-color: var(--border-strong); transform: translateX(4px); }
.timeline-period { font-family: var(--font-mono); color: var(--accent); font-size: 0.8rem; }
.timeline-card h3 { margin: 8px 0 2px; font-family: var(--font-head); font-size: 1.15rem; }
.timeline-company { color: var(--text-dim); font-size: 0.9rem; margin: 0 0 12px; font-weight: 600; }
.timeline-card p { color: var(--text-dim); margin: 0 0 14px; font-size: 0.94rem; }
.timeline-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.timeline-tags span {
  font-size: 0.74rem;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
}

.cert-strip { margin-top: 56px; text-align: center; }
.cert-strip-label { font-family: var(--font-mono); color: var(--text-faint); font-size: 0.8rem; margin-bottom: 18px; }
.cert-badges { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cert-badge {
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-dim);
  background: var(--surface);
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.cert-badge:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--text); }
.cert-education {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 44px;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.skill-card:hover { transform: translateY(-6px); border-color: var(--border-strong); }
.skill-icon { font-size: 1.8rem; margin-bottom: 14px; }
.skill-card h3 { font-family: var(--font-head); font-size: 1rem; margin: 0 0 18px; }
.skill-bars li { margin-bottom: 14px; }
.skill-name { display: block; font-size: 0.8rem; color: var(--text-dim); margin-bottom: 6px; }
.skill-bar { display: block; height: 6px; background: rgba(255,255,255,0.06); border-radius: 6px; overflow: hidden; }
.skill-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 6px;
  background: var(--accent-grad);
  transition: width 1.1s var(--ease);
}
.skill-bar.is-visible i { width: var(--val); }
.tool-chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-chip-grid span {
  font-size: 0.74rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

/* ---------- Projects ---------- */
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.filter-btn:hover { border-color: var(--border-strong); color: var(--text); }
.filter-btn.is-active { background: var(--accent-grad); color: #06111f; border-color: transparent; font-weight: 600; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.35s var(--ease), border-color 0.35s, opacity 0.3s, box-shadow 0.35s;
}
.project-card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: 0 16px 40px rgba(0,0,0,0.35); }
.project-card.is-hidden { display: none; }
.project-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.project-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  border: 1px solid rgba(56,189,248,0.3);
  background: rgba(56,189,248,0.08);
  padding: 4px 10px;
  border-radius: 999px;
}
.project-year { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-faint); }
.project-card h3 { font-family: var(--font-head); font-size: 1.1rem; margin: 0 0 10px; }
.project-card p { color: var(--text-dim); font-size: 0.9rem; margin: 0 0 16px; }
.project-tech { display: flex; gap: 8px; flex-wrap: wrap; }
.project-tech span {
  font-size: 0.72rem;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
}
.projects-note { margin-top: 34px; color: var(--text-faint); font-size: 0.9rem; text-align: center; }

/* ---------- Interactive terminal ---------- */
.terminal-section { padding-top: 60px; padding-bottom: 60px; }
.terminal-window {
  max-width: 720px;
  margin: 40px auto 0;
  background: rgba(8, 13, 26, 0.75);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45), var(--shadow-glow);
  backdrop-filter: blur(10px);
}
.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid var(--border);
}
.terminal-titlebar span[class^="terminal-dot-"] { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot-red { background: #ff5f56; }
.terminal-dot-yellow { background: #ffbd2e; }
.terminal-dot-green { background: #27c93f; }
.terminal-title { margin-left: 8px; font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-faint); }
.terminal-body {
  padding: 18px 20px;
  height: 240px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-dim);
}
.terminal-body::-webkit-scrollbar { width: 6px; }
.terminal-body::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.terminal-line { white-space: pre-wrap; word-break: break-word; }
.terminal-line.cmd { color: var(--text); }
.terminal-line.cmd::before { content: "vit@peterek:~$ "; color: var(--accent); }
.terminal-line.out { color: var(--accent-3); }
.terminal-line.error { color: #f87171; }
.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}
.terminal-prompt { font-family: var(--font-mono); color: var(--accent); font-size: 0.85rem; white-space: nowrap; }
.terminal-input-row input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.terminal-hint {
  text-align: center;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ---------- Footer uptime ---------- */
.uptime-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-faint);
}
.uptime-tag .status-dot { position: relative; top: -1px; }
.uptime-tag #uptimeValue { color: var(--accent-3); }

/* ---------- Testimonials ---------- */
.testimonial-slider { max-width: 720px; margin: 40px auto 0; text-align: center; position: relative; }
.testimonial-track { position: relative; min-height: 160px; }
.testimonial-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  pointer-events: none;
}
.testimonial-slide.is-active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.testimonial-slide p {
  font-family: var(--font-head);
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--text);
  margin: 0 0 18px;
}
.testimonial-slide cite { color: var(--text-faint); font-style: normal; font-size: 0.88rem; }
.testimonial-dots { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.testimonial-dots button {
  width: 8px; height: 8px; border-radius: 50%;
  border: none; background: var(--border-strong);
  cursor: pointer; transition: 0.25s;
}
.testimonial-dots button.is-active { background: var(--accent); width: 22px; border-radius: 6px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 720px;
  margin: 44px auto 0;
}
.contact-info > p { color: var(--text-dim); margin: 0 0 26px; text-align: center; }
.contact-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.contact-item:hover { transform: translateX(6px); border-color: var(--border-strong); }
.contact-icon { font-size: 1.3rem; }
.contact-item strong { display: block; font-size: 0.82rem; color: var(--text-faint); font-weight: 600; }
.contact-item span span, .contact-item span em { font-size: 0.95rem; }
.contact-item em { font-style: normal; color: var(--text-faint); }

/* ---------- Footer ---------- */
.site-footer { padding: 34px 0; border-top: 1px solid var(--border); }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--text-faint); font-size: 0.85rem; }
.back-to-top {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.back-to-top:hover { transform: translateY(-3px); border-color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1260px) {
  /* these two sit at fixed pixel offsets from the photo so they stay
     clear of it at any width; on narrower desktop widths that same fixed
     offset would push them off the edge of the viewport, so hide just
     these two a bit earlier than the rest */
  .orbit-card--4, .orbit-card--6 { display: none; }
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { height: 360px; margin-top: 20px; }
  .orbit-card--4, .orbit-card--5, .orbit-card--6, .orbit-card--7 { display: none; }
  .tech-orbit { width: 260px; height: 260px; margin: -130px 0 0 -130px; }
  .orbit-dot { transform: rotate(var(--angle)) translate(130px) rotate(calc(-1 * var(--angle))); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .stats-grid { margin-top: 0; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .burger { display: flex; }
  .brand-logo { height: 46px; }
  .site-header.is-scrolled .brand-logo { height: 40px; }
  .header-actions .btn--sm { display: none; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .contact-items { grid-template-columns: 1fr; }
  .hero { padding-top: 120px; }

  .nav.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 66px; left: 16px; right: 16px;
    background: rgba(11,17,32,0.96);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    gap: 16px;
    backdrop-filter: blur(16px);
    z-index: 99;
  }
}

@media (max-width: 480px) {
  .hero-visual { display: none; }
  .orbit-card { display: none; }
}
