/* ============================================================
   Daniel Koljada — Personal site
   ============================================================ */

:root {
  --bg:        #0b0e14;
  --bg-alt:    #0f131c;
  --card:      #141926;
  --card-2:    #171d2c;
  --border:    rgba(255, 255, 255, 0.08);
  --border-2:  rgba(255, 255, 255, 0.14);
  --text:      #e8ebf2;
  --muted:     #9aa4b8;
  --muted-2:   #6c768c;

  --accent:    #6366f1;
  --accent-2:  #22d3ee;
  --accent-3:  #a855f7;
  --grad:      linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #22d3ee 100%);
  --grad-soft: linear-gradient(135deg, rgba(99,102,241,.18), rgba(34,211,238,.12));

  --radius:    18px;
  --radius-sm: 12px;
  --shadow:    0 24px 60px -24px rgba(0, 0, 0, 0.6);
  --maxw:      1140px;

  --ff-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --ff-body:    "Inter", system-ui, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--ff-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
svg { width: 100%; height: 100%; }

h1, h2, h3, .brand__name {
  font-family: var(--ff-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; position: relative; }
.section--alt { background: var(--bg-alt); }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Background decoration ---------- */
.bg-decor { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.blob--1 { width: 520px; height: 520px; background: radial-gradient(circle, #4f46e5, transparent 70%); top: -160px; right: -120px; }
.blob--2 { width: 480px; height: 480px; background: radial-gradient(circle, #0891b2, transparent 70%); bottom: -180px; left: -140px; opacity: 0.4; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--ff-display); font-weight: 600; font-size: 0.95rem;
  padding: 13px 24px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 12px 30px -10px rgba(99,102,241,.6); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(99,102,241,.75); }
.btn--ghost { background: rgba(255,255,255,.04); color: var(--text); border-color: var(--border-2); }
.btn--ghost:hover { background: rgba(255,255,255,.09); transform: translateY(-2px); }
.btn--block { width: 100%; margin-top: 22px; }
.btn--lg { padding: 16px 30px; font-size: 1rem; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(11,14,20,.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }

.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; }
.brand__mark {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--grad); color: #fff;
  font-family: var(--ff-display); font-weight: 800; font-size: 0.95rem; letter-spacing: 0.02em;
  box-shadow: 0 8px 20px -8px rgba(99,102,241,.7);
}
.brand__name { font-size: 1.05rem; }

.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__links a {
  font-family: var(--ff-display); font-weight: 500; font-size: 0.95rem; color: var(--muted);
  padding: 9px 14px; border-radius: 999px; transition: color .2s ease, background .2s ease;
}
.nav__links a:hover, .nav__links a.active { color: var(--text); background: rgba(255,255,255,.05); }
.nav__cta { color: var(--text) !important; background: rgba(255,255,255,.06); border: 1px solid var(--border-2); margin-left: 6px; }
.nav__cta:hover { background: rgba(255,255,255,.12) !important; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }
.nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding-top: 150px; padding-bottom: 90px; }
.hero__inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }

.badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 0.82rem; font-weight: 500; color: var(--muted);
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  padding: 7px 15px; border-radius: 999px; margin-bottom: 22px;
}
.badge__dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.55); } 70% { box-shadow: 0 0 0 9px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }

.eyebrow { font-family: var(--ff-display); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 18px; }
.section__eyebrow { font-family: var(--ff-display); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 14px; }

.hero__title { font-size: clamp(2.4rem, 5.2vw, 3.9rem); font-weight: 800; margin-bottom: 22px; }
.hero__lead { font-size: 1.12rem; color: var(--muted); max-width: 560px; margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 48px; }

.stats { display: grid; grid-template-columns: repeat(4, auto); gap: 30px; flex-wrap: wrap; }
.stats li { display: flex; flex-direction: column; }
.stats__num { font-family: var(--ff-display); font-weight: 800; font-size: 1.85rem; line-height: 1; }
.stats__label { font-size: 0.82rem; color: var(--muted-2); margin-top: 6px; }

/* Hero visual */
.hero__visual { position: relative; display: grid; place-items: center; }
.hero__photo {
  position: relative; width: 320px; height: 380px; border-radius: 26px; overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow);
}
.hero__photo::after {
  content: ""; position: absolute; inset: 0; border-radius: 26px;
  padding: 1.5px; background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .85; pointer-events: none; z-index: 2;
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.hero__photo-fallback {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 0;
  font-family: var(--ff-display); font-weight: 800; font-size: 5rem; color: #fff;
  background: var(--grad);
}

.hero__chip {
  position: absolute; display: inline-flex; align-items: center; gap: 9px; z-index: 3;
  background: rgba(20,25,38,.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-2); border-radius: 14px; padding: 11px 15px;
  font-family: var(--ff-display); font-weight: 600; font-size: 0.85rem;
  box-shadow: 0 16px 40px -16px rgba(0,0,0,.7);
  animation: float 5s ease-in-out infinite;
}
.hero__chip svg { width: 20px; height: 20px; stroke: var(--accent-2); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hero__chip--1 { top: 22px; left: -34px; }
.hero__chip--2 { bottom: 40px; right: -38px; animation-delay: 1.6s; }
.hero__chip--2 svg { stroke: var(--accent-3); }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Section heads ---------- */
.section__head { max-width: 680px; margin-bottom: 54px; }
.section__title { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 800; }
.section__sub { color: var(--muted); font-size: 1.08rem; margin-top: 16px; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: start; }
.about__text p { color: var(--muted); margin-bottom: 18px; font-size: 1.06rem; }
.about__text strong { color: var(--text); font-weight: 600; }
.about__tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.tag {
  font-family: var(--ff-display); font-weight: 500; font-size: 0.85rem;
  padding: 8px 15px; border-radius: 999px;
  background: var(--grad-soft); border: 1px solid var(--border-2); color: var(--text);
}

.about__card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); position: sticky; top: 100px;
}
.about__card h3 { font-size: 1.15rem; margin-bottom: 20px; }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.facts li:last-child { border-bottom: 0; }
.facts__k { color: var(--muted-2); }
.facts__v { color: var(--text); font-weight: 500; text-align: right; }

/* ---------- Cards (expertise) ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.card:hover { transform: translateY(-5px); border-color: var(--border-2); background: var(--card-2); }
.card__icon { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; background: var(--grad-soft); border: 1px solid var(--border-2); margin-bottom: 18px; }
.card__icon svg { width: 24px; height: 24px; stroke: var(--accent-2); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.12rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.93rem; }

/* ---------- Timeline ---------- */
.timeline { position: relative; max-width: 760px; margin-left: 8px; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(to bottom, var(--accent), var(--accent-2), transparent); }
.tl-item { position: relative; padding-bottom: 30px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -34px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); transform: translateX(-1px); box-shadow: 0 0 0 4px rgba(99,102,241,.12); }
.tl-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 28px; transition: border-color .25s ease, transform .25s ease; }
.tl-card:hover { border-color: var(--border-2); transform: translateX(4px); }
.tl-period { display: inline-block; font-family: var(--ff-display); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 8px; }
.tl-card h3 { font-size: 1.25rem; }
.tl-org { color: var(--muted-2); font-size: 0.92rem; margin: 4px 0 14px; }
.tl-list li { position: relative; padding-left: 22px; color: var(--muted); font-size: 0.97rem; margin-bottom: 8px; }
.tl-list li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--grad); }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.service {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 34px 32px; transition: transform .25s ease, border-color .25s ease;
}
.service:hover { transform: translateY(-5px); border-color: var(--border-2); }
.service__no { font-family: var(--ff-display); font-weight: 800; font-size: 2.6rem; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.16); display: block; margin-bottom: 16px; }
.service h3 { font-size: 1.3rem; margin-bottom: 12px; }
.service p { color: var(--muted); font-size: 1rem; }

/* ---------- Selected Work ---------- */
.work { display: grid; gap: 20px; }
.work__feature {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 36px;
  background: linear-gradient(135deg, rgba(99,102,241,.14), rgba(34,211,238,.06)), var(--card);
  border: 1px solid var(--border-2); border-radius: var(--radius);
  padding: 36px 38px; box-shadow: var(--shadow);
}
.work__feature-body h3 { font-size: 1.5rem; margin: 14px 0 10px; }
.work__feature-body p { color: var(--muted); font-size: 1.02rem; max-width: 640px; }
.work__metric { text-align: center; padding-left: 36px; border-left: 1px solid var(--border); }
.work__metric-num { font-family: var(--ff-display); font-weight: 800; font-size: 3.6rem; line-height: 1; display: block; }
.work__metric-label { color: var(--muted); font-size: 0.92rem; display: block; margin-top: 8px; max-width: 140px; }

.work__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.work__card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.work__card:hover { transform: translateY(-5px); border-color: var(--border-2); background: var(--card-2); }
.work__card h3 { font-size: 1.15rem; margin: 14px 0 10px; }
.work__card p { color: var(--muted); font-size: 0.93rem; }
.work__card--more { background: var(--grad-soft); border-style: dashed; }

.work__tag {
  display: inline-block; font-family: var(--ff-display); font-weight: 600;
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-2);
  background: rgba(34,211,238,.08); border: 1px solid var(--border-2);
  padding: 5px 11px; border-radius: 999px;
}

/* ---------- Languages ---------- */
.langs { display: grid; gap: 26px; max-width: 720px; }
.lang__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.lang__name { font-family: var(--ff-display); font-weight: 600; font-size: 1.1rem; }
.lang__level { color: var(--muted-2); font-size: 0.88rem; }
.lang__bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.06); overflow: hidden; }
.lang__bar span { display: block; height: 100%; border-radius: 999px; background: var(--grad); width: 0; transition: width 1.1s cubic-bezier(.22,1,.36,1); }

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden; text-align: center;
  background: var(--card); border: 1px solid var(--border-2); border-radius: 28px;
  padding: 68px 40px; box-shadow: var(--shadow);
}
.cta__glow { position: absolute; top: -120px; left: 50%; transform: translateX(-50%); width: 520px; height: 320px; background: radial-gradient(circle, rgba(99,102,241,.45), transparent 70%); filter: blur(40px); pointer-events: none; }
.cta__title { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: 18px; position: relative; }
.cta__sub { color: var(--muted); font-size: 1.1rem; max-width: 580px; margin: 0 auto 32px; position: relative; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; position: relative; }
.cta__meta { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; margin-top: 36px; color: var(--muted); font-size: 0.95rem; position: relative; }
.cta__meta span { display: inline-flex; align-items: center; gap: 9px; }
.cta__meta svg { width: 18px; height: 18px; stroke: var(--accent-2); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 50px 0 34px; background: var(--bg-alt); }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand strong { font-family: var(--ff-display); font-size: 1.05rem; }
.footer__brand p { color: var(--muted-2); font-size: 0.88rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer__links a { color: var(--muted); font-size: 0.95rem; transition: color .2s ease; }
.footer__links a:hover { color: var(--text); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 24px; color: var(--muted-2); font-size: 0.88rem; }
.footer__legal a { color: var(--muted); transition: color .2s ease; }
.footer__legal a:hover { color: var(--text); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Legal pages
   ============================================================ */
.legal { padding-top: 130px; padding-bottom: 90px; min-height: 70vh; }
.legal .container { max-width: 820px; }
.legal__back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-family: var(--ff-display); font-weight: 500; font-size: 0.92rem; margin-bottom: 26px; transition: color .2s ease; }
.legal__back:hover { color: var(--text); }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 10px; }
.legal__lead { color: var(--muted); margin-bottom: 40px; }
.legal h2 { font-size: 1.4rem; margin: 38px 0 14px; }
.legal h3 { font-size: 1.1rem; margin: 24px 0 10px; }
.legal p, .legal li { color: var(--muted); margin-bottom: 12px; }
.legal strong { color: var(--text); font-weight: 600; }
.legal ul { list-style: disc; padding-left: 22px; margin-bottom: 16px; }
.legal a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.legal__box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 28px; margin-bottom: 16px; }
.legal__box p { margin-bottom: 4px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 920px) {
  .hero__inner { grid-template-columns: 1fr; gap: 60px; }
  .hero__visual { order: -1; }
  .about { grid-template-columns: 1fr; }
  .about__card { position: static; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .work__feature { grid-template-columns: 1fr; gap: 24px; }
  .work__metric { border-left: 0; border-top: 1px solid var(--border); padding-left: 0; padding-top: 22px; text-align: left; }
  .work__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .section { padding: 72px 0; }
  .nav__links {
    position: fixed; inset: 76px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: rgba(11,14,20,.97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    transform: translateY(-130%); transition: transform .35s ease; visibility: hidden;
  }
  .nav__links.open { transform: translateY(0); visibility: visible; }
  .nav__links a { padding: 13px 14px; font-size: 1rem; }
  .nav__cta { margin: 6px 0 0; text-align: center; }
  .nav__toggle { display: flex; }

  .stats { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .services { grid-template-columns: 1fr; }
  .work__grid { grid-template-columns: 1fr; }
  .footer__inner, .footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .cards { grid-template-columns: 1fr; }
  .hero__photo { width: 260px; height: 320px; }
  .hero__chip--1 { left: -10px; }
  .hero__chip--2 { right: -10px; }
  .cta { padding: 48px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
