:root {
  --bg-paper: #fbfbf9;
  --bg-tint: #f3f6fd;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --border-harsh: #1a1a1a;
  --border-muted: rgba(26, 26, 26, 0.18);
  --grid-line: rgba(29, 78, 216, 0.1);
  --text-main: #1a1a1a;
  --text-muted: rgba(26, 26, 26, 0.72);
  --accent: #1d4ed8;
  --accent-bright: #2563eb;
  --accent-soft: rgba(29, 78, 216, 0.14);
  --accent-warm: rgba(245, 158, 11, 0.18);
  --marker: rgba(250, 230, 140, 0.75);

  --syntax-keyword: #d73a49;
  --syntax-string: #032f62;
  --syntax-property: #6f42c1;

  --sans: 'Avenir Next', 'Segoe UI Variable', 'Segoe UI', 'Helvetica Neue', sans-serif;
  --mono: 'SFMono-Regular', 'SF Mono', 'JetBrains Mono', 'Cascadia Mono', 'Fira Mono', monospace;

  --ease-brutal: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-block: 12px 12px 0 rgba(26, 26, 26, 0.96);
}

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

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 12%, rgba(29, 78, 216, 0.2), transparent 0 22%),
    radial-gradient(circle at 86% 10%, rgba(245, 158, 11, 0.12), transparent 0 18%),
    linear-gradient(180deg, #fcfcfb 0%, #f3f6fd 42%, #fbfbf9 100%);
  color: var(--text-main);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

nav,
main,
footer {
  position: relative;
  z-index: 1;
}

.page-backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.page-grid,
.page-glow,
.page-beam {
  position: absolute;
  inset: 0;
}

.page-grid {
  background-image:
    linear-gradient(rgba(29, 78, 216, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 78, 216, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 85%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 85%);
}

.page-glow {
  filter: blur(18px);
  transform-origin: center;
}

.page-glow-one {
  inset: auto auto 18% -8%;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29, 78, 216, 0.18) 0%, rgba(29, 78, 216, 0.08) 35%, transparent 72%);
  animation: float-drift 14s ease-in-out infinite;
}

.page-glow-two {
  inset: 7% -8% auto auto;
  width: 22rem;
  height: 22rem;
  border-radius: 35%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.14) 0%, rgba(245, 158, 11, 0.08) 28%, transparent 74%);
  animation: float-drift 17s ease-in-out infinite reverse;
}

.page-beam {
  --beam-rotate: -12deg;
  --beam-shift-x: -18px;
  --beam-shift-y: 20px;
  inset: auto;
  width: 32rem;
  height: 10rem;
  border: 1px solid rgba(29, 78, 216, 0.09);
  background: linear-gradient(90deg, rgba(29, 78, 216, 0.08), rgba(29, 78, 216, 0));
  opacity: 0.85;
  transform: rotate(var(--beam-rotate));
}

.page-beam-one {
  top: 14%;
  right: -12rem;
  --beam-rotate: -12deg;
  --beam-shift-x: -18px;
  --beam-shift-y: 20px;
  animation: beam-sweep 20s ease-in-out infinite;
}

.page-beam-two {
  bottom: 16%;
  left: -11rem;
  --beam-rotate: 16deg;
  --beam-shift-x: 18px;
  --beam-shift-y: -18px;
  animation: beam-sweep 24s ease-in-out infinite reverse;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

nav {
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(251, 251, 249, 0.76);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(26, 26, 26, 0.14);
  padding: 16px 0;
  animation: nav-enter 0.8s var(--ease-brutal) both;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: 0.03em;
}

.logo span {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 13px;
  font-family: var(--mono);
  transition: color 0.25s ease;
}

.hero {
  position: relative;
  padding: 124px 0 92px;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 42px 12px 0;
  border: 1px solid rgba(29, 78, 216, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.1)),
    linear-gradient(135deg, rgba(29, 78, 216, 0.08), transparent 42%);
  transform: rotate(-1.2deg);
  z-index: -3;
}

.hero::after {
  content: "";
  position: absolute;
  top: 22px;
  right: 24px;
  width: 15rem;
  height: 15rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29, 78, 216, 0.18) 0%, rgba(29, 78, 216, 0.05) 45%, transparent 72%);
  filter: blur(8px);
  z-index: -2;
  animation: pulse-glow 10s ease-in-out infinite;
}

.hero-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.hero-orb,
.hero-ring,
.hero-grid {
  position: absolute;
}

.hero-orb {
  border-radius: 50%;
  filter: blur(2px);
}

.hero-orb-one {
  top: 8%;
  left: -2%;
  width: 6.5rem;
  height: 6.5rem;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.34), rgba(245, 158, 11, 0.04) 70%);
  animation: float-drift 11s ease-in-out infinite;
}

.hero-orb-two {
  right: 8%;
  bottom: 8%;
  width: 5rem;
  height: 5rem;
  background: radial-gradient(circle, rgba(29, 78, 216, 0.28), rgba(29, 78, 216, 0.04) 70%);
  animation: float-drift 9s ease-in-out infinite reverse;
}

.hero-ring {
  top: 4%;
  right: -2%;
  width: 11rem;
  height: 11rem;
  border-radius: 50%;
  border: 1px dashed rgba(29, 78, 216, 0.28);
  animation: slow-spin 20s linear infinite;
}

.hero-grid {
  left: -5%;
  bottom: 6%;
  width: 14rem;
  height: 8rem;
  border: 1px solid rgba(29, 78, 216, 0.1);
  background-image:
    linear-gradient(rgba(29, 78, 216, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 78, 216, 0.08) 1px, transparent 1px);
  background-size: 16px 16px;
  transform: rotate(-7deg);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 5vw, 48px);
  background:
    radial-gradient(circle at top right, rgba(29, 78, 216, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 249, 254, 0.82));
  border: 1px solid var(--border-harsh);
  box-shadow: 14px 14px 0 rgba(26, 26, 26, 0.95);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 12%, rgba(29, 78, 216, 0.1) 38%, rgba(250, 230, 140, 0.3) 68%, transparent 100%);
  transform: translateX(-35%);
  pointer-events: none;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(29, 78, 216, 0.16);
  pointer-events: none;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 8px 14px;
  border: 1px solid rgba(29, 78, 216, 0.18);
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

.hero-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-bright), rgba(245, 158, 11, 0.7));
  box-shadow: 0 0 0 6px rgba(29, 78, 216, 0.08);
}

h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  line-height: 1.14;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

.hero-panel h1 {
  font-size: clamp(15px, 2vw, 19px);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  margin-bottom: 10px;
}

.hero-declaration {
  font-size: clamp(30px, 5.2vw, 52px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 14px;
}

.hero-sub {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 28px;
  line-height: 1.68;
}

.hero-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid rgba(26, 26, 26, 0.12);
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  color: var(--text-main);
  animation: badge-float 8s ease-in-out infinite;
}

.hero-chip:nth-child(2) {
  animation-delay: 1.4s;
}

.hero-chip:nth-child(3) {
  animation-delay: 2.8s;
}

.avail-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
  padding: 4px 10px;
  background: transparent;
  border: 1px solid var(--border-muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.avail-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  animation: avail-pulse 2.4s ease-in-out infinite;
}

.typing-cursor::after {
  content: '_';
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

.btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 12px 24px;
  font-size: 13px;
  font-family: var(--mono);
  text-decoration: none;
  border: 1px solid var(--border-harsh);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.9);
  transition: transform 0.2s var(--ease-brutal), box-shadow 0.2s var(--ease-brutal), border-color 0.2s ease, color 0.2s ease;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, transparent 10%, rgba(29, 78, 216, 0.18) 45%, rgba(250, 230, 140, 0.34) 72%, transparent 100%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease-brutal);
}

.btn:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--border-harsh);
  border-color: var(--accent-bright);
  color: var(--accent-bright);
}

.btn:hover::before {
  transform: translateX(0);
}

.btn-primary {
  background: var(--accent-bright);
  color: #fff;
  border-color: var(--accent-bright);
}

.btn-primary::before {
  background: linear-gradient(120deg, transparent 10%, rgba(255, 255, 255, 0.18) 45%, rgba(250, 230, 140, 0.2) 72%, transparent 100%);
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 6px 6px 0 rgba(26, 26, 26, 0.85);
}

section {
  position: relative;
  padding: 72px 0;
}

#skills {
  padding-top: 32px;
}

#experience::before,
#projects::before,
#skills::before {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
}

#experience::before {
  top: 46px;
  left: max(16px, calc(50% - 580px));
  width: 11rem;
  height: 12rem;
  border: 1px solid rgba(29, 78, 216, 0.16);
  background:
    linear-gradient(180deg, rgba(29, 78, 216, 0.08), transparent 65%),
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(29, 78, 216, 0.08) 18px 19px);
  transform: rotate(-6deg);
}

#projects::before {
  top: 72px;
  right: max(16px, calc(50% - 590px));
  width: 12rem;
  height: 12rem;
  border-radius: 28px;
  border: 1px solid rgba(245, 158, 11, 0.15);
  background:
    radial-gradient(circle at 30% 30%, rgba(29, 78, 216, 0.16), transparent 42%),
    linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(255, 255, 255, 0.05));
  transform: rotate(12deg);
}

#skills::before {
  left: max(16px, calc(50% - 560px));
  bottom: 32px;
  width: 13rem;
  height: 9rem;
  border: 1px solid rgba(29, 78, 216, 0.14);
  background-image:
    radial-gradient(circle, rgba(29, 78, 216, 0.15) 1px, transparent 1px),
    linear-gradient(135deg, rgba(29, 78, 216, 0.06), transparent 75%);
  background-size: 16px 16px, 100% 100%;
  transform: skew(-8deg);
}

.section-heading {
  font-size: 18px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading::after {
  content: '';
  height: 1px;
  flex-grow: 1;
  background: linear-gradient(to right, var(--border-harsh), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--ease-brutal) 0.12s;
}

.section-heading.is-visible::after {
  transform: scaleX(1);
}

.exp-item {
  margin-bottom: 28px;
  border-left: 1px solid var(--border-harsh);
  padding: 20px 22px 12px 24px;
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42));
  border-radius: 0 24px 24px 0;
  transition: border-color 0.3s ease, opacity 0.3s ease;
}

.exp-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 24px;
  width: 9px;
  height: 9px;
  background: var(--bg-paper);
  border: 2px solid var(--border-harsh);
  border-radius: 50%;
  transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.exp-item::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.08), transparent 45%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.exp-item:hover {
  --surface-x: 6px;
  border-left-color: var(--accent-bright);
}

.exp-item:hover::before {
  transform: scale(1.2);
  background: rgba(29, 78, 216, 0.12);
  border-color: var(--accent-bright);
}

.exp-item:hover::after {
  opacity: 1;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.exp-header h3,
.project-card h3 {
  font-size: 1.08rem;
}

.exp-link {
  color: var(--accent);
  padding-left: 4px;
}

.exp-role {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 13px;
}

.exp-bullets {
  list-style: none;
}

.exp-bullets li {
  margin-bottom: 12px;
  color: var(--text-muted);
  position: relative;
  padding-left: 18px;
}

.exp-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
}

/* ── Timeline ───────────────────────────────── */

.timeline {
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 80px;
  top: 10px;
  bottom: 80px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    var(--border-harsh) 0%,
    rgba(26, 26, 26, 0.08) 100%
  );
  z-index: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 36px;
  padding-bottom: 80px;
  position: relative;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 75.5px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg-paper);
  border: 2px solid var(--border-harsh);
  z-index: 1;
}

.timeline-item:first-child::before {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.timeline-meta {
  padding-top: 5px;
  display: flex;
  justify-content: flex-end;
  padding-right: 20px;
}

.timeline-year {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: right;
  letter-spacing: 0.04em;
}

.timeline-card {
  padding-bottom: 0;
  transition: opacity 0.3s ease;
}

.timeline-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}

.timeline-header h3 {
  font-size: 1.08rem;
}

.highlight {
  color: var(--text-main);
  font-weight: 500;
  font-family: var(--mono);
  background-image: linear-gradient(transparent 62%, var(--marker) 62%);
  background-size: 0% 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s var(--ease-brutal);
}

.highlight:hover {
  background-size: 100% 100%;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  padding: 32px;
  background:
    radial-gradient(circle at top right, rgba(29, 78, 216, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 248, 252, 0.9));
  border: 1px solid var(--border-harsh);
  box-shadow: 10px 10px 0 rgba(26, 26, 26, 0.94);
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, rgba(29, 78, 216, 0.16), transparent 42%);
  opacity: 0.65;
  pointer-events: none;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 15%, rgba(255, 255, 255, 0.72) 48%, transparent 72%);
  transform: translateX(-130%);
  transition: transform 0.9s var(--ease-brutal);
  pointer-events: none;
}

.project-card:hover {
  --surface-x: -6px;
  --surface-y: -6px;
  box-shadow: 14px 14px 0 var(--border-harsh);
}

.project-card:hover::after {
  transform: translateX(130%);
}

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--accent);
  margin-right: 12px;
  border: 1px solid rgba(29, 78, 216, 0.18);
  padding: 3px 7px;
  background: rgba(29, 78, 216, 0.04);
}

.tag-row {
  margin: 8px 0 16px;
}

.project-copy,
.project-bullets {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.project-bullets {
  list-style: none;
}

.project-bullets li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 12px;
}

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

.project-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
}

/* ── Bento Metrics ───────────────────────────── */

.bento-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin: 18px 0 22px;
}

.bento-stat {
  padding: 14px 12px;
  border: 1px solid var(--border-muted);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.project-card:hover .bento-stat {
  border-color: rgba(29, 78, 216, 0.2);
  background: rgba(255, 255, 255, 0.72);
}

.bento-number {
  font-size: clamp(22px, 3.5vw, 28px);
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1;
}

.bento-label {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

.bento-detail {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

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

.hover-link {
  position: relative;
  text-decoration: none;
  color: var(--text-main);
  display: inline-block;
  transition: color 0.25s ease;
}

.hover-link:hover {
  color: var(--accent-bright);
}

.hover-link::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 1px;
  bottom: -2px;
  left: 0;
  background: linear-gradient(90deg, var(--accent-bright), rgba(29, 78, 216, 0));
  transform-origin: bottom right;
  transition: transform 0.3s var(--ease-brutal);
}

.hover-link:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.editor-window {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(29, 78, 216, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(251, 251, 249, 0.98), rgba(245, 248, 255, 0.88));
  border: 1px solid var(--border-harsh);
  box-shadow: var(--shadow-block);
  border-radius: 16px;
}

.editor-window::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.08), transparent 35%, rgba(250, 230, 140, 0.18) 80%);
  pointer-events: none;
}

.editor-window:hover {
  --surface-x: -4px;
  --surface-y: -4px;
  box-shadow: 16px 16px 0 var(--border-harsh);
}

/* ── Marquee ────────────────────────────────── */

.marquee-wrap {
  padding: 4px 0;
}

.marquee-container {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 0;
}

.marquee-row {
  display: flex;
  width: max-content;
  animation: marquee-fwd 32s linear infinite;
  will-change: transform;
}

.marquee-row--reverse {
  animation: marquee-rev 26s linear infinite;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  padding: 8px 18px;
  border: 1px solid rgba(29, 78, 216, 0.22);
  background: rgba(255, 255, 255, 0.72);
  margin: 0 6px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.marquee-item.specialty {
  color: var(--text-muted);
  border-color: var(--border-muted);
  background: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.marquee-sep {
  display: inline-flex;
  align-items: center;
  align-self: center;
  flex-shrink: 0;
  color: rgba(26, 26, 26, 0.18);
  font-size: 10px;
  padding: 0 2px;
}

.editor-header {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-harsh);
  background-color: rgba(29, 78, 216, 0.04);
}

.editor-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--border-harsh);
  background: rgba(255, 255, 255, 0.86);
}

.editor-body {
  padding: 32px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-main);
  overflow-x: auto;
}

.syntax-keyword {
  color: var(--syntax-keyword);
  font-weight: 600;
}

.syntax-variable {
  color: var(--text-main);
  font-weight: 600;
}

.syntax-property {
  color: var(--syntax-property);
}

.syntax-string {
  color: var(--syntax-string);
}

.terminal-cursor {
  animation: blink 1s step-end infinite;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
  padding: clamp(36px, 5vw, 56px);
  background:
    radial-gradient(circle at top right, rgba(29, 78, 216, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 248, 252, 0.9));
  border: 1px solid var(--border-harsh);
  box-shadow: var(--shadow-block);
}

.contact-headline {
  font-size: clamp(22px, 3.5vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.15;
}

.contact-tagline {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.7;
  margin-top: -8px;
}

.contact-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer {
  padding: 60px 0 40px;
  text-align: center;
  border-top: 1px solid rgba(26, 26, 26, 0.14);
  margin-top: 40px;
}

.footer-note {
  color: var(--text-muted);
  font-size: 12px;
}

.reveal-wrapper {
  display: block;
}

.overflow-visible {
  overflow: visible;
}

.reveal-element {
  --reveal-y: 40px;
  --surface-x: 0px;
  --surface-y: 0px;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  transform: translate3d(var(--surface-x), calc(var(--reveal-y) + var(--surface-y)), 0) perspective(1200px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  opacity: 0;
  transition: transform 0.8s var(--ease-brutal), opacity 0.8s ease, box-shadow 0.3s var(--ease-brutal), border-color 0.3s ease, background-color 0.3s ease, filter 0.3s ease;
  will-change: transform, opacity;
}

.reveal-element.is-visible {
  --reveal-y: 0px;
  opacity: 1;
}

.hero .reveal-element {
  --reveal-y: 0px;
  opacity: 1;
}

.interactive-surface {
  transform-style: preserve-3d;
}

.interactive-surface.is-hovered {
  transition-duration: 0.18s;
}

.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}

.delay-3 {
  transition-delay: 0.3s;
}

.delay-4 {
  transition-delay: 0.4s;
}

.sparkline {
  display: inline-block;
  vertical-align: middle;
  margin-left: 5px;
  position: relative;
  top: -1px;
  opacity: 0.82;
  filter: drop-shadow(0 2px 4px rgba(29, 78, 216, 0.14));
}

.spark-line {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
}

.stack-filter-btn {
  appearance: none;
  background: none;
  border: none;
  padding: 1px 3px;
  margin: 0 -3px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-radius: 2px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  outline-offset: 2px;
}

.stack-filter-btn:hover {
  background-color: rgba(3, 47, 98, 0.08);
  transform: translateY(-1px);
}

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

.stack-filter-btn.is-active {
  background-color: var(--marker);
  color: var(--text-main);
}

.project-card.dimmed,
.exp-item.dimmed {
  opacity: 0.16;
  filter: saturate(0.45);
  pointer-events: none;
}

.hero-profile {
  position: relative;
  width: 112px;
  height: 112px;
  margin-bottom: 1.8rem;
  border: 1px solid var(--border-harsh);
  box-shadow: 7px 7px 0 var(--border-harsh);
  overflow: hidden;
  background-color: var(--bg-tint);
  animation: profile-lift 7.5s ease-in-out infinite;
}

.hero-profile::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -18px;
  height: 22px;
  background: radial-gradient(circle, rgba(26, 26, 26, 0.2), transparent 72%);
  filter: blur(9px);
  z-index: -1;
}

.hero-profile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%) contrast(128%) brightness(138%);
  -webkit-mask-image: radial-gradient(circle, white 43%, transparent 43%);
  mask-image: radial-gradient(circle, white 43%, transparent 43%);
  -webkit-mask-size: 7px 7px;
  mask-size: 7px 7px;
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  transition: filter 0.5s var(--ease-brutal), opacity 0.3s ease;
}

.hero-profile.dot-canvas-ready img {
  opacity: 0;
  pointer-events: none;
}

.hero-profile canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  filter: grayscale(100%) contrast(128%) brightness(138%);
  transition: filter 0.6s var(--ease-brutal);
}

.hero-profile.is-hovered canvas {
  filter: grayscale(0%) contrast(112%) brightness(110%) saturate(1.25);
}

.hero-panel:hover .hero-profile img {
  filter: grayscale(25%) contrast(115%) brightness(120%);
}

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

@keyframes nav-enter {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-drift {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -18px, 0) scale(1.04);
  }
}

@keyframes beam-sweep {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(var(--beam-rotate));
    opacity: 0.55;
  }
  50% {
    transform: translate3d(var(--beam-shift-x), var(--beam-shift-y), 0) rotate(calc(var(--beam-rotate) + 3deg));
    opacity: 0.95;
  }
}

@keyframes pulse-glow {
  0%, 100% {
    transform: scale(1);
    opacity: 0.68;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.92;
  }
}

@keyframes slow-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes badge-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes avail-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0);
  }
}

@keyframes profile-lift {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes marquee-fwd {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes marquee-rev {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

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

  nav {
    padding: 14px 0;
  }

  .nav-links {
    gap: 16px;
  }

  .hero {
    padding: 96px 0 64px;
  }

  .hero-panel {
    padding: 28px;
    box-shadow: 10px 10px 0 rgba(26, 26, 26, 0.95);
  }

  .hero-panel::after {
    inset: 14px;
  }

  .exp-header {
    flex-direction: column;
    gap: 4px;
  }

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

  section {
    padding: 56px 0;
  }

  .contact-links {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-links .btn {
    text-align: center;
    justify-content: center;
  }

  #experience::before,
  #projects::before,
  #skills::before {
    width: 7rem;
    height: 7rem;
    opacity: 0.65;
  }

  .timeline::before {
    left: 64px;
  }

  .timeline-item {
    grid-template-columns: 64px 1fr;
    gap: 24px;
    padding-bottom: 60px;
  }

  .timeline-item::before {
    left: 59.5px;
  }

  .timeline-meta {
    padding-right: 12px;
  }
}

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

  .hero-declaration {
    font-size: clamp(26px, 8vw, 36px);
  }

  .hero-meta {
    gap: 8px;
  }

  .hero-chip {
    font-size: 10px;
  }

  .btn {
    width: 100%;
  }

  .project-card {
    box-shadow: 8px 8px 0 rgba(26, 26, 26, 0.95);
  }

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

  .timeline::before {
    display: none;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 4px;
    padding-bottom: 48px;
  }

  .timeline-item::before {
    display: none;
  }

  .timeline-meta {
    justify-content: flex-start;
    padding-right: 0;
  }
}

@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;
    scroll-behavior: auto !important;
  }

  .reveal-element {
    --reveal-y: 0px;
    --surface-x: 0px;
    --surface-y: 0px;
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    opacity: 1;
  }

  .marquee-row,
  .marquee-row--reverse {
    animation: none;
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }
}
