/* ===========================================================
   Jiří Oláh — osobní web / personal site
   =========================================================== */

:root{
  --blue:        #2563eb;
  --blue-light:  #3b82f6;
  --blue-soft:   #eff4ff;

  --dark:        #080b12;
  --dark-2:      #0d121d;
  --dark-3:      #111827;

  --ink:         #0f172a;
  --ink-2:       #334155;
  --muted:       #64748b;
  --line:        #e2e8f0;
  --bg:          #ffffff;
  --bg-alt:      #f8fafc;

  --radius:      14px;
  --radius-lg:   20px;
  --shadow:      0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  --shadow-lg:   0 24px 60px rgba(2,6,23,.55);
  --wrap:        1160px;
}

*,*::before,*::after{ box-sizing:border-box; }

html{ scroll-behavior:smooth; scroll-padding-top:88px; }

body{
  margin:0;
  font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  color:var(--ink);
  background:var(--bg);
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul,ol{ margin:0; padding:0; list-style:none; }
h1,h2,h3{ margin:0; line-height:1.2; letter-spacing:-.02em; }
p{ margin:0 0 14px; }

.container{ width:100%; max-width:var(--wrap); margin-inline:auto; padding-inline:24px; }

/* stroked icons */
.ico{
  width:18px; height:18px; flex:none;
  fill:none; stroke:currentColor; stroke-width:1.8;
  stroke-linecap:round; stroke-linejoin:round;
}
.ico-f{ width:16px; height:16px; flex:none; fill:currentColor; }

/* ===================== HEADER ===================== */
.site-header{
  position:fixed; inset:0 0 auto 0; z-index:60;
  transition:background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom:1px solid transparent;
}
.site-header.scrolled{
  background:rgba(8,11,18,.82);
  backdrop-filter:blur(14px);
  border-bottom-color:rgba(255,255,255,.08);
}
.header-inner{
  display:flex; align-items:center; gap:24px;
  height:78px;
}
.brand{ display:flex; align-items:center; gap:12px; color:#fff; }
.brand-mark{
  display:grid; place-items:center;
  width:38px; height:38px; border-radius:11px;
  border:1.5px solid rgba(255,255,255,.35);
  font-weight:700; font-size:14px; letter-spacing:.02em;
}
.brand-name{ font-weight:600; font-size:15.5px; }

.nav{ display:flex; gap:28px; margin-inline:auto; }
.nav a{
  color:rgba(255,255,255,.72);
  font-size:14.5px; font-weight:500;
  transition:color .2s;
}
.nav a:hover, .nav a.active{ color:#fff; }

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

.lang-switch{
  display:flex; padding:3px; gap:2px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:999px;
}
.lang-switch button{
  border:0; background:transparent; cursor:pointer;
  color:rgba(255,255,255,.6);
  font:600 12px/1 "Inter",sans-serif; letter-spacing:.04em;
  padding:7px 11px; border-radius:999px;
  transition:background .2s, color .2s;
}
.lang-switch button:hover{ color:#fff; }
.lang-switch button.is-active{ background:#fff; color:var(--dark); }

/* ===================== BUTTONS ===================== */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:9px;
  padding:13px 22px; border-radius:11px;
  font-size:14.5px; font-weight:600; letter-spacing:-.01em;
  border:1px solid transparent; cursor:pointer;
  transition:transform .18s, background .2s, border-color .2s, box-shadow .2s, color .2s;
}
.btn:hover{ transform:translateY(-2px); }
.btn-primary{ background:var(--blue); color:#fff; box-shadow:0 10px 26px rgba(37,99,235,.35); }
.btn-primary:hover{ background:#1d4ed8; }
.btn-outline{ background:transparent; color:#fff; border-color:rgba(255,255,255,.28); }
.btn-outline:hover{ background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.5); }
.btn-ghost{ background:transparent; color:#fff; border-color:rgba(255,255,255,.28); padding:11px 18px; }
.btn-ghost:hover{ background:rgba(255,255,255,.08); }
.btn-light{
  background:#fff; color:var(--ink-2);
  border-color:var(--line); padding:10px 18px; font-size:13.5px;
}
.btn-light:hover{ border-color:#c7d2e1; box-shadow:var(--shadow); }
.btn.full{ width:100%; margin-top:6px; }

/* ===================== HERO ===================== */
.hero{
  position:relative; overflow:hidden;
  background:var(--dark); color:#fff;
  padding:170px 0 96px;
}
/* padající znaky na pozadí hero — laděné do modré palety webu, ne do zelené */
.hero-matrix{
  position:absolute; inset:0; z-index:0;
  pointer-events:none;
  opacity:.42;
  /* nahoře i dole se déšť rozplyne, ať nekončí ostrým řezem na hraně sekce */
  -webkit-mask-image:linear-gradient(to bottom, transparent 0%, #000 18%, #000 62%, transparent 96%);
          mask-image:linear-gradient(to bottom, transparent 0%, #000 18%, #000 62%, transparent 96%);
}

.hero-glow{
  position:absolute; inset:0; pointer-events:none;
  background:
    radial-gradient(760px 460px at 78% 34%, rgba(37,99,235,.28), transparent 62%),
    radial-gradient(620px 420px at 8% 8%,  rgba(59,130,246,.14), transparent 60%);
}
.hero-inner{
  position:relative; z-index:1;
  display:grid; grid-template-columns:1fr 1fr; gap:64px; align-items:center;
}

.eyebrow{
  color:var(--blue-light);
  font-family:"JetBrains Mono","Courier New",monospace;
  font-size:12.5px; font-weight:600;
  letter-spacing:.18em; text-transform:uppercase;
  margin:0 0 14px;
}

/* terminálová výzva — přes ::before, aby ji psací stroj nerozsekal na znaky */
.eyebrow::before{
  content:">";
  margin-right:9px;
  color:var(--blue);
  font-weight:700;
}
.hero-name{
  font-size:clamp(48px,6.4vw,84px); font-weight:800;
  letter-spacing:-.035em; margin-bottom:10px;
}
.hero-role{
  color:var(--blue-light);
  font-size:clamp(20px,2.2vw,27px); font-weight:700;
  letter-spacing:-.02em; margin:0 0 22px;
}
.hero-text{
  color:rgba(255,255,255,.7);
  font-size:16px; max-width:46ch; margin-bottom:32px;
}
/* psaní hero textu — znaky jsou v DOM od začátku, jen se odkrývají,
   takže se během animace nic nepřelévá */
.tw-ch{ visibility:hidden; }
.tw-ch.on{ visibility:visible; }

/* podtržítko místo bloku, ať to sedí k výzvě ">" */
.tw-cursor{
  display:inline-block;
  width:.62em; height:.1em; min-height:2px;
  background:var(--blue-light);
  vertical-align:baseline; margin-left:4px; border-radius:1px;
  animation:tw-blink 1.05s steps(1) infinite;
}
@keyframes tw-blink{ 0%,50%{ opacity:1; } 50.01%,100%{ opacity:0; } }

.hero-btns{ display:flex; flex-wrap:wrap; gap:14px; margin-bottom:34px; }

.hero-socials{ display:flex; gap:12px; }
.hero-socials a{
  display:grid; place-items:center;
  width:42px; height:42px; border-radius:50%;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  color:rgba(255,255,255,.8);
  transition:background .2s, color .2s, transform .2s;
}
.hero-socials a:hover{ background:var(--blue); color:#fff; border-color:transparent; transform:translateY(-2px); }

/* photo */
.hero-photo{ position:relative; }
/* fotka bez rámu — výřez splývá s pozadím hero sekce */
.photo-frame{ position:relative; display:grid; place-items:end center; }

/* měkká záře za postavou */
.photo-frame::before{
  content:""; position:absolute; z-index:0;
  left:50%; top:46%; translate:-50% -50%;
  width:104%; aspect-ratio:1/1; border-radius:50%;
  background:radial-gradient(circle, rgba(37,99,235,.42), rgba(37,99,235,.10) 52%, transparent 70%);
  filter:blur(18px);
}

.photo-frame img{
  position:relative; z-index:1;
  width:100%; max-width:520px; height:auto;
  /* spodek fotky se rozplyne do pozadí */
  -webkit-mask-image:linear-gradient(to bottom, #000 66%, rgba(0,0,0,.55) 86%, transparent 100%);
          mask-image:linear-gradient(to bottom, #000 66%, rgba(0,0,0,.55) 86%, transparent 100%);
  filter:drop-shadow(0 26px 46px rgba(2,6,23,.62));
}
.photo-frame img.hidden{ display:none; }

.photo-fallback{
  position:relative; z-index:1; display:none;
  width:100%; aspect-ratio:1/1; place-items:center;
}
.photo-fallback.show{ display:grid; }
.photo-fallback span{
  font-size:112px; font-weight:800; letter-spacing:-.04em;
  color:rgba(255,255,255,.92);
  text-shadow:0 8px 44px rgba(37,99,235,.65);
}

.hero-stats{
  display:grid; grid-template-columns:repeat(3,1fr); gap:8px;
  margin-top:14px; padding:18px 20px;
  border-radius:var(--radius);
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.1);
  backdrop-filter:blur(8px);
}
.stat{ display:flex; align-items:center; gap:11px; color:rgba(255,255,255,.55); }
.stat strong{ display:block; color:#fff; font-size:13.5px; font-weight:600; line-height:1.35; }
.stat .stat-sub{ display:block; color:rgba(255,255,255,.72); font-size:12px; line-height:1.35; }
.stat small{ display:block; font-size:11.5px; margin-top:1px; }
.dot{
  width:9px; height:9px; flex:none; border-radius:50%;
  background:#22c55e; box-shadow:0 0 0 4px rgba(34,197,94,.2);
}

/* ===================== TECHNOLOGIE (marquee) ===================== */
.tech-strip{
  background:var(--dark);
  border-top:1px solid rgba(255,255,255,.07);
  padding:22px 0 24px;
}

.tech-label{
  margin:0 0 16px;
  text-align:center;
  color:rgba(255,255,255,.38);
  font-size:11px; font-weight:600;
  letter-spacing:.2em; text-transform:uppercase;
}

.tech-marquee{
  overflow:hidden;
  /* okraje se rozplynou, pás tak nikde nezačíná ani nekončí ostře */
  -webkit-mask-image:linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image:linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

/* Seznam je v HTML dvakrát za sebou; posun o -50 % tak nikdy neukáže mezeru. */
.tech-track{
  display:flex; align-items:center; gap:54px;
  width:max-content;
  animation:tech-scroll 42s linear infinite;
}
.tech-marquee:hover .tech-track{ animation-play-state:paused; }

@keyframes tech-scroll{
  from{ transform:translateX(0); }
  to  { transform:translateX(-50%); }
}

.tech-item{
  display:flex; align-items:center; gap:10px;
  color:rgba(255,255,255,.5);
  transition:color .25s;
}
.tech-item:hover{ color:#fff; }
.tech-item svg{ width:25px; height:25px; flex:none; fill:currentColor; }
.tech-item span{ font-size:13.5px; font-weight:500; white-space:nowrap; letter-spacing:-.01em; }

@media (max-width:620px){
  .tech-track{ gap:38px; animation-duration:32s; }
  .tech-item svg{ width:22px; height:22px; }
}

/* ===================== SECTIONS ===================== */
.section{ padding:84px 0; border-top:1px solid var(--line); }
.section-alt{ background:var(--bg-alt); }

.grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:72px; align-items:start; }
.grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:56px; align-items:start; }

.h-sec{
  display:flex; align-items:center; gap:11px;
  font-size:25px; font-weight:700; margin-bottom:26px;
}
.h-ico{ width:23px; height:23px; color:var(--blue); stroke-width:1.7; }
.h-mini{ font-size:15px; font-weight:700; margin:28px 0 12px; }

.section p{ color:var(--ink-2); font-size:15px; }

.quote{
  margin-top:22px; padding-left:16px;
  border-left:3px solid var(--blue);
  font-style:italic; color:var(--ink) !important; font-weight:500;
}

.sec-head{ display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; }
.sec-head .h-sec{ margin-bottom:0; }
.link-more{
  display:inline-flex; align-items:center; gap:7px;
  color:var(--blue); font-size:14px; font-weight:600;
}
.link-more:hover{ text-decoration:underline; }

/* ===== what I do cards ===== */
.cards{ display:grid; grid-template-columns:1fr 1fr; gap:14px 22px; }
.card-mini{ display:flex; gap:13px; align-items:flex-start; }
.card-mini .ci{
  display:grid; place-items:center; flex:none;
  width:38px; height:38px; border-radius:11px;
  background:var(--blue-soft); color:var(--blue);
  transition:background .2s, color .2s;
}
.card-mini:hover .ci{ background:var(--blue); color:#fff; }
.card-mini strong{ display:block; font-size:14.5px; font-weight:600; line-height:1.4; }
.card-mini small{ color:var(--muted); font-size:12.5px; }

/* ===== timeline ===== */
.timeline{ position:relative; padding-left:22px; }
.timeline::before{
  content:""; position:absolute; left:4px; top:6px; bottom:6px;
  width:2px; background:var(--line);
}
.timeline li{ position:relative; display:grid; grid-template-columns:132px 1fr; gap:18px; padding-bottom:26px; }
.timeline li::before{
  content:""; position:absolute; left:-22px; top:7px;
  width:10px; height:10px; border-radius:50%;
  background:var(--blue); box-shadow:0 0 0 3px var(--bg-alt);
}
.timeline.slim{ padding-left:22px; }
.timeline.slim li{ grid-template-columns:1fr; gap:2px; }
.tl-date{ color:var(--blue); font-size:12.5px; font-weight:600; padding-top:2px; }
.tl-date.inline{ display:block; margin-bottom:2px; }
.tl-body h3{ font-size:15px; font-weight:700; margin-bottom:5px; }
.tl-body .sep{ color:var(--muted); font-weight:400; margin:0 3px; }
.tl-body p{ font-size:13.5px; color:var(--muted); margin:0; }
.timeline li[hidden]{ display:none; }

/* ===== skill bars ===== */
.bars{ display:grid; gap:16px; }
.bar{ display:grid; grid-template-columns:1fr auto; align-items:center; row-gap:7px; }
.bar span{ font-size:13.5px; font-weight:500; color:var(--ink-2); }
.bar i{ font-style:normal; font-size:12.5px; color:var(--muted); }
.track{
  grid-column:1/-1; height:5px; border-radius:99px;
  background:var(--line); overflow:hidden;
}
.fill{
  width:0; height:100%; border-radius:99px;
  background:linear-gradient(90deg,var(--blue),var(--blue-light));
  transition:width 1.1s cubic-bezier(.22,1,.36,1);
}

.tags{ display:flex; flex-wrap:wrap; gap:8px; margin-top:28px; }
.tags span{
  padding:6px 12px; border-radius:999px;
  background:#fff; border:1px solid var(--line);
  font-size:12.5px; font-weight:500; color:var(--ink-2);
}

/* ===== projects ===== */
.proj-grid{
  display:grid; gap:24px; margin-top:34px;
  grid-template-columns:repeat(auto-fit,minmax(255px,1fr));
}
.proj{
  display:block;
  padding:26px; border-radius:var(--radius);
  border:1px solid var(--line); background:#fff;
  transition:transform .22s, box-shadow .22s, border-color .22s;
}
.proj:hover{ transform:translateY(-4px); box-shadow:var(--shadow); border-color:#cfe0ff; }
.proj-ico{
  display:grid; place-items:center;
  width:44px; height:44px; border-radius:12px; margin-bottom:16px;
  background:var(--blue-soft); color:var(--blue);
}
.proj-ico .ico{ width:22px; height:22px; }
.proj h3{ font-size:16px; font-weight:700; margin-bottom:9px; }
.proj p{ font-size:13.5px; color:var(--muted); }
.proj-tags{ display:flex; flex-wrap:wrap; gap:7px; margin-top:16px; }
.proj-tags span{
  padding:4px 10px; border-radius:6px;
  background:var(--blue-soft); color:var(--blue);
  font-size:11.5px; font-weight:600;
}

/* ===== lists ===== */
.checks li{
  position:relative; padding-left:26px; margin-bottom:14px;
  font-size:14px; color:var(--ink-2);
}
.checks li::before{
  content:""; position:absolute; left:0; top:6px;
  width:15px; height:15px; border-radius:50%;
  background:var(--blue-soft);
  border:1.5px solid var(--blue);
}
.checks li strong{ display:block; font-size:14px; font-weight:600; color:var(--ink); }
.checks li small{ color:var(--muted); font-size:12.5px; }

.contact-list li{
  display:flex; align-items:center; gap:12px;
  margin-bottom:15px; font-size:14px; color:var(--ink-2);
}
.contact-list .ico,.contact-list .ico-f{ color:var(--blue); }
.contact-list a{ transition:color .2s; word-break:break-all; }
.contact-list a:hover{ color:var(--blue); }

/* ===================== FOOTER ===================== */
.site-footer{ background:var(--dark); color:rgba(255,255,255,.55); padding:26px 0; }
.footer-inner{ display:flex; align-items:center; justify-content:space-between; gap:20px; }
.site-footer p{ margin:0; font-size:13.5px; }
.to-top{
  display:grid; place-items:center;
  width:38px; height:38px; border-radius:10px;
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.12);
  color:#fff; transition:background .2s, transform .2s;
}
.to-top:hover{ background:var(--blue); transform:translateY(-2px); }

/* ===================== ANIMATION ===================== */
.reveal{ opacity:0; transform:translateY(22px); transition:opacity .6s ease, transform .6s ease; }
.reveal.in{ opacity:1; transform:none; }

/* ===================== MOBILE NAV ===================== */
.nav-toggle{
  display:none; flex-direction:column; gap:5px;
  width:42px; height:42px; align-items:center; justify-content:center;
  background:transparent; border:1px solid rgba(255,255,255,.2);
  border-radius:10px; cursor:pointer;
}
.nav-toggle span{ display:block; width:17px; height:2px; background:#fff; border-radius:2px; transition:transform .25s, opacity .2s; }
.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); }

/* ===================== RESPONSIVE ===================== */
@media (max-width:1080px){
  .grid-3{ grid-template-columns:1fr 1fr; gap:44px; }
  .grid-3 > :last-child{ grid-column:1/-1; max-width:520px; }
}

@media (max-width:960px){
  .nav{
    position:absolute; top:78px; left:0; right:0;
    flex-direction:column; gap:0; margin:0;
    background:rgba(8,11,18,.97); backdrop-filter:blur(14px);
    border-bottom:1px solid rgba(255,255,255,.1);
    max-height:0; overflow:hidden; transition:max-height .3s ease;
  }
  .nav.open{ max-height:340px; }
  .nav a{ padding:14px 24px; border-top:1px solid rgba(255,255,255,.06); }
  .nav-toggle{ display:flex; }
  .btn-cv{ display:none; }
  .site-header{ background:rgba(8,11,18,.82); backdrop-filter:blur(14px); }

  .hero{ padding:130px 0 72px; }
  .hero-inner{ grid-template-columns:1fr; gap:44px; }
  .hero-photo{ order:-1; max-width:460px; }
  .grid-2{ grid-template-columns:1fr; gap:52px; }
  .section{ padding:64px 0; }
}

@media (max-width:620px){
  .container{ padding-inline:18px; }
  .cards{ grid-template-columns:1fr; }
  .hero-stats{ grid-template-columns:1fr; gap:14px; }
  .timeline li{ grid-template-columns:1fr; gap:4px; }
  .grid-3{ grid-template-columns:1fr; }
  .grid-3 > :last-child{ grid-column:auto; }
  .footer-inner{ flex-direction:column; gap:12px; text-align:center; }
  .hero-btns .btn{ flex:1 1 100%; }
}

@media (prefers-reduced-motion:reduce){
  *{ animation:none !important; transition:none !important; }
  html{ scroll-behavior:auto; }
  .reveal{ opacity:1; transform:none; }
  /* bez animace by se zobrazila jen první polovina zdvojeného seznamu */
  .tech-marquee{ overflow-x:auto; }
  .hero-matrix{ display:none; }
}
