/* základní CSS */
:root {
  --bg: #ffffff;
  --text: #000000;
  --muted: #000000;
  --hairline: rgba(0, 0, 0, 0.12);
  --maxw: 1120px;
  --padx: 28px;
  --pady: 56px;
  --radius: 18px;
  /* ruční posun poznámky/šipek nad fotkou (desktop výchozí) */
  --note-top: 8%;
  --note-right: -6%;
  --note-rotate: -4deg;
  --note-scale: 1;
}

/* box-sizing pro konzistentní výpočty rozložení */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* HTML a body jsou přes celou výšku viewportu */
html,
body {
  height: 100%;
}

/* styl body (odstraní výchozí okraje, nastaví font, pozadí, barvu textu a typografické optimalizace) */
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--muted);
  line-height: 1.30;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* styl obrázků (responsivní šířka, automatická výška a display: block proti nechtěným mezerám) */
img {
  max-width: 150%;
  height: auto;
  display: block;
}

/* styl odkazů (dědí barvu textu a odstraňuje výchozí podtržení) */
a {
  color: inherit;
  text-decoration: none;
}

/* „přeskočit na obsah“ pro přístupnost (zpočátku mimo obrazovku, při focusu se zobrazí) */
.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-160%);
  transition: transform 160ms ease;
  z-index: 50;
}

.skip-link:focus {
  transform: translateY(0);
  outline: none;
}

/* kontejner hlavičky webu (plná šířka) */
.site-header {
  width: 100%;
}

/* vnitřní rozložení hlavičky (centrování a flex pro značku a navigaci) */
.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px var(--padx);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

/* styl loga (tučné, velká písmena, rozestupy mezi písmeny) */
.brand {
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 18px;
}

/* trvalé zvýraznění pouze části jména (např. „Ree“) */
.brand__highlight {
  position: relative;
  display: inline-block;
  z-index: 0;
}

.brand__highlight::after {
  content: "";
  position: absolute;
  left: calc(52%);
  width: max(calc(100% + 12px), 140px);
  top: 50%;
  height: 170%;
  background-image: url("./highlither.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto 100%;
  opacity: 1;
  transform: translate(-50%, -48%) scale(1);
  z-index: -1;
  pointer-events: none;
}

/* varianta, kdy se zvýraznění zobrazí až po najetí (např. na Contacts) */
.brand--hover .brand__highlight::after {
  opacity: 0;
  transform: translate(-50%, -48%) scale(0.95);
  transition: opacity 180ms ease, transform 200ms ease;
}

.brand--hover:hover .brand__highlight::after,
.brand--hover:focus-visible .brand__highlight::after {
  opacity: 1;
  transform: translate(-50%, -48%) scale(1);
}

/* kontejner navigace (vodorovné rozložení přes flex) */
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  letter-spacing: 0.02em;
}

/* navigační odkazy (padding, průhledný spodní border, tlumená barva, přechody) */
.nav__link {
  padding: 6px 6px;
  color: var(--text);
  transition: color 160ms ease;
}

.nav__link:hover {
  color: var(--text);
}

.nav__link[aria-current="page"] {
  color: var(--text);
}

.nav__link:focus-visible {
  outline: 2px solid rgba(47, 143, 162, 0.45);
  outline-offset: 4px;
  border-radius: 6px;
}

.nav__link[aria-disabled="true"] {
  cursor: default;
}

.nav__link--highlight {
  position: relative;
}

.nav__link--highlight::after {
  content: "";
  position: absolute;
  left: 50%;
  width: max(calc(100% + 12px), 140px);
  top: 50%;
  height: 150%;
  background-image: url("./highlither.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto 100%;
  opacity: 0;
  transform: translate(-50%, -40%) scale(0.94);
  transition: opacity 200ms ease, transform 220ms ease;
  z-index: -1;
  pointer-events: none;
}

.nav__link--highlight:hover::after,
.nav__link--highlight:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, -48%) scale(1);
}

/* trvalé zvýraznění (např. pro Contacts) */
.nav__link--highlight.nav__link--static::after {
  opacity: 1;
  transform: translate(-50%, -48%) scale(1);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* kontejner stránky (centrovaný, s max šířkou a paddingem) */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--pady) + 14px) var(--padx) var(--pady);
}

/* specifické rozvržení pro stránku kontaktů (centrování a posun dolů) */
.page--contact {
  display: flex;
  justify-content: center;
  padding: calc(var(--pady) + 100px) var(--padx) var(--pady);
}

/* hero sekce (grid pro text a média, zarovnání na střed) */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(18px, 4vw, 48px);
  min-height: clamp(520px, 68vh, 740px);
  text-align: right;
}

/* kontejner textu v hero (mírný pravý padding na větších obrazovkách) */
.hero__text {
  padding-right: clamp(0px, 2vw, 18px);
  position: relative;
  z-index: 2;
  transform: translateX(-20px);
}

/* „kicker“ v hero (menší nadpis nad hlavním titulkem, tlumená barva, velká písmena) */
.hero__kicker {
  margin: 0 0 18px;
  color: var(--text);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: clamp(28px, 1vw, 64px);
}

/* hlavní titulek v hero (velký, lehčí řez, velká písmena) */
.hero__title {
  margin: 0;
  color: var(--text);
  font-weight: 300;
  letter-spacing: 0.04em;
  font-size: 22px;
  line-height: 1.12;
}

/* kontejner médií v hero (zarovnání obrázku) */
.hero__media {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  z-index: 1;
}

.hero__media::before {
  content: "";
  position: absolute;
  inset: -8% -10%;
  background: url("./background.png") center / 80% auto no-repeat;
  transform: translate(-70px, -70px);
  z-index: -1; /* drží pozadí pod fotkou */
  pointer-events: none;
}

.hero__skills {
  position: absolute;
  top: 14%;
  right: -12%;
  width: clamp(63px, 11.6vw, 116px);
  z-index: 2;
  pointer-events: none;
  transform: translate(5px, -100px) rotate(-2deg);
  isolation: isolate;
}

.hero__skills::after {
  content: "";
  position: absolute;
  inset: -6% -10%;
  background: url("./highlither.png") center / 50% 70% no-repeat;
  z-index: 5;
  pointer-events: none;
  opacity: 0.9;
  mix-blend-mode: multiply;
  transform: translate(20px, 7px);
}

.hero__skills-image {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 2;
}

.hero__skills-arrow {
  position: absolute;
  display: block;
  width: clamp(43px, 8vw, 86px);
  height: auto;
}

.hero__skills-arrow--name { /* šipka k Resources */
  left: calc(-42% - 30px);
  top: calc(22% - 80px);
  transform: rotate(25deg);
}

.hero__skills-arrow--face {
  right: 91%;
  bottom: -70%;
  transform: rotate(-15deg) scaleX(-1);
}

/* obrázek v hero (responsivní šířka, zachovaný poměr stran, stín) */
.hero__image {
  width: min(520px, 42vw);
  margin-left: clamp(-64px, -4vw, -18px);
  max-height: 72vh;
  object-fit: contain;
}

.hero__note {
  position: absolute;
  /* tady ladíš umístění celé „poznámky“ (thatsme + šipky) */
  top: var(--note-top);
  right: var(--note-right);

  display: flex;
  align-items: center;
  gap: clamp(8px, 1.8vw, 16px);

  transform: rotate(var(--note-rotate)) scale(var(--note-scale));

  z-index: 3;
  pointer-events: none;
}

.hero__note img {
  display: block;
}

.hero__note-arrow {
  width: clamp(86px, 12vw, 140px);
  height: auto;
}

.hero__note-arrow--name {
  width: clamp(60px, 8.4vw, 98px);
  transform: translate(-550px, -180px); /* pozice namearrow.jpg */
}

.hero__note-arrow--face {
  width: clamp(43px, 6vw, 70px);
  transform: translate(-570px, -80px); /* pozice facearrow.jpg */
}

.hero__note-text-wrap {
  position: relative;
  display: inline-block;
  width: clamp(92px, 11.9vw, 145px);
  transform: translate(-570px, -120px) rotate(7deg); /* pozice + rotace thatsme.png */
  z-index: 2;
  isolation: isolate;
}

.hero__note-text-wrap::after {
  content: "";
  position: absolute;
  inset: -6% -10%;
  background: url("./highlither.png") center / 45% 100% no-repeat;
  z-index: 5; /* nad obrázkem poznámky */
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.9;
  transform: translateX(50px);
}

.hero__note-text {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  :root {
    --note-top: -6%;
    --note-right: 2%;
    --note-rotate: -3deg;
    --note-scale: 1;
  }
}

@media (max-width: 640px) {
  :root {
    --note-top: -12px;
    --note-right: 6px;
    --note-rotate: -2deg;
    --note-scale: 0.92;
  }

  .hero__note {
    gap: 6px;
  }

  .hero__note-arrow {
    width: clamp(68px, 26vw, 120px);
  }

  .hero__note-arrow--name {
    width: clamp(48px, 18.2vw, 84px);
  }

  .hero__note-arrow--face {
    width: clamp(34px, 13vw, 60px);
  }

  .hero__note-text-wrap {
    width: clamp(61px, 18vw, 95px);
  }
}

/* vnitřní kontejner patičky (centrovaný s paddingem) */
.site-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px var(--padx);
  text-align: center;
}

/* třída pro tlumenou barvu textu */
.muted {
  color: var(--muted);
}

/* media query do 920px (hero do jednoho sloupce, úprava velikosti obrázku, úprava navigace) */
@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    min-height: auto;
    padding-top: 14px;
  }

  .hero__text {
    padding-right: 0;
  }

  .hero__image {
    width: min(560px, 92vw);
    max-height: none;
    margin-left: 0;
  }

  /* schovej ruční poznámku a skills, když se layout skládá na jeden sloupec */
  .hero__note,
  .hero__skills {
    display: none;
  }

  .nav {
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .hero__skills {
    top: -6%;
    right: 4%;
    width: clamp(63px, 19vw, 95px);
    transform: translate(5px, -50px) rotate(5deg);
  }

  .hero__skills::after {
    inset: -10% -12%;
    background-size: 70% 100%;
  }

  .hero__skills-arrow {
    width: clamp(38px, 16vw, 77px);
  }

  .hero__skills-arrow--name {
    left: calc(-32% - 40px);
    top: 18%;
  }

  .hero__skills-arrow--face {
    right: -24%;
    bottom: -2%;
    transform: rotate(135deg) scaleX(-1);
  }
}

/* media query pro preferenci omezeného pohybu (vypne animace a přechody) */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
  }
}


/* CONTACTS PAGE */
.contact {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.contact__kicker {
  margin: 0 0 14px;
  color: var(--text);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 14px;
}

.contact__title {
  margin: 0 0 18px;
  color: var(--text);
  font-weight: 300;
  letter-spacing: 0.04em;
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.12;
}

.contact__lead {
  margin: 0 0 26px;
}

.contact__list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-radius: var(--radius);
  margin-left: auto;
  margin-right: auto;
}

.contact__item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 18px;
  align-items: center;
  justify-content: center;
  justify-items: start;
  text-align: left;
}


.contact__label {
  color: rgba(23, 23, 23, 0.74);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
  z-index: 0;
}

.contact__label::after {
  content: "";
  position: absolute;
  left: 50%;
  width: max(calc(100% + 12px), 140px);
  top: 50%;
  height: 150%;
  background-image: url("./highlither.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto 100%;
  opacity: 1;
  transform: translate(-50%, -48%) scale(1.5);
  z-index: -1;
  pointer-events: none;
}

.contact__value {
  color: var(--text);
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  justify-content: flex-start;
}

.contact__value a {
  color: inherit;
  transition: color 160ms ease;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.contact__value a:hover {
  color: var(--text);
}

.contact__value a:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.45);
  outline-offset: 4px;
  border-radius: 6px;
}

@media (max-width: 560px) {
  .contact__item {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 8px;
  }
  .contact__label {
    margin-bottom: 2px;
  }
}
