:root {
  --bg: #0a0a0c;
  --bg-soft: #131316;
  --ink: #f5f5f4;
  --muted: #9d9da6;
  --design: #ff4d5e;   /* rdeča — oblikovanje */
  --code: #4d8dff;     /* modra — koda */
  --card-radius: 20px;
  --max-w: 1180px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Sora', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, .nav__logo, .btn, .filter {
  font-family: 'Space Grotesk', sans-serif;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
p { line-height: 1.7; color: var(--muted); }

/* Ambient glows — rdeča za design, modra za code */
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.16;
  z-index: 0;
  pointer-events: none;
}
.glow--design {
  width: 560px; height: 560px;
  background: var(--design);
  top: -180px; left: -160px;
}
.glow--code {
  width: 520px; height: 520px;
  background: var(--code);
  top: 40%; right: -220px;
}

/* Nav */
.nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px clamp(20px, 6vw, 72px);
}
.nav__logo {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.nav__logo .dot { color: var(--design); }
.lang-toggle {
  position: absolute;
  right: clamp(20px, 6vw, 72px);
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: none;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s ease;
}
.lang-toggle:hover { background: rgba(255,255,255,0.08); }

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px clamp(20px, 6vw, 72px);
}
.hero__title {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.9;
  font-style: italic;
}
.hero__line { display: block; }
.hero__line--design {
  font-size: clamp(4rem, 17vw, 13rem);
  background: linear-gradient(105deg, #ff6b79, var(--design) 55%, #d92e3f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: slideRight 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero__line--amp {
  font-size: clamp(2rem, 8.5vw, 6.5rem);
  margin-top: 0.15em;
  background: linear-gradient(105deg, #7aa5ff, var(--code) 55%, #2f6fe0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: slideLeft 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}
@keyframes slideRight {
  from { opacity: 0; transform: translateX(-60px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideLeft {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}
.hero__sub {
  margin: 28px 0 36px;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: var(--muted);
  animation: fadeUp 0.9s ease 0.6s both;
}
.hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.9s ease 0.75s both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn--primary {
  background: linear-gradient(120deg, #ff5f6f, #e02e40);
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(255, 77, 94, 0.45);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 16px 36px -8px rgba(255, 77, 94, 0.55); }
.btn--ghost {
  border-color: rgba(255,255,255,0.2);
  color: var(--ink);
}
.btn--ghost:hover { background: rgba(255,255,255,0.08); transform: translateY(-3px); }
.btn--light {
  background: var(--ink);
  color: var(--bg);
  margin: 24px 0 0;
}
.btn--light:hover { transform: translateY(-3px); }

.scroll-cue {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.scroll-cue span {
  width: 4px; height: 8px;
  background: var(--design);
  border-radius: 2px;
  animation: scrollDown 1.6s ease infinite;
}
@keyframes scrollDown {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(14px); }
}

/* Sections shared */
section {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 100px clamp(20px, 6vw, 72px);
  scroll-margin-top: 90px;
}
.section-head { margin-bottom: 48px; }
.section-tag {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--design);
  margin-bottom: 14px;
}
h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0;
  letter-spacing: -0.02em;
}

/* About */
.about__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
}
.about__text p {
  font-size: 1.05rem;
  margin: 0 0 20px;
}
.tools__title {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.tools__title--design { color: var(--design); }
.tools__title--code { color: var(--code); margin-top: 28px; }
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tools li {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid rgba(255,255,255,0.08);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.tools--design li:hover { border-color: rgba(255, 77, 94, 0.6); transform: translateY(-2px); }
.tools--code li:hover { border-color: rgba(77, 141, 255, 0.6); transform: translateY(-2px); }

/* Projects / gallery — horizontalni drsnik */
.section-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.carousel__btns { display: flex; gap: 10px; }
.carousel__btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: var(--bg-soft);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.carousel__btn:hover { background: rgba(255,255,255,0.1); transform: translateY(-2px); }

.gallery {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 4px;
  padding: 4px 4px 18px;
  margin: -4px;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.tile {
  flex: 0 0 clamp(250px, 30vw, 330px);
  scroll-snap-align: start;
}
.tile__media {
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid rgba(255,255,255,0.06);
}
.tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.tile:hover .tile__media img { transform: scale(1.06); }
.tile__caption { padding: 14px 6px 0; }
.tile__caption h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
}
.tile__caption p {
  margin: 3px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Contact */
.contact { padding-top: 0; padding-bottom: 140px; }
.contact__box {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  background:
    radial-gradient(560px 420px at 0% 100%, rgba(255, 77, 94, 0.2), transparent 62%),
    radial-gradient(560px 420px at 100% 0%, rgba(77, 141, 255, 0.2), transparent 62%),
    var(--bg-soft);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 28px;
  padding: clamp(40px, 6vw, 70px);
}
.contact__box h2 { margin-top: 12px; }
.contact__box p {
  color: var(--muted);
  max-width: 440px;
  margin: 12px 0 0;
  font-size: 1.05rem;
}
.contact__portrait {
  width: clamp(200px, 26vw, 320px);
  flex-shrink: 0;
  align-self: flex-end;
  margin-bottom: calc(-1 * clamp(40px, 6vw, 70px));
  filter: drop-shadow(0 24px 40px rgba(0,0,0,0.55));
}
.socials {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 26px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
}
.socials a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.socials a:hover { color: var(--ink); border-color: var(--ink); }

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 30px 20px 50px;
}
.footer p { font-size: 0.85rem; color: var(--muted); margin: 0; }

/* Gumb na vrh */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(19, 19, 22, 0.85);
  backdrop-filter: blur(10px);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
}
.to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.to-top:hover { background: rgba(255,255,255,0.12); }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 720px) {
  .tile { flex-basis: 74vw; }
  .contact__box { flex-direction: column; align-items: flex-start; }
  .contact__portrait { align-self: center; }
}
