/* ===================================================
   Michal Gašperan — personal site
   Professional tech theme: dark, neon accents, glass
   =================================================== */

:root {
  --bg: #080B12;
  --bg-elev: #0D111C;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #E7ECF3;
  --text-muted: #8B96AB;
  --text-faint: #5B6579;

  --cyan: #22D3EE;
  --violet: #8B5CF6;
  --pink: #F472B6;

  --gradient: linear-gradient(135deg, var(--cyan), var(--violet));
  --glow-cyan: 0 0 24px rgba(34, 211, 238, 0.35);
  --glow-violet: 0 0 24px rgba(139, 92, 246, 0.35);

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --font-head: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* subtle blueprint grid overlay across the whole page */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.2;
  margin: 0 0 .5em;
  color: var(--text);
}

h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }

p { margin: 0 0 1em; color: var(--text-muted); }

a { color: var(--cyan); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--text); }

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

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

.section { padding: 110px 0; }

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

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: .85rem;
  letter-spacing: .04em;
  color: var(--cyan);
  margin-bottom: 20px;
}
.tag-idx {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--bg);
  background: var(--gradient);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.section-lead {
  max-width: 600px;
  font-size: 1.05rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  position: relative;
}

.btn-primary {
  background: var(--gradient);
  color: #061018;
  box-shadow: var(--glow-cyan);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 34px rgba(139, 92, 246, 0.45); color: #061018; }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }

.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 11, 18, 0.7);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(8, 11, 18, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -.01em;
}
.logo .dot { color: var(--cyan); }

.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .92rem;
  color: var(--text-muted);
}
.main-nav a .idx {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--text-faint);
}
.main-nav a:hover { color: var(--text); }
.main-nav .nav-cta {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 9px 20px;
  border-radius: 999px;
}
.main-nav .nav-cta:hover { border-color: var(--cyan); color: var(--cyan); }

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

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}
.lang-btn {
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active {
  background: var(--gradient);
  color: #061018;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

/* ---------- Hero ---------- */
.hero { padding: 100px 0 90px; overflow: hidden; position: relative; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-size: .95rem;
}
.eyebrow .bracket { color: var(--violet); }

.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }

.hero-role {
  font-family: var(--font-head);
  font-weight: 500;
  color: var(--text);
  font-size: 1.1rem;
}
.hero-role .sep { color: var(--cyan); }

.hero-quote {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 24px 0 32px;
  min-height: 84px;
}
.cursor { color: var(--cyan); animation: blink 1s step-start infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }

.hero-socials { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; padding: 0; margin: 0; }
.hero-socials a {
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all .2s ease;
}
.hero-socials a:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: var(--glow-cyan); transform: translateY(-2px); }

.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; }

.avatar-frame { position: relative; width: 320px; height: 320px; display: flex; align-items: center; justify-content: center; }

.avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--gradient);
  filter: blur(28px);
  opacity: .35;
}

.avatar-photo {
  position: relative;
  width: 264px;
  height: 264px;
  border-radius: 50%;
  background: linear-gradient(145deg, #131a2a, #0b0f18);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 2;
}
.avatar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-initials {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 4.4rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.avatar-orbit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  animation: spin 18s linear infinite;
}
.avatar-orbit circle {
  fill: none;
  stroke: var(--cyan);
  stroke-opacity: .35;
  stroke-width: 1;
  stroke-dasharray: 4 10;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: .8rem;
  color: var(--text-muted);
}
.hero-badge .badge-num {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--text);
  font-size: .95rem;
}
.hero-badge-1 { top: 8%; left: -4%; }
.hero-badge-2 { bottom: 10%; right: -6%; }

.scroll-cue {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}
.scroll-cue span {
  width: 26px;
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  position: relative;
  display: block;
}
.scroll-cue span::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  background: var(--cyan);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { top: 8px; opacity: 1; }
  70% { top: 22px; opacity: 0; }
  100% { top: 22px; opacity: 0; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr .9fr;
  gap: 48px;
  margin-top: 32px;
  align-items: start;
}

.about-stats { display: grid; gap: 20px; }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  text-align: center;
  transition: border-color .2s ease, transform .2s ease;
}
.stat-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.stat-number {
  display: block;
  font-family: var(--font-head);
  font-size: 2.1rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label {
  font-size: .88rem;
  color: var(--text-muted);
}

/* ---------- Projects ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 40px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
  position: relative;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-md);
  padding: 1px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity .25s ease;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.project-card:hover { transform: translateY(-6px); background: var(--surface-hover); }
.project-card:hover::before { opacity: 1; }

.project-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--cyan);
}
.project-icon svg { width: 24px; height: 24px; }

.project-role {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--violet);
  font-size: .82rem;
  margin-bottom: 12px;
}

.project-card a { font-weight: 600; font-size: .88rem; font-family: var(--font-mono); }
.project-card a .arrow { transition: transform .2s ease; display: inline-block; }
.project-card a:hover .arrow { transform: translateX(3px); }

/* ---------- Timeline ---------- */
.timeline {
  margin-top: 48px;
  position: relative;
  padding-left: 32px;
  border-left: 1px solid var(--border-strong);
}

.timeline-item { position: relative; padding-bottom: 48px; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -37px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: var(--glow-cyan);
}

.timeline-year {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--cyan);
  margin-bottom: 8px;
  font-size: .95rem;
}
.timeline-year .range { color: var(--text-faint); }

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 28px;
}

/* ---------- Expertise ---------- */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 40px;
}

.expertise-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
}

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

.tag {
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.tag-accent { border-color: rgba(34, 211, 238, 0.4); color: var(--cyan); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.contact-details {
  list-style: none;
  padding: 0;
  margin: 28px 0;
  display: grid;
  gap: 18px;
}
.contact-details li { display: flex; flex-direction: column; gap: 4px; }
.contact-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: .8rem;
  color: var(--violet);
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: .8rem;
  margin-bottom: 8px;
  color: var(--text-muted);
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .95rem;
  background: var(--bg-elev);
  color: var(--text);
  resize: vertical;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--text-faint); }
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

.form-note { margin-top: 12px; font-size: .88rem; text-align: center; min-height: 1.2em; font-family: var(--font-mono); }
.form-note.success { color: var(--cyan); font-weight: 600; }
.form-note.error { color: var(--pink); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer-inner p { margin: 0; color: var(--text-faint); font-size: .85rem; text-align: center; font-family: var(--font-mono); }

/* ---------- Reveal animation ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.js [data-reveal].is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .avatar-orbit, .scroll-cue span::before { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-quote { margin-left: auto; margin-right: auto; text-align: left; }
  .hero-actions, .hero-socials { justify-content: center; }
  .hero-visual { order: -1; margin-bottom: 24px; }
  .about-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .expertise-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .main-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: rgba(8, 11, 18, 0.97);
    backdrop-filter: blur(14px);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 24px 24px;
    gap: 14px;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav .nav-cta { text-align: center; justify-content: center; }
  .nav-toggle { display: flex; }
  .project-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .avatar-frame { width: 240px; height: 240px; }
  .avatar-photo { width: 200px; height: 200px; }
  .avatar-initials { font-size: 3.4rem; }
  .hero-badge { display: none; }
}
