/* Lični portfolio — tamna paleta i MR vizuelni identitet */
:root {
  /* Boje */
  --bg: #060807;
  --bg-alt: #0a0d0b;
  --surface: #0f1311;
  --surface-2: #141a17;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f2f5f3;
  --muted: #9aa8a0;
  --accent: #6ef08c;
  --accent-strong: #46e070;
  --accent-dim: rgba(110, 240, 140, 0.12);
  --accent-glow: rgba(110, 240, 140, 0.35);
  --on-accent: #05130a;

  /* Tipografija */
  --font-display: system-ui, sans-serif;
  --font-body: system-ui, sans-serif;

  /* Ritam */
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1200px;
  --section-y: clamp(72px, 10vw, 140px);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============ Reset ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============ Layout ============ */
.container {
  width: min(var(--container), 100% - 48px);
  margin-inline: auto;
}

.section { padding-block: var(--section-y); position: relative; }
.section--alt { background: var(--bg-alt); }

.section__head { max-width: 680px; margin-bottom: clamp(40px, 6vw, 72px); }

.section__eyebrow {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section__eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.section__sub {
  color: var(--muted);
  margin-top: 16px;
  font-size: 1.05rem;
  max-width: 56ch;
}

/* ============ Dugmad ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 30px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  transition: transform 0.2s var(--ease-out), box-shadow 0.25s, background 0.25s, border-color 0.25s;
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 0 0 rgba(110, 240, 140, 0);
}
.btn--primary:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn--ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}


.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
}
.nav__logo-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid rgba(110, 240, 140, 0.45);
  box-shadow: 0 0 24px rgba(110, 240, 140, 0.2);
}
.nav__logo-text { font-weight: 600; font-size: 1.02rem; letter-spacing: 0.01em; }

.nav__links { display: flex; gap: 32px; }
.nav__links a {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
  position: relative;
  padding: 6px 0;
}
.nav__links a:hover { color: var(--text); }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease-out);
}
.nav__links a:hover::after { transform: scaleX(1); }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.03);
}
.lang-switch__btn {
  min-width: 44px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}
.lang-switch__btn.is-active { background: var(--accent); color: var(--on-accent); }
.lang-switch__btn:not(.is-active):hover { color: var(--text); }

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: min(790px, 88svh);
  display: flex;
  align-items: center;
  padding-top: clamp(76px, 10vw, 126px);
  padding-bottom: clamp(76px, 10vw, 126px);
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(110, 240, 140, 0.13) 0%, rgba(110, 240, 140, 0.04) 40%, transparent 70%);
  pointer-events: none;
}

.hero__inner { position: relative; z-index: 1; text-align: center; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 32px;
}

.hero__eyebrow {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.45rem, 9.6vw, 8.2rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.hero__title-line { display: block; }
.hero__title-line--accent {
  color: var(--accent);
  text-shadow: 0 0 60px rgba(110, 240, 140, 0.4);
}

.hero__sub {
  max-width: 560px;
  margin: 0 auto 40px;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
}

.hero__cta {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.about__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}

.about__photo { position: relative; }

.about__photo-frame {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(120% 120% at 30% 15%, rgba(110, 240, 140, 0.12) 0%, transparent 50%),
    linear-gradient(165deg, #14301f 0%, #0a1410 55%, #060807 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.about__photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__photo-card {
  position: absolute;
  left: 18px;
  bottom: 18px;
  right: 18px;
  padding: 14px 20px;
  border-radius: 12px;
  background: rgba(10, 13, 11, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong);
}
.about__photo-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.02rem;
}
.about__photo-card span { color: var(--accent); font-size: 0.83rem; }

.about__para {
  color: var(--muted);
  margin-top: 18px;
  max-width: 56ch;
}

.work__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.work-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.35s var(--ease-out), border-color 0.3s, box-shadow 0.35s;
}
.work-card:hover {
  transform: translateY(-6px);
  border-color: rgba(110, 240, 140, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.work-card__thumb {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  min-height: 175px;
  padding: 15px clamp(16px, 3vw, 34px);
  overflow: hidden;
}
.work-card__thumb--1 { background: radial-gradient(120% 140% at 20% 10%, #14301f 0%, #0a1410 55%, #060807 100%); }
.work-card__thumb--alina { background: radial-gradient(ellipse at 25% 15%, #503143, #22141d 65%, #100c10); }
.work-card__thumb--alina .mock-logo { color: #f6d5e0; }
.work-card__thumb--statlas { background: radial-gradient(ellipse at 70% 20%, #263960, #161d33 65%, #0c101b); }
.work-card__thumb--statlas .mock-logo { color: #bbd5ff; }

.mock-browser {
  width: 100%;
  max-width: 460px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 13, 11, 0.85);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s var(--ease-out);
}
.work-card:hover .mock-browser { transform: translateY(-6px) scale(1.02); }

.mock-browser__bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mock-browser__bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.mock-browser__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 106px;
  padding: 18px 10px;
  text-align: center;
}
.mock-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.5rem);
  letter-spacing: 0.16em;
}
.mock-tag {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer {
  border-top: 1px solid var(--border);
  padding-block: 36px;
  background: var(--bg-alt);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 101;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 8px;
  transform: translateY(calc(-100% - 8px));
}
.skip-link:focus { transform: none; }

.nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.nav__inner {
  width: min(var(--container), 100% - 48px);
  min-height: 72px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__links { margin-left: auto; }
.nav__logo-text { white-space: nowrap; }
.hero__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero__eyebrow { letter-spacing: 0.18em; }
.about__photo { width: min(100%, 370px); justify-self: center; }
.about__photo-frame { display: block; }
.about__photo-frame img { object-position: center 35%; }

.work__grid { align-items: start; gap: 22px; }
.work__grid--demos { align-items: stretch; }
.work__group-title {
  margin: clamp(30px, 5vw, 54px) 0 18px;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  line-height: 1.25;
}
.work-card { min-width: 0; }
.work-card:hover { transform: translateY(-3px); }
.work-card--featured {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  margin-bottom: 22px;
}
.work-card__thumb--ranch {
  align-self: stretch;
  aspect-ratio: auto;
  min-height: 230px;
  background: radial-gradient(ellipse at 25% 15%, #654125, #2c1c13 55%, #12100c);
}
.work-card__thumb--ranch .mock-logo { color: #f6d9ab; }
.work-card--featured .work-card__meta { padding: clamp(22px, 4vw, 48px); }
.work-card--featured .work-card__meta h3 { font-size: clamp(1.55rem, 3vw, 2.25rem); }
.work-card__link { margin-top: 22px; }
.work-card--demo { display: flex; flex-direction: column; }
.work-card--demo .work-card__meta { display: flex; flex: 1; flex-direction: column; align-items: flex-start; }
.work-card--demo .work-card__description { margin-bottom: 20px; }
.work-card--demo .work-card__link { margin-top: auto; }
.work-card__meta { padding: clamp(18px, 2.5vw, 30px); }
.work-card__meta h3, .work-card__meta h4, .skill-card h3 { margin-bottom: 10px; font-size: 1.24rem; line-height: 1.25; }
.work-card__type { color: var(--accent); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 7px; }
.work-card__description, .skill-card p { color: var(--muted); font-size: 0.95rem; }

.skills__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.skill-card {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface), var(--bg));
}
.skill-card__icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: monospace;
  font-size: 1.2rem;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tags li { padding: 3px 9px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--muted); font-size: 0.77rem; }

.contact__panel {
  padding: clamp(24px, 6vw, 68px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: radial-gradient(ellipse at 0% 0%, var(--accent-dim), transparent 70%), var(--surface);
}
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 26px;
}
.contact__email {
  color: var(--accent);
  font-size: clamp(1rem, 3vw, 1.4rem);
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.contact__socials { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; }
.contact__socials a, .footer__top { color: var(--muted); }
.contact__socials a:hover, .footer__top:hover { color: var(--accent); }
.footer__copy { color: var(--muted); font-size: 0.86rem; }

@media (max-width: 840px) {
  .work__grid, .skills__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .nav__inner { flex-wrap: wrap; gap: 4px 12px; padding-block: 10px 4px; }
  .lang-switch { margin-left: auto; }
  .nav__links { order: 2; width: 100%; margin-left: 0; justify-content: space-between; gap: 8px; }
  .nav__links a { padding-block: 9px; }
  .about__grid { grid-template-columns: 1fr; }
  .about__photo { justify-self: start; }
  .work-card--featured { grid-template-columns: minmax(0, 1fr); }
  .work-card__thumb--ranch { min-height: 180px; }
}

@media (max-width: 520px) {
  .container, .nav__inner { width: calc(100% - 32px); }
  .nav__logo { gap: 6px; }
  .nav__logo-mark { width: 32px; height: 32px; }
  .nav__logo-text { font-size: 0.89rem; }
  .lang-switch__btn { min-width: 36px; padding-inline: 7px; }
  .nav__links a { font-size: 0.86rem; }
  .hero { min-height: auto; }
  .hero__sub { margin-bottom: 28px; }
  .hero__cta { gap: 10px; }
  .hero__cta .btn { width: 100%; }
  .work__grid, .skills__grid { grid-template-columns: minmax(0, 1fr); }
}

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