/* ==========================================================================
   Surendra Vishwakarma — Portfolio
   Design tokens first, then components. Dark cyber-minimalist theme.
   ========================================================================== */

:root {
  /* Color system */
  --bg: #0B0914;
  --surface: #120F24;
  --surface-elevated: #1A1533;
  --surface-glass: rgba(18, 15, 36, 0.78);
  --border: #251F3D;
  --border-active: #4C1D95;

  --accent: #8B5CF6;
  --accent-hover: #A855F7;
  --accent-active: #7C3AED;
  --glow: #C084FC;
  --grad-start: #8B5CF6;
  --grad-end: #D946EF;

  --text: #F3F4F6;
  --text-secondary: #9CA3AF;
  --text-muted: #8B8AA3;
  --text-accent: #E9D5FF;

  /* Typography */
  --font-display: "Outfit", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;

  /* Layout */
  --container: 76rem;
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 4.5rem;
  --section-pad: clamp(5rem, 9vw, 8rem);

  --shadow-card: 0 10px 40px rgba(3, 2, 12, 0.45);
  --shadow-glow: 0 14px 48px rgba(139, 92, 246, 0.22);
}

/* ---------- Reset & base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: rgba(139, 92, 246, 0.45); color: #fff; }

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

h1, h2, h3 { font-family: var(--font-display); color: var(--text); line-height: 1.15; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.75rem); font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 1.2rem; font-weight: 600; }

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

.container {
  width: min(var(--container), 100% - 2.5rem);
  margin-inline: auto;
}

.section { padding-block: var(--section-pad); }

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 2000;
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: #fff;
  border-radius: 0 0 10px 10px;
  font-weight: 600;
}
.skip-link:focus { top: 0; }

/* ---------- Ambient background ---------- */

.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
}
.orb-a {
  width: 42rem; height: 42rem;
  top: -16rem; right: -12rem;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.32), transparent 65%);
}
.orb-b {
  width: 38rem; height: 38rem;
  bottom: -14rem; left: -14rem;
  background: radial-gradient(circle, rgba(217, 70, 239, 0.18), transparent 65%);
}

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

/* Film grain — subtle noise overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Scroll progress bar ---------- */

.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 1100;
  background: rgba(255, 255, 255, 0.04);
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--grad-start), var(--grad-end));
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- Header / navigation ---------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 32px rgba(3, 2, 12, 0.35);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.brand-mark { filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5)); }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand-dot { color: var(--glow); font-style: normal; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-link {
  position: relative;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.4rem 0;
  transition: color 0.25s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--grad-start), var(--grad-end));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

.nav-cta-item { display: flex; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(18, 15, 36, 0.7);
}
.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}
.btn:active { transform: translateY(0) scale(0.98); }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.85rem; }

.btn-primary {
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  color: #fff;
  box-shadow: 0 10px 32px rgba(139, 92, 246, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(139, 92, 246, 0.5);
}

.btn-ghost {
  border-color: var(--border);
  background: rgba(18, 15, 36, 0.6);
  color: var(--text);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--border-active);
  color: var(--text-accent);
  box-shadow: var(--shadow-glow);
}

.icon { width: 1.15em; height: 1.15em; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-lg { width: 1.6rem; height: 1.6rem; color: var(--accent); }

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

.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
  padding-top: calc(var(--header-h) + 2.5rem);
  padding-bottom: 3rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-accent);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.28);
  padding: 0.45rem 1rem;
  border-radius: 999px;
}
.section-head .eyebrow { margin-bottom: 1.2rem; }

.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2.2s ease-out infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero-title {
  margin: 1.4rem 0 1rem;
  font-size: clamp(2.6rem, 6.2vw, 4.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.04;
}
.h1-line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.h1-line-inner { display: inline-block; }

.grad-text {
  background: linear-gradient(100deg, var(--grad-start) 10%, var(--grad-end) 55%, var(--glow) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-role {
  color: var(--glow);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  margin-bottom: 1.2rem;
}

.hero-headline {
  font-family: var(--font-display);
  color: var(--text);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  font-weight: 500;
  max-width: 36rem;
  margin-bottom: 0.9rem;
}

.hero-intro { max-width: 36rem; font-size: 0.98rem; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2.2rem;
  margin-block: 1.8rem;
  padding-block: 1.2rem;
  border-block: 1px solid var(--border);
}
.hero-stats li { display: grid; gap: 0.1rem; }
.hero-stats strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
}
.hero-stats span { font-size: 0.78rem; color: var(--text-muted); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.hero-social { display: flex; gap: 0.5rem; margin-top: 1.6rem; }
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.social-link:hover {
  color: var(--text-accent);
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* Hero photo composition */
.hero-visual {
  position: relative;
  justify-self: center;
  width: min(100%, 25rem);
}

.photo-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 30px 80px rgba(3, 2, 12, 0.6), var(--shadow-glow);
}
.photo-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 18%, rgba(139, 92, 246, 0.16), transparent 55%),
    linear-gradient(180deg, transparent 55%, rgba(11, 9, 20, 0.85) 100%);
}
.photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  filter: saturate(1.05) contrast(1.04);
}

.float-chip {
  position: absolute;
  left: 50%;
  bottom: -1.1rem;
  transform: translateX(-50%);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.1rem;
  font-size: 0.74rem;
  color: var(--text-accent);
  background: rgba(18, 15, 36, 0.85);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 999px;
  box-shadow: var(--shadow-glow);
}

/* On-load animation: masked line-by-line reveal */
.h1-line-inner {
  transform: translateY(115%);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.h1-line:nth-child(2) .h1-line-inner { animation-delay: 0.12s; }

.anim { opacity: 0; animation: fade-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.anim-1 { animation-delay: 0.05s; }
.anim-2 { animation-delay: 0.3s; }
.anim-3 { animation-delay: 0.42s; }
.anim-4 { animation-delay: 0.52s; }
.anim-5 { animation-delay: 0.62s; }
.anim-6 { animation-delay: 0.72s; }
.anim-7 { animation-delay: 0.82s; }

.anim-photo {
  opacity: 0;
  animation: photo-in 1s cubic-bezier(0.22, 1, 0.36, 1) 0.45s forwards;
}

@keyframes rise { to { transform: translateY(0); } }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes photo-in {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Marquee ---------- */

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--border);
  background: rgba(18, 15, 36, 0.45);
  padding-block: 1.05rem;
}
.marquee-track { display: flex; width: max-content; animation: marquee 55s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group {
  display: flex;
  align-items: center;
  gap: 2.6rem;
  padding-right: 2.6rem;
}
.marquee-group li {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
}
.marquee-group li[aria-hidden="true"] {
  color: var(--accent);
  font-weight: 400;
  text-shadow: 0 0 12px rgba(139, 92, 246, 0.8);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Section headers ---------- */

.section-head { max-width: 42rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-sub { margin-top: 1rem; }

/* ---------- Cards ---------- */

.card {
  background: linear-gradient(180deg, rgba(26, 21, 51, 0.6), rgba(18, 15, 36, 0.6));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: border-color 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.card:hover {
  border-color: rgba(139, 92, 246, 0.55);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow), var(--shadow-card);
}

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

.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.about-text { display: grid; gap: 1.2rem; }
.about-text p { font-size: 1.02rem; }

.about-facts { padding: 1.6rem; }
.about-facts h3 {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--glow);
  margin-bottom: 1.2rem;
}
.about-facts dl { display: grid; gap: 1rem; }
.about-facts div {
  display: grid;
  gap: 0.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--border);
}
.about-facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.about-facts dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}
.about-facts dd { color: var(--text); font-weight: 500; font-size: 0.95rem; }

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

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 1.4rem;
}
.skill-card { padding: 1.6rem; }
.skill-card h3 { margin-bottom: 1.1rem; font-size: 1.05rem; color: var(--text-accent); }

.chip-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 0.34rem 0.75rem;
  border-radius: 999px;
  color: #CBB8FF;
  background: rgba(139, 92, 246, 0.09);
  border: 1px solid rgba(139, 92, 246, 0.22);
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.chip:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.25);
}
.chip-sm { font-size: 0.72rem; padding: 0.26rem 0.62rem; color: #B9A6F5; }

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

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.9rem;
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.project-tag {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--glow);
}
.status-badge {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #86EFAC;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 0.24rem 0.65rem;
  border-radius: 999px;
}

.project-desc { font-size: 0.95rem; }

.feature-list { display: grid; gap: 0.55rem; }
.feature-list li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.52em;
  width: 6px; height: 6px;
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  transform: rotate(45deg);
  border-radius: 1.5px;
}

.tech-list { margin-top: auto; padding-top: 0.4rem; }

.project-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}

.repo-pending {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0.55rem 1.1rem;
  border: 1px dashed var(--border);
  border-radius: 999px;
  cursor: default;
}

/* ---------- Education & achievements ---------- */

.edu-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.timeline {
  position: relative;
  padding-left: 2rem;
  display: grid;
  gap: 2.2rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0.32rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 1px;
  background: linear-gradient(180deg, var(--accent), rgba(139, 92, 246, 0.08));
}
.timeline-item { position: relative; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 0.35rem;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.7);
}
.timeline-dates {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--glow);
  margin-bottom: 0.35rem;
}
.timeline-item h3 { margin-bottom: 0.3rem; }
.timeline-detail { font-size: 0.95rem; color: var(--text); }
.timeline-note { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.35rem; }

.achievements h3 {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--glow);
  margin-bottom: 1.2rem;
}
.achievements ul { display: grid; gap: 1rem; }
.ach-card {
  display: grid;
  gap: 0.3rem;
  padding: 1.2rem 1.4rem;
}
.ach-card strong { color: var(--text); font-family: var(--font-display); font-size: 1.02rem; }
.ach-card span { font-size: 0.88rem; }

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

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.5rem;
}
a.contact-card:hover h3 { color: var(--text-accent); }

.contact-body { display: grid; gap: 0.2rem; min-width: 0; }
.contact-body h3 { font-size: 1rem; }
.contact-value {
  font-size: 0.8rem;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.contact-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.icon-btn:hover {
  color: var(--text-accent);
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}
.icon-btn.copied { color: #34D399; border-color: rgba(52, 211, 153, 0.5); }

.arrow-icon { margin-left: auto; color: var(--text-muted); transition: transform 0.25s ease, color 0.25s ease; }
a.contact-card:hover .arrow-icon { transform: translateX(4px); color: var(--accent); }

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.2rem 0;
  background: rgba(18, 15, 36, 0.5);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Stagger children inside grids once revealed */
.skills-grid .reveal:nth-child(2), .projects-grid .reveal:nth-child(2), .contact-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.skills-grid .reveal:nth-child(3), .projects-grid .reveal:nth-child(3), .contact-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.skills-grid .reveal:nth-child(4) { transition-delay: 0.24s; }
.skills-grid .reveal:nth-child(5) { transition-delay: 0.32s; }
.skills-grid .reveal:nth-child(6) { transition-delay: 0.4s; }

/* ---------- Responsive ---------- */

@media (max-width: 62em) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: calc(var(--header-h) + 2rem); text-align: left; }
  .hero-visual { order: -1; width: min(100%, 20rem); margin-top: 0.5rem; }
  .hero-headline, .hero-intro { max-width: none; }
  .projects-grid { grid-template-columns: 1fr; }
  .about-grid, .edu-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }

  /* Mobile navigation drawer */
  .nav-toggle { display: flex; }
  .nav-panel {
    position: fixed;
    top: 0; right: 0;
    height: 100dvh;
    width: min(20rem, 84vw);
    padding: calc(var(--header-h) + 1.5rem) 2rem 2rem;
    background: rgba(11, 9, 20, 0.96);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    visibility: hidden;
  }
  .nav-panel.open { transform: translateX(0); visibility: visible; }
  .nav-list { flex-direction: column; align-items: flex-start; gap: 1.4rem; }
  .nav-link { font-size: 1.05rem; }
  .nav-cta-item { margin-top: 0.6rem; }
  .nav-resume { padding: 0.7rem 1.4rem; }
}

@media (max-width: 34em) {
  .hero-stats { gap: 0.8rem 1.4rem; }
  .hero-stats strong { font-size: 1.2rem; }
  .btn { width: 100%; justify-content: center; }
  .hero-cta { flex-direction: column; }
  .footer-inner { justify-content: center; text-align: center; }
  .float-chip { white-space: nowrap; font-size: 0.62rem; padding: 0.5rem 0.85rem; }
}

/* ---------- Reduced motion ---------- */

@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;
  }
  .anim, .anim-photo, .reveal { opacity: 1 !important; transform: none !important; }
  .h1-line-inner { transform: none !important; }
  .marquee-track { animation: none !important; flex-wrap: wrap; width: 100%; }
  .pulse-dot { animation: none !important; }
}

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

.contact-form {
  position: relative;
  display: grid;
  gap: 1.15rem;
  padding: 1.9rem;
  margin-bottom: 2.4rem;
  max-width: 46rem;
}
.contact-form h3 {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--glow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-field { display: grid; gap: 0.4rem; }
.form-field label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}
.form-field input,
.form-field textarea {
  font: inherit;
  color: var(--text);
  background: rgba(11, 9, 20, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--text-muted); }
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}
.form-field textarea { resize: vertical; min-height: 7.5rem; }

/* Hidden honeypot — off-screen for humans, tempting for bots */
.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-footer { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.form-footer .btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.form-status { font-size: 0.8rem; min-height: 1.2em; }
.form-status.ok { color: #34D399; }
.form-status.err { color: #F87171; }

@media (max-width: 34em) {
  .form-row { grid-template-columns: 1fr; }
}
