/* ============================================================
   Urienix — Personal site
   Palette: Dracula (#14141B ink · #BD93F9 purple · #80FFEA cyan
            · #8AFF80 green · #FF80BF pink · #F1FA8C yellow)
   Type:    Press Start 2P — hero title, section titles, brand
            JetBrains Mono — everything else (labels use uppercase
            + letter-spacing to keep the console-y feel readable)
   ============================================================ */

:root {
  --ink:    #14141B;
  --panel:  #1F1F2A;
  --surface:#282A36;
  --edge:   #44475A;
  --text:   #F8F8F2;
  --muted:  #B8B8C4;

  --cyan:   #80FFEA;
  --green:  #8AFF80;
  --yellow: #F1FA8C;
  --pink:   #FF80BF;
  --purple: #BD93F9;
  --red:    #FF5555;

  --brand-dim:   rgba(189, 147, 249, 0.35);
  --brand-ghost: rgba(189, 147, 249, 0.10);
  --edge-soft:   rgba(184, 184, 196, 0.16);

  --px: 4px;

  --nav-h: 64px;

  /* Small-label shorthand — mono, uppercase, tracked. Used in nav,
     buttons, chips, badges, card headings. Legible at 10-12px. */
  --label-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Utility for label-style text — mono uppercase with wide tracking. */
.u-label {
  font-family: var(--label-family);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  background-color: var(--ink);
  color: var(--text);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--purple); color: var(--ink); }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--pink); }

/* ---------- Background layers ---------- */

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bg-grid {
  background-image:
    linear-gradient(to right,  rgba(184,184,196,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(184,184,196,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 25%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 25%, transparent 85%);
}

.bg-glow {
  background:
    radial-gradient(circle 620px at 50% 12%, rgba(189,147,249,0.22), transparent 70%),
    radial-gradient(circle 520px at 15% 90%, rgba(128,255,234,0.14), transparent 72%),
    radial-gradient(circle 460px at 88% 70%, rgba(255,128,191,0.12), transparent 72%);
  animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe { 0%,100%{opacity:.7} 50%{opacity:1} }

/* Scanlines are now driven by the CRT mode toggle (see below) so the base
   view is clean and the effect is a single, coherent look. */
.bg-scanlines { display: none; }

#bubbles { overflow: hidden; }
.bubble {
  position: absolute;
  bottom: -40px;
  width: var(--px);
  height: var(--px);
  background: var(--purple);
  opacity: 0;
  box-shadow: 0 0 8px var(--brand-dim);
  animation: rise linear infinite;
}
@keyframes rise {
  0%   { transform: translateY(0)     translateX(0);   opacity: 0;    }
  8%   {                                                opacity: 0.7;  }
  50%  { transform: translateY(-55vh) translateX(14px); opacity: 0.55; }
  92%  {                                                opacity: 0.25; }
  100% { transform: translateY(-110vh) translateX(-8px); opacity: 0;   }
}

/* ---------- CRT mode (default: on) ----------
   Classic CRT look ported from urienix-site:
     ::before → dense horizontal scanlines (2px pitch) + subtle RGB
                phosphor stripes (3px pitch). Same recipe as the old site.
     ::after  → whole-screen "flicker" — an almost-transparent dark layer
                whose opacity dances rapidly, giving that faint TV wobble.
   Toggle: add `.crt-off` on <body> to disable both layers. */

body::before,
body::after {
  content: " ";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 55;
  transition: opacity 0.3s ease;
}

body::before {
  background:
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.28) 50%),
    linear-gradient(90deg,
      rgba(255, 0, 0, 0.06),
      rgba(0, 255, 0, 0.02),
      rgba(0, 0, 255, 0.06));
  background-size: 100% 2px, 3px 100%;
}

body::after {
  background: rgba(18, 16, 16, 0.10);
  animation: crt-flicker 0.15s infinite steps(1, end);
}

@keyframes crt-flicker {
  0%   { opacity: 0.27861; }
  5%   { opacity: 0.34769; }
  10%  { opacity: 0.23604; }
  15%  { opacity: 0.90626; }
  20%  { opacity: 0.18128; }
  25%  { opacity: 0.83891; }
  30%  { opacity: 0.65583; }
  35%  { opacity: 0.67807; }
  40%  { opacity: 0.26559; }
  45%  { opacity: 0.84693; }
  50%  { opacity: 0.96019; }
  55%  { opacity: 0.08594; }
  60%  { opacity: 0.20313; }
  65%  { opacity: 0.71988; }
  70%  { opacity: 0.53455; }
  75%  { opacity: 0.37288; }
  80%  { opacity: 0.71428; }
  85%  { opacity: 0.70419; }
  90%  { opacity: 0.70030; }
  95%  { opacity: 0.36108; }
  100% { opacity: 0.24387; }
}

body.crt-off::before,
body.crt-off::after {
  opacity: 0;
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; opacity: 0.30; }
}

/* ---------- Nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px clamp(14px, 3vw, 28px);
  min-height: var(--nav-h);
  background: rgba(20, 20, 27, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--edge-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
}
.brand:hover { color: var(--cyan); }
.brand-logo {
  border-radius: 999px;
  border: 1px solid var(--edge);
  image-rendering: pixelated;
}
.brand-caret {
  color: var(--purple);
  animation: blink 1s steps(1, end) infinite;
}
@keyframes blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0.15; }
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.8vw, 26px);
  font-family: var(--label-family);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.nav-links a {
  color: var(--muted);
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
  border-bottom-color: var(--purple);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  background: rgba(31,31,42,0.7);
  border: 1px solid var(--edge-soft);
  border-radius: 4px;
}
.lang-btn {
  font-family: var(--label-family);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 5px 8px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.lang-btn:hover { color: var(--text); border-color: var(--brand-dim); }
.lang-btn[aria-pressed="true"] {
  color: var(--ink);
  background: var(--purple);
  border-color: var(--purple);
  box-shadow: 0 0 14px var(--brand-dim);
}
.lang-sep { color: rgba(184,184,196,0.4); font-size: 11px; }

.crt-toggle {
  font-family: var(--label-family);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 7px 10px;
  color: var(--green);
  background: rgba(31,31,42,0.7);
  border: 1px solid rgba(138,255,128,0.35);
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.crt-toggle:hover { color: var(--text); border-color: var(--brand-dim); }
.crt-toggle[aria-pressed="false"] {
  color: var(--muted);
  border-color: var(--edge-soft);
  background: transparent;
}

/* Hide nav links on tiny screens */
@media (max-width: 720px) {
  .nav-links a { font-size: 12px; padding: 6px 2px; }
  .brand-name  { display: none; }
}
@media (max-width: 480px) {
  .nav-links { display: none; }
}

/* ---------- Sections ---------- */

main { position: relative; z-index: 10; }

.section {
  padding: clamp(64px, 10vh, 120px) clamp(18px, 5vw, 48px);
  max-width: 1180px;
  margin: 0 auto;
  scroll-margin-top: var(--nav-h);
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: clamp(32px, 5vh, 48px);
}
.section-title {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(20px, 3.2vw, 30px);
  line-height: 1.35;
  color: var(--text);
  text-shadow: 0 0 22px rgba(189,147,249,0.35);
  position: relative;
  padding-left: 28px;
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: var(--purple);
  box-shadow: 3px 3px 0 var(--pink);
}
.section-kicker {
  margin: 0 0 0 28px;
  font-family: var(--label-family);
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ---------- Hero ---------- */

.section-hero {
  padding-top: clamp(24px, 5vh, 60px);
  padding-bottom: clamp(48px, 8vh, 96px);
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
}
.hero-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.hero-avatar-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  display: grid;
  place-items: center;
  perspective: 900px;
}
.hero-avatar {
  width: 180px;
  height: 180px;
  border-radius: 999px;
  border: 3px solid var(--purple);
  image-rendering: pixelated;
  box-shadow:
    0 0 0 6px rgba(20,20,27,1),
    0 0 40px rgba(189,147,249,0.35);
  object-fit: cover;
  background: var(--panel);
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-8px); }
}

/* ---------- Moneda del hero ----------
   Tres capas, un transform cada una, porque flotar y girar sobre el mismo
   elemento significa pelearse por la misma propiedad:
     .hero-coin       -> flota (translateY), heredado del avatar de siempre
     .hero-coin-inner -> gira (rotateY) al pasar el raton
     .coin-face       -> cada cara, con su reverso oculto
   El anillo punteado se queda fuera a proposito: gira en su propio eje y no
   acompana a la moneda. */

.hero-coin {
  width: 180px;
  height: 180px;
  animation: float 5s ease-in-out infinite;
  transform-style: preserve-3d;
}

/* La moneda invita a jugar con ella, asi que se comporta como algo pulsable.
   El cursor cubre la caja de la moneda, que es la misma que escucha el click:
   los 180 px de .hero-coin, no los 200 px del hueco que la contiene. */
.hero-coin,
.hero-coin-inner,
.coin-face {
  cursor: pointer;
}

.hero-coin-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.35, 0.05, 0.2, 1);
}

.hero-avatar-wrap:hover .hero-coin-inner,
.hero-avatar-wrap:focus-within .hero-coin-inner {
  transform: rotateY(180deg);
}

.coin-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* El retrato es pixel art de 128 px servido a x3. Escalarlo suave evita el
   moire que sale al reducir 384 -> 180 a base de vecino mas cercano. */
.coin-face--back {
  transform: rotateY(180deg);
  image-rendering: auto;
}
.avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px dashed rgba(189,147,249,0.4);
  animation: spin 22s linear infinite;
  /* Es decoracion y va por encima de la moneda, asi que sin esto se queda
     con el raton: ni el cursor de la moneda ni su click llegarian nunca. */
  pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero-title {
  margin: 10px 0 0;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(22px, 5vw, 42px);
  line-height: 1.5;
  color: var(--cyan);
  text-shadow: 0 0 24px rgba(128,255,234,0.35);
  position: relative;
}
.hero-title.is-glitching::before,
.hero-title.is-glitching::after {
  content: attr(data-glitch);
  position: absolute; inset: 0;
  color: var(--cyan);
}
.hero-title.is-glitching::before {
  color: var(--pink);
  transform: translate(-2px, 1px);
  clip-path: inset(0 0 55% 0);
  opacity: 0.85;
}
.hero-title.is-glitching::after {
  color: var(--purple);
  transform: translate(2px, -1px);
  clip-path: inset(58% 0 0 0);
  opacity: 0.75;
}

.hero-role {
  margin: 4px 0 0;
  font-family: var(--label-family);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--pink);
}
.hero-role .brk { color: var(--muted); margin: 0 8px; font-weight: 400; }

/* Terminal */
.terminal {
  width: min(720px, 96%);
  margin-top: 12px;
  background: rgba(20,20,27,0.78);
  border: 1px solid var(--edge);
  box-shadow: 0 0 30px rgba(0,0,0,0.4), 0 0 20px rgba(189,147,249,0.2);
  overflow: hidden;
  text-align: left;
  border-radius: 6px;
}
.term-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--edge);
}
.term-dot {
  width: 10px; height: 10px; border-radius: 999px;
  display: inline-block;
}
.term-dot--red    { background: var(--red); }
.term-dot--yellow { background: var(--yellow); }
.term-dot--green  { background: var(--green); }
.term-title {
  margin-left: 8px;
  font-family: var(--label-family);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.term-body {
  padding: 16px 18px 18px;
  font-size: clamp(13px, 1.6vw, 14.5px);
  line-height: 1.85;
}
.term-body p { margin: 0; }
.prompt { color: var(--pink); margin-right: 8px; }

/* El texto espera escondido a que el tecleo tome el mando. Se oculta con
   visibility y no con display, para que siga ocupando su sitio y la caja no
   cambie de alto al empezar. La clase la pone el propio JS al arrancar. */
.js .term-body [data-i18n] { visibility: hidden; }
.js .term-body.is-live [data-i18n] { visibility: visible; }
.caret  { color: var(--purple); animation: blink 1s steps(1,end) infinite; }

/* Socials */
.socials {
  display: flex;
  gap: 12px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.socials a {
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--edge);
  color: var(--text);
  transition: color 0.15s ease, background-color 0.15s ease, transform 0.12s ease;
}
.socials a:hover {
  color: var(--yellow);
  background: rgba(241,250,140,0.08);
  transform: translateY(-2px);
}

/* Simple pixel-styled social icons using pseudo elements or SVG data */
.ic {
  display: block;
  width: 20px; height: 20px;
  background: currentColor;
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
}
.ic-github    { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 .5C5.7.5.7 5.6.7 11.9c0 5 3.3 9.3 7.9 10.8.6.1.8-.3.8-.6v-2c-3.2.7-3.9-1.5-3.9-1.5-.5-1.3-1.3-1.7-1.3-1.7-1.1-.7.1-.7.1-.7 1.2.1 1.8 1.2 1.8 1.2 1 1.8 2.7 1.3 3.4 1 .1-.8.4-1.3.7-1.6-2.6-.3-5.3-1.3-5.3-5.9 0-1.3.5-2.4 1.2-3.2-.1-.3-.5-1.5.1-3.2 0 0 1-.3 3.3 1.2 1-.3 2-.4 3-.4s2 .1 3 .4c2.3-1.6 3.3-1.2 3.3-1.2.6 1.7.2 3 .1 3.2.7.8 1.2 1.9 1.2 3.2 0 4.6-2.7 5.6-5.3 5.9.4.3.8 1 .8 2v3c0 .3.2.7.8.6 4.6-1.6 7.9-5.9 7.9-10.8C23.3 5.6 18.3.5 12 .5z'/></svg>");
              mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 .5C5.7.5.7 5.6.7 11.9c0 5 3.3 9.3 7.9 10.8.6.1.8-.3.8-.6v-2c-3.2.7-3.9-1.5-3.9-1.5-.5-1.3-1.3-1.7-1.3-1.7-1.1-.7.1-.7.1-.7 1.2.1 1.8 1.2 1.8 1.2 1 1.8 2.7 1.3 3.4 1 .1-.8.4-1.3.7-1.6-2.6-.3-5.3-1.3-5.3-5.9 0-1.3.5-2.4 1.2-3.2-.1-.3-.5-1.5.1-3.2 0 0 1-.3 3.3 1.2 1-.3 2-.4 3-.4s2 .1 3 .4c2.3-1.6 3.3-1.2 3.3-1.2.6 1.7.2 3 .1 3.2.7.8 1.2 1.9 1.2 3.2 0 4.6-2.7 5.6-5.3 5.9.4.3.8 1 .8 2v3c0 .3.2.7.8.6 4.6-1.6 7.9-5.9 7.9-10.8C23.3 5.6 18.3.5 12 .5z'/></svg>"); }
.ic-gitlab    { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M23.955 13.587l-1.342-4.135-2.664-8.199a.454.454 0 0 0-.867 0L16.418 9.45H7.582L4.919 1.253a.454.454 0 0 0-.867 0L1.387 9.452.045 13.587a.906.906 0 0 0 .333 1.017l11.618 8.484 11.62-8.484a.906.906 0 0 0 .34-1.017z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M23.955 13.587l-1.342-4.135-2.664-8.199a.454.454 0 0 0-.867 0L16.418 9.45H7.582L4.919 1.253a.454.454 0 0 0-.867 0L1.387 9.452.045 13.587a.906.906 0 0 0 .333 1.017l11.618 8.484 11.62-8.484a.906.906 0 0 0 .34-1.017z'/></svg>"); }
.ic-linkedin  { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M20.45 20.45h-3.55v-5.57c0-1.33-.02-3.05-1.86-3.05-1.86 0-2.15 1.45-2.15 2.95v5.67H9.35V9h3.4v1.56h.05c.47-.9 1.63-1.85 3.36-1.85 3.6 0 4.27 2.37 4.27 5.46v6.28zM5.34 7.43a2.06 2.06 0 1 1 0-4.12 2.06 2.06 0 0 1 0 4.12zM7.11 20.45H3.56V9h3.55v11.45zM22.22 0H1.77C.79 0 0 .77 0 1.72v20.56C0 23.23.79 24 1.77 24h20.45c.98 0 1.77-.77 1.77-1.72V1.72C24 .77 23.2 0 22.22 0z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M20.45 20.45h-3.55v-5.57c0-1.33-.02-3.05-1.86-3.05-1.86 0-2.15 1.45-2.15 2.95v5.67H9.35V9h3.4v1.56h.05c.47-.9 1.63-1.85 3.36-1.85 3.6 0 4.27 2.37 4.27 5.46v6.28zM5.34 7.43a2.06 2.06 0 1 1 0-4.12 2.06 2.06 0 0 1 0 4.12zM7.11 20.45H3.56V9h3.55v11.45zM22.22 0H1.77C.79 0 0 .77 0 1.72v20.56C0 23.23.79 24 1.77 24h20.45c.98 0 1.77-.77 1.77-1.72V1.72C24 .77 23.2 0 22.22 0z'/></svg>"); }
.ic-x         { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M18.9 1.5h3.6l-7.9 9 9.3 12H16.9l-5.6-7.3-6.4 7.3H1.3l8.4-9.7L.8 1.5h7.1l5 6.6 6-6.6zm-1.3 18.5h2L7.1 3.4H5l12.6 16.6z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M18.9 1.5h3.6l-7.9 9 9.3 12H16.9l-5.6-7.3-6.4 7.3H1.3l8.4-9.7L.8 1.5h7.1l5 6.6 6-6.6zm-1.3 18.5h2L7.1 3.4H5l12.6 16.6z'/></svg>"); }
.ic-instagram { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 2.16c3.2 0 3.58.01 4.85.07 1.17.05 1.8.25 2.23.42.56.22.96.48 1.38.9.42.42.68.82.9 1.38.17.42.37 1.06.42 2.23.06 1.27.07 1.65.07 4.85s-.01 3.58-.07 4.85c-.05 1.17-.25 1.8-.42 2.23-.22.56-.48.96-.9 1.38-.42.42-.82.68-1.38.9-.42.17-1.06.37-2.23.42-1.27.06-1.65.07-4.85.07s-3.58-.01-4.85-.07c-1.17-.05-1.8-.25-2.23-.42a3.7 3.7 0 0 1-1.38-.9 3.7 3.7 0 0 1-.9-1.38c-.17-.42-.37-1.06-.42-2.23C2.17 15.58 2.16 15.2 2.16 12s.01-3.58.07-4.85c.05-1.17.25-1.8.42-2.23.22-.56.48-.96.9-1.38.42-.42.82-.68 1.38-.9.42-.17 1.06-.37 2.23-.42C8.42 2.17 8.8 2.16 12 2.16zM12 0C8.74 0 8.33.01 7.05.07 5.78.13 4.9.34 4.14.63a5.9 5.9 0 0 0-2.13 1.38A5.9 5.9 0 0 0 .63 4.14C.34 4.9.13 5.78.07 7.05.01 8.33 0 8.74 0 12s.01 3.67.07 4.95c.06 1.27.27 2.15.56 2.91.3.79.7 1.46 1.38 2.13.68.68 1.35 1.09 2.13 1.38.76.3 1.64.5 2.91.56C8.33 23.99 8.74 24 12 24s3.67-.01 4.95-.07c1.27-.06 2.15-.27 2.91-.56a5.9 5.9 0 0 0 2.13-1.38 5.9 5.9 0 0 0 1.38-2.13c.3-.76.5-1.64.56-2.91.06-1.28.07-1.69.07-4.95s-.01-3.67-.07-4.95c-.06-1.27-.27-2.15-.56-2.91a5.9 5.9 0 0 0-1.38-2.13A5.9 5.9 0 0 0 19.86.63C19.1.34 18.22.13 16.95.07 15.67.01 15.26 0 12 0zm0 5.84A6.16 6.16 0 1 0 12 18.16 6.16 6.16 0 0 0 12 5.84zm0 10.16A4 4 0 1 1 12 8a4 4 0 0 1 0 8zm6.4-11.85a1.44 1.44 0 1 0 0 2.88 1.44 1.44 0 0 0 0-2.88z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 2.16c3.2 0 3.58.01 4.85.07 1.17.05 1.8.25 2.23.42.56.22.96.48 1.38.9.42.42.68.82.9 1.38.17.42.37 1.06.42 2.23.06 1.27.07 1.65.07 4.85s-.01 3.58-.07 4.85c-.05 1.17-.25 1.8-.42 2.23-.22.56-.48.96-.9 1.38-.42.42-.82.68-1.38.9-.42.17-1.06.37-2.23.42-1.27.06-1.65.07-4.85.07s-3.58-.01-4.85-.07c-1.17-.05-1.8-.25-2.23-.42a3.7 3.7 0 0 1-1.38-.9 3.7 3.7 0 0 1-.9-1.38c-.17-.42-.37-1.06-.42-2.23C2.17 15.58 2.16 15.2 2.16 12s.01-3.58.07-4.85c.05-1.17.25-1.8.42-2.23.22-.56.48-.96.9-1.38.42-.42.82-.68 1.38-.9.42-.17 1.06-.37 2.23-.42C8.42 2.17 8.8 2.16 12 2.16zM12 0C8.74 0 8.33.01 7.05.07 5.78.13 4.9.34 4.14.63a5.9 5.9 0 0 0-2.13 1.38A5.9 5.9 0 0 0 .63 4.14C.34 4.9.13 5.78.07 7.05.01 8.33 0 8.74 0 12s.01 3.67.07 4.95c.06 1.27.27 2.15.56 2.91.3.79.7 1.46 1.38 2.13.68.68 1.35 1.09 2.13 1.38.76.3 1.64.5 2.91.56C8.33 23.99 8.74 24 12 24s3.67-.01 4.95-.07c1.27-.06 2.15-.27 2.91-.56a5.9 5.9 0 0 0 2.13-1.38 5.9 5.9 0 0 0 1.38-2.13c.3-.76.5-1.64.56-2.91.06-1.28.07-1.69.07-4.95s-.01-3.67-.07-4.95c-.06-1.27-.27-2.15-.56-2.91a5.9 5.9 0 0 0-1.38-2.13A5.9 5.9 0 0 0 19.86.63C19.1.34 18.22.13 16.95.07 15.67.01 15.26 0 12 0zm0 5.84A6.16 6.16 0 1 0 12 18.16 6.16 6.16 0 0 0 12 5.84zm0 10.16A4 4 0 1 1 12 8a4 4 0 0 1 0 8zm6.4-11.85a1.44 1.44 0 1 0 0 2.88 1.44 1.44 0 0 0 0-2.88z'/></svg>"); }
.ic-mail      { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M2 4h20a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zm10 8.5L2 6v.01L12 13l10-6.99V6l-10 6.5z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M2 4h20a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zm10 8.5L2 6v.01L12 13l10-6.99V6l-10 6.5z'/></svg>"); }

.scroll-cue {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--label-family);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.22em;
}
.scroll-cue .cue-arrow {
  display: inline-block;
  animation: bounce 1.6s ease-in-out infinite;
  color: var(--purple);
}
@keyframes bounce {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(4px); }
}
.scroll-cue:hover { color: var(--cyan); }

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.about-card {
  padding: 22px 22px;
  background: linear-gradient(180deg, rgba(31,31,42,0.85), rgba(40,42,54,0.85));
  border: 1px solid var(--edge);
  border-radius: 8px;
  box-shadow: var(--px) var(--px) 0 rgba(189,147,249,0.15);
}
.about-card--wide { grid-column: 1 / -1; }
.about-h {
  margin: 0 0 14px;
  font-family: var(--label-family);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--pink);
}
.about-card p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.8; color: var(--text); }
.about-card strong { color: var(--cyan); font-weight: 600; }

.dot-list {
  margin: 0; padding: 0; list-style: none;
  display: grid; gap: 8px;
}
.dot-list li {
  position: relative;
  padding-left: 22px;
  line-height: 1.6;
  color: var(--text);
}
.dot-list li::before {
  content: "";
  position: absolute; left: 4px; top: 10px;
  width: 8px; height: 8px;
  background: var(--purple);
  box-shadow: 2px 2px 0 var(--pink);
}
.dot-list strong { color: var(--cyan); }

.chip-list {
  margin: 4px 0 0; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.chip {
  padding: 7px 12px;
  font-family: var(--label-family);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
  border: 1px solid var(--edge);
  background: rgba(20,20,27,0.5);
  border-radius: 3px;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.chip:hover { transform: translate(-2px,-2px); box-shadow: var(--px) var(--px) 0 currentColor; }
.chip--purple { color: var(--purple); border-color: rgba(189,147,249,0.5); }
.chip--cyan   { color: var(--cyan);   border-color: rgba(128,255,234,0.5); }
.chip--green  { color: var(--green);  border-color: rgba(138,255,128,0.5); }
.chip--yellow { color: var(--yellow); border-color: rgba(241,250,140,0.5); }
.chip--pink   { color: var(--pink);   border-color: rgba(255,128,191,0.5); }

@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ---------- Career timeline ---------- */

.timeline {
  position: relative;
  margin: 0;
  padding: 0 0 0 22px;
  list-style: none;
  border-left: 2px dashed rgba(189,147,249,0.35);
}
.tl-item {
  position: relative;
  padding: 4px 4px 34px 26px;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: -8px; top: 10px;
  width: 14px; height: 14px;
  background: var(--purple);
  box-shadow: 3px 3px 0 var(--pink);
}
.tl-item.is-current::before { background: var(--green); box-shadow: 3px 3px 0 var(--cyan); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse {
  0%,100% { box-shadow: 3px 3px 0 var(--cyan), 0 0 0 0 rgba(138,255,128,0.6); }
  50%     { box-shadow: 3px 3px 0 var(--cyan), 0 0 0 6px rgba(138,255,128,0); }
}

.tl-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px;
  margin-bottom: 6px;
}
.tl-role {
  font-family: var(--label-family);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.01em;
}
.tl-at { color: var(--muted); font-size: 13px; }
.tl-company { color: var(--pink); font-weight: 700; font-size: 14.5px; }
.tl-dates {
  margin-left: auto;
  font-family: var(--label-family);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.tl-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 8px 0 10px; padding: 0; list-style: none;
}
.tl-tag {
  font-family: var(--label-family);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  color: var(--muted);
  background: rgba(68,71,90,0.4);
  border: 1px solid var(--edge);
  border-radius: 3px;
  letter-spacing: 0.02em;
}
.tl-tag.tl-tag--current,
.tl-tag.tl-tag--remote {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.tl-tag.tl-tag--current { color: var(--green); border-color: rgba(138,255,128,0.5); }
.tl-tag.tl-tag--remote  { color: var(--yellow); border-color: rgba(241,250,140,0.5); }
.tl-desc { margin: 4px 0 0; color: var(--text); font-size: 13.5px; line-height: 1.7; }
.tl-highlights {
  margin: 10px 0 0; padding: 0 0 0 20px;
  color: var(--muted); font-size: 13px; line-height: 1.8;
}
.tl-highlights li::marker { color: var(--purple); }

/* ---------- Skills ---------- */

.skills-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.skill-card {
  padding: 18px;
  background: rgba(31,31,42,0.85);
  border: 1px solid var(--edge);
  border-radius: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.15s ease;
}
.skill-card:hover {
  transform: translate(-3px,-3px);
  box-shadow: 6px 6px 0 rgba(189,147,249,0.25);
  border-color: var(--purple);
}
.skill-h {
  margin: 0 0 14px;
  font-family: var(--label-family);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--yellow);
}
.skill-icons { margin-bottom: 12px; }
.skill-icons img { max-width: 100%; height: auto; }
.skill-note { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.7; }

@media (max-width: 900px) { .skills-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .skills-grid { grid-template-columns: 1fr; } }

/* ---------- Projects ---------- */

.projects-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.project-card {
  display: flex;
  flex-direction: column;
  background: rgba(31,31,42,0.9);
  border: 1px solid var(--edge);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.15s ease;
}
.project-card:hover {
  transform: translate(-3px,-3px);
  box-shadow: 6px 6px 0 rgba(255,128,191,0.25);
  border-color: var(--pink);
}
.project-media {
  background: linear-gradient(135deg, #282A36, #14141B);
  padding: 22px;
  display: grid;
  place-items: center;
  height: 160px;
  border-bottom: 1px solid var(--edge);
}
.project-media img { max-height: 120px; max-width: 100%; object-fit: contain; }
.project-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project-title {
  margin: 0;
  font-family: var(--label-family);
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.01em;
}
.project-desc { margin: 0; color: var(--text); font-size: 13.5px; line-height: 1.65; flex: 1; }
.project-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0; padding: 0; list-style: none;
}
.project-tag {
  font-family: var(--label-family);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  color: var(--purple);
  border: 1px solid rgba(189,147,249,0.35);
  border-radius: 3px;
  letter-spacing: 0.02em;
}
.project-cta {
  margin-top: 6px;
  align-self: flex-start;
  padding: 8px 14px;
  font-family: var(--label-family);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--yellow);
  border: 1px solid var(--yellow);
  border-radius: 3px;
  letter-spacing: 0.1em;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.project-cta:hover {
  color: var(--ink);
  background: var(--pink);
  border-color: var(--pink);
  transform: translate(-2px,-2px);
  box-shadow: 4px 4px 0 rgba(255,128,191,0.4);
}

.projects-more {
  margin: 28px 0 0;
  text-align: right;
}
.projects-more a {
  font-family: var(--label-family);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--cyan);
  letter-spacing: 0.12em;
}

/* ---------- Contact ---------- */

.contact-card {
  padding: 28px;
  background: linear-gradient(180deg, rgba(31,31,42,0.9), rgba(40,42,54,0.9));
  border: 1px solid var(--edge);
  border-radius: 8px;
  box-shadow: 4px 4px 0 rgba(189,147,249,0.2);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-lead {
  margin: 0;
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
}
.cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-family: var(--label-family);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  background: var(--cyan);
  border: 1px solid var(--cyan);
  border-radius: 3px;
  box-shadow: var(--px) var(--px) 0 var(--brand-dim);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}
.cta:hover {
  background: var(--pink);
  border-color: var(--pink);
  transform: translate(-2px,-2px);
  box-shadow: 6px 6px 0 rgba(255,128,191,0.35);
  color: var(--ink);
}
.cta-icon { color: var(--ink); font-size: 12px; }

.contact-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0,1fr));
  margin: 0; padding: 0; list-style: none;
  font-size: 13px;
}
.contact-list li {
  display: flex; gap: 12px; align-items: baseline;
  padding: 10px 12px;
  background: rgba(20,20,27,0.5);
  border: 1px dashed rgba(184,184,196,0.2);
}
.contact-list .k {
  min-width: 90px;
  font-family: var(--label-family);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.14em;
}
@media (max-width: 560px) { .contact-list { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 9px;
  padding: 28px 20px 40px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(184,184,196,0.65);
  border-top: 1px solid var(--edge-soft);
}
.site-footer .dot { color: var(--purple); }
.site-footer a    { color: var(--cyan); }

/* ---------- Reveal on scroll ----------
   Opt-out: elements default visible so no-JS / SSR / snapshots still work.
   The JS observer adds .reveal-hidden right before it observes, then removes
   the class when the element enters the viewport, giving the nice animation
   only when the browser can play it. */

[data-reveal] {
  transition: opacity .7s ease, transform .7s ease, filter .7s ease;
}
[data-reveal].reveal-hidden {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(4px);
}

/* ---------- Accessibility ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .bubble { display: none; }
  [data-reveal].reveal-hidden { opacity: 1; transform: none; filter: none; }
}
