/* ------------------------------------------------------------------
   todorovski.dev — coming soon
------------------------------------------------------------------ */

:root {
  --bg:          #07070b;
  --bg-soft:     #0d0d14;
  --ink:         #f2f3f7;
  --ink-dim:     #a9adbd;
  --ink-faint:   #6b7085;
  --line:        rgba(255, 255, 255, .09);
  --accent:      #7c5cff;
  --accent-2:    #22d3ee;
  --accent-3:    #f472b6;

  --card-w:      min(720px, 100%);
  --ease:        cubic-bezier(.22, 1, .36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 4vw, 3rem);
  background: transparent;
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: clamp(15px, .55vw + 13.6px, 17px);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(124, 92, 255, .35);
  color: #fff;
}

/* the inline icon sprite is a definitions-only document */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- layered background ---------------------------------- */

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: .55;
  pointer-events: none;
}

.aurora {
  position: fixed;
  inset: -20%;
  z-index: 0;
  filter: blur(90px);
  pointer-events: none;
}

.blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  opacity: .5;
  mix-blend-mode: screen;
  will-change: transform;
}

.blob-1 {
  width: 46vmax; height: 46vmax;
  top: -6%; left: -8%;
  background: radial-gradient(circle at 30% 30%, var(--accent), transparent 68%);
  animation: drift-1 26s var(--ease) infinite alternate;
}

.blob-2 {
  width: 40vmax; height: 40vmax;
  bottom: -12%; right: -6%;
  background: radial-gradient(circle at 60% 40%, var(--accent-2), transparent 66%);
  animation: drift-2 32s var(--ease) infinite alternate;
  opacity: .38;
}

.blob-3 {
  width: 34vmax; height: 34vmax;
  top: 40%; left: 45%;
  background: radial-gradient(circle at 50% 50%, var(--accent-3), transparent 64%);
  animation: drift-3 38s var(--ease) infinite alternate;
  opacity: .26;
}

@keyframes drift-1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(12vw, 8vh, 0) scale(1.18); }
}
@keyframes drift-2 {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to   { transform: translate3d(-14vw, -10vh, 0) scale(.9); }
}
@keyframes drift-3 {
  from { transform: translate3d(-6vw, 4vh, 0) scale(.95); }
  to   { transform: translate3d(8vw, -12vh, 0) scale(1.25); }
}

/* faint technical grid, faded at the edges */
.grid-veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(to right,  var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 80% 65% at 50% 45%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 65% at 50% 45%, #000 20%, transparent 78%);
  opacity: .5;
}

/* cursor-following light */
.spotlight {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 40%),
    rgba(124, 92, 255, .16),
    transparent 62%
  );
  transition: background .18s linear;
}

/* film grain */
.noise {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- card ------------------------------------------------- */

.stage {
  position: relative;
  z-index: 5;
  width: var(--card-w);
  perspective: 1400px;
}

.card {
  position: relative;
  padding: clamp(1.75rem, 5vw, 3.25rem);
  border-radius: 26px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .07) inset,
    0 30px 80px -20px rgba(0, 0, 0, .8);
  overflow: hidden;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transform-style: preserve-3d;
  transition: transform .5s var(--ease);
}

/* the pointer is on the card — follow it instantly instead of easing */
.card.tilting { transition: transform .12s linear; }

/* animated conic border sheen */
.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--angle, 0deg),
    transparent 0deg 70deg,
    rgba(124, 92, 255, .85) 110deg,
    rgba(34, 211, 238, .7) 150deg,
    transparent 200deg 360deg
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: spin 8s linear infinite;
  pointer-events: none;
}

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes spin {
  to { --angle: 360deg; }
}

/* ---------- badge ------------------------------------------------ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .4rem .85rem .4rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.pulse {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 12px #34d399;
}

.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #34d399;
  animation: ping 2.2s var(--ease) infinite;
}

@keyframes ping {
  0%   { transform: scale(1);   opacity: .7; }
  70%  { transform: scale(3.2); opacity: 0; }
  100% { transform: scale(3.2); opacity: 0; }
}

/* ---------- type ------------------------------------------------- */

.name {
  margin: 0 0 .9rem;
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.035em;
}

.name .word { display: block; }

.grad {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-3) 42%, var(--accent-2) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shift 9s ease-in-out infinite;
}

@keyframes shift {
  0%, 100% { background-position:   0% 50%; }
  50%      { background-position: 100% 50%; }
}

.role {
  margin: 0 0 1.1rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(.85rem, 2.6vw, 1rem);
  color: var(--ink-dim);
  min-height: 1.6em;
}

.prompt { color: var(--accent-2); }

.caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  margin-left: -.25rem;
  background: var(--accent-2);
  border-radius: 1px;
  animation: blink 1.05s steps(1) infinite;
}

@keyframes blink {
  0%, 50%   { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

.lede {
  color: var(--ink-dim);
  font-weight: 500;
}

.tagline {
  margin: 0 0 2rem;
  max-width: 46ch;
  color: var(--ink-faint);
}

/* ---------- stack ------------------------------------------------ */

.stack {
  display: grid;
  gap: 1.15rem;
  margin: 0 0 1.75rem;
}

.stack-group { display: grid; gap: .6rem; }

.stack-label {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.stack-label svg {
  width: 14px;
  height: 14px;
  color: var(--accent-2);
  opacity: .8;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  padding: .34rem .68rem .34rem .58rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .035);
  font-size: .82rem;
  font-weight: 450;
  color: var(--ink-dim);
  white-space: nowrap;
  cursor: default;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px) scale(.96);
  animation: chip-in .55s var(--ease) forwards;
  animation-delay: calc(430ms + var(--i, 0) * 38ms);
  transition:
    color .3s var(--ease),
    border-color .3s var(--ease),
    background-color .3s var(--ease),
    transform .3s var(--ease),
    box-shadow .3s var(--ease);
}

.chip-icon {
  width: 15px;
  height: 15px;
  flex: none;
  fill: currentColor;
  color: var(--ink-faint);
  transition: color .3s var(--ease), transform .45s var(--ease), filter .3s var(--ease);
}

/* light sweep, parked off-chip until hover */
.chip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 20%,
    color-mix(in srgb, var(--brand, #fff) 22%, transparent) 50%,
    transparent 80%
  );
  transform: translateX(-120%);
  opacity: 0;
  pointer-events: none;
}

.chip:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--brand, #fff) 55%, transparent);
  background: color-mix(in srgb, var(--brand, #fff) 9%, rgba(255, 255, 255, .035));
  transform: translateY(-3px);
  box-shadow: 0 10px 26px -12px var(--brand, #fff);
}

.chip:hover .chip-icon {
  color: var(--brand, currentColor);
  transform: scale(1.14) rotate(-5deg);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--brand, #fff) 55%, transparent));
}

.chip:hover::after {
  opacity: 1;
  animation: sweep .7s var(--ease);
}

@keyframes sweep {
  from { transform: translateX(-120%); }
  to   { transform: translateX(120%); }
}

@keyframes chip-in {
  to {
    opacity: 1;
    transform: none;
  }
}

/* no hover to reveal the brand colour on touch — show it at rest */
@media (hover: none) {
  .chip-icon { color: var(--brand, var(--ink-faint)); opacity: .95; }
}

/* ---------- os line ---------------------------------------------- */

.os {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 1.9rem;
  font-size: .86rem;
  color: var(--ink-faint);
}

.os-chip {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  padding: .3rem .7rem .3rem .6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  font-size: .8rem;
  font-weight: 500;
  color: var(--ink-dim);
  cursor: default;
  transition:
    color .3s var(--ease),
    border-color .3s var(--ease),
    background-color .3s var(--ease),
    transform .3s var(--ease),
    box-shadow .3s var(--ease);
}

.os-icon {
  width: 15px;
  height: 15px;
  flex: none;
  fill: currentColor;
  color: var(--brand, var(--ink-faint));
  opacity: .9;
  transition: transform .45s var(--ease), filter .3s var(--ease);
}

.os-chip:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--brand, #fff) 50%, transparent);
  background: color-mix(in srgb, var(--brand, #fff) 8%, rgba(255, 255, 255, .04));
  transform: translateY(-2px);
  box-shadow: 0 10px 26px -14px var(--brand, #fff);
}

.os-chip:hover .os-icon {
  transform: scale(1.14);
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--brand, #fff) 55%, transparent));
}

/* ---------- button ----------------------------------------------- */

.actions { margin-bottom: 2.25rem; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  padding: .9rem 1.35rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .04));
  color: var(--ink);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform .35s var(--ease),
    border-color .35s var(--ease),
    box-shadow .35s var(--ease);
  will-change: transform;
}

.btn-glow {
  position: absolute;
  inset: -60%;
  z-index: -1;
  background: conic-gradient(from 180deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  opacity: 0;
  filter: blur(18px);
  transition: opacity .4s var(--ease);
}

.btn:hover,
.btn:focus-visible {
  border-color: rgba(255, 255, 255, .28);
  box-shadow: 0 14px 40px -12px rgba(124, 92, 255, .75);
}

.btn:hover .btn-glow,
.btn:focus-visible .btn-glow { opacity: .55; }

.btn:active { transform: scale(.98); }

.btn .icon {
  width: 18px;
  height: 18px;
  transition: transform .35s var(--ease);
}

.btn:hover .icon { transform: scale(1.12) rotate(-4deg); }

.btn .arrow {
  width: 15px;
  height: 15px;
  opacity: .55;
  transition: transform .35s var(--ease), opacity .35s var(--ease);
}

.btn:hover .arrow,
.btn:focus-visible .arrow {
  transform: translateX(4px);
  opacity: 1;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

/* ---------- meta footer ------------------------------------------ */

.meta {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .74rem;
  letter-spacing: .06em;
  color: var(--ink-faint);
}

.meta .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.meta .sep { opacity: .4; }

/* ---------- entrance reveal -------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(6px);
  animation: rise .9s var(--ease) forwards;
  animation-delay: var(--d, 0ms);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

/* ---------- responsive ------------------------------------------- */

@media (max-width: 480px) {
  .card { border-radius: 20px; }
  .btn  { width: 100%; justify-content: center; }
  .name .word.grad { letter-spacing: -.045em; }
  .chip { font-size: .78rem; padding: .3rem .6rem; }
}

/* ---------- reduced motion --------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .reveal,
  .chip {
    opacity: 1;
    transform: none;
    filter: none;
    animation-delay: 0ms !important;
  }

  #field { display: none; }
  .spotlight { display: none; }
  .card { transform: none !important; }
  .chip::after { display: none; }
  .caret { opacity: 1; }
}
