/* ============================================================
   ROBOTT.SK — hlavný štýl (dizajn systém, layout, komponenty)
   ============================================================ */

/* ---------- Dizajn systém (CSS premenné) ---------- */
:root {
  /* Farby */
  --bg: #0a0a14;
  --bg-2: #12121f;
  --bg-3: #1a1a2e;
  --neon-1: #7c3aed;   /* fialová */
  --neon-2: #06b6d4;   /* azúrová */
  --neon-3: #f43f5e;   /* gaming ružovo-červená */
  --text: #e2e8f0;
  --text-dim: #94a3b8;

  --gradient-brand: linear-gradient(135deg, var(--neon-1), var(--neon-2));
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);

  /* Typografia */
  --font-head: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', monospace;

  /* Rozmery */
  --container: 1200px;
  --radius: 16px;
  --nav-height: 72px;

  /* Prechody */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --speed: 0.35s;

  /* Akcent stránky (podstránky si ho prepíšu) */
  --accent: var(--neon-1);
  --accent-2: var(--neon-2);

  color-scheme: dark;
}

/* Tematické akcenty podstránok */
body.page-it      { --accent: #06b6d4; --accent-2: #3b82f6; }
body.page-gaming  { --accent: #f43f5e; --accent-2: #f97316; }
body.page-ai      { --accent: #7c3aed; --accent-2: #d946ef; }

/* ---------- Reset a základ ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

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

a { color: var(--neon-2); text-decoration: none; transition: color var(--speed); }
a:hover { color: var(--text); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

code, .mono { font-family: var(--font-mono); }

::selection { background: var(--neon-1); color: #fff; }

/* Focus stavy pre prístupnosť */
:focus-visible {
  outline: 2px solid var(--neon-2);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--neon-1), var(--neon-2));
  border-radius: 5px;
}

/* ---------- Layout pomocníci ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: 96px; position: relative; }

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--text-dim);
  max-width: 640px;
  margin-bottom: 48px;
}

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Glassmorphism ---------- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

/* ---------- Navigácia ---------- */
.navbar {
  position: fixed;
  inset: 16px 16px auto;
  z-index: 100;
  height: var(--nav-height);
  max-width: calc(var(--container) + 48px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 24px;
  transition: box-shadow var(--speed), background var(--speed);
}

.navbar.scrolled {
  background: rgba(10, 10, 20, 0.75);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
  transition: filter var(--speed);
}

.logo:hover {
  color: var(--text);
  filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.65));
}

.logo-icon { width: 28px; height: 28px; flex-shrink: 0; }

.logo-tld {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 10px;
  transition: color var(--speed), background var(--speed);
}

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

.nav-links a.active {
  color: var(--text);
  background: var(--glass-bg);
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* Prepínač jazyka */
.lang-switch {
  display: flex;
  gap: 2px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 3px;
  margin-left: 8px;
}

.lang-switch button {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 4px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: all var(--speed);
}

.lang-switch button.active {
  background: var(--gradient-brand);
  color: #fff;
}

/* Hamburger (mobil) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px auto;
  border-radius: 2px;
  transition: transform var(--speed) var(--ease), opacity var(--speed);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;   /* mobil: stabilná výška bez skákania adresnej lišty */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: var(--nav-height);
}

.hero-sub {
  position: relative;
  min-height: 52vh;
  min-height: 52svh;
}

#particles {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-inline: 24px;
  max-width: 900px;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
  margin-bottom: 20px;
}

.hero .typewriter {
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--text-dim);
  min-height: 2.2em;
  margin-bottom: 36px;
}

.typewriter .caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--neon-2);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

.typewriter .word { color: var(--accent-2, var(--neon-2)); }

.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Gradient orby na pozadí */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
}

.orb-1 { width: 480px; height: 480px; background: var(--neon-1); top: -10%; left: -10%; }
.orb-2 { width: 400px; height: 400px; background: var(--neon-2); bottom: -15%; right: -5%; }
.orb-3 { width: 300px; height: 300px; background: var(--neon-3); top: 40%; right: 25%; opacity: 0.15; }

/* ---------- Tlačidlá ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform var(--speed) var(--ease), box-shadow var(--speed);
}

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.45);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 0 42px rgba(124, 58, 237, 0.75), 0 0 80px rgba(6, 182, 212, 0.35);
}

.btn-ghost {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text);
  backdrop-filter: blur(12px);
}

.btn-ghost:hover {
  transform: translateY(-3px);
  border-color: var(--neon-2);
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.35);
}

/* ---------- Karty ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.card {
  padding: 36px 30px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--speed), box-shadow var(--speed);
  transform-style: preserve-3d;
  will-change: transform;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
              rgba(255, 255, 255, 0.08), transparent 45%);
  opacity: 0;
  transition: opacity var(--speed);
  pointer-events: none;
}

.card:hover::before { opacity: 1; }

.card:hover {
  border-color: color-mix(in srgb, var(--card-accent, var(--accent)) 55%, transparent);
  box-shadow: 0 0 36px color-mix(in srgb, var(--card-accent, var(--accent)) 22%, transparent);
}

.card-icon {
  font-size: 2.2rem;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  margin-bottom: 22px;
  background: color-mix(in srgb, var(--card-accent, var(--accent)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--card-accent, var(--accent)) 35%, transparent);
}

.card h3 { font-size: 1.35rem; margin-bottom: 12px; }
.card p { color: var(--text-dim); font-size: 0.97rem; }

.card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-weight: 500;
  color: var(--card-accent, var(--accent));
}

.card .card-link:hover { gap: 12px; }
.card .card-link { transition: gap var(--speed) var(--ease); }

.card-it     { --card-accent: #06b6d4; }
.card-gaming { --card-accent: #f43f5e; }
.card-ai     { --card-accent: #7c3aed; }

/* ---------- Sekcia „O mne" teaser ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: center;
}

.avatar-frame {
  aspect-ratio: 1;
  max-width: 340px;
  display: grid;
  place-items: center;
  font-size: 7rem;
  position: relative;
  margin-inline: auto;
}

.avatar-frame::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--radius);
  padding: 2px;
  background: var(--gradient-brand);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-rotate 6s linear infinite;
}

/* ---------- Zoznamy / štítky ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
  transition: all var(--speed);
}

.tag:hover {
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 35%, transparent);
}

/* ---------- Kontakt ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-form { display: grid; gap: 18px; padding: 36px; }

.contact-form label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-dim);
  display: grid;
  gap: 8px;
}

.contact-form input,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 13px 16px;
  transition: border-color var(--speed), box-shadow var(--speed);
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--neon-2);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.25);
}

/* Honeypot — mimo obrazovky, pre boty však vo formulári "existuje" */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Kontrolná otázka */
.captcha-q {
  font-family: var(--font-mono);
  color: var(--neon-2);
  font-weight: 700;
}

/* Stavová hláška formulára */
.form-status {
  min-height: 1.5em;
  font-size: 0.92rem;
  margin: 0;
}

.form-status.sending { color: var(--text-dim); }
.form-status.success { color: #34d399; }
.form-status.error   { color: var(--neon-3); }

.socials { display: grid; gap: 14px; }

.social-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  color: var(--text);
  transition: transform var(--speed) var(--ease), border-color var(--speed), box-shadow var(--speed);
}

.social-link:hover {
  transform: translateX(8px);
  border-color: var(--neon-2);
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.2);
  color: var(--text);
}

.social-link .icon { font-size: 1.5rem; }
.social-link small { color: var(--text-dim); display: block; font-family: var(--font-mono); }

/* ---------- Pätička ---------- */
footer {
  border-top: 1px solid var(--glass-border);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  position: relative;
}

.footer-logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

/* ---------- Custom kurzor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  translate: -50% -50%;
}

.cursor-dot {
  width: 7px; height: 7px;
  background: var(--neon-2);
  box-shadow: 0 0 10px var(--neon-2);
}

.cursor-ring {
  width: 36px; height: 36px;
  border: 1.5px solid rgba(124, 58, 237, 0.6);
  transition: width 0.25s, height 0.25s, border-color 0.25s;
}

body.cursor-hover .cursor-ring {
  width: 56px; height: 56px;
  border-color: var(--neon-2);
}

@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---------- Responzivita ----------
   breakpointy: 1024 px (tablet landscape / menší NB)
                900 px  (tablet portrait → hamburger menu)
                640 px  (telefóny)                        */

@media (max-width: 1024px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .section { padding-block: 72px; }
  .avatar-frame { max-width: 280px; font-size: 5.5rem; }
}

/* Tablet portrait a menšie — menu sa už nezmestí, prepíname na hamburger.
   Pozn.: backdrop-filter na .navbar mení kotvu position:fixed potomkov,
   preto je mobilné menu riešené ako panel pod lištou (position:absolute),
   nie celoobrazovkový fixed overlay. */
@media (max-width: 900px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    background: rgba(13, 13, 24, 0.97);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--speed), transform var(--speed) var(--ease), visibility var(--speed);
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    text-align: center;
    font-size: 1.05rem;
    padding: 13px;
  }

  .nav-links .lang-switch {
    width: max-content;
    margin: 10px auto 2px;
  }
}

/* Telefóny */
@media (max-width: 640px) {
  .container { padding-inline: 18px; }

  .navbar { inset: 12px 12px auto; padding-inline: 18px; }
  .logo { font-size: 1.1rem; }
  .logo-icon { width: 24px; height: 24px; }

  .section { padding-block: 56px; }
  .section-subtitle { margin-bottom: 32px; }

  .hero-sub { min-height: 42svh; }
  .hero .typewriter { margin-bottom: 28px; }
  .hero-cta .btn { width: 100%; justify-content: center; }

  .cards-grid { gap: 18px; }
  .card { padding: 28px 22px; }

  .contact-form { padding: 24px 20px; }
  .social-link { padding: 15px 18px; }

  .avatar-frame { max-width: 220px; font-size: 4.5rem; }

  footer { padding: 32px 18px; }
}
