/* =========================================================
   Renz Sayaman — Portfolio
   ========================================================= */

:root {
  --bg: #0a0a0f;
  --bg-2: #101018;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.14);
  --text: #ededf2;
  --muted: #9b9bab;
  --accent: #ffa733;
  --accent-2: #ff5e3a;
  --violet: #7c5cff;
  --grad: linear-gradient(135deg, #ffc35a 0%, #ff8a3d 45%, #ff5e3a 100%);
  --radius: 20px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --container: 1180px;
  --nav-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

::selection {
  background: var(--accent);
  color: #111;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

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

.muted {
  color: var(--muted);
}

.small {
  font-size: 14px;
}

.mono {
  font-family: var(--font-mono);
}

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

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--accent);
  color: #111;
  border-radius: 8px;
  font-weight: 600;
}

.skip-link:focus {
  top: 16px;
}

/* ---------- Ambient background ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  will-change: transform;
}

.blob-1 {
  width: 520px;
  height: 520px;
  background: #ff7a2f;
  top: -160px;
  left: -120px;
  animation: drift1 22s ease-in-out infinite alternate;
}

.blob-2 {
  width: 480px;
  height: 480px;
  background: var(--violet);
  top: 10%;
  right: -160px;
  opacity: 0.35;
  animation: drift2 26s ease-in-out infinite alternate;
}

.blob-3 {
  width: 420px;
  height: 420px;
  background: #ff3d6e;
  bottom: -200px;
  left: 30%;
  opacity: 0.2;
  animation: drift3 30s ease-in-out infinite alternate;
}

@keyframes drift1 {
  to {
    transform: translate(180px, 140px) scale(1.15);
  }
}

@keyframes drift2 {
  to {
    transform: translate(-160px, 200px) scale(0.9);
  }
}

@keyframes drift3 {
  to {
    transform: translate(-200px, -120px) scale(1.2);
  }
}

.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 560px;
  height: 560px;
  margin: -280px 0 0 -280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 150, 60, 0.12), transparent 60%);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity .4s;
}

.cursor-glow.on {
  opacity: 1;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--grad);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 200;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s, border-color .3s;
  will-change: transform;
}

.btn-sm {
  padding: 10px 18px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--grad);
  color: #160c02;
  box-shadow: 0 10px 30px -10px rgba(255, 120, 50, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 16px 40px -10px rgba(255, 120, 50, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-ghost {
  border: 1px solid var(--border-2);
  background: var(--surface);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  border-color: var(--accent);
  background: rgba(255, 167, 51, 0.08);
}

.btn i {
  transition: transform .3s var(--ease);
}

.btn:hover i {
  transform: translate(2px, -2px);
}

/* ---------- Navigation ---------- */
.nav-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 14px 16px;
  transition: padding .3s var(--ease);
}

.nav {
  max-width: var(--container);
  margin: 0 auto;
  height: 56px;
  padding: 0 8px 0 18px;
  display: flex;
  align-items: center;
  gap: 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: background .3s, border-color .3s, box-shadow .3s;
}

.nav-wrap.scrolled .nav {
  background: rgba(14, 14, 20, 0.7);
  border-color: var(--border);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  margin-right: auto;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--grad);
  color: #160c02;
  font-size: 14px;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-links a {
  position: relative;
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 999px;
  transition: color .2s, background .2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a.active {
  color: var(--text);
  background: var(--surface-2);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  position: relative;
}

.menu-toggle span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .35s var(--ease), top .35s var(--ease);
}

.menu-toggle span:first-child {
  top: 17px;
}

.menu-toggle span:last-child {
  top: 25px;
}

.menu-toggle[aria-expanded="true"] span:first-child {
  top: 21px;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
  top: 21px;
  transform: rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(10, 10, 15, 0.96);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px 28px 40px;
  clip-path: circle(0% at calc(100% - 44px) 42px);
  transition: clip-path .6s var(--ease);
  visibility: hidden;
}

.mobile-menu.open {
  clip-path: circle(150% at calc(100% - 44px) 42px);
  visibility: visible;
}

.mobile-menu li {
  overflow: hidden;
}

.mobile-menu li a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--font-display);
  font-size: clamp(36px, 10vw, 52px);
  font-weight: 700;
  padding: 6px 0;
  transform: translateY(100%);
  transition: transform .5s var(--ease);
}

.mobile-menu li a span {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
}

.mobile-menu.open li a {
  transform: none;
}

.mobile-menu.open li:nth-child(2) a { transition-delay: .05s; }
.mobile-menu.open li:nth-child(3) a { transition-delay: .1s; }
.mobile-menu.open li:nth-child(4) a { transition-delay: .15s; }
.mobile-menu.open li:nth-child(5) a { transition-delay: .2s; }

.mobile-mail {
  margin-top: 40px;
  color: var(--muted);
  font-size: 15px;
  word-break: break-all;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero-grid > *,
.about-grid > *,
.contact-card > * {
  min-width: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  backdrop-filter: blur(8px);
}

.pulse {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2ee59d;
  flex-shrink: 0;
}

.pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #2ee59d;
  animation: ping 1.8s cubic-bezier(0, 0, .2, 1) infinite;
}

@keyframes ping {

  75%,
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

.hero-title {
  margin-top: 24px;
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.hero-role {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: clamp(17px, 2.2vw, 22px);
  color: var(--text);
  min-height: 1.6em;
}

.hero-role .mono {
  color: var(--accent);
}

.caret {
  display: inline-block;
  width: 10px;
  height: 1.1em;
  margin-left: 4px;
  vertical-align: -0.15em;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-sub {
  margin-top: 20px;
  max-width: 540px;
  font-size: 18px;
  color: var(--muted);
}

.hero-sub strong {
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-meta {
  margin-top: 40px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.divider {
  width: 1px;
  height: 22px;
  background: var(--border-2);
}

.socials {
  display: flex;
  gap: 10px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 17px;
  transition: color .25s, border-color .25s, transform .25s var(--ease), background .25s;
}

.socials a:hover {
  color: #160c02;
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
}

/* Code card */
.hero-visual {
  position: relative;
  perspective: 1200px;
}

.code-card {
  position: relative;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(28, 28, 38, 0.85), rgba(16, 16, 24, 0.9));
  border: 1px solid var(--border-2);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  backdrop-filter: blur(12px);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform .2s ease-out;
}

.code-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255, 167, 51, 0.7), transparent 40%, transparent 60%, rgba(124, 92, 255, 0.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.code-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.r { background: #ff5f57; }
.dot.y { background: #febc2e; }
.dot.g { background: #28c840; }

.code-file {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.code-body {
  margin: 0;
  padding: 22px 24px 26px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.85;
  color: #c9c9d6;
  overflow-x: auto;
  white-space: pre;
}

.code-body .k { color: #c792ea; }
.code-body .v { color: #82aaff; }
.code-body .p { color: #ffcb6b; }
.code-body .s { color: #c3e88d; }
.code-body .b { color: #ff9e64; }
.code-body .f { color: #89ddff; }
.code-body .c { color: #6b6b80; }

.float-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(20, 20, 28, 0.85);
  border: 1px solid var(--border-2);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
  animation: float 6s ease-in-out infinite;
  white-space: nowrap;
}

.float-chip i {
  color: var(--accent);
}

.chip-1 {
  top: -22px;
  right: 24px;
}

.chip-2 {
  bottom: -22px;
  left: -18px;
  animation-delay: -3s;
}

.chip-2 i {
  color: #2ee59d;
}

@keyframes float {
  50% {
    transform: translateY(-10px);
  }
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.6;
  transition: opacity .3s;
}

.scroll-cue:hover {
  opacity: 1;
}

.mouse {
  display: block;
  width: 24px;
  height: 38px;
  border: 2px solid var(--muted);
  border-radius: 14px;
  position: relative;
}

.wheel {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--accent);
  animation: wheel 1.6s ease-in-out infinite;
}

@keyframes wheel {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}

/* ---------- Marquee ---------- */
.marquee {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
  padding: 22px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: marquee 32s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track span {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  transition: color .3s;
}

.marquee-track span:hover {
  color: var(--text);
}

.marquee-track i {
  color: var(--accent);
  font-size: 24px;
}

@keyframes marquee {
  to {
    transform: translateX(calc(-50% - 28px));
  }
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding: 120px 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 64px;
}

.section-head-row {
  max-width: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}

.head-note {
  max-width: 320px;
  font-size: 15px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  margin-top: 16px;
  font-size: clamp(32px, 4.6vw, 54px);
  font-weight: 700;
}

.card {
  position: relative;
  padding: 30px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color .3s, translate .4s var(--ease), background .3s;
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-2);
  translate: 0 -4px;
}

/* Spotlight hover (mouse-follow) */
.spotlight::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 167, 51, 0.12), transparent 40%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}

.spotlight:hover::before {
  opacity: 1;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: center;
}

.about-photo {
  position: relative;
}

.photo-frame {
  position: relative;
  border-radius: 28px;
  padding: 2px;
  background: linear-gradient(160deg, rgba(255, 167, 51, 0.8), rgba(255, 255, 255, 0.05) 40%, rgba(124, 92, 255, 0.6));
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8);
}

.photo-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 26px;
  filter: saturate(1.05) contrast(1.03);
}

.photo-tag {
  position: absolute;
  left: 50%;
  bottom: -26px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-radius: 18px;
  background: rgba(18, 18, 26, 0.9);
  border: 1px solid var(--border-2);
  backdrop-filter: blur(12px);
  white-space: nowrap;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
}

.photo-tag strong {
  display: block;
  font-size: 15px;
}

.photo-tag span:not(.pulse) {
  font-size: 13px;
  color: var(--muted);
}

.lead {
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.55;
  color: var(--text);
  font-weight: 500;
}

.about-body .muted {
  margin-top: 18px;
  font-size: 17px;
}

.stats {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stat {
  padding: 22px 20px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 800;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.facts {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.facts li {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  padding: 16px 18px;
  background: var(--bg-2);
}

.facts i {
  grid-row: span 2;
  align-self: center;
  font-size: 20px;
  color: var(--accent);
}

.facts span {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.facts strong {
  font-size: 15px;
  font-weight: 600;
}

/* ---------- Services ---------- */
.cards-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: rgba(255, 167, 51, 0.1);
  border: 1px solid rgba(255, 167, 51, 0.25);
  color: var(--accent);
  font-size: 24px;
  margin-bottom: 24px;
  transition: transform .4s var(--ease);
}

.card:hover .card-icon {
  transform: rotate(-8deg) scale(1.08);
}

.card h3 {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 10px;
}

.card p {
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.skill-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.skill-head i {
  font-size: 22px;
  color: var(--accent);
}

.skill-head h3 {
  margin: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips li {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  transition: border-color .25s, color .25s, background .25s;
}

.chips li:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 167, 51, 0.06);
}

/* ---------- Projects ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -24px 0 36px;
}

.filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: color .25s, border-color .25s, background .25s;
}

.filter:hover {
  color: var(--text);
  border-color: rgba(255, 167, 51, 0.5);
}

.filter.active {
  color: #160c02;
  background: var(--grad);
  border-color: transparent;
}

.filter-count {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.filter.active .filter-count {
  background: rgba(0, 0, 0, 0.15);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.project-grid > *,
.pcard > * {
  min-width: 0;
}

.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 14px;
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color .3s, background .3s;
}

.pcard:hover {
  border-color: rgba(255, 167, 51, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

.pcard.is-hidden,
.more-list li.is-hidden {
  display: none;
}

.pcard.pop {
  animation: pop .5s var(--ease) both;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(16px) scale(.98);
  }
}

.pcard-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 8px;
  align-items: stretch;
}

.pcard-media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  border-radius: 16px;
  overflow: hidden;
  background: #15151d;
  border: 1px solid var(--border-2);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
  transform-style: preserve-3d;
  transition: transform .2s ease-out, box-shadow .4s;
}

button.pcard-media:hover {
  box-shadow: 0 30px 70px -30px rgba(255, 120, 50, 0.45), 0 0 0 1px rgba(255, 167, 51, 0.3);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: #1b1b24;
  border-bottom: 1px solid var(--border);
}

.browser-bar > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a3a48;
}

.url {
  margin-left: 14px;
  flex: 1;
  max-width: 260px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pcard-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top;
  transition: transform 1.2s var(--ease);
}

.pcard-media:hover img {
  transform: scale(1.05);
}

.zoom {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--grad);
  color: #160c02;
  font-size: 17px;
  opacity: 0;
  transform: scale(.7);
  transition: opacity .3s, transform .4s var(--ease);
}

.pcard-media:hover .zoom,
.pcard-media:focus-visible .zoom {
  opacity: 1;
  transform: none;
}

.pcard-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 12px 10px;
}

.pcard-wide .pcard-body {
  padding: 22px 26px;
  justify-content: center;
}

.pcard-type {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.pcard-body h3 {
  margin-top: 10px;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
}

.pcard-wide .pcard-body h3 {
  font-size: clamp(26px, 3vw, 36px);
}

.pcard-body > p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
}

.tags {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags li {
  padding: 5px 12px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  background: rgba(255, 167, 51, 0.08);
  border: 1px solid rgba(255, 167, 51, 0.2);
}

.pcard-links {
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pcard-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  font-size: 14px;
  font-weight: 600;
  transition: color .25s, border-color .25s, background .25s, transform .25s var(--ease);
}

.pcard-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.pcard-links a.live {
  background: var(--grad);
  color: #160c02;
  border-color: transparent;
}

.pcard-links a.live:hover {
  color: #160c02;
}

/* Illustrated media for projects without a public screenshot */
.art {
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 140, 50, 0.35), transparent 55%),
    radial-gradient(120% 90% at 100% 100%, rgba(124, 92, 255, 0.4), transparent 55%),
    #14141c;
}

.pcard-wide .art {
  aspect-ratio: auto;
  min-height: 340px;
}

.art::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.art-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(10, 10, 15, 0.7);
  border: 1px solid var(--border-2);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 600;
}

.art-badge i {
  color: var(--accent);
}

.mock-dash {
  position: absolute;
  inset: 64px 8% 0;
  z-index: 1;
  border-radius: 14px 14px 0 0;
  background: rgba(14, 14, 20, 0.85);
  border: 1px solid var(--border-2);
  border-bottom: 0;
  box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, 0.6);
  transition: transform .8s var(--ease);
}

.pcard:hover .mock-dash {
  transform: translateY(-8px);
}

.mock-dash {
  display: flex;
  gap: 14px;
  padding: 16px;
}

.md-side {
  width: 18%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.md-side span {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
}

.md-side span:first-child {
  background: var(--grad);
}

.md-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.md-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.md-tiles div {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.md-tiles b {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.md-tiles i {
  display: block;
  margin-top: 8px;
  height: 12px;
  width: 60%;
  border-radius: 4px;
  background: var(--grad);
}

.md-tiles div:nth-child(2) i { width: 45%; background: #82aaff; }
.md-tiles div:nth-child(3) i { width: 52%; background: #c792ea; }

.md-chart {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 8%;
  padding: 14px 14px 0;
  border-radius: 10px 10px 0 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-bottom: 0;
}

.md-chart span {
  flex: 1;
  height: var(--h);
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #ffb547, rgba(255, 94, 58, 0.3));
  transform-origin: bottom;
}

.js .reveal.in .md-chart span {
  animation: grow 1.1s var(--ease) both;
}

.md-chart span:nth-child(2) { animation-delay: .05s !important; }
.md-chart span:nth-child(3) { animation-delay: .1s !important; }
.md-chart span:nth-child(4) { animation-delay: .15s !important; }
.md-chart span:nth-child(5) { animation-delay: .2s !important; }
.md-chart span:nth-child(6) { animation-delay: .25s !important; }
.md-chart span:nth-child(7) { animation-delay: .3s !important; }

@keyframes grow {
  from {
    transform: scaleY(0);
  }
}

/* More on GitHub */
.more {
  margin-top: 72px;
}

.more-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.more-head h3 {
  font-size: 24px;
}

.more-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.more-all:hover i {
  transform: translate(2px, -2px);
}

.more-all i {
  transition: transform .25s var(--ease);
}

.more-list {
  border-top: 1px solid var(--border);
}

.more-list a {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 18px;
  padding: 18px 12px;
  border-bottom: 1px solid var(--border);
  transition: background .25s, padding .35s var(--ease);
}

.more-list a:hover {
  background: rgba(255, 255, 255, 0.03);
  padding-left: 20px;
}

.more-list a > i:first-child {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 167, 51, 0.1);
  color: var(--accent);
  font-size: 18px;
}

.more-list div {
  min-width: 0;
}

.more-list strong {
  display: block;
  font-size: 16px;
}

.more-list span {
  display: block;
  font-size: 14px;
  color: var(--muted);
}

.more-list em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.more-list .go {
  color: var(--muted);
  transition: color .25s, transform .25s var(--ease);
}

.more-list a:hover .go {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ---------- Process ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  counter-reset: step;
  position: relative;
}

.process li {
  position: relative;
  padding: 28px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), transparent);
}

.process .step {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 167, 51, 0.4);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 22px;
  background: var(--bg);
}

.process li:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 51px;
  left: 70px;
  right: -18px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 167, 51, 0.5), transparent);
}

.process h3 {
  font-size: 21px;
  margin-bottom: 10px;
}

.process p {
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Contact ---------- */
.contact-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  padding: 56px;
  border-radius: 32px;
  background:
    radial-gradient(600px circle at 0% 0%, rgba(255, 140, 50, 0.14), transparent 50%),
    radial-gradient(600px circle at 100% 100%, rgba(124, 92, 255, 0.14), transparent 50%),
    rgba(16, 16, 24, 0.75);
  border: 1px solid var(--border-2);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.contact-title {
  margin: 16px 0 18px;
  font-size: clamp(32px, 4.2vw, 50px);
  font-weight: 700;
}

.contact-list {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color .25s, background .25s;
}

.contact-item:hover {
  border-color: var(--border-2);
  background: rgba(255, 255, 255, 0.04);
}

.contact-item>div {
  flex: 1;
  min-width: 0;
}

.contact-item a,
.contact-item>div>span:not(.ci-label) {
  display: block;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-item a:hover {
  color: var(--accent);
}

.ci-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 167, 51, 0.1);
  color: var(--accent);
  font-size: 18px;
}

.ci-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-2);
  font-size: 13px;
  color: var(--muted);
  transition: color .2s, border-color .2s;
}

.copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: center;
}

.field {
  position: relative;
}

.field input,
.field textarea {
  width: 100%;
  padding: 24px 18px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  outline: none;
  resize: vertical;
  transition: border-color .25s, background .25s, box-shadow .25s;
}

.field textarea {
  min-height: 140px;
}

.field label {
  position: absolute;
  left: 18px;
  top: 17px;
  color: var(--muted);
  font-size: 16px;
  pointer-events: none;
  transform-origin: 0 0;
  transition: transform .2s var(--ease), color .2s;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  background: rgba(255, 167, 51, 0.04);
  box-shadow: 0 0 0 4px rgba(255, 167, 51, 0.12);
}

.field input:focus+label,
.field input:not(:placeholder-shown)+label,
.field textarea:focus+label,
.field textarea:not(:placeholder-shown)+label {
  transform: translateY(-10px) scale(0.75);
  color: var(--accent);
}

.field.invalid input,
.field.invalid textarea {
  border-color: #ff5e7a;
}

.form-status {
  min-height: 1.4em;
  font-size: 14px;
  color: var(--muted);
}

.form-status.error {
  color: #ff7a90;
}

.form-status.ok {
  color: #2ee59d;
}

/* ---------- Footer ---------- */
.footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.footer-big {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 12vw, 160px);
  line-height: 0.9;
  letter-spacing: -0.05em;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
}

.footer-big .accent {
  -webkit-text-fill-color: var(--accent);
}

.footer-row {
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.to-top {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--grad);
  color: #160c02;
  font-size: 18px;
  transition: transform .3s var(--ease);
}

.to-top:hover {
  transform: translateY(-4px);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  background: rgba(5, 5, 8, 0.9);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity .3s;
}

.lightbox.show {
  opacity: 1;
}

.lightbox[hidden] {
  display: none;
}

.lightbox figure {
  margin: 0;
  max-width: min(1200px, 100%);
  max-height: 100%;
  overflow: auto;
  transform: scale(.96);
  transition: transform .4s var(--ease);
}

.lightbox.show figure {
  transform: none;
}

.lightbox img {
  border-radius: 14px;
  border: 1px solid var(--border-2);
}

.lightbox figcaption {
  margin-top: 14px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  font-size: 18px;
}

.lightbox-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 400;
  padding: 12px 20px;
  border-radius: 999px;
  background: #1c1c26;
  border: 1px solid var(--border-2);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
  transform: translate(-50%, 140%);
  opacity: 0;
  transition: transform .4s var(--ease), opacity .4s;
  pointer-events: none;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease), translate .4s var(--ease), border-color .3s, background .3s;
  transition-delay: var(--d, 0s), var(--d, 0s), 0s, 0s, 0s;
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .cards-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .process {
    grid-template-columns: repeat(2, 1fr);
  }

  .process li::after {
    display: none;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 64px;
  }

  .hero-visual {
    max-width: 560px;
  }
}

@media (max-width: 900px) {
  .nav-links,
  .nav-cta {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .about-grid,
  .project-grid,
  .pcard-wide,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .about-photo {
    max-width: 420px;
    margin: 0 auto 30px;
  }

  .pcard-wide .art {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .pcard-wide .pcard-body {
    padding: 22px 12px 10px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .section-head-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-card {
    padding: 36px 28px;
    gap: 40px;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 88px 0;
  }

  .section-head {
    margin-bottom: 44px;
  }

  .cards-4,
  .process {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }

  .stat {
    padding: 16px 12px;
  }

  .facts {
    grid-template-columns: 1fr;
  }

  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-right: -16px;
    padding-right: 16px;
    scrollbar-width: none;
  }

  .filter {
    flex-shrink: 0;
  }

  .pcard {
    padding: 10px;
    border-radius: 22px;
  }

  .mock-dash {
    inset: 56px 6% 0;
  }

  .more-list a {
    grid-template-columns: auto 1fr auto;
    gap: 14px;
  }

  .more-list em {
    display: none;
  }

  .hero-sub {
    font-size: 16px;
  }

  .code-body {
    font-size: 12px;
    padding: 18px 18px 36px;
  }

  .chip-1 {
    right: 8px;
  }

  .chip-2 {
    left: 8px;
  }

  .contact-card {
    padding: 28px 18px;
    border-radius: 24px;
  }

  .copy-btn span {
    display: none;
  }

  .scroll-cue {
    display: none;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
