/* Stefan Boyadzhiev's portfolio (portfolio.sbworks.dev). Dark only: the same ribbon field and glass as SB Social
   (sites/sbworks-social/public/site). No inline styles or scripts (see _headers). */

@font-face { font-family: "Sofia Sans"; font-weight: 400; font-display: swap; src: url(/fonts/sofia-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Sofia Sans"; font-weight: 500; font-display: swap; src: url(/fonts/sofia-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Sofia Sans"; font-weight: 700; font-display: swap; src: url(/fonts/sofia-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Sofia Sans"; font-weight: 800; font-display: swap; src: url(/fonts/sofia-sans-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Accent"; font-style: italic; font-weight: 600; font-display: swap; src: url(/fonts/cormorant-garamond-latin-600-italic.woff2) format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }

:root {
  color-scheme: dark;
  --bg: #06060c;
  --ink: #f3f2ff;
  --muted: rgba(232, 230, 255, .68);
  --dim: rgba(232, 230, 255, .56);
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .14);
  --glass: rgba(18, 17, 34, .52);
  --iris: #8b85ff;
  --iris-hi: #b7b2ff;
  --iris-deep: #5046e5;
  --on-iris: #0b0a1a;
  --ok: #5fe3a1;
  --radius: 22px;
  --sans: "Sofia Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --accent: "Accent", Georgia, "Times New Roman", serif;
  --wrap: 1200px;
  --gut: 24px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.025em; line-height: 1.04; text-wrap: balance; }
p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
em { font-family: var(--accent); font-style: italic; font-weight: 600; letter-spacing: -.01em; }
h1 em, h2 em { font-size: 1.12em; line-height: .8; color: #fff; }
.mono { font-family: var(--mono); font-weight: 500; font-size: 12.5px; letter-spacing: .01em; }
.small { font-size: 12px; }
.dim { color: var(--dim); }
.wrap { width: min(100% - 2 * var(--gut), var(--wrap)); margin-inline: auto; }
:focus-visible { outline: 2px solid var(--iris-hi); outline-offset: 3px; border-radius: 8px; }

/* ------------------------------------------------------------ field (same as SB Social) */
.ribbons { position: fixed; inset: 0; width: 100vw; height: 100lvh; z-index: -2; pointer-events: none; }
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .06; mix-blend-mode: overlay; background: url(/grain.svg) repeat; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 80% at 0% 0%, rgba(6, 6, 12, .55), transparent 60%), linear-gradient(180deg, transparent 70%, rgba(6, 6, 12, .6));
}

/* ------------------------------------------------------------ parts */
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--iris); box-shadow: 0 0 10px var(--iris); flex: none; }
.dot.live { background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }

.tag, .pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line2); background: rgba(255, 255, 255, .04); color: var(--muted);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.eyebrow { color: var(--muted); }

.glass {
  position: relative; border-radius: var(--radius); border: 1px solid var(--line2);
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02) 40%), var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 30px 80px -30px rgba(0, 0, 0, .8);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px;
  border-radius: 999px; border: 0; cursor: pointer; font: 700 15px/1 var(--sans); letter-spacing: -.005em; white-space: nowrap;
  color: var(--on-iris); background: linear-gradient(180deg, #a29dff, var(--iris));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .25) inset, 0 8px 30px -6px rgba(139, 133, 255, .65);
  transition: transform .18s var(--ease), box-shadow .18s, background .18s;
}
.btn:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, .35) inset, 0 10px 40px -4px rgba(139, 133, 255, .85); }
.btn:active { transform: scale(.97); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-ghost { color: var(--ink); background: rgba(255, 255, 255, .06); box-shadow: 0 0 0 1px var(--line2) inset; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); box-shadow: 0 0 0 1px rgba(255, 255, 255, .22) inset; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  font: 500 12px/1 var(--mono); padding: 6px 9px; border-radius: 999px; color: var(--muted);
  border: 1px solid var(--line2); background: rgba(255, 255, 255, .035);
}
.ext { color: var(--iris-hi); white-space: nowrap; }
.ext:hover { color: #fff; }

/* ------------------------------------------------------------ nav */
.nav {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px;
  padding: 14px max(var(--gut), (100% - var(--wrap)) / 2); transition: background .25s, border-color .25s;
  border-bottom: 1px solid transparent;
}
.nav.stuck { background: rgba(6, 6, 12, .62); border-color: var(--line); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand-tile { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--iris); color: var(--on-iris); font: 800 13px/1 var(--sans); letter-spacing: -.02em; box-shadow: 0 0 18px -2px rgba(139, 133, 255, .7); }
.links { display: flex; gap: 28px; margin-inline: auto; font-size: 14.5px; color: var(--muted); }
.links a { transition: color .15s; }
.links a:hover { color: var(--ink); }
.nav-end { display: flex; align-items: center; gap: 10px; }
.nav-end .mono { font-size: 11px; opacity: .7; }

/* ------------------------------------------------------------ hero */
.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; min-height: min(calc(100svh - 64px), 820px); padding-block: 40px 80px; }
.hero .eyebrow { margin-top: 26px; }
.hero h1 { font-size: clamp(44px, 6vw, 82px); margin: 14px 0 22px; }
.hero h1 em { display: inline-block; }
.lead { font-size: 18.5px; color: var(--muted); max-width: 36em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.where { margin-top: 22px; }

.card-me { padding: 24px; }
.me-head { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.me-head img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(139, 133, 255, .5); box-shadow: 0 0 24px -4px rgba(139, 133, 255, .6); }
.me-head b { display: block; font-size: 19px; letter-spacing: -.01em; }
.me-rows { display: grid; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.me-rows div { display: grid; grid-template-columns: 60px 1fr; gap: 10px; align-items: baseline; }
.me-rows dt { color: var(--iris-hi); }
.me-rows dd { color: var(--muted); font-size: 15px; line-height: 1.4; }
.me-rows dd b { color: var(--ink); font-weight: 700; }
.card-me .label { margin: 16px 0 8px; }

/* ------------------------------------------------------------ sections */
.block { padding-block: 72px; }
.head { margin-bottom: 32px; }
.head h2 { font-size: clamp(36px, 4.6vw, 60px); margin-top: 12px; }
.sub { color: var(--muted); max-width: 40em; margin-top: 14px; }

/* featured products */
.feature { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 0; overflow: hidden; margin-bottom: 24px; }
.feature-media { position: relative; padding: 28px; display: grid; place-items: center; background: radial-gradient(90% 90% at 30% 20%, rgba(139, 133, 255, .16), transparent 70%); border-right: 1px solid var(--line); }
.feature-media > img { border-radius: 14px; border: 1px solid var(--line2); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); }
.feature-body { padding: 32px 32px 30px; display: flex; flex-direction: column; gap: 12px; }
.feature-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.feature h3 { font-size: 34px; }
.kind { color: var(--iris-hi); font-size: 15px; font-weight: 500; }
.tagline { color: var(--muted); }
.role { font-size: 15px; }
.role b { font-weight: 700; }
.points { display: grid; gap: 8px; font-size: 15px; color: var(--muted); }
.points li { position: relative; padding-left: 18px; }
.points li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--iris); box-shadow: 0 0 8px var(--iris); }
.points b { color: var(--ink); font-weight: 700; }
.feature .chips { margin-top: 6px; }

.quanta-media { min-height: 380px; }
.quanta-media .q-desk { width: 82%; justify-self: start; align-self: start; }
.quanta-media .q-phone { position: absolute; width: 23%; border-radius: 16px; border: 1px solid var(--line2); box-shadow: 0 24px 50px -14px rgba(0, 0, 0, .9); }
.quanta-media .q1 { right: 22%; bottom: 22px; }
.quanta-media .q2 { right: 28px; bottom: 46px; }

/* project grid */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filters .pill { cursor: pointer; font: 500 14px/1 var(--sans); padding: 9px 16px; transition: color .15s, background .15s, border-color .15s; }
.filters .pill:hover { color: var(--ink); }
.filters .pill.on { color: var(--on-iris); background: var(--iris); border-color: transparent; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.proj { overflow: hidden; display: flex; flex-direction: column; transition: transform .3s var(--ease), border-color .3s; }
.proj:hover { transform: translateY(-4px); border-color: rgba(183, 178, 255, .32); }
.proj[hidden] { display: none; }
.shot { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--line); background: #0d0c1c; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s var(--ease); }
.proj:hover .shot img { transform: scale(1.04); }
.shot-text { display: grid; place-content: center; gap: 8px; text-align: center; color: var(--muted); background: radial-gradient(80% 90% at 50% 30%, rgba(139, 133, 255, .28), transparent 70%), #0d0c1c; }
.shot-text b { font: italic 600 40px/1 var(--accent); color: #fff; }
.proj-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.proj h3 { font-size: 21px; letter-spacing: -.015em; }
.proj h3 .kind { font-size: 14px; font-weight: 500; letter-spacing: 0; }
.proj p { font-size: 15px; color: var(--muted); line-height: 1.5; }
.proj .tech { color: var(--iris-hi); opacity: .85; font-size: 11.5px; margin-top: auto; }
.proj .ext { font-size: 12px; }

/* skills */
.can { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.can-item { padding: 18px 18px 20px; border-radius: 18px; display: grid; gap: 6px; }
.can-item b { font-size: 16.5px; }
.can-item span { font-size: 14.5px; color: var(--muted); line-height: 1.45; }
.skills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.skill { padding: 18px; border-radius: 18px; }
.skill h3 { color: var(--iris-hi); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 12px; }

/* experience */
.timeline { padding: 8px 28px; }
.job { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.job:last-child { border-bottom: 0; }
.when { color: var(--iris-hi); padding-top: 4px; }
.job h3 { font-size: 20px; letter-spacing: -.015em; }
.job p { font-size: 15px; margin-top: 4px; }
.job p:not(.dim) { color: var(--muted); max-width: 52em; }

/* contact */
.contact { padding: clamp(28px, 5vw, 56px); text-align: center; overflow: hidden; }
.contact::before { content: ""; position: absolute; inset: -40% -10% auto; height: 120%; background: radial-gradient(50% 50% at 50% 50%, rgba(139, 133, 255, .22), transparent 70%); pointer-events: none; }
.contact h2 { font-size: clamp(34px, 4.6vw, 58px); margin: 12px 0 16px; position: relative; }
.contact .lead { margin-inline: auto; position: relative; }
.contact .cta { justify-content: center; position: relative; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 28px 40px; border-top: 1px solid var(--line); }
.foot a { color: var(--iris-hi); }
.foot a:hover { color: #fff; }

/* ------------------------------------------------------------ motion */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ------------------------------------------------------------ smaller screens */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .can, .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature { grid-template-columns: 1fr; }
  .feature-media { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 36px; min-height: 0; padding-block: 24px 48px; }
  .links { display: none; }
  .nav-end { margin-left: auto; }
}
@media (max-width: 640px) {
  :root { --gut: 16px; }
  body { font-size: 16px; }
  .ribbons { opacity: .5; }
  .grid, .can, .skills { grid-template-columns: 1fr; }
  .block { padding-block: 52px; }
  .feature-body { padding: 22px 20px; }
  .feature h3 { font-size: 28px; }
  .feature-top { flex-direction: column; gap: 4px; }
  .quanta-media { min-height: 0; padding: 18px; }
  .quanta-media .q-desk { width: 100%; }
  .quanta-media .q-phone { width: 26%; bottom: 10px; }
  .quanta-media .q1 { right: 32%; }
  .quanta-media .q2 { right: 12px; bottom: 24px; }
  .timeline { padding: 4px 18px; }
  .job { grid-template-columns: 1fr; gap: 6px; }
  .brand span:last-child { font-size: 15px; }
  .cta .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .proj, .shot img, .btn { transition: none; }
  .dot.live { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .glass, .tag, .pill, .btn-ghost, .nav.stuck { -webkit-backdrop-filter: none; backdrop-filter: none; background: #131224; }
}
