/* ══════════════════════════════════════════════════════════════
   style.css — Roshan Shrestha Portfolio
   All theme variables, layout, components, responsive styles
   Animations live in animations.css
══════════════════════════════════════════════════════════════ */

/* ─── THEME: LIGHT ─── */
:root,
[data-theme="light"] {
  --ink: #111110;
  --ink-2: #3d3d3b;
  --ink-3: #6e6e6b;
  --ink-4: #9e9e9a;
  --surface: #f8f7f4;
  --surface-2: #f0efe9;
  --surface-3: #e8e6df;
  --card-bg: #ffffff;
  --card-alt-bg: #f8f7f4;
  --nav-bg: rgba(248, 247, 244, 0.92);
  --footer-bg: #111110;
  --footer-text: rgba(255, 255, 255, 0.4);
  --footer-link: rgba(255, 255, 255, 0.55);
  --accent: #1a56db;
  --accent-light: #e8eefb;
  --accent-mid: #3b6fd4;
  --border: rgba(0, 0, 0, 0.09);
  --border-strong: rgba(0, 0, 0, 0.17);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06);
  --hero-glow: rgba(26, 86, 219, 0.055);
  --hero-glow-2: rgba(26, 86, 219, 0.03);
  --status-current-bg: #dcfce7;
  --status-current-text: #166534;
  --badge-web-bg: #f0fdf4;
  --badge-web-text: #166534;
  --badge-web-bdr: #bbf7d0;
  --badge-app-bg: #fff7ed;
  --badge-app-text: #9a3412;
  --badge-app-bdr: #fed7aa;
  --badge-ph-bg: #fefce8;
  --badge-ph-text: #854d0e;
  --badge-ph-bdr: #fde68a;
  --toggle-bg: #e8e6df;
  --toggle-knob: #ffffff;
  --scrollbar: #e8e6df;
  --cursor-dot: #1a56db;
  --progress-bar: #1a56db;
  --particle-color: rgba(26, 86, 219, 0.18);
}

/* ─── THEME: DARK ─── */
[data-theme="dark"] {
  --ink: #f0ede8;
  --ink-2: #c8c4bc;
  --ink-3: #8f8b84;
  --ink-4: #5e5b56;
  --surface: #16151a;
  --surface-2: #1e1d23;
  --surface-3: #27252d;
  --card-bg: #1e1d23;
  --card-alt-bg: #16151a;
  --nav-bg: rgba(22, 21, 26, 0.93);
  --footer-bg: #0e0d11;
  --footer-text: rgba(240, 237, 232, 0.35);
  --footer-link: rgba(240, 237, 232, 0.5);
  --accent: #5b8ef5;
  --accent-light: rgba(91, 142, 245, 0.14);
  --accent-mid: #4a7ae8;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
  --hero-glow: rgba(91, 142, 245, 0.09);
  --hero-glow-2: rgba(91, 142, 245, 0.04);
  --status-current-bg: rgba(21, 128, 61, 0.2);
  --status-current-text: #4ade80;
  --badge-web-bg: rgba(21, 128, 61, 0.15);
  --badge-web-text: #4ade80;
  --badge-web-bdr: rgba(74, 222, 128, 0.2);
  --badge-app-bg: rgba(154, 52, 18, 0.15);
  --badge-app-text: #fb923c;
  --badge-app-bdr: rgba(251, 146, 60, 0.2);
  --badge-ph-bg: rgba(133, 77, 14, 0.15);
  --badge-ph-text: #fbbf24;
  --badge-ph-bdr: rgba(251, 191, 36, 0.2);
  --toggle-bg: #27252d;
  --toggle-knob: #f0ede8;
  --scrollbar: #27252d;
  --cursor-dot: #5b8ef5;
  --progress-bar: #5b8ef5;
  --particle-color: rgba(91, 142, 245, 0.2);
}

/* ─── THEME TRANSITION ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition:
    background-color 0.28s ease,
    border-color 0.28s ease,
    color 0.28s ease,
    box-shadow 0.28s ease;
}

/* Exclude animation/interaction transitions */
.btn,
a,
.project-card,
.contact-link-item,
.skill-category,
.edu-card {
  transition-duration: 0.18s;
}

/* ─── BASE ─── */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  /* prevent horizontal scroll on mobile */
}

body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  color: var(--ink-2);
  background: var(--surface);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  cursor: none;
  /* custom cursor active */
  overflow-x: hidden;
  /* prevent horizontal scroll on mobile */
  max-width: 100vw;
}

@media (hover: none) {
  body {
    cursor: auto;
  }
}

/* ─── TYPOGRAPHY ─── */
h1,
h2,
h3,
h4 {
  font-weight: 500;
  color: var(--ink);
  line-height: 1.25;
}

h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
  font-size: 1.1rem;
}

p {
  color: var(--ink-2);
  font-size: 0.975rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  cursor: none;
}

a:hover {
  text-decoration: underline;
}

strong {
  font-weight: 500;
  color: var(--ink);
}

code,
.mono {
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
}

@media (hover: none) {
  a {
    cursor: auto;
  }
}

/* ─── LAYOUT — FIXED: wider containers for large screens ─── */
.container {
  /* FIX: raised from 780px — gives content room to breathe on wide desktops */
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
  width: 100%;
}

.container-wide {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
  width: 100%;
}

/* On very large screens, add slightly more side padding so it doesn't
   feel edge-to-edge but still uses the space efficiently */
@media (min-width: 1400px) {
  .container {
    padding: 0 3rem;
  }

  .container-wide {
    padding: 0 3rem;
  }
}

section {
  padding: 5rem 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

#about {
  background: var(--card-bg);
}

#skills {
  background: var(--surface);
}

#projects {
  background: var(--card-bg);
}

#experience {
  background: var(--surface);
}

#education {
  background: var(--card-bg);
}

#contact {
  background: var(--surface);
}

/* ─── SCROLL PROGRESS BAR ─── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--progress-bar);
  z-index: 200;
  transition: width 0.08s linear;
}

/* ─── CUSTOM CURSOR ─── */
#cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--cursor-dot);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, opacity 0.2s;
}

#cursor-ring {
  position: fixed;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.18s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    width 0.2s ease, height 0.2s ease, opacity 0.2s, border-color 0.28s;
  opacity: 0.6;
}

#cursor-ring.hovering {
  width: 44px;
  height: 44px;
  opacity: 0.35;
}

@media (hover: none) {

  #cursor-dot,
  #cursor-ring {
    display: none;
  }
}

/* ─── NAVIGATION ─── */

nav:not(.nav-drawer) {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  height: 58px;
  display: flex;
  align-items: center;
  transition: box-shadow 0.3s;
}

nav:not(.nav-drawer).scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
  min-width: 0;
  box-sizing: border-box;
}

.nav-logo {
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.04em;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-logo:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
  align-items: center;
  flex-wrap: nowrap;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--ink-3);
  padding: 0.3rem 0.65rem;
  border-radius: 5px;
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.2s ease, left 0.2s ease;
}

.nav-links a.active::after,
.nav-links a:hover::after {
  width: 60%;
  left: 20%;
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--surface-2);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--ink);
  font-weight: 500;
}

.nav-cv-link {
  color: var(--accent) !important;
  font-weight: 500 !important;
}

/* Theme Toggle — subtle, icon-only in desktop nav */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
}

.theme-toggle:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.toggle-track {
  width: 26px;
  height: 15px;
  background: var(--surface-3);
  border-radius: 8px;
  position: relative;
  flex-shrink: 0;
  transition: background 0.25s;
  border: 1px solid var(--border);
}

[data-theme="dark"] .toggle-track {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--toggle-knob);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .toggle-knob {
  transform: translateX(11px);
}

.toggle-icon {
  font-size: 0.8rem;
  line-height: 1;
}

/* Hide the old text label entirely */
.toggle-label {
  display: none !important;
}

/* Drawer theme row */
.drawer-theme-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}

.drawer-theme-label {
  font-size: 0.9rem;
  color: var(--ink-3);
}

.theme-toggle-drawer {
  display: flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.theme-toggle-drawer:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.toggle-icon-mobile {
  font-size: 0.8rem;
  line-height: 1;
}

/* Mobile nav burger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}

.nav-burger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.25s;
}

.nav-burger.open span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.nav-burger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-burger.open span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* Mobile drawer */
.nav-drawer {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 58px;
  left: 0;
  right: 0;
  background: var(--card-bg);
  /* Fix: Fully opaque theme background */
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  /* Fix: Stronger shadow for clear visual hierarchy */
  z-index: 99;
  padding: 1rem 1.5rem 1.5rem;
  gap: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
  /* Smoother animation */
}

[data-theme="dark"] .nav-drawer {
  background: var(--card-bg);
  border-bottom-color: var(--border);
}

.nav-drawer.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0s;
}

.nav-drawer a {
  font-size: 0.95rem;
  color: var(--ink-2);
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  font-weight: 400;
  display: block;
}

.nav-drawer a:last-of-type {
  border-bottom: none;
}

.nav-drawer a:hover {
  color: var(--accent);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0.6rem 1.3rem;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.18s;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.08);
  opacity: 0;
  transition: opacity 0.18s;
}

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

.btn-primary {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
}

.btn-primary:hover {
  background: var(--ink-2);
  border-color: var(--ink-2);
  text-decoration: none;
  color: var(--surface);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background: var(--surface-2);
  text-decoration: none;
  color: var(--ink);
  transform: translateY(-1px);
}

.btn-outline:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: transparent;
  padding-left: 0;
}

.btn-ghost:hover {
  text-decoration: underline;
  background: transparent;
}

/* ─── SECTION LABELS ─── */
.section-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-4);
  display: block;
  margin-bottom: 0.6rem;
}

.section-heading {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.section-sub {
  font-size: 0.95rem;
  color: var(--ink-3);
  max-width: 540px;
  line-height: 1.65;
  margin-bottom: 2.5rem;
}

.section-divider {
  width: 36px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 2.5rem;
  border-radius: 2px;
}

/* ─── HERO ─── */
#home {
  padding-top: 7rem;
  padding-bottom: 4rem;
  background: var(--surface);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  max-width: 100%;
}

#home::before {
  content: '';
  position: absolute;
  top: -140px;
  right: -100px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--hero-glow) 0%, transparent 70%);
  pointer-events: none;
  animation: orb-pulse 8s ease-in-out infinite;
}

#home::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -80px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--hero-glow-2) 0%, transparent 70%);
  pointer-events: none;
  animation: orb-pulse 10s ease-in-out infinite reverse;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.55;
}

/* ── Two-column hero grid ── */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  min-height: calc(100vh - 11rem);
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── Right visual panel ── */
.hero-right {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  min-height: 480px;
  align-items: stretch;
}

/* Decorative background SVG */
.hero-grid-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--accent);
  pointer-events: none;
  z-index: 0;
}

/* Profile card */
.hero-card {
  position: relative;
  z-index: 1;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 1.5px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

.hero-card-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}

.hero-card-role {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--ink-4);
  letter-spacing: 0.03em;
  margin-top: 1px;
}

.hero-card-status {
  margin-left: auto;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.hero-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
  animation: status-pulse 2.5s ease-in-out infinite;
}

@keyframes status-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.08);
  }
}

/* Skill pill cluster */
.hero-pill-cluster {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 1rem 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.hero-pill {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  font-weight: 400;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink-3);
  transition: all 0.18s;
}

.hero-pill:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: rgba(91, 142, 245, 0.3);
}

.hero-pill-accent {
  background: var(--accent-light);
  color: var(--accent);
  border-color: rgba(91, 142, 245, 0.25);
  font-weight: 500;
}

/* Mini stat cards */
.hero-mini-cards {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.hero-mini-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero-mini-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hero-mini-icon {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.hero-mini-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--ink-4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.hero-mini-val {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}

.hero-mini-sub {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--ink-4);
  margin-top: 1px;
}

/* Floating credential badge */
.hero-badge-float {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow-sm);
  animation: float 4s ease-in-out infinite;
}

.hero-badge-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.hero-badge-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
}

.hero-badge-sub {
  font-family: 'DM Mono', monospace;
  font-size: 0.67rem;
  color: var(--ink-4);
  margin-top: 1px;
}

/* Left column text elements */
.hero-mono {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-mono::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--accent);
}

.hero-name {
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.05;
  margin-bottom: 0.6rem;
}

.hero-title {
  font-family: 'DM Mono', monospace;
  font-size: clamp(0.78rem, 1.2vw, 0.95rem);
  color: var(--ink-3);
  font-weight: 400;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.hero-title .cursor-blink {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 2px;
  animation: blink 1.1s step-end infinite;
}

.hero-desc {
  font-size: 0.975rem;
  color: var(--ink-2);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 2rem;
  font-weight: 300;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  max-width: 100%;
}

.stat-num {
  font-family: 'DM Mono', monospace;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink);
  display: block;
}

.stat-label {
  font-size: 0.74rem;
  color: var(--ink-4);
  letter-spacing: 0.03em;
}

/* Scroll indicator */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.45;
  animation: fadeIn 1s 2s both;
}

.scroll-hint span {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  color: var(--ink-4);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 30px;
  background: var(--ink-4);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: scroll-drop 1.8s ease-in-out infinite;
}

/* ── Hero responsive ── */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    min-height: auto;
  }

  .hero-right {
    min-height: auto;
    padding: 1rem;
  }

  .hero-grid-svg {
    display: none;
  }
}

@media (max-width: 600px) {
  .hero-mini-cards {
    grid-template-columns: 1fr;
  }

  .hero-right {
    display: none;
  }

  .hero-desc {
    max-width: 100%;
  }
}

/* ─── ABOUT ─── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: start;
}

.about-photo-wrap {
  position: relative;
}

.about-photo {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  background: var(--surface-3);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.about-photo:hover {
  transform: scale(1.018);
  box-shadow: var(--shadow-lg);
}

.about-photo-placeholder {
  width: 100%;
  aspect-ratio: 4/5;
  background: var(--surface-3);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--ink-4);
  letter-spacing: 0.05em;
  border: 1px dashed var(--border-strong);
}

.about-badge {
  position: absolute;
  bottom: -16px;
  right: -16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
  font-size: 0.8rem;
  animation: float 4s ease-in-out infinite;
  /* prevent badge from pushing page width on small screens */
  max-width: calc(100% - 1rem);
}

.about-badge-label {
  color: var(--ink-4);
  font-size: 0.72rem;
  font-family: 'DM Mono', monospace;
}

.about-badge-value {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.9rem;
}

.about-text p {
  margin-bottom: 1.1rem;
  font-size: 0.975rem;
  line-height: 1.75;
  color: var(--ink-2);
}

.about-text p:last-of-type {
  margin-bottom: 1.6rem;
}

.about-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 1.5rem;
}

.pill {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 9px;
  letter-spacing: 0.03em;
  transition: all 0.18s;
}

.pill:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* ─── SKILLS ─── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.skill-category {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.skill-category::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.skill-category:hover::before {
  transform: scaleX(1);
}

.skill-category:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.skill-cat-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.skill-category:hover .skill-cat-icon {
  transform: rotate(-5deg) scale(1.08);
}

.skill-cat-name {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 0.85rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-tag {
  font-size: 0.8rem;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 9px;
  font-weight: 300;
  transition: all 0.15s;
}

.skill-tag:hover {
  background: var(--surface-3);
  transform: translateY(-1px);
}

.skill-tag.primary {
  color: var(--accent);
  background: var(--accent-light);
  border-color: rgba(91, 142, 245, 0.22);
  font-weight: 400;
}

.skill-tag.primary:hover {
  opacity: 0.85;
}

.cert-strip {
  margin-top: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.cert-strip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.cert-icon {
  font-size: 1.3rem;
}

.cert-text {
  flex: 1;
}

.cert-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
}

.cert-by {
  font-size: 0.78rem;
  color: var(--ink-4);
  font-family: 'DM Mono', monospace;
}

/* ─── PROJECTS ─── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.project-card {
  background: var(--card-alt-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: box-shadow 0.25s, transform 0.25s;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-light) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.project-card:hover::before {
  opacity: 1;
}

.project-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.project-card.data {
  border-top: 2.5px solid var(--accent);
}

.project-type-badge {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-flex;
  width: fit-content;
}

.badge-data {
  background: var(--accent-light);
  color: var(--accent);
}

.badge-web {
  background: var(--badge-web-bg);
  color: var(--badge-web-text);
  border: 1px solid var(--badge-web-bdr);
}

.badge-app {
  background: var(--badge-app-bg);
  color: var(--badge-app-text);
  border: 1px solid var(--badge-app-bdr);
}

.badge-placeholder {
  background: var(--badge-ph-bg);
  color: var(--badge-ph-text);
  border: 1px solid var(--badge-ph-bdr);
}

.project-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}

.project-summary {
  font-size: 0.87rem;
  color: var(--ink-3);
  line-height: 1.65;
  flex: 1;
}

.project-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.project-tool {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--ink-3);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
}

.project-outcome {
  font-size: 0.8rem;
  color: var(--ink-3);
  background: var(--surface-2);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  line-height: 1.5;
  border-left: 2px solid var(--border-strong);
}

.project-outcome::before {
  content: '↳ ';
  color: var(--accent);
  font-family: 'DM Mono', monospace;
}

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

.project-link {
  font-size: 0.78rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  font-weight: 400;
  transition: gap 0.15s;
}

.project-link:hover {
  text-decoration: underline;
  gap: 6px;
}

.placeholder-note {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--ink-4);
  letter-spacing: 0.04em;
  text-align: right;
  margin-top: 0.5rem;
  opacity: 0.75;
}

/* ─── EXPERIENCE / TIMELINE ─── */
.timeline {
  display: flex;
  flex-direction: column;
}

.timeline-item {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 1.5rem;
  padding: 1.75rem 0 1.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: background 0.2s, padding-left 0.2s ease;
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-item:hover {
  background: transparent;
}

/* Animated left accent line on hover */
.timeline-item::before {
  content: '';
  position: absolute;
  left: 0.15rem;
  top: 1rem;
  width: 2px;
  height: 0;
  background: var(--accent);
  border-radius: 999px;
  pointer-events: none;
  transition: height 0.4s ease, opacity 0.25s ease;
  opacity: 0.85;
}

.timeline-item:hover::before {
  height: calc(100% - 2rem);
}

.timeline-date {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-4);
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 0.25rem;
  line-height: 1.5;
}

.timeline-meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.64rem;
  color: var(--ink-4);
  line-height: 1.6;
  margin-top: 0.3rem;
  opacity: 0.75;
}

.timeline-status {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-block;
}

.status-current {
  background: var(--status-current-bg);
  color: var(--status-current-text);
}

.status-prev {
  background: var(--surface-3);
  color: var(--ink-4);
}

.timeline-role {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.timeline-company {
  font-size: 0.85rem;
  color: var(--ink-3);
  margin-bottom: 0.85rem;
  font-family: 'DM Mono', monospace;
}

.timeline-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeline-bullets li {
  font-size: 0.88rem;
  color: var(--ink-2);
  line-height: 1.6;
  padding-left: 1rem;
  position: relative;
}

.timeline-bullets li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--ink-4);
  font-family: 'DM Mono', monospace;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 0.85rem;
}

.t-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--ink-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  transition: all 0.15s;
}

.t-tag:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}

/* ─── EDUCATION ─── */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.edu-card {
  background: var(--card-alt-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.edu-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.edu-card.featured {
  border-top: 2.5px solid var(--accent);
}

.edu-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: var(--accent-light);
  border-radius: 50%;
  transform: translate(40px, -40px);
  opacity: 0.35;
  pointer-events: none;
  transition: opacity 0.28s;
}

.edu-card:hover::after {
  opacity: 0.6;
}

.edu-degree {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.edu-institution {
  font-size: 0.85rem;
  font-family: 'DM Mono', monospace;
  color: var(--ink-3);
  margin-bottom: 0.15rem;
}

.edu-period {
  font-size: 0.75rem;
  font-family: 'DM Mono', monospace;
  color: var(--ink-4);
  margin-bottom: 0.9rem;
}

.edu-detail {
  font-size: 0.85rem;
  color: var(--ink-3);
  line-height: 1.6;
}

.edu-highlight {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-light);
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.edu-courses {
  font-size: 0.8rem;
  color: var(--ink-4);
  margin-top: 0.5rem;
  line-height: 1.55;
}

/* ─── CONTACT ─── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-intro {
  font-size: 0.975rem;
  color: var(--ink-2);
  line-height: 1.75;
  margin-bottom: 1.75rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-link-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
}

.contact-link-item:hover {
  box-shadow: var(--shadow);
  text-decoration: none;
  transform: translateX(4px);
  border-color: var(--accent);
}

.cli-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.cli-label {
  font-size: 0.75rem;
  color: var(--ink-4);
  font-family: 'DM Mono', monospace;
  display: block;
}

.cli-value {
  font-size: 0.875rem;
  color: var(--ink);
  font-weight: 400;
}


.contact-availability {
  margin: 1.25rem 0 1.35rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
}

.contact-availability-label,
.contact-cv-kicker,
.project-featured-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 0.45rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.contact-availability p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.contact-cv-card {
  margin-top: 1.5rem;
  padding: 1.15rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(145deg, var(--card-bg), var(--surface-2));
  box-shadow: var(--shadow-sm);
}

.contact-cv-card h3 {
  margin-bottom: 0.35rem;
}

.contact-cv-card p {
  margin-bottom: 1rem;
  color: var(--ink-3);
  font-size: 0.875rem;
}

.contact-cv-card .btn {
  width: 100%;
  justify-content: center;
}

.project-card.featured {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.project-card.featured::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
  border-radius: 14px 0 0 14px;
}

.project-featured-label {
  margin-bottom: 0.65rem;
}

/* FIXED FORM BLOWOUT ISSUE */
.contact-form-note {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  /* Added these two properties to fix the grid blowout */
  min-width: 0;
  overflow-wrap: break-word;
}

.contact-form-note h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
  color: var(--ink);
}

.contact-form-note p {
  font-size: 0.875rem;
  color: var(--ink-3);
  margin-bottom: 1.25rem;
}

.contact-field {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  color: var(--ink);
  margin-bottom: 0.75rem;
  display: block;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.contact-field::placeholder {
  color: var(--ink-4);
}

.contact-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

textarea.contact-field {
  resize: vertical;
  min-height: 90px;
}

/* ─── FOOTER ─── */
footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.78rem;
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.04em;
}

footer a {
  color: var(--footer-link);
  text-decoration: none;
  transition: color 0.15s;
}

footer a:hover {
  color: var(--ink);
}

/* ─── SCROLL-TO-TOP ─── */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  background: var(--ink);
  color: var(--surface);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, background 0.18s;
  z-index: 50;
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

#back-to-top:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 820px) {
  .nav-links {
    display: none;
  }

  .nav-inner .theme-toggle {
    visibility: hidden;
  }

  .nav-burger {
    display: flex;
  }
}

@media (max-width: 700px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-photo-placeholder {
    aspect-ratio: 3/2;
  }

  .about-photo-wrap {
    overflow: visible;
  }

  /* badge still shows */
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

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

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

  .hero-stats {
    gap: 1.25rem;
  }

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

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

  .theme-toggle .toggle-label {
    display: none;
  }

  #back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
  }

  /* Prevent wide tags from overflowing on small screens */
  .timeline-tags,
  .project-tools,
  .skill-tags,
  .about-pills,
  .hero-ctas {
    flex-wrap: wrap;
  }

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

  /* About badge repositioned to avoid edge bleed */
  .about-badge {
    right: 0;
    bottom: -12px;
  }
}

@media (max-width: 480px) {
  .btn {
    font-size: 0.82rem;
    padding: 0.55rem 1rem;
  }

  section {
    padding: 3.5rem 0;
  }

  .hero-ctas {
    gap: 8px;
  }



  .stat-num {
    font-size: 1.1rem;
  }

  .cert-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  /* Timeline left col collapses cleanly */
  .timeline-left {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
  }

  .timeline-date {
    margin-bottom: 0;
  }

  /* ADDED: Reduce form padding on very small screens to give more room */
  .contact-form-note {
    padding: 1.25rem;
  }
}


@media (max-width: 700px) {
  #hero-canvas {
    display: none;
  }

  .hero-title .cursor-blink {
    display: none;
  }

  .contact-cv-card {
    margin-top: 1.25rem;
  }
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar);
  border-radius: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* ══════════════════════════════════════════════════════════
   MOBILE READ MORE / SEE MORE
   Mobile-only polished disclosure controls
   ══════════════════════════════════════════════════════════ */
@media (max-width: 700px) {

  .mob-collapsible {
    position: relative;
    overflow: hidden;
    transition: max-height 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .mob-collapsible.mob-collapsed::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1.8rem;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent, var(--card-bg));
  }

  #experience .mob-collapsible.mob-collapsed::after,
  #skills .mob-collapsible.mob-collapsed::after,
  #contact .mob-collapsible.mob-collapsed::after {
    background: linear-gradient(to bottom, transparent, var(--surface));
  }

  .project-summary.mob-collapsed {
    max-height: 5.15em;
  }

  .project-summary.mob-collapsible:not(.mob-collapsed) {
    max-height: 900px;
  }

  .timeline-bullets.mob-collapsed {
    max-height: 4.9em;
  }

  .timeline-bullets.mob-collapsible:not(.mob-collapsed) {
    max-height: 1500px;
  }

  .expand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: fit-content;
    min-height: 34px;
    margin-top: 0.7rem;
    padding: 0.38rem 0.75rem 0.38rem 0.85rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    font-family: 'DM Mono', monospace;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--accent);
    cursor: pointer;
    letter-spacing: 0.045em;
    line-height: 1;
    text-transform: uppercase;
    transition: transform 0.18s ease, border-color 0.18s ease,
      background-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .expand-btn:hover,
  .expand-btn:focus-visible {
    transform: translateY(-1px);
    background: var(--accent-light);
    border-color: var(--accent);
    box-shadow: var(--shadow);
    outline: none;
    text-decoration: none;
  }

  .expand-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
  }

  .expand-icon {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-light);
    font-style: normal;
    font-size: 0.9rem;
    line-height: 1;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
      background-color 0.18s ease;
  }

  .expand-btn--open .expand-icon {
    transform: rotate(180deg);
  }

  .timeline-bullets + .expand-btn {
    margin-top: 0.85rem;
  }
}

/* ══════════════════════════════════════════════════════════
   CONTACT FORM — SUCCESS STATE
   ══════════════════════════════════════════════════════════ */
#cf-success {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

#cf-success[hidden] {
  display: none;
}

#cf-success.cf-success-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.cf-success-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  width: 100%;
  max-width: 420px;
  padding: 2rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--card-bg), var(--card-alt-bg));
  box-shadow: var(--shadow-sm);
}

.cf-success-icon {
  width: 68px;
  height: 68px;
  margin-bottom: 0.55rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-light);
}

.cf-checkmark {
  width: 58px;
  height: 58px;
  display: block;
}

.cf-checkmark-circle {
  stroke: var(--accent);
  stroke-width: 2.5;
  fill: none;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-linecap: round;
  animation: cf-circle 0.55s cubic-bezier(0.65, 0, 0.45, 1) 0.15s forwards;
}

.cf-checkmark-tick {
  stroke: var(--accent);
  stroke-width: 2.8;
  fill: none;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: cf-tick 0.35s cubic-bezier(0.65, 0, 0.45, 1) 0.65s forwards;
}

@keyframes cf-circle {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes cf-tick {
  to {
    stroke-dashoffset: 0;
  }
}

.cf-success-kicker {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.1rem;
  animation: cf-up 0.4s ease 0.78s both;
}

.cf-success-title {
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.28;
  animation: cf-up 0.4s ease 0.85s both;
}

.cf-success-sub {
  font-size: 0.92rem;
  color: var(--ink-3);
  line-height: 1.7;
  max-width: 340px;
  animation: cf-up 0.4s ease 0.95s both;
}

.cf-success-mono {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-top: 0.35rem;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-light);
  opacity: 0.9;
  animation: cf-up 0.4s ease 1.05s both;
}

@keyframes cf-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Inline feedback */
#cf-feedback {
  font-size: 0.84rem;
  margin-top: 0.6rem;
  line-height: 1.5;
  display: none;
}

@media (prefers-reduced-motion: reduce) {

  .cf-checkmark-circle,
  .cf-checkmark-tick,
  .cf-success-kicker,
  .cf-success-title,
  .cf-success-sub,
  .cf-success-mono {
    animation: none;
    stroke-dashoffset: 0;
    opacity: 1;
    transform: none;
  }

  #cf-success {
    transition: none;
  }

  .mob-collapsible {
    transition: none;
  }
}