/* Sarathlal SRL — terminal / cyber (black · neon red · white) */
:root {
  --bg-void: #000000;
  --bg-deep: #050505;
  --bg-panel: #080808;
  --bg-card: #0c0c0c;
  --border: rgba(255, 0, 51, 0.38);
  --border-dim: rgba(255, 0, 51, 0.12);
  /* Accent = neon red (phosphor name kept for fewer refactors) */
  --phosphor: #ff0033;
  --phosphor-bright: #ff3355;
  --phosphor-dim: rgba(255, 51, 85, 0.55);
  --text: #f2f2f2;
  --text-dim: #8f8f8f;
  --stroke: #ffffff;
  --amber: #e8e8e8;
  --danger: #ff2244;
  --danger-bg: rgba(255, 0, 51, 0.08);
  --glow: 0 0 22px rgba(255, 0, 51, 0.35);
  --glow-strong: 0 0 48px rgba(255, 0, 51, 0.45);
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 4px;
  --radius-lg: 6px;
  --header-inner-h: 76px;
  --header-status-h: 30px;
  --header-h: calc(var(--header-inner-h) + var(--header-status-h));
  --max: 1080px;
  --fx-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fx-fast: 0.25s;
  --fx-mid: 0.45s;
}

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

html {
  scroll-behavior: auto;
  overscroll-behavior: none;
  scrollbar-color: rgba(255, 51, 85, 0.45) var(--bg-void);
  scrollbar-width: thin;
}

html::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html::-webkit-scrollbar-track {
  background: var(--bg-void);
}

html::-webkit-scrollbar-thumb {
  background: rgba(255, 51, 85, 0.42);
  border-radius: 999px;
  border: 2px solid var(--bg-void);
}

html::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 51, 85, 0.65);
}

body {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-void);
  -webkit-font-smoothing: antialiased;
  position: relative;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: rgba(255, 0, 51, 0.38);
  color: var(--text);
}

::-moz-selection {
  background: rgba(255, 0, 51, 0.38);
  color: var(--text);
}

/* Avoid default blue ring on mouse focus; keyboard still gets :focus-visible from components */
:focus:not(:focus-visible) {
  outline: none;
}

/* Matrix + CRT sit behind / over page */
.matrix-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.2;
  pointer-events: none;
}

.grain-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: url("assets/mood-texture.png") center center / cover no-repeat;
  opacity: 0.22;
  mix-blend-mode: overlay;
  filter: contrast(1.15) saturate(0.85);
}

.crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.12),
    rgba(0, 0, 0, 0.12) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: multiply;
}

body > :not(.matrix-canvas):not(.crt-overlay):not(.grain-layer) {
  position: relative;
  z-index: 2;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 10000;
  padding: 0.55rem 1rem;
  background: var(--phosphor);
  color: var(--bg-void);
  font-weight: 700;
  border-radius: 2px;
  text-decoration: none;
  font-size: 0.8125rem;
  transition: transform var(--fx-fast) var(--fx-ease), box-shadow var(--fx-fast) ease;
}

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

.skip-link:focus-visible {
  transform: scale(1.03);
  box-shadow: 0 0 24px rgba(255, 0, 51, 0.55);
}

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

a {
  color: var(--phosphor-bright);
  text-decoration: none;
}

a:hover {
  color: var(--phosphor);
  text-shadow: var(--glow);
}

.wrap {
  width: min(100% - 1.75rem, var(--max));
  margin-inline: auto;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-deep) 92%, transparent);
  backdrop-filter: blur(10px);
}

.site-header.is-scrolled {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 36px rgba(255, 0, 51, 0.12);
  border-bottom-color: rgba(255, 0, 51, 0.45);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-inner-h);
  width: min(100% - 1.75rem, var(--max));
  margin-inline: auto;
  padding-block: 0.35rem;
}

.header-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  min-height: var(--header-status-h);
  width: min(100% - 1.75rem, var(--max));
  margin-inline: auto;
  padding: 0.2rem 0 0.45rem;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-top: 1px solid var(--border-dim);
}

.header-status strong {
  color: var(--phosphor);
  font-weight: 600;
}

.status-sep {
  opacity: 0.45;
}

.status-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--phosphor);
  box-shadow: 0 0 8px var(--phosphor);
  animation: led-pulse 2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .status-led {
    animation: none;
  }
}

@keyframes led-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.logo--image {
  max-width: min(88vw, 380px);
}

.site-logo {
  display: block;
  height: clamp(40px, 11vw, 58px);
  width: auto;
  object-fit: contain;
}

.logo--image:hover,
.logo--image:focus-visible {
  color: inherit;
  text-shadow: none;
}

.site-nav a {
  position: relative;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: color 0.25s ease, text-shadow 0.25s ease, transform 0.25s var(--fx-ease);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--phosphor), transparent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--fx-ease);
  pointer-events: none;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--phosphor-bright);
  text-shadow: var(--glow);
}

.nav-prefix {
  color: var(--phosphor-dim);
  margin-right: 0.15em;
}

.nav-cta {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color 0.25s ease, box-shadow 0.3s ease, transform 0.25s var(--fx-ease);
}

.nav-cta:hover,
.nav-cta:focus-visible {
  border-color: var(--phosphor);
  box-shadow: var(--glow);
  transform: translateY(-1px);
}

.site-nav {
  display: flex;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.3s ease, transform 0.25s var(--fx-ease);
}

.nav-toggle:hover {
  border-color: var(--phosphor);
  box-shadow: var(--glow);
  transform: scale(1.05);
}

.nav-toggle:active {
  transform: scale(0.98);
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  margin-inline: auto;
  background: var(--phosphor);
  border-radius: 1px;
  box-shadow: 0 0 6px var(--phosphor-dim);
  transition: transform 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    max-height: 0;
    overflow: hidden;
    background: var(--bg-deep);
    border-bottom: 1px solid transparent;
    transition: max-height 0.35s ease, border-color 0.2s;
  }

  .site-nav.is-open {
    max-height: 420px;
    border-color: var(--border);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.25rem;
    gap: 0;
  }

  .nav-list a {
    display: block;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border-dim);
  }

  .nav-list li:last-child a {
    border-bottom: 0;
    margin-top: 0.35rem;
    text-align: center;
  }
}

/* —— Hero —— */
.hero {
  position: relative;
  padding: clamp(2.5rem, 8vw, 4rem) 0 clamp(3.5rem, 12vw, 6.5rem);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 80% at 50% -30%, rgba(255, 0, 51, 0.14), transparent 55%),
    linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-void) 50%);
  pointer-events: none;
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: -20%;
  opacity: 0.35;
  background: repeating-linear-gradient(
    -32deg,
    transparent,
    transparent 72px,
    rgba(255, 0, 51, 0.06) 72px,
    rgba(255, 0, 51, 0.06) 74px,
    transparent 74px,
    transparent 140px,
    rgba(255, 255, 255, 0.04) 140px,
    rgba(255, 255, 255, 0.04) 142px
  );
  pointer-events: none;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: linear-gradient(rgba(255, 0, 51, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 51, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}

.hero-inner {
  position: relative;
}

.terminal-block {
  margin-bottom: 2rem;
  padding: 1rem 1.1rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: inset 0 0 40px rgba(255, 0, 51, 0.06);
  transition: border-color 0.35s ease, box-shadow 0.45s var(--fx-ease);
}

.term-line {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.term-line:last-child {
  margin-bottom: 0;
}

.term-prompt {
  color: var(--phosphor);
  font-weight: 600;
}

.term-cmd {
  color: var(--text);
  word-break: break-word;
}

.term-out {
  color: var(--text-dim);
  padding-left: 0.5rem;
  border-left: 2px solid var(--border);
}

.term-out.dim {
  opacity: 0.85;
  font-size: 0.75rem;
}

.hero-layout {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-layout {
    grid-template-columns: 1fr minmax(260px, 320px);
    gap: clamp(1.5rem, 4vw, 3rem);
  }
}

.hero-copy {
  min-width: 0;
}

.hero-photo-wrap {
  margin: 0;
  justify-self: center;
}

@media (min-width: 900px) {
  .hero-photo-wrap {
    justify-self: end;
  }
}

.hero-photo-frame {
  padding: 3px;
  background: linear-gradient(135deg, var(--phosphor), var(--stroke), var(--phosphor));
  border-radius: var(--radius-lg);
  box-shadow: var(--glow-strong);
  overflow: hidden;
}

.hero-photo {
  display: block;
  width: min(300px, 80vw);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 2px);
  filter: grayscale(0.25) contrast(1.08) saturate(0.85);
}

.hero-photo-cap {
  margin: 0.65rem 0 0;
  font-size: 0.6875rem;
  color: var(--text-dim);
  text-align: center;
  letter-spacing: 0.02em;
}

.hero-photo-cap code {
  color: var(--phosphor-dim);
  font-size: inherit;
}

.ok {
  color: var(--phosphor);
  font-weight: 600;
}

.eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--phosphor);
  margin: 0 0 0.75rem;
  text-shadow: var(--glow);
  transition: letter-spacing 0.5s var(--fx-ease), text-shadow 0.4s ease;
}

.hero-copy:hover .eyebrow {
  letter-spacing: 0.18em;
  text-shadow: 0 0 28px rgba(255, 0, 51, 0.65);
}

.hero-title {
  font-size: clamp(1.85rem, 5vw, 2.85rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin: 0 0 1rem;
  text-transform: lowercase;
}

.glitch-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem;
}

.glitch {
  position: relative;
  color: var(--phosphor-bright);
  text-shadow: 0 0 28px rgba(255, 0, 51, 0.55);
}

@media (prefers-reduced-motion: no-preference) {
  .glitch::before,
  .glitch::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    clip-path: inset(0 0 0 0);
  }

  .glitch::before {
    color: #ff0044;
    opacity: 0.55;
    animation: glitch-shift 3.5s infinite linear alternate-reverse;
    z-index: -1;
  }

  .glitch::after {
    color: #ffffff;
    opacity: 0.4;
    animation: glitch-shift 2.8s infinite linear alternate;
    z-index: -2;
  }
}

@keyframes glitch-shift {
  0%,
  90%,
  100% {
    transform: translate(0);
    clip-path: inset(0 0 0 0);
  }
  91% {
    transform: translate(-2px, 1px);
    clip-path: inset(20% 0 60% 0);
  }
  93% {
    transform: translate(2px, -1px);
    clip-path: inset(65% 0 10% 0);
  }
  95% {
    transform: translate(-1px, 0);
    clip-path: inset(40% 0 30% 0);
  }
}

.cursor-blink {
  color: var(--phosphor);
  font-weight: 400;
  animation: blink 1.1s step-end infinite;
}

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

.footer-cursor {
  margin-left: 0.15em;
}

.hero-lead {
  max-width: 40rem;
  margin: 0 0 1.75rem;
  color: var(--text-dim);
  font-size: 0.9375rem;
}

.typewriter-shell {
  display: inline;
}

.typewriter-caret {
  margin-left: 0.06em;
  color: var(--phosphor);
  font-weight: 400;
}

.lead-prefix {
  color: var(--phosphor);
  margin-right: 0.35rem;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  text-transform: lowercase;
  overflow: hidden;
  isolation: isolate;
  transition: box-shadow 0.3s var(--fx-ease), border-color 0.25s ease, background 0.25s ease, transform 0.3s var(--fx-ease),
    color 0.2s ease;
}

.btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 36px rgba(255, 0, 51, 0.28);
}

.btn:active {
  transform: translateY(-1px) scale(1.01);
}

.btn-prefix {
  color: var(--phosphor-dim);
  font-weight: 500;
}

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

.btn-primary {
  background: var(--phosphor);
  color: var(--bg-void);
  border-color: var(--phosphor-bright);
  box-shadow: var(--glow);
}

.btn-primary:hover {
  background: var(--phosphor-bright);
  box-shadow: var(--glow-strong);
}

.btn-primary .btn-prefix {
  color: var(--bg-panel);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--phosphor);
  background: rgba(255, 0, 51, 0.08);
  box-shadow: var(--glow);
}

/* —— Sections —— */
.section {
  padding: clamp(3rem, 9vw, 5rem) 0;
}

.section-muted {
  background: var(--bg-panel);
  border-block: 1px solid var(--border-dim);
}

.section-head {
  margin-bottom: 2rem;
  max-width: 44rem;
}

.section-head-center {
  margin-inline: auto;
  text-align: center;
  max-width: 42rem;
}

.section-head h2 {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 0.5rem;
  color: var(--phosphor-bright);
  text-shadow: var(--glow);
  transition: text-shadow 0.4s ease, transform 0.35s var(--fx-ease);
}

.section-head:hover h2 {
  transform: translateX(2px);
}

.h2-tag {
  display: inline-block;
  margin-right: 0.5rem;
  padding: 0.1rem 0.45rem;
  font-size: 0.65em;
  vertical-align: middle;
  color: var(--bg-void);
  background: var(--phosphor);
  border-radius: 2px;
  font-weight: 700;
  transition: transform 0.35s var(--fx-ease), box-shadow 0.35s ease;
}

.section-head:hover .h2-tag {
  transform: rotate(-3deg) scale(1.06);
  box-shadow: 0 0 18px rgba(255, 0, 51, 0.55);
}

.section-sub {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.875rem;
}

/* —— Cards —— */
.about-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 800px) {
  .about-grid {
    grid-template-columns: 1.35fr 1fr;
  }
}

.card {
  padding: 1.35rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255, 0, 51, 0.08);
  transition: transform 0.45s var(--fx-ease), box-shadow 0.45s var(--fx-ease), border-color 0.35s ease;
}

.terminal-card {
  position: relative;
}

.terminal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--phosphor), transparent);
  opacity: 0.35;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  transition: opacity 0.4s ease, filter 0.35s ease;
}

.terminal-card:hover::before {
  opacity: 0.95;
  filter: drop-shadow(0 0 6px rgba(255, 0, 51, 0.8));
}

.card-stat {
  box-shadow: inset 0 1px 0 rgba(255, 0, 51, 0.08);
}

.card-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--phosphor);
  margin: 0 0 0.85rem;
}

.card-prompt {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--amber);
}

.prose p {
  margin: 0 0 0.85rem;
  color: var(--text-dim);
}

.prose p:last-child {
  margin-bottom: 0;
}

.principles {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-dim);
}

.principles li {
  margin-bottom: 0.45rem;
  padding-left: 0.1rem;
  transition: transform 0.3s var(--fx-ease), color 0.25s ease;
}

@media (hover: hover) {
  .principles li:hover {
    transform: translateX(8px);
    color: var(--text);
  }
}

.principles li:last-child {
  margin-bottom: 0;
}

.li-mark {
  color: var(--phosphor);
  margin-right: 0.35rem;
  font-size: 0.75rem;
}

/* Expertise */
.expertise-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .expertise-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.expertise-item {
  display: flex;
  gap: 1rem;
  padding: 1.15rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform 0.4s var(--fx-ease), box-shadow 0.4s var(--fx-ease), border-color 0.35s ease;
}

@media (hover: hover) {
  .expertise-item:hover {
    transform: translateX(4px);
    border-color: rgba(255, 0, 51, 0.45);
    box-shadow: -4px 0 0 var(--phosphor), 0 12px 36px rgba(0, 0, 0, 0.4);
  }
}

.expertise-icon {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--amber);
  opacity: 0.95;
  font-variant-numeric: tabular-nums;
}

.expertise-item h3 {
  margin: 0 0 0.3rem;
  font-size: 0.9375rem;
  color: var(--phosphor-bright);
  text-transform: lowercase;
}

.expertise-item p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-dim);
}

/* Work */
.work-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.work-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.work-meta {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin: 0 0 0.5rem;
  transition: letter-spacing 0.35s var(--fx-ease), color 0.3s ease, text-shadow 0.3s ease;
}

@media (hover: hover) {
  .work-card:hover .work-meta {
    letter-spacing: 0.14em;
    color: var(--phosphor-bright);
    text-shadow: var(--glow);
  }
}

.work-card h3 {
  margin: 0 0 0.45rem;
  font-size: 0.9375rem;
  color: var(--text);
  text-transform: none;
  line-height: 1.35;
}

.work-title-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border-dim);
  display: inline-block;
  transition: color 0.25s ease, border-color 0.25s ease, text-shadow 0.3s ease, transform 0.3s var(--fx-ease);
}

.work-title-link:hover {
  color: var(--phosphor-bright);
  border-bottom-color: var(--phosphor);
  text-shadow: var(--glow);
  transform: translateX(3px);
}

.work-title-link:focus-visible {
  outline: 2px solid var(--phosphor);
  outline-offset: 3px;
  border-radius: 2px;
}

.work-card p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-dim);
  flex-grow: 1;
}

/* Projects */
.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.project-card {
  display: block;
  padding: 1.35rem 1.5rem;
}

.project-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.65rem;
}

.project-name {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--phosphor-bright);
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.project-badge {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  border: 1px solid var(--border-dim);
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.35);
}

.project-badge--pub {
  color: var(--bg-void);
  background: var(--phosphor);
  border-color: var(--phosphor-bright);
}

.project-desc {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.project-tags li {
  font-size: 0.6875rem;
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  border: 1px solid var(--border-dim);
  color: var(--amber);
  background: rgba(0, 0, 0, 0.25);
  transition: transform 0.25s var(--fx-ease), border-color 0.25s ease, box-shadow 0.25s ease, color 0.2s ease;
}

@media (hover: hover) {
  .project-tags li:hover {
    transform: scale(1.08);
    border-color: var(--phosphor);
    color: var(--stroke);
    box-shadow: 0 0 14px rgba(255, 0, 51, 0.35);
  }
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.1rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border-dim);
}

.project-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--phosphor-bright);
  text-decoration: none;
  text-transform: lowercase;
}

.project-link:hover {
  color: var(--stroke);
  text-shadow: var(--glow);
}

.project-link-meta {
  font-weight: 400;
  color: var(--text-dim);
  text-shadow: none;
}

.project-link--static {
  color: var(--text-dim);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: lowercase;
  cursor: default;
}

.project-link--static .project-link-meta {
  color: var(--text-dim);
}

/* Contact */
.section-contact {
  background: linear-gradient(180deg, var(--bg-void), var(--bg-panel));
}

.contact-wrap {
  text-align: center;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 0.85rem;
  margin-bottom: 1.75rem;
}

.contact-note {
  max-width: 36rem;
  margin: 0 auto;
  font-size: 0.8125rem;
  color: var(--text-dim);
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  background: var(--danger-bg);
  border: 1px solid rgba(255, 68, 102, 0.35);
  text-align: left;
  transition: border-color 0.35s ease, box-shadow 0.4s var(--fx-ease), transform 0.35s var(--fx-ease);
}

.contact-note:hover {
  border-color: rgba(255, 68, 102, 0.65);
  box-shadow: 0 0 28px rgba(255, 0, 51, 0.2);
  transform: translateY(-2px);
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.footer-inner p {
  margin: 0;
}

.footer-line {
  font-size: 0.75rem;
  color: var(--text);
}

.footer-prompt {
  color: var(--phosphor);
  font-weight: 600;
}

.footer-hex {
  color: var(--stroke);
  font-size: inherit;
}

.footer-meta {
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--phosphor-dim);
}

.footer-inner a {
  position: relative;
  color: var(--phosphor-bright);
  text-decoration: none;
  transition: color 0.25s ease, text-shadow 0.3s ease;
}

.footer-inner a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--phosphor), transparent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s var(--fx-ease);
}

.footer-inner a:hover::after,
.footer-inner a:focus-visible::after {
  transform: scaleX(1);
}

@media (hover: hover) {
  .card:hover,
  .work-card:hover,
  .project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 0, 51, 0.55);
    box-shadow:
      0 24px 52px rgba(0, 0, 0, 0.55),
      0 0 42px rgba(255, 0, 51, 0.2),
      inset 0 1px 0 rgba(255, 0, 51, 0.14);
  }
}

/* Reveal — instant when scrolling into view (no transition) */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  filter: blur(10px);
  transition: none;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.reveal-delay-1,
.reveal-delay-2,
.reveal-delay-3 {
  transition-delay: 0s;
}

@keyframes title-glow {
  0%,
  100% {
    text-shadow: 0 0 10px rgba(255, 0, 51, 0.35);
  }
  50% {
    text-shadow: 0 0 26px rgba(255, 0, 51, 0.65), 0 0 48px rgba(255, 0, 51, 0.2);
  }
}

@keyframes badge-pop {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(255, 0, 51, 0);
    filter: brightness(1);
  }
  50% {
    box-shadow: 0 0 16px rgba(255, 0, 51, 0.45);
    filter: brightness(1.12);
  }
}

@keyframes terminal-breathe {
  0%,
  100% {
    box-shadow: inset 0 0 40px rgba(255, 0, 51, 0.06);
    border-color: var(--border);
  }
  50% {
    box-shadow: inset 0 0 56px rgba(255, 0, 51, 0.12), 0 0 24px rgba(255, 0, 51, 0.12);
    border-color: rgba(255, 0, 51, 0.48);
  }
}

@keyframes scanlines-drift {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 6px;
  }
}

@keyframes grain-drift {
  0%,
  100% {
    opacity: 0.19;
  }
  50% {
    opacity: 0.28;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .section-head h2 {
    animation: title-glow 5.5s ease-in-out infinite;
  }

  .section-head:hover h2 {
    animation: none;
    text-shadow: 0 0 32px rgba(255, 0, 51, 0.7);
  }

  .h2-tag {
    animation: badge-pop 4s ease-in-out infinite;
  }

  .section-head:hover .h2-tag {
    animation: none;
  }

  .terminal-block {
    animation: terminal-breathe 6s ease-in-out infinite;
  }

  .crt-overlay {
    animation: scanlines-drift 2.2s linear infinite;
  }

  .grain-layer {
    animation: grain-drift 8s ease-in-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  .grain-layer {
    opacity: 0.12;
    animation: none !important;
  }

  .crt-overlay {
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }

  .work-grid .reveal:nth-child(n) {
    transition-delay: 0s !important;
  }

  .nav-toggle-bar {
    transition: none;
  }

  .cursor-blink {
    animation: none;
    opacity: 1;
  }

  .glitch::before,
  .glitch::after {
    display: none;
  }

  .section-head h2,
  .h2-tag,
  .terminal-block {
    animation: none !important;
  }

  .section-head:hover h2,
  .section-head:hover .h2-tag {
    transform: none;
  }

  .contact-note:hover {
    transform: none;
  }
}
