:root {
  --bg: #f4f1ea;
  --card: #fbf9f4;
  --ink: #1b1a17;
  --muted: #6e6a61;
  --line: #e1dbcf;
  --hot: #e46a3d;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, "Bitstream Charter", "Source Serif Pro", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --r: 16px;
  --gap: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
/* fini papirni šum umesto gradijenta */
body::before, body::after {
  content: ""; position: fixed; inset: -24px; pointer-events: none; z-index: -1;
  background-size: 22px 22px;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
}
body::before { opacity: .35; background-image: radial-gradient(rgb(27 26 23 / .07) 1px, transparent 1px); }
/* tačkice oko kursora tamne i malo narandžaste — maska prati miš */
body::after {
  background-image: radial-gradient(rgb(228 106 61 / .55) 1.2px, transparent 1.4px);
  -webkit-mask-image: radial-gradient(170px circle at var(--mx, -999px) var(--my, -999px), #000, transparent 75%);
          mask-image: radial-gradient(170px circle at var(--mx, -999px) var(--my, -999px), #000, transparent 75%);
  opacity: var(--spot, 0); transition: opacity .5s;
}
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; }
.muted { color: var(--muted); }
.eyebrow { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
:focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: 12px; top: -48px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.top { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; font: 700 19px var(--mono); letter-spacing: -.02em; }
.logo .lb { fill: var(--bg); opacity: 0; transform-box: fill-box; transform-origin: center; animation: lb-rise 2.8s ease-in infinite; }
.logo .b2 { animation-duration: 3.6s; animation-delay: 1.1s; }
.logo .b3 { animation-duration: 3.1s; animation-delay: 2s; }
.logo .liquid { transform-box: fill-box; transform-origin: 50% 100%; animation: lb-slosh 5s ease-in-out infinite; }
.logo:hover .lb { animation-duration: 1.2s; }
@keyframes lb-rise {
  0% { transform: translateY(0) scale(.5); opacity: 0; }
  15% { opacity: .9; }
  70% { opacity: .7; }
  100% { transform: translateY(-15px) scale(1); opacity: 0; }
}
@keyframes lb-slosh { 0%, 100% { transform: skewY(0); } 30% { transform: skewY(-3deg); } 60% { transform: skewY(2deg); } }
nav { display: flex; align-items: center; gap: 22px; }
nav > a { text-decoration: none; color: var(--muted); font-size: 14px; }
nav > a:hover { color: var(--ink); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 99px; padding: 2px; background: var(--card); }
.lang button {
  font: 600 11px var(--mono); letter-spacing: .06em; border: 0; background: none; color: var(--muted);
  padding: 4px 9px; border-radius: 99px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); padding-bottom: var(--gap); }
.cell { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }

.hero {
  grid-column: span 7; padding: 28px 34px; display: flex; flex-direction: column; justify-content: center; gap: 14px;
  position: relative; overflow: hidden; isolation: isolate;
  /* toplija, malo tonirana površina + jača ivica i mekana "papirna" dubina */
  background: #fdf7ee;
  border-color: #dccdb8;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .8),
    0 1px 0 #e6d9c6,
    0 14px 30px -22px rgb(120 62 24 / .35);
}
/* mekani narandžasti sjaj u gornjem desnom uglu i tračak dole levo */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(380px 260px at 96% 4%, rgb(228 106 61 / .16), transparent 70%),
    radial-gradient(300px 180px at 0% 100%, rgb(228 166 61 / .08), transparent 70%);
  animation: hero-glow 14s ease-in-out infinite alternate;
}
@keyframes hero-glow { from { transform: translate(0, 0); } to { transform: translate(-18px, 10px); } }
/* sitna ručno nacrtana oznaka u uglu — "laboratorijska" crtica */
.hero::after {
  content: ""; position: absolute; top: 18px; right: 20px; width: 46px; height: 46px; pointer-events: none; opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 46' fill='none' stroke='%23e46a3d' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M23 4v8M23 34v8M4 23h8M34 23h8'/%3E%3Ccircle cx='23' cy='23' r='9' stroke-dasharray='2 3'/%3E%3C/svg%3E") no-repeat center / contain;
  animation: hero-mark 30s linear infinite;
}
@keyframes hero-mark { to { transform: rotate(1turn); } }
.hero-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 99px;
  font: 600 11.5px var(--mono); letter-spacing: .04em; color: #a8461f;
  background: rgb(228 106 61 / .1); border: 1px solid rgb(228 106 61 / .28);
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hot); box-shadow: 0 0 0 0 rgb(228 106 61 / .5); animation: badge-ping 2.4s ease-out infinite; }
@keyframes badge-ping { 0% { box-shadow: 0 0 0 0 rgb(228 106 61 / .45); } 70%, 100% { box-shadow: 0 0 0 7px rgb(228 106 61 / 0); } }
.hero h1 {
  font: 400 clamp(36px, 4.6vw, 64px)/1 var(--serif);
  letter-spacing: -.03em; max-width: 16ch;
}
.hero h1 em { font-style: italic; color: var(--hot); position: relative; white-space: nowrap; }
.hero h1 em::after { /* ručno podvučeno */
  content: ""; position: absolute; left: 2%; right: 4%; bottom: .02em; height: .14em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cpath d='M1 5c20-4 40-4 60-1s28 1 38-2' fill='none' stroke='%23e46a3d' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  animation: ul-draw 1s cubic-bezier(.6, .1, .3, 1) .35s both;
}
.hero:hover h1 em::after { animation: ul-redraw .8s cubic-bezier(.6, .1, .3, 1) both; }
@keyframes ul-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes ul-redraw { 0% { clip-path: inset(0 0 0 0); } 35% { clip-path: inset(0 0 0 100%); } 36% { clip-path: inset(0 100% 0 0); } 100% { clip-path: inset(0 0 0 0); } }
.lead { font-size: 17px; color: var(--muted); max-width: 54ch; }

.services { grid-column: span 5; display: grid; gap: var(--gap); }
/* usluge su namerno lakše od heroja: providnija pozadina, tiša ivica */
.service {
  display: flex; gap: 14px; align-items: center; padding: 14px 18px;
  background: rgb(251 249 244 / .55); border-color: rgb(225 219 207 / .75);
  transition: background .25s, border-color .25s;
}
.service:hover { background: var(--card); border-color: var(--line); }
.service svg { flex: none; width: 34px; height: 34px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.service svg * { transform-box: fill-box; transform-origin: center; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), stroke .3s, opacity .3s; }
.svc-web .cur { opacity: 0; stroke: var(--hot); }
.svc-web:hover .lt { transform: translateX(-2.5px); }
.svc-web:hover .gt { transform: translateX(2.5px); }
.svc-web:hover .cur { animation: svc-blink .9s steps(1) infinite; }
.svc-ai:hover .glyph { stroke: var(--hot); }
.svc-ai:hover .pins { animation: svc-pins 1.1s ease-in-out infinite; }
.svc-ai:hover .chip { transform: rotate(-6deg); }
.svc-auto:hover .gear { animation: svc-spin 3s linear infinite; }
.svc-auto:hover .gear circle { stroke: var(--hot); }
@keyframes svc-blink { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes svc-pins { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.12); opacity: .45; } }
@keyframes svc-spin { to { transform: rotate(1turn); } }
.service h2 { font: 600 15px var(--sans); margin-bottom: 2px; }
.service p { color: var(--muted); font-size: 13.5px; }

/* ---------- Projekti ---------- */
.lab { grid-column: 1 / -1; }
.lab-head { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 4px 10px; }
.lab-head h2 { font: 400 26px var(--serif); letter-spacing: -.01em; }
.projects { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }

.project {
  --tint: color-mix(in srgb, var(--a) 11%, var(--card));
  display: grid; grid-template-columns: 116px 1fr; gap: 14px; align-items: center;
  padding: 10px 16px 10px 10px; height: 100%; text-decoration: none; position: relative;
  transition: border-color .2s, box-shadow .2s;
}
.project::after { /* strelica */
  content: "↗"; position: absolute; top: 10px; right: 14px; font-size: 15px; color: var(--muted);
  transition: transform .2s, color .2s;
}
.project:hover, .project:focus-visible { border-color: var(--a); box-shadow: 0 6px 0 -2px color-mix(in srgb, var(--a) 25%, transparent); }
.project:hover::after, .project:focus-visible::after { transform: translate(2px, -2px); color: var(--a); }
.art { background: var(--tint); border-radius: 11px; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; }
.art svg { width: 100%; height: 100%; display: block; fill: none; stroke: var(--a); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.info h3 { font: 600 17px var(--sans); letter-spacing: -.01em; padding-right: 18px; }
.url { display: inline-block; font: 12px var(--mono); color: var(--a); margin: 1px 0 5px; filter: brightness(.85); }
.info p { color: var(--muted); font-size: 13.5px; line-height: 1.45; }

/* ---------- O Veblabu + kontakt ---------- */
.about { grid-column: span 7; padding: 22px 28px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.about p { max-width: 82ch; }
.about .stack { font-size: 12px; }
.contact {
  grid-column: span 5; padding: 22px 28px; background: var(--ink); color: var(--bg); border-color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  position: relative; overflow: hidden; isolation: isolate;
}
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(220px circle at var(--gx, 82%) var(--gy, 55%), rgb(228 106 61 / .32), transparent 70%);
  opacity: .55; transition: opacity .4s;
}
.contact:hover::before { opacity: 1; }
.contact .eyebrow { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.contact h2 { font: 400 clamp(26px, 2.6vw, 34px)/1.1 var(--serif); letter-spacing: -.02em; margin-top: 4px; }
.btn {
  font: 600 14px var(--sans); border: 0; border-radius: 99px; padding: 11px 20px; cursor: pointer;
  background: var(--hot); color: #fff; white-space: nowrap; transition: transform .15s, box-shadow .15s;
  box-shadow: 0 3px 0 rgb(0 0 0 / .25);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 rgb(0 0 0 / .25); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgb(0 0 0 / .25); }

.foot { padding: 4px 28px 14px; }

/* ---------- Dijalog ---------- */
dialog {
  border: 1px solid var(--line); border-radius: 20px; padding: 0; width: min(520px, calc(100% - 32px));
  background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgb(27 26 23 / .25);
}
dialog::backdrop { background: rgb(27 26 23 / .45); }
dialog form { display: flex; flex-direction: column; gap: 14px; padding: 24px 26px 22px; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; }
.dlg-head h2 { font: 400 24px var(--serif); }
.x { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); padding: 2px 6px; border-radius: 8px; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; }
input, select, textarea {
  font: 15px var(--sans); color: var(--ink); background: #fff; resize: vertical;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--hot); outline-offset: -1px; border-color: transparent; }
.invalid { border-color: #c8382c; }
.dlg-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.note { font-size: 13px; color: var(--muted); flex: 1; }

/* =========================================================
   Animacije projekata
   - idle: tiha, spora animacija koja stalno "diše"
   - hover/fokus kartice: kratka, izražajnija animacija
   Osnovno stanje = gotova slika, pa uz reduced-motion
   ostaje lepa statična ilustracija.
   ========================================================= */
.art svg * { transform-box: fill-box; transform-origin: center; }

/* Kvadrati — idle: sobe tiho dišu. hover: zidovi se iscrtaju, sobe iskoče, vrata se otvore */
.kv .wall { stroke-dasharray: 1; }
.kv .room { fill: var(--a); stroke: none; opacity: .22; animation: kv-breathe 6s ease-in-out infinite; }
.kv .r2 { animation-delay: -2s; } .kv .r3 { animation-delay: -4s; }
.kv .door { stroke-dasharray: 2 3; opacity: .7; transform-origin: 100% 100%; }
.project:is(:hover, :focus-visible) .kv .wall { animation: kv-draw .9s ease-out both; }
.project:is(:hover, :focus-visible) .kv .w2 { animation-delay: .15s; }
.project:is(:hover, :focus-visible) .kv .room { animation: kv-pop .5s cubic-bezier(.3, 1.5, .5, 1) both; }
.project:is(:hover, :focus-visible) .kv .r1 { animation-delay: .45s; }
.project:is(:hover, :focus-visible) .kv .r2 { animation-delay: .6s; }
.project:is(:hover, :focus-visible) .kv .r3 { animation-delay: .75s; }
.project:is(:hover, :focus-visible) .kv .door { animation: kv-door 1.1s ease-in-out .5s both; }
@keyframes kv-breathe { 0%, 100% { opacity: .16; } 50% { opacity: .28; } }
@keyframes kv-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes kv-pop { from { opacity: 0; transform: scale(.4); } to { opacity: .26; transform: scale(1); } }
@keyframes kv-door { 0%, 100% { transform: rotate(0); } 45% { transform: rotate(-35deg); } }

/* Kapiram — idle: sjaj tinja. hover: sijalica se upali, zanjiše, zraci prsnu */
.kp .glow { fill: var(--a); stroke: none; opacity: .2; animation: kp-breathe 4s ease-in-out infinite; }
.kp .fil { opacity: .75; }
.kp .rays { opacity: .25; transform-origin: 50% 100%; }
.kp .rays path { stroke-width: 2.4; }
.kp .bulb { transform-origin: 50% 100%; }
.project:is(:hover, :focus-visible) .kp .bulb { animation: kp-wobble .9s ease-in-out both; }
.project:is(:hover, :focus-visible) .kp .glow { animation: kp-flash .8s ease-out both; }
.project:is(:hover, :focus-visible) .kp .fil { animation: kp-fil .8s ease-out both; }
.project:is(:hover, :focus-visible) .kp .rays { animation: kp-burst .6s cubic-bezier(.3, 1.6, .5, 1) .15s both; }
@keyframes kp-breathe { 0%, 100% { opacity: .1; } 50% { opacity: .24; } }
@keyframes kp-wobble { 0% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 50% { transform: rotate(7deg); } 75% { transform: rotate(-3deg); } 100% { transform: rotate(0); } }
@keyframes kp-flash { 0% { opacity: .1; } 15% { opacity: .45; } 25% { opacity: .08; } 40%, 100% { opacity: .42; } }
@keyframes kp-fil { 0% { opacity: .5; } 40%, 100% { opacity: 1; stroke-width: 2.6; } }
@keyframes kp-burst { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }

/* Mareza — idle: talasi lagano plutaju. hover: talasi se podignu, plovak "zagrize", krug na vodi */
.mr .wave { transform-box: view-box; transform-origin: 0 0; animation: mr-wave 9s linear infinite; }
.mr .w2 { animation-duration: 13s; animation-direction: reverse; }
.mr .w3 { animation-duration: 7s; opacity: .55; }
.mr .waves { transform-origin: 50% 100%; transition: transform .6s cubic-bezier(.3, 1.4, .5, 1); }
.mr .fill { fill: color-mix(in srgb, var(--a) 18%, transparent); }
.mr .sun { fill: color-mix(in srgb, var(--a) 22%, transparent); stroke: none; transition: transform .6s; }
.mr .float { transform-origin: 50% 100%; animation: mr-bob 3.4s ease-in-out infinite; }
.mr .float circle { fill: var(--card); }
.mr .ring { stroke-width: 1.4; opacity: 0; }
.project:is(:hover, :focus-visible) .mr .waves { transform: scaleY(1.18); }
.project:is(:hover, :focus-visible) .mr .sun { transform: translateY(-4px); }
.project:is(:hover, :focus-visible) .mr .float { animation: mr-bite 1.3s ease-in-out both; }
.project:is(:hover, :focus-visible) .mr .ring { animation: mr-ring 1.2s ease-out .35s both; }
@keyframes mr-wave { to { transform: translateX(-60px); } }
@keyframes mr-bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(2px) rotate(4deg); } }
@keyframes mr-bite { 0% { transform: translateY(0); } 25% { transform: translateY(7px); } 40% { transform: translateY(2px); } 55% { transform: translateY(8px) rotate(8deg); } 100% { transform: translateY(0); } }
@keyframes mr-ring { from { opacity: .8; transform: scale(.5); } to { opacity: 0; transform: scale(2.6, 1.2); } }

/* Placevi — idle: izabrana parcela tiho pulsira. hover: granice "marširaju", pin padne */
.pl .parcel { stroke-dasharray: 5 4; }
.pl .hl { fill: var(--a); fill-opacity: .16; stroke-dasharray: none; stroke-width: 2.4; animation: pl-pulse 5s ease-in-out infinite; }
.pl .pin { transform-origin: 50% 100%; }
.pl .pin path { fill: var(--a); stroke: var(--a); }
.pl .pin circle { fill: var(--card); stroke: none; }
.project:is(:hover, :focus-visible) .pl .parcel:not(.hl) { animation: pl-march 1.1s linear infinite; }
.project:is(:hover, :focus-visible) .pl .pin { animation: pl-drop .7s cubic-bezier(.3, 1.2, .5, 1) both; }
@keyframes pl-pulse { 0%, 100% { fill-opacity: .1; } 50% { fill-opacity: .24; } }
@keyframes pl-march { to { stroke-dashoffset: -18; } }
@keyframes pl-drop { 0% { transform: translateY(-16px); opacity: 0; } 55% { transform: translateY(0) scale(1.1, .88); opacity: 1; } 75% { transform: translateY(-3px); } 100% { transform: none; } }

/* Montenegro Gravel — idle: biciklista polako vozi, zastavica leprša. hover: ruta teče, makadam trese */
.gr .hills { fill: color-mix(in srgb, var(--a) 16%, transparent); stroke: none; }
.gr .route { stroke-dasharray: 3 5; stroke-width: 2.2; }
.gr .flag { fill: var(--a); stroke-width: 1.6; transform-origin: 100% 0; animation: gr-flag 3s ease-in-out infinite; }
.gr .rider { stroke: var(--ink); stroke-width: 1.6; }
.gr .rider circle { fill: none; }
.gr .rider .head { fill: var(--ink); stroke: none; }
.gr .rider .body { stroke: var(--a); stroke-width: 2.2; }
.project:is(:hover, :focus-visible) .gr .route { animation: gr-route .7s linear infinite; }
.project:is(:hover, :focus-visible) .gr .bump { animation: gr-bump .22s steps(2) infinite; }
.project:is(:hover, :focus-visible) .gr .flag { animation: gr-flag-fast .5s ease-in-out infinite; }
@keyframes gr-flag { 0%, 100% { transform: skewY(0); } 50% { transform: skewY(6deg); } }
@keyframes gr-flag-fast { 0%, 100% { transform: skewY(-8deg); } 50% { transform: skewY(10deg); } }
@keyframes gr-route { to { stroke-dashoffset: -16; } }
@keyframes gr-bump { 0% { transform: translateY(0); } 50% { transform: translateY(-1.2px); } }

/* BrainDebug — idle: impuls polako obilazi čvorove. hover: veze potekle, "bug" čvor zasija crveno pa se popravi */
.bd .link { stroke-width: 1.4; opacity: .45; stroke-dasharray: 2 4; transition: opacity .3s; }
.bd .node { fill: var(--card); stroke-width: 2.2; animation: bd-pulse 7s ease-in-out infinite; }
.bd .n2 { animation-delay: 1s; } .bd .n3 { animation-delay: 2s; } .bd .n4 { animation-delay: 3s; }
.bd .n5 { animation-delay: 4s; } .bd .n6 { animation-delay: 5s; } .bd .n7 { animation-delay: 6s; }
.project:is(:hover, :focus-visible) .bd .link { opacity: .85; animation: bd-flow .8s linear infinite; }
.project:is(:hover, :focus-visible) .bd .n4 { animation: bd-bug 1.4s ease-in-out both; }
@keyframes bd-pulse { 0%, 16%, 100% { fill: var(--card); transform: scale(1); } 7% { fill: var(--a); transform: scale(1.3); } }
@keyframes bd-flow { to { stroke-dashoffset: -12; } }
@keyframes bd-bug {
  0% { fill: var(--card); transform: scale(1); }
  20%, 45% { fill: #e0453a; stroke: #e0453a; transform: scale(1.4); }
  30% { transform: scale(1.2) translateX(-1px); }
  38% { transform: scale(1.35) translateX(1px); }
  70%, 100% { fill: var(--a); stroke: var(--a); transform: scale(1.15); }
}

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

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero, .services, .about, .contact { grid-column: 1 / -1; }
  .services { grid-template-columns: repeat(3, 1fr); }
  .service { flex-direction: column; align-items: flex-start; }
  .projects { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  nav { gap: 14px; }
  nav > a:not([href="#contact"]) { display: none; }
  .hero { padding: 26px 22px; }
  .services, .projects { grid-template-columns: 1fr; }
  .lab-head .mono { display: none; }
  .service { flex-direction: row; align-items: center; }
  .contact { flex-direction: column; align-items: flex-start; }
  .about, .contact { padding: 22px; }
  .foot { padding: 6px 16px 20px; }
}
