/* ============================================================
   Jan Smitka — personal site
   Dark theme · turquoise accent · Space Grotesk / Inter
   ============================================================ */

:root {
  --bg: #0b0f14;
  --bg-soft: #0e151d;
  --card: #101923;
  --ink: #e7edf3;
  --muted: #8b98a5;
  --accent: #3ddad0;
  --accent-dim: rgba(61, 218, 208, 0.12);
  --line: rgba(231, 237, 243, 0.08);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --pad-x: clamp(1.25rem, 5vw, 6rem);
}

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

html { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* film grain */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  pointer-events: none;
  z-index: 999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--accent); color: var(--bg); }

a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.05; }
em { font-style: normal; color: var(--accent); }
.accent { color: var(--accent); }

/* ============ chrome: progress bar, cursor, nav ============ */

.progress-bar {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--accent), #7ae8ff);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 200;
}

.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  margin: -18px 0 0 -18px;
  border: 1px solid rgba(61, 218, 208, 0.55);
  border-radius: 50%;
  pointer-events: none;
  z-index: 300;
  opacity: 0;
  transition: width 0.25s, height 0.25s, margin 0.25s, opacity 0.3s;
}
.cursor-ring.is-active {
  width: 64px; height: 64px;
  margin: -32px 0 0 -32px;
  background: rgba(61, 218, 208, 0.08);
}
@media (hover: none), (pointer: coarse) {
  .cursor-ring { display: none; }
}

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--pad-x);
  z-index: 100;
  background: linear-gradient(to bottom, rgba(11, 15, 20, 0.85), rgba(11, 15, 20, 0));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav--hidden { transform: translateY(-110%); }

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.25s;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-cta {
  color: var(--accent) !important;
  border: 1px solid rgba(61, 218, 208, 0.4);
  padding: 0.45rem 1.1rem;
  border-radius: 99px;
  transition: background 0.25s, color 0.25s !important;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--accent); color: var(--bg) !important; }

@media (max-width: 640px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ============ hero ============ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7rem var(--pad-x) 4rem;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; z-index: -1; }

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 30%, transparent 75%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}
.orb-a {
  width: 480px; height: 480px;
  background: rgba(61, 218, 208, 0.14);
  top: -10%; right: -5%;
}
.orb-b {
  width: 380px; height: 380px;
  background: rgba(45, 108, 223, 0.12);
  bottom: -15%; left: -8%;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.pulse-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(61, 218, 208, 0.6);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 218, 208, 0.55); }
  70% { box-shadow: 0 0 0 12px rgba(61, 218, 208, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 218, 208, 0); }
}

.hero-title {
  font-size: clamp(3.5rem, 11vw, 8.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }

.hero-role {
  max-width: 34rem;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.9rem 2rem;
  border-radius: 99px;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
  will-change: transform;
}
.btn-solid { background: var(--accent); color: var(--bg); }
.btn-solid:hover { background: #5ce8df; }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* photo */
.hero-photo { position: relative; justify-self: center; }

.photo-frame {
  position: relative;
  width: clamp(240px, 26vw, 360px);
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
  clip-path: inset(0 0 0 0);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px var(--line);
}
.photo-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.photo-monogram {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 700;
  color: var(--accent);
  background:
    radial-gradient(circle at 30% 25%, rgba(61, 218, 208, 0.25), transparent 55%),
    radial-gradient(circle at 75% 80%, rgba(45, 108, 223, 0.3), transparent 55%),
    var(--card);
}
.no-photo img { display: none; }
.no-photo .photo-monogram { display: grid; }

.photo-caption {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-scroll {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}
.scroll-track {
  width: 1px; height: 52px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.scroll-thumb {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 40%;
  background: var(--accent);
  animation: scrollThumb 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes scrollThumb {
  0% { transform: translateY(-110%); }
  60%, 100% { transform: translateY(260%); }
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-photo { grid-row: 1; margin-bottom: 1rem; }
  .photo-frame { width: clamp(200px, 48vw, 280px); }
  .hero { padding-top: 6rem; }
}

/* ============ marquee ============ */

.marquee {
  border-block: 1px solid var(--line);
  padding: 1.4rem 0;
  overflow: hidden;
  background: var(--bg-soft);
}
.marquee-inner {
  display: flex;
  width: max-content;
  will-change: transform;
}
.marquee-part {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding-right: 2.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  font-weight: 500;
  white-space: nowrap;
  color: var(--muted);
}
.marquee-part i { font-style: normal; color: var(--accent); font-size: 0.6em; }

/* ============ shared section bits ============ */

.section {
  padding: clamp(6rem, 12vh, 9rem) var(--pad-x);
  max-width: 1280px;
  margin: 0 auto;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 6vh, 4rem);
}
.section-num {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.section-head h2 {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

/* ============ about ============ */

.about-text {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.3rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  max-width: 60rem;
}
.about-text .hl { color: var(--accent); }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-top: clamp(3rem, 7vh, 5rem);
}
.stat {
  background: var(--bg);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* ============ experience / timeline ============ */

.timeline { position: relative; padding-left: 2.5rem; }

.timeline-line {
  position: absolute;
  top: 0; bottom: 0; left: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), rgba(61, 218, 208, 0.15));
}

.tl-item { position: relative; padding-bottom: clamp(2.5rem, 6vh, 4rem); }
.tl-item:last-child { padding-bottom: 0; }

.tl-dot {
  position: absolute;
  left: calc(-2.5rem + 3px);
  top: 0.55rem;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.tl-item--legal .tl-dot { border-color: var(--muted); }

.tl-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  max-width: 46rem;
  transition: border-color 0.3s, transform 0.3s;
}
.tl-card:hover { border-color: rgba(61, 218, 208, 0.35); transform: translateY(-3px); }

.tl-date {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.tl-item--legal .tl-date { color: var(--muted); }

.tl-card h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin: 0.5rem 0 0.2rem; }
.tl-company { color: var(--muted); font-size: 0.92rem; margin-bottom: 0.9rem; }
.tl-card > p:not(.tl-company) { color: var(--muted); font-size: 0.95rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.1rem; }
.chips span {
  font-size: 0.75rem;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(61, 218, 208, 0.2);
}
.tl-item--legal .chips span {
  background: rgba(139, 152, 165, 0.1);
  color: var(--muted);
  border-color: rgba(139, 152, 165, 0.25);
}

/* ============ projects (horizontal) ============ */

.projects {
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}

.projects-track {
  display: flex;
  align-items: center;
  height: 100vh;
  width: max-content;
  padding: 0 var(--pad-x);
  gap: clamp(2rem, 4vw, 4rem);
  will-change: transform;
}

.project-intro { width: min(38rem, 38vw); flex-shrink: 0; }
.project-intro p { color: var(--muted); font-size: 1.1rem; margin-top: 0.5rem; }
.project-intro .section-head { margin-bottom: 1.5rem; }
.drag-hint {
  display: inline-block;
  margin-top: 2.5rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-card {
  position: relative;
  width: min(44rem, 62vw);
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(2rem, 4vw, 3.5rem);
  overflow: hidden;
  transition: border-color 0.3s;
}
.project-card:hover { border-color: rgba(61, 218, 208, 0.35); }

/* linked cards (e.g. Kam Večer → App Store) */
.project-card--link { display: block; cursor: pointer; }
.project-arrow {
  position: absolute;
  right: 1.6rem;
  bottom: 1.3rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--muted);
  transition: color 0.3s, transform 0.3s;
}
.project-card--link:hover .project-arrow {
  color: var(--accent);
  transform: translate(4px, -4px);
}

.project-index {
  position: absolute;
  top: 0.5rem; right: 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(5rem, 10vw, 8rem);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px rgba(231, 237, 243, 0.12);
  line-height: 1;
  pointer-events: none;
}

.project-top {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 1.4rem;
}

.project-icon {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 22%;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--line);
}
.project-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.icon-fallback {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  background:
    radial-gradient(circle at 30% 25%, rgba(61, 218, 208, 0.28), transparent 60%),
    radial-gradient(circle at 75% 80%, rgba(45, 108, 223, 0.3), transparent 60%),
    var(--bg-soft);
}
.project-icon.no-icon img { display: none; }
.project-icon.no-icon .icon-fallback { display: grid; }

.project-status {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 99px;
  margin-bottom: 1.25rem;
}
.project-top .project-status { margin-bottom: 0; }
.status-live { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(61, 218, 208, 0.3); }
.status-shipped { background: rgba(122, 232, 143, 0.1); color: #7ae88f; border: 1px solid rgba(122, 232, 143, 0.25); }
.status-retired { background: rgba(139, 152, 165, 0.12); color: var(--muted); border: 1px solid rgba(139, 152, 165, 0.25); }

.project-card h3 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 1rem; }
.project-card p { color: var(--muted); max-width: 34rem; }

/* ultra-wide screens: the whole rail fits — center it, no scroll hint */
.projects--static .projects-track { margin-inline: auto; }
.projects--static .drag-hint { visibility: hidden; }

@media (max-width: 767px) {
  .projects-track {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    width: auto;
    padding: clamp(5rem, 10vh, 7rem) var(--pad-x);
  }
  .project-intro { width: auto; }
  .project-card { width: auto; }
  .drag-hint { display: none; }
}

/* ============ education ============ */

.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}
.edu-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  transition: border-color 0.3s, transform 0.3s;
}
.edu-card:hover { border-color: rgba(61, 218, 208, 0.35); transform: translateY(-4px); }
.edu-year {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.edu-card h3 { font-size: 1.4rem; margin: 0.6rem 0 0.15rem; }
.edu-school { color: var(--ink); font-size: 0.92rem; margin-bottom: 0.6rem; }
.edu-card > p:last-child { color: var(--muted); font-size: 0.9rem; }

/* ============ contact ============ */

.contact { text-align: left; padding-bottom: 3rem; }

.contact-title {
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  letter-spacing: -0.02em;
  max-width: 20ch;
  margin-bottom: 1.5rem;
}
.contact-title .word { display: inline-block; }

.contact-sub { color: var(--muted); font-size: 1.1rem; margin-bottom: 3rem; }

.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.6vw, 1.8rem);
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  padding: 1.1rem 2.4rem;
  border-radius: 99px;
  transition: background 0.3s;
  will-change: transform;
}
.contact-email:hover { background: #5ce8df; }

.contact-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  color: var(--muted);
}
.contact-links a { transition: color 0.25s; }
.contact-links a:hover { color: var(--accent); }
.dot-sep { color: var(--line); }

.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: clamp(4rem, 10vh, 7rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}

/* ============ reduced motion ============ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
