:root {
  --bg: #060810;
  --bg-alt: #0A0E1A;
  --surface: #0E1424;
  --surface-2: #141C33;
  --text: #E8EDFB;
  --text-muted: #8C96B8;
  --border: #212C48;
  --accent: #00E0FF;
  --accent-2: #8B5CFF;
  --accent-3: #33FFB0;
  --accent-soft: rgba(0, 224, 255, 0.10);
  --accent-glow: rgba(0, 224, 255, 0.35);
  --violet-glow: rgba(139, 92, 255, 0.35);
  --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 20px 60px rgba(0,0,0,0.45);
  --gradient: linear-gradient(135deg, var(--accent), var(--accent-2));
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -5%, rgba(139,92,255,0.16), transparent 60%),
    radial-gradient(ellipse 900px 600px at 100% 10%, rgba(0,224,255,0.12), transparent 60%),
    linear-gradient(var(--bg), var(--bg));
  background-attachment: fixed;
}

h1, h2, h3 {
  font-family: "Sora", ui-sans-serif, system-ui, sans-serif;
  text-wrap: balance;
  margin: 0;
  letter-spacing: -0.01em;
  font-weight: 700;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace; }

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding-inline: max(20px, env(safe-area-inset-left));
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- Background layers ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--gradient);
  box-shadow: 0 0 12px var(--accent-glow);
  z-index: 100;
  transition: width 0.1s linear;
}
.net-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}

/* ---------- Nav ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(6, 8, 16, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
header.site-header.scrolled {
  border-bottom-color: rgba(0, 224, 255, 0.25);
  box-shadow: 0 1px 24px rgba(0, 224, 255, 0.08);
}
nav.wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 16px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.08rem;
  text-decoration: none;
  color: var(--text);
}
.brand-mark {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  color: var(--accent);
  text-shadow: 0 0 14px var(--accent-glow);
}
.brand-mark-slash { color: var(--accent-2); }
.brand-logo {
  height: 34px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 10px rgba(0,224,255,0.18));
}
.navlinks {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 28px);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.navlinks a {
  position: relative;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.15s ease;
  padding: 4px 2px;
}
.navlinks a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--gradient);
  transition: right 0.25s ease;
}
.navlinks a:hover, .navlinks a:focus-visible { color: var(--text); }
.navlinks a:hover::after, .navlinks a:focus-visible::after { right: 0; }
.navlinks a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(52px, 9vw, 96px) clamp(40px, 7vw, 64px); position: relative; overflow: clip; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-3);
  margin-bottom: 20px;
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 0 0 rgba(51,255,176,0.6);
  animation: pulse-ring 2s ease-out infinite;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(51,255,176,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(51,255,176,0); }
  100% { box-shadow: 0 0 0 0 rgba(51,255,176,0); }
}

.hero h1 {
  font-size: clamp(2.6rem, 6.6vw, 4.4rem);
  font-weight: 800;
  line-height: 1.03;
  background: linear-gradient(120deg, #FFFFFF 30%, var(--accent) 75%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .role {
  margin-top: 16px;
  font-size: clamp(0.98rem, 2vw, 1.15rem);
  color: var(--text);
  min-height: 1.4em;
}
.type-target { color: var(--accent); }
.type-cursor { color: var(--accent-2); animation: blink 1s step-start infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero .tagline {
  margin-top: 22px;
  max-width: 56ch;
  font-size: clamp(1.02rem, 2vw, 1.15rem);
  color: var(--text-muted);
}
.cta-row { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 9px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.86rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.25s ease, border-color 0.2s ease;
  cursor: pointer;
  overflow: hidden;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--gradient);
  color: #060810;
  font-weight: 600;
  box-shadow: 0 0 0 rgba(0,224,255,0);
}
.btn-primary:hover { box-shadow: 0 6px 30px var(--accent-glow); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255,255,255,0.02);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 20px rgba(0,224,255,0.12); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Stat strip ---------- */
.stat-strip {
  margin-top: 44px;
  display: flex;
  gap: clamp(22px, 5vw, 44px);
  flex-wrap: wrap;
}
.stat-block { display: flex; flex-direction: column; gap: 2px; }
.stat-num {
  font-family: "Sora", sans-serif;
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { font-size: 0.78rem; color: var(--text-muted); font-family: "JetBrains Mono", monospace; }

/* ---------- Terminal hero visual ---------- */
.hero-visual { position: relative; }
.terminal-window {
  background: rgba(14, 20, 36, 0.85);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 60px rgba(139,92,255,0.10);
  backdrop-filter: blur(6px);
  position: relative;
  z-index: 1;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #FF5F57; }
.dot-yellow { background: #FEBC2E; }
.dot-green { background: #28C840; }
.terminal-title { margin-left: 8px; font-size: 0.76rem; color: var(--text-muted); }
.terminal-body {
  margin: 0;
  padding: 20px 18px 24px;
  font-size: 0.86rem;
  line-height: 1.9;
  color: var(--text-muted);
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.tk-fn { color: var(--accent); }
.tk-str { color: var(--accent-3); }
.tk-ok { color: var(--accent-3); }
.tk-muted { color: var(--text-muted); }
.cursor-blink { animation: blink 1s step-start infinite; color: var(--accent); }
.type-loop::after { content: ""; }

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  z-index: 0;
  animation: float-orb 9s ease-in-out infinite;
}
.glow-orb-1 { width: 220px; height: 220px; background: rgba(0,224,255,0.28); top: -40px; right: -40px; }
.glow-orb-2 { width: 180px; height: 180px; background: rgba(139,92,255,0.28); bottom: -50px; left: -30px; animation-delay: -4s; }
.glow-orb-3 { width: 260px; height: 260px; background: rgba(139,92,255,0.22); top: -80px; right: -60px; }
@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(10px, -14px) scale(1.08); }
}

/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid var(--border);
  background: rgba(255,255,255,0.015);
  overflow: hidden;
  padding-block: 14px;
  position: relative;
  z-index: 1;
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 14px;
  animation: marquee-scroll 32s linear infinite;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-item {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.marquee-dot { color: var(--accent-2); opacity: 0.7; }

/* ---------- Sections ---------- */
section { padding-block: clamp(48px, 8vw, 88px); position: relative; z-index: 1; }
section + section { border-top: 1px solid var(--border); }

.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: clamp(28px, 5vw, 44px); }
.section-num { font-family: "JetBrains Mono", monospace; font-size: 0.85rem; color: var(--accent-2); }
.section-head h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); font-weight: 700; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } }
.about-grid p { font-size: 1.05rem; color: var(--text-muted); max-width: 56ch; }
.about-grid p + p { margin-top: 14px; }
.stack-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: block;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  padding: 7px 12px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Projects ---------- */
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 700px) { .project-grid { grid-template-columns: 1fr; } }
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent), var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  transform-style: preserve-3d;
  will-change: transform;
}
.card:hover {
  border-color: rgba(0,224,255,0.4);
  box-shadow: var(--shadow), 0 0 34px rgba(0,224,255,0.12);
}
.card-media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(0,224,255,0.14), rgba(139,92,255,0.14));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .card-media img { transform: scale(1.06); }
.card-media .fallback {
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 2.2rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.85;
}
.card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.card-index { font-size: 0.8rem; color: var(--accent-2); }
.card h3 { font-size: 1.2rem; font-weight: 700; }
.card p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  padding: 4px 9px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(0,224,255,0.18);
}
.card-links { margin-top: auto; display: flex; gap: 18px; padding-top: 4px; flex-wrap: wrap; }
.card-links a {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.card-links a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Contact ---------- */
.contact-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(32px, 6vw, 56px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.contact-panel h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); text-align: center; position: relative; z-index: 1; }
.contact-panel > p.intro { max-width: 50ch; margin: 16px auto 0; color: var(--text-muted); font-size: 1.02rem; text-align: center; position: relative; z-index: 1; }
.contact-row { margin-top: 30px; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; position: relative; z-index: 1; }

.contact-grid { margin-top: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 36px; position: relative; z-index: 1; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-field label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.form-field input, .form-field textarea {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.98rem;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  resize: vertical;
}
.form-field input:focus, .form-field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.hp-field { position: absolute; left: -9999px; top: -9999px; }

.form-note {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 18px;
}
.form-note.success { background: rgba(51,255,176,0.1); color: var(--accent-3); border: 1px solid rgba(51,255,176,0.25); }
.form-note.error { background: rgba(255,95,87,0.1); color: #FF8A80; border: 1px solid rgba(255,95,87,0.25); }

footer.site-footer {
  padding-block: 28px;
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

/* ---------- Reveal ---------- */
.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
  .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Mobile responsive ---------- */
@media (max-width: 780px) {
  .wrap { padding-inline: 18px; }

  nav.wrap {
    flex-wrap: wrap;
    row-gap: 10px;
    padding-block: 14px;
  }
  .navlinks {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 16px;
    row-gap: 8px;
    flex-wrap: wrap;
    font-size: 0.78rem;
  }
  .brand { font-size: 1rem; gap: 8px; }
  .brand-logo { height: 28px; }

  .hero { padding-block: 36px 30px; }
  .hero h1 { font-size: clamp(2.1rem, 9vw, 2.9rem); }
  .hero .tagline { max-width: 100%; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { width: 100%; justify-content: center; }

  .stat-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px 12px;
    margin-top: 34px;
  }
  .stat-block { gap: 4px; }
  .stat-label { line-height: 1.3; }

  .terminal-body { font-size: 0.78rem; padding: 16px 14px 20px; line-height: 1.8; }

  .about-grid p { max-width: 100%; }

  .contact-row { flex-direction: column; align-items: stretch; }
  .contact-row .btn { width: 100%; justify-content: center; text-align: center; }
  .contact-row .btn span { width: 100%; overflow-wrap: anywhere; }
  .contact-panel { padding: 28px 20px; border-radius: 14px; }

  section { padding-block: 44px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .navlinks { gap: 12px; font-size: 0.72rem; }
  .stat-strip { gap: 14px 8px; }
  .stat-num { font-size: 1.35rem; }
  .stat-label { font-size: 0.7rem; }
  .card-body { padding: 18px 18px 20px; }
  .section-head h2 { font-size: 1.4rem; }
  .terminal-title { display: none; }
}

/* ================= Pro / Hi-tech enhancements ================= */

/* Page-load fade (pure CSS, no JS dependency) */
body { animation: page-fade-in 0.6s ease both; }
@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { body { animation: none; } }

/* Ambient cursor glow (desktop / fine-pointer only) */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 440px; height: 440px;
  margin: -220px 0 0 -220px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(circle, rgba(0,224,255,0.09), rgba(139,92,255,0.05) 42%, transparent 70%);
  transform: translate3d(-999px, -999px, 0);
  will-change: transform;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.cursor-glow.active { opacity: 1; }
@media (pointer: coarse), (max-width: 900px) { .cursor-glow { display: none; } }

/* Section dot navigation (desktop only) */
.section-dots {
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.section-dots a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  text-decoration: none;
}
.dot-mark {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--text-muted);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  display: block;
}
.section-dots a:hover .dot-mark { border-color: var(--accent); transform: scale(1.2); }
.section-dots a.active .dot-mark {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow), 0 0 0 4px rgba(0,224,255,0.12);
  transform: scale(1.2);
}
.dot-tip {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.section-dots a:hover .dot-tip { opacity: 1; transform: translateY(-50%) translateX(0); }
@media (max-width: 1080px) { .section-dots { display: none; } }

/* Back-to-top button */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.2s ease, box-shadow 0.2s ease, visibility 0.25s;
  box-shadow: var(--shadow);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { border-color: var(--accent); box-shadow: 0 0 24px var(--accent-glow); transform: translateY(-2px); }
.back-to-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 480px) { .back-to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; } }

/* Scroll-spy active nav link */
.navlinks a.active { color: var(--accent); }
.navlinks a.active::after { right: 0; }

/* Button shine sweep */
.btn { position: relative; }
.btn .shine {
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}
.btn:hover .shine { left: 130%; }

/* Animated gradient border ring on project cards */
@property --card-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.card { position: relative; }
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--card-angle, 0deg), var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
  animation: rotate-card-border 3.5s linear infinite;
  animation-play-state: paused;
}
.card:hover::after { opacity: 1; animation-play-state: running; }
@keyframes rotate-card-border { to { --card-angle: 360deg; } }
@media (prefers-reduced-motion: reduce) { .card::after { animation: none; } }

/* Staggered project card reveal (reuses existing .reveal / .in system) */
.project-grid .card {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.project-grid.in .card { opacity: 1; transform: none; }
.project-grid .card:nth-child(1) { transition-delay: 0.04s; }
.project-grid .card:nth-child(2) { transition-delay: 0.11s; }
.project-grid .card:nth-child(3) { transition-delay: 0.18s; }
.project-grid .card:nth-child(4) { transition-delay: 0.25s; }
.project-grid .card:nth-child(5) { transition-delay: 0.32s; }
.project-grid .card:nth-child(6) { transition-delay: 0.39s; }
@media (prefers-reduced-motion: reduce) {
  .project-grid .card { opacity: 1; transform: none; transition: none; }
}

/* Card image "wipe" reveal, in sync with each card's stagger delay */
.project-grid .card-media img,
.project-grid .card-media .fallback {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.9s cubic-bezier(.16,1,.3,1);
}
.project-grid.in .card-media img,
.project-grid.in .card-media .fallback {
  clip-path: inset(0 0 0 0);
}
.project-grid .card:nth-child(1) .card-media img, .project-grid .card:nth-child(1) .card-media .fallback { transition-delay: 0.14s; }
.project-grid .card:nth-child(2) .card-media img, .project-grid .card:nth-child(2) .card-media .fallback { transition-delay: 0.21s; }
.project-grid .card:nth-child(3) .card-media img, .project-grid .card:nth-child(3) .card-media .fallback { transition-delay: 0.28s; }
.project-grid .card:nth-child(4) .card-media img, .project-grid .card:nth-child(4) .card-media .fallback { transition-delay: 0.35s; }
.project-grid .card:nth-child(5) .card-media img, .project-grid .card:nth-child(5) .card-media .fallback { transition-delay: 0.42s; }
.project-grid .card:nth-child(6) .card-media img, .project-grid .card:nth-child(6) .card-media .fallback { transition-delay: 0.49s; }
@media (prefers-reduced-motion: reduce) {
  .project-grid .card-media img,
  .project-grid .card-media .fallback { clip-path: none; transition: none; }
}

/* Terminal window scanline texture + moving light band */
.terminal-window::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0,224,255,0.035) 0px, rgba(0,224,255,0.035) 1px, transparent 1px, transparent 3px);
  pointer-events: none;
  z-index: 2;
  opacity: 0.6;
}
.terminal-window::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: -40px;
  height: 40px;
  background: linear-gradient(180deg, transparent, rgba(0,224,255,0.07), transparent);
  animation: scan-move 5s linear infinite;
  pointer-events: none;
  z-index: 2;
}
@keyframes scan-move {
  0% { top: -40px; }
  100% { top: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .terminal-window::after { animation: none; display: none; }
}

/* Hero heading soft glow pulse */
.hero h1 { animation: heading-glow 6s ease-in-out infinite; }
@keyframes heading-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(0,224,255,0)); }
  50% { filter: drop-shadow(0 0 16px rgba(0,224,255,0.18)); }
}
@media (prefers-reduced-motion: reduce) { .hero h1 { animation: none; } }

/* Eyebrow badge tightened up with a hairline border for extra polish */
.eyebrow {
  border: 1px solid rgba(51,255,176,0.22);
  background: rgba(51,255,176,0.06);
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
}