/* ============================================================
   FONTS
   ============================================================ */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap");

/* ============================================================
   DESIGN TOKENS — "Developer Workshop" palette
   ============================================================ */
:root {
  /* Backgrounds */
  --bg: #0e1117;
  --surface: #161c26;
  --surface-2: #1e2433;

  /* Accents */
  --amber: #f59e0b; /* primary — warmth, builder energy */
  --amber-2: #fbbf24; /* lighter amber for hover */
  --accent: rgb(39, 227, 234); /* teal — experience highlights */
  --accent-rgb: 39, 227, 234;
  --blue: #60a5fa; /* secondary — links */
  --green: #34d399; /* success */
  --red: #f87171; /* broken/error state */

  /* Text */
  --text: #e2e8f0;
  --text-dim: #6b7a92;
  --text-muted: #3a4455;

  /* Borders */
  --border: rgba(255, 255, 255, 0.07);
  --border-2: rgba(255, 255, 255, 0.03);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);

  /* Typography */
  --f-head: "Plus Jakarta Sans", sans-serif;
  --f-body: "Inter", sans-serif;
  --f-mono: "JetBrains Mono", monospace;

  /* Misc */
  --r: 10px;
  --r-sm: 6px;
  --ease: 0.25s ease;
  --max-w: 1180px;
  --section-gap: 110px;
}

/* ============================================================
   RESET
   ============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}
img {
  max-width: 100%;
  display: block;
}
button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}
.section {
  padding: var(--section-gap) 0;
}

/* ============================================================
   SHARED SECTION TYPOGRAPHY
   ============================================================ */
.section-label {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--amber);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-label::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--amber);
}

.section-title {
  font-family: var(--f-head);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1rem;
}

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

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--r-sm);
  font-family: var(--f-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--ease);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--amber);
  color: #0e1117;
  border-color: var(--amber);
}
.btn-primary:hover {
  background: var(--amber-2);
  border-color: var(--amber-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}
.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--amber);
  color: var(--amber);
  transform: translateY(-2px);
}
.btn-full {
  width: 100%;
  justify-content: center;
  padding: 0.85rem;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.3rem 0;
  transition:
    background 0.3s ease,
    padding 0.3s ease,
    border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(14, 17, 23, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
  padding: 0.9rem 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  font-family: var(--f-head);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  transition: color var(--ease);
  flex-shrink: 0;
}
.nav-logo .dot {
  color: var(--amber);
}
.nav-logo:hover {
  color: var(--amber);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}
.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: 0.4rem 0.75rem;
  border-radius: var(--r-sm);
  transition:
    color var(--ease),
    background var(--ease);
}
.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.nav-link.active {
  color: var(--amber);
}

.nav-cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 0.45rem 1rem;
  border-radius: var(--r-sm);
  transition: var(--ease);
  flex-shrink: 0;
}
.nav-cta:hover {
  background: rgba(4, 165, 194, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.3rem;
  padding: 0.3rem 0.55rem;
  border-radius: var(--r-sm);
  transition: var(--ease);
}
.nav-toggle:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 5rem;
}

/* Subtle dot-grid background */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px
  );
  background-size: 28px 28px;
  mask-image: radial-gradient(
    ellipse 75% 80% at 60% 50%,
    black 30%,
    transparent 80%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 75% 80% at 60% 50%,
    black 30%,
    transparent 80%
  );
  pointer-events: none;
  z-index: 0;
}

/* Faint code block — right side decoration */
.code-deco {
  position: absolute;
  right: 3rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--f-mono);
  font-size: 0.82rem;
  line-height: 1.85;
  color: var(--text-dim);
  opacity: 0.1;
  pointer-events: none;
  user-select: none;
  white-space: pre;
  border-left: 2px solid rgba(245, 158, 11, 0.15);
  padding-left: 1.25rem;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

/* Availability badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--green);
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  padding: 0.3rem 0.85rem;
  border-radius: 50px;
  margin-bottom: 2rem;
}
.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
  animation: pulse-badge 2.5s ease-in-out infinite;
}
@keyframes pulse-badge {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

/* Headline */
.hero-title {
  font-family: var(--f-head);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1.5px;
  color: var(--text);
  margin-bottom: 1.5rem;
}

/* "whats brken" → hover corrects typo + sweeps highlight, removes squiggle */
.word-break {
  position: relative;
  display: inline;
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-color: var(--red);
  text-underline-offset: 5px;
  background-image: linear-gradient(
    rgba(245, 158, 11, 0.18),
    rgba(245, 158, 11, 0.18)
  );
  background-size: 0% 82%;
  background-position: 0 95%;
  background-repeat: no-repeat;
  border-radius: 3px;
  padding: 0 2px;
  cursor: default;
  transition:
    text-decoration-color 0.3s ease,
    background-size 0.35s ease,
    color 0.3s ease;
}
.word-break.fixed {
  text-decoration-color: transparent;
  background-size: 100% 82%;
  color: var(--amber);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 520px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

/* ── Broken button easter egg ── */
.broken-demo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.btn-broken {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem 0.65rem 1.75rem; /* intentionally misaligned padding */
  border: 2px dashed var(--red);
  border-radius: var(--r-sm);
  background: rgba(248, 113, 113, 0.05);
  color: var(--red);
  font-size: 0.875rem;
  font-weight: 600;
  transform: rotate(-2.5deg) translateX(-6px);
  transform-origin: left center;
  transition:
    transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    padding 0.35s ease,
    border-color 0.3s ease,
    border-style 0.3s ease,
    background 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
}
.btn-broken-icon {
  font-style: normal;
  font-size: 0.8rem;
  transition: var(--ease);
}
.btn-broken:hover,
.btn-broken.fixed {
  border-style: solid;
  border-color: var(--amber);
  background: rgba(245, 158, 11, 0.08);
  color: var(--amber);
  padding: 0.65rem 1.35rem; /* symmetric — "fixed" */
  transform: rotate(0deg) translateX(0);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.18);
}
.btn-broken:hover .btn-broken-icon {
  content: "✓";
}
.btn-broken:hover .btn-broken-icon::before {
  content: "✓";
}

.demo-hint {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  font-style: italic;
  animation: hint-fade 3s ease-in-out infinite;
}
@keyframes hint-fade {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.9;
  }
}

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

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  background: var(--surface);
  border-top: 1px solid var(--border-2);
  border-bottom: 1px solid var(--border-2);
}

.about-grid {
  display: grid;
  grid-template-columns: 248px 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-top: 3.5rem;
}

/* ── Profile card ── */
.profile-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  position: relative;
  transition:
    border-color var(--ease),
    box-shadow var(--ease);
}
.profile-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: 1.6rem 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.profile-avatar {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}
.avatar-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-muted);
  border: 2px solid var(--border);
  border-radius: 50%;
}
.profile-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--amber);
  transition: opacity 0.3s;
}
.avatar-scan {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(
    180deg,
    transparent 30%,
    rgba(245, 158, 11, 0.14) 50%,
    transparent 70%
  );
  animation: scan 2.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes scan {
  0%,
  100% {
    transform: translateY(-40px);
  }
  50% {
    transform: translateY(40px);
  }
}

.profile-meta {
  text-align: center;
}
.profile-name {
  font-family: var(--f-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: var(--text);
  margin-bottom: 0.2rem;
  text-transform: uppercase;
}
.profile-role {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  margin-bottom: 0.45rem;
}
.profile-online {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--f-mono);
  font-size: 0.58rem;
  color: var(--green);
  letter-spacing: 1.5px;
  background: rgba(52, 211, 153, 0.07);
  border: 1px solid rgba(52, 211, 153, 0.15);
  padding: 0.15rem 0.55rem;
  border-radius: 50px;
}
.online-dot {
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 5px var(--green);
  animation: pulse-badge 2s ease-in-out infinite;
}

.profile-specs {
  padding: 0.9rem 1rem;
}
.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border-2);
  font-family: var(--f-mono);
  font-size: 0.62rem;
  line-height: 1.5;
}
.spec-row:last-child {
  border-bottom: none;
}
.sk {
  color: var(--text-muted);
  flex-shrink: 0;
}
.sv {
  color: var(--text);
  text-align: right;
}

/* Bio column */
.about-bio p {
  font-size: 0.975rem;
  color: var(--text-dim);
  line-height: 1.85;
  margin-bottom: 1.1rem;
}

.about-stats {
  display: flex;
  gap: 2rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 1.75rem 0 2rem;
}
.stat-item {
  display: flex;
  flex-direction: column;
}
.stat-item .stat-num {
  font-family: var(--f-head);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--amber);
  line-height: 1;
  display: inline;
}
.stat-item .stat-plus {
  font-family: var(--f-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--amber);
}
.stat-item .stat-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  letter-spacing: 0.5px;
}

/* Trait cards */
.traits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.trait-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.4rem;
  transition:
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.trait-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.trait-emoji {
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
  display: block;
}
.trait-card h4 {
  font-family: var(--f-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.trait-card p {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ============================================================
   PROJECTS — Pinboard / workshop corkboard style
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  align-items: start;
}

/* Featured card spans 2 columns on larger screens */
.project-card.featured {
  grid-column: span 2;
}
.project-card.featured:hover {
  border-color: var(--accent);
}

/* ── The card (outer wrapper — no tilt here) ── */
.project-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-top: 12px;
  cursor: pointer;
  z-index: 1;
  transition:
    box-shadow 0.38s ease,
    border-color 0.3s ease;
}

.project-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  z-index: 999;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(245, 158, 11, 0.3),
    0 0 55px rgba(245, 158, 11, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

/* ── All Projects button row ── */
.projects-more-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 2rem;
}
.btn-all-projects {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  background: transparent;
  border: 1px solid var(--border);
  border-color: var(--amber);
  border-radius: var(--r);
  color: var(--amber);
  /* color: var(--text-muted); */
  font-family: var(--f-mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition:
    border-color 0.25s,
    color 0.25s,
    background 0.25s;
}
.btn-all-projects:hover {
  color: var(--amber-2);

  background: rgba(245, 158, 11, 0.06);
}

/* ── Push pin ── */
.card-pin {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  background: radial-gradient(circle at 35% 35%, var(--amber-2), #b45309);
  border-radius: 50%;
  box-shadow:
    0 3px 10px rgba(245, 158, 11, 0.45),
    inset 0 -2px 4px rgba(0, 0, 0, 0.25);
  z-index: 10;
}
.card-pin::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 10px;
  background: rgba(245, 158, 11, 0.4);
  border-radius: 0 0 2px 2px;
}

/* ── card-body — this is where the tilt lives ── */
.card-body {
  padding: 1.5rem;
  transform: rotate(-2deg); /* default: lean left  */
  transform-origin: top center;
  will-change: transform;
  transition: transform 0.4s cubic-bezier(0.34, 1.15, 0.64, 1);
}

/* Even cards lean right.
   Specificity [0,3,0] — same as :hover below, declared first so hover wins. */
.project-card:nth-child(even) .card-body {
  transform: rotate(2deg);
}

/* Hover: straighten. Declared after :nth-child so source order wins on equal specificity. */
.project-card:hover .card-body {
  transform: rotate(0deg);
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.card-num {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
}
.card-tag {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.09);
  border: 1px solid rgba(245, 158, 11, 0.2);
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
}

/* Project image */
.card-img {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--surface-2);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-2);
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.42s cubic-bezier(0.34, 1.15, 0.64, 1);
}
.project-card:hover .card-img img {
  transform: scale(1.06);
}

.img-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-muted);
}
/* Hide placeholder when img loads */
.card-img img:not([style*="display: none"]) + .img-placeholder {
  display: none;
}

.card-title {
  font-family: var(--f-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.project-card.featured .card-title {
  font-size: 1.4rem;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 1rem;
}

/* Bug report log */
.card-log {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: rgba(248, 113, 113, 0.05);
  border: 1px solid rgba(248, 113, 113, 0.12);
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
}
.log-icon {
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.log-text {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* Tech stack tags */
.card-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.stack-tag {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

/* Links */
.card-links {
  display: flex;
  gap: 0.6rem;
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 1rem;
  border-radius: var(--r-sm);
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--ease);
}
.card-link.primary {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--amber);
}
.card-link.primary:hover {
  background: rgba(245, 158, 11, 0.18);
}
.card-link.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.card-link.ghost:hover {
  border-color: var(--text-dim);
  color: var(--text);
}

/* ============================================================
   SKILLS — Canvas Physics Network
   ============================================================ */

.network-wrapper {
  position: relative;
  width: 100%;
  height: 620px;
  margin-top: 1rem;
  overflow: hidden;
  border-radius: var(--r);
}

#skillsCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ============================================================
   CONTACT — Email + Social channels (no form)
   ============================================================ */
.contact {
  position: relative;
  overflow: hidden;
}

/* Ambient radial glow sitting behind everything */
.contact-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(
    ellipse at center,
    rgba(245, 158, 11, 0.07) 0%,
    rgba(245, 158, 11, 0.02) 45%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

/* Centre everything */
.contact-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.contact-inner .section-label,
.contact-inner .section-title {
  text-align: center;
}

/* Availability pill */
.contact-avail {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.25rem;
  margin-bottom: 3rem;
  padding: 0.45rem 1rem;
  background: rgba(52, 211, 153, 0.06);
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--green);
  letter-spacing: 0.03em;
}
.avail-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
  animation: avail-pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes avail-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.06);
  }
}

/* ── Email copy card ── */
.contact-email-card {
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.35rem 1.65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
  margin-bottom: 1rem;
}
.contact-email-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow:
    0 12px 40px rgba(245, 158, 11, 0.1),
    0 0 0 1px rgba(245, 158, 11, 0.15);
  transform: translateY(-3px);
}
.contact-email-card.copied {
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow:
    0 8px 32px rgba(52, 211, 153, 0.12),
    0 0 0 1px rgba(52, 211, 153, 0.2);
}

.cec-icon {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: var(--r-sm);
  transition:
    background 0.25s,
    transform 0.3s;
}
.contact-email-card:hover .cec-icon {
  background: rgba(245, 158, 11, 0.12);
  transform: rotate(-6deg) scale(1.05);
}
.contact-email-card.copied .cec-icon {
  color: var(--green);
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.2);
}

.cec-body {
  flex: 1;
  min-width: 0;
}
.cec-label {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.25rem;
}
.cec-addr {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cec-action {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  transition: color 0.25s;
  white-space: nowrap;
}
.contact-email-card:hover .cec-action {
  color: var(--amber);
}
.contact-email-card.copied .cec-action {
  color: var(--green);
}
.cec-copy-icon {
  font-size: 1rem;
}
.cec-hint {
  display: block;
}

/* ── Social channel cards ── */
.contact-channels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  max-width: 560px;
}
.channel-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  text-decoration: none;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.channel-card:hover {
  transform: translateY(-5px);
}

.channel-card--github:hover {
  border-color: rgba(200, 210, 230, 0.35);
  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(200, 210, 230, 0.1);
}
.channel-card--linkedin:hover {
  border-color: rgba(10, 102, 194, 0.45);
  box-shadow:
    0 16px 44px rgba(10, 102, 194, 0.14),
    0 0 0 1px rgba(10, 102, 194, 0.15);
}

.channel-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  border-radius: var(--r-sm);
  transition:
    transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1),
    background 0.25s;
}
.channel-card--github .channel-icon {
  color: #e6edf3;
  background: rgba(200, 210, 230, 0.07);
  border: 1px solid rgba(200, 210, 230, 0.12);
}
.channel-card--linkedin .channel-icon {
  color: #0a66c2;
  background: rgba(10, 102, 194, 0.08);
  border: 1px solid rgba(10, 102, 194, 0.15);
}
.channel-card:hover .channel-icon {
  transform: scale(1.12) rotate(-4deg);
}
.channel-card--github:hover .channel-icon {
  background: rgba(200, 210, 230, 0.13);
}
.channel-card--linkedin:hover .channel-icon {
  background: rgba(10, 102, 194, 0.14);
  border-color: rgba(10, 102, 194, 0.3);
}

.channel-body {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.channel-name {
  display: block;
  font-family: var(--f-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.1rem;
}
.channel-handle {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.65rem;
  color: var(--amber);
  letter-spacing: 0.03em;
  margin-bottom: 0.3rem;
}
.channel-desc {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.channel-arrow {
  font-size: 1rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition:
    transform 0.25s ease,
    color 0.2s;
  opacity: 0;
}
.channel-card:hover .channel-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
  color: var(--text-dim);
}

/* Social buttons used in footer */
.social-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  transition: var(--ease);
  text-decoration: none;
}
.social-btn:hover {
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.06);
  transform: translateY(-3px);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.6rem 0;
  background: var(--surface);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.footer-copy span {
  color: var(--amber);
  font-weight: 600;
}
.footer-socials {
  display: flex;
  gap: 0.5rem;
}
.footer-top {
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: color var(--ease);
}
.footer-top:hover {
  color: var(--amber);
}

/* ============================================================
   ANIMATIONS (scroll-triggered via JS)
   ============================================================ */

/* Elements hidden before JS animates them in */
.js-reveal {
  opacity: 0;
  transform: translateY(28px);
}
/* Applied by GSAP */
.js-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  /* About: collapse profile+bio into 2 cols, traits below */
  .about-grid {
    grid-template-columns: 220px 1fr;
    gap: 2rem;
  }
  .about-grid .traits-grid {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, 1fr);
  }
  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }
  .project-card.featured {
    grid-column: span 2;
  }
  .contact-channels {
    grid-template-columns: 1fr;
  }
  .network-wrapper {
    height: 480px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-gap: 80px;
  }

  /* Mobile nav */
  .nav-cta {
    display: none;
  }
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 270px;
    background: rgba(14, 17, 23, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    padding: 5.5rem 2rem 2rem;
    gap: 0;
    border-left: 1px solid var(--border);
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .nav-links.open {
    display: flex;
    transform: translateX(0);
  }
  .nav-link {
    width: 100%;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-2);
    border-radius: 0;
    font-size: 1rem;
  }
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    position: relative;
  }

  /* Hero */
  .code-deco {
    display: none;
  }
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  /* About: single column */
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-grid .profile-card {
    max-width: 320px;
    margin: 0 auto;
  }
  .about-grid .traits-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Projects */
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .project-card.featured {
    grid-column: auto;
  }

  /* Skills network */
  .network-wrapper {
    height: 620px;
  }

  /* Form */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }
  .hero-title {
    letter-spacing: -0.5px;
  }
  .about-stats {
    gap: 1.25rem;
  }
  .traits-grid {
    grid-template-columns: 1fr;
  }
  .cec-hint {
    display: none;
  }
  .cec-addr {
    font-size: 0.88rem;
  }
}

/* ============================================================
   EXPERIENCE SECTION
   ============================================================ */

/* ── outer layout: left+center | right panel ── */
/* Default: right column is 0 (hidden); transitions to 360px on open */
.exp-layout {
  display: grid;
  grid-template-columns: 1fr 0px;
  gap: 0;
  align-items: start;
  margin-top: 3rem;
  transition:
    grid-template-columns 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    gap 0.4s ease;
}
.exp-layout.detail-open {
  grid-template-columns: 1fr 360px;
  gap: 2rem;
}

/* ── inner grid: company col | project list col ── */
.exp-left-center {
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: start;
  min-width: 0;
}

/* ── right panel wrapper (clips overflow during animation) ── */
.exp-right {
  overflow: hidden;
  min-width: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.exp-layout.detail-open .exp-right {
  opacity: 1;
  pointer-events: auto;
}

/* ── right inner (sticky scroll) ── */
.exp-right-inner {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.exp-right-inner::-webkit-scrollbar {
  width: 4px;
}
.exp-right-inner::-webkit-scrollbar-track {
  background: transparent;
}
.exp-right-inner::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

/* ── detail panel transitions ── */
.exp-detail-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.75rem;
  transition: opacity 0.2s ease;
}
.exp-detail-panel.exp-panel--exit {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.exp-detail-panel.exp-panel--enter {
  opacity: 0;
  transform: translateY(-6px);
  animation: edpEnter 0.32s ease forwards;
}
.exp-detail-panel.loaded {
  opacity: 1;
}

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

/* ── company cell ── */
.exp-company-cell {
  padding: 1.5rem 1rem 1.5rem 0;
  border-right: 1px solid var(--border);
  position: relative;
}

.exp-timeline {
  position: absolute;
  top: 0;
  right: -1px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.exp-tl-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-dim);
  border: 2px solid var(--bg);
  flex-shrink: 0;
  margin-top: 1.75rem;
  transition: background 0.2s;
  position: relative;
  z-index: 1;
}
.exp-company-cell.active .exp-tl-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}
.exp-tl-line {
  width: 1px;
  flex: 1;
  background: var(--border);
  margin-top: 4px;
}

.exp-company-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.exp-company-link {
  color: inherit;
}
.exp-company-link:hover .exp-company-name {
  color: var(--amber);
}

.exp-company-name {
  font-family: var(--f-head);
  font-size: 1rem;
  font-weight: 800;
  color: white;
  transition: color 0.2s;
}
.exp-company-cell.active .exp-company-name {
  color: var(--accent);
}
.exp-company-role {
  font-size: 0.78rem;
  color: var(--text-dim);
}
.exp-company-dur {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.exp-type-badge {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 30px;
  padding: 0.15rem 0.55rem;
  margin-top: 0.35rem;
  width: fit-content;
}
.exp-company-loc {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.exp-company-loc i {
  font-size: 0.8rem;
}

/* ── column headers (Companies / Projects / Details) ── */
.exp-col-header {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}
.exp-col-header--company {
  padding-right: 1rem;
  border-right: 1px solid var(--border);
}
.exp-col-header--projects {
  padding-left: 1.5rem;
}

.exp-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  padding-bottom: 0.65rem;
  margin-bottom: 1rem;
}

.exp-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
  padding: 0;
  flex-shrink: 0;
}
.exp-close-btn:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
}

/* ── project list cell ── */
.exp-projlist-cell {
  padding: 0 0 0.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.exp-proj-item {
  padding: 0.6rem 0.85rem;
  border-radius: var(--r-sm);
  border-left: 2px solid transparent;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
  outline: none;
}
.exp-proj-item:hover {
  background: rgba(var(--accent-rgb), 0.04);
  border-color: rgba(var(--accent-rgb), 0.45);
}
.exp-proj-item:focus-visible {
  background: rgba(var(--accent-rgb), 0.05);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.2);
}
.exp-proj-item.active {
  background: rgba(var(--accent-rgb), 0.06);
  border-color: var(--accent);
}
.exp-proj-item.active .epj-name {
  color: var(--accent);
}

.epj-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0.3rem;
  transition: color 0.2s;
}
/* .epj-desc is hidden in the middle column — description lives in the detail panel */
.epj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.epj-tag {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1rem 0.45rem;
}

/* ── horizontal divider ── */
.exp-divider {
  grid-column: 1 / -1;
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0;
}

/* ── detail panel content ── */
.edp-badge-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.edp-badge {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
}
.edp-type-badge {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 30px;
  padding: 0.15rem 0.55rem;
}
.edp-title {
  font-family: var(--f-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}
.edp-desc {
  font-size: 0.83rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 0;
}
.edp-sep {
  height: 1px;
  background: var(--border);
  margin: 1.1rem 0;
}
.edp-details {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}
.edp-tech-section {
  margin-bottom: 1.25rem;
}
.edp-tech-label {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.55rem;
}
.edp-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.edp-tag {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  color: var(--blue);
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
}
.edp-images {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.edp-images img {
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  object-fit: cover;
  max-height: 180px;
  width: 100%;
}
.edp-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}
.edp-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--r-sm);
  border: 1px solid;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}
.edp-link--live {
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.07);
}
.edp-link--live:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--amber);
}
.edp-link--repo {
  color: var(--text-dim);
  border-color: var(--border);
  background: transparent;
}
.edp-link--repo:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--surface-2);
}

/* ── "See N more projects" link ── */
.epj-see-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--amber);
  padding: 0.5rem 1rem;
  margin-top: 0.25rem;
  border-radius: var(--r-sm);
  border: 1px solid rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.05);
  transition:
    background 0.2s,
    border-color 0.2s;
  text-decoration: none;
}
.epj-see-more:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: var(--amber);
}
.epj-see-more i {
  font-size: 0.85rem;
}

/* ── "All Experiences" button row ── */
.exp-more-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  padding-top: 1.5rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.btn-exp-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  background: transparent;
  border: 1px solid var(--border);
  border-color: var(--amber);
  border-radius: var(--r);
  color: var(--amber-2);
  font-family: var(--f-mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition:
    border-color 0.25s,
    color 0.25s,
    background 0.25s;
}
.btn-exp-more:hover {
  border-color: var(--amber);
  color: var(--amber-2);
  background: rgba(245, 158, 11, 0.06);
}

/* ── responsive ── */
@media (max-width: 1024px) {
  .exp-layout,
  .exp-layout.detail-open {
    grid-template-columns: 1fr;
    gap: 0;
    transition: none;
  }
  .exp-layout.detail-open {
    gap: 1.5rem;
  }
  .exp-right {
    opacity: 0;
    overflow: hidden;
    max-height: 0;
    transition:
      opacity 0.3s ease,
      max-height 0.4s ease;
  }
  .exp-layout.detail-open .exp-right {
    opacity: 1;
    max-height: 2000px;
  }
  .exp-right-inner {
    position: static;
    max-height: none;
  }
}

@media (max-width: 680px) {
  .exp-left-center {
    grid-template-columns: 1fr;
  }
  .exp-company-cell {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 0.25rem;
  }
  .exp-timeline {
    display: none;
  }
  .exp-projlist-cell {
    padding: 0.75rem 0 0.75rem 0;
  }
  .exp-proj-item {
    border-left-width: 3px;
  }
  .exp-divider {
    margin: 0.75rem 0;
  }
}

/* ============================================================
   SIDE PROJECTS SECTION — alternate surface background
   ============================================================ */
.side-projects {
  background: var(--surface);
  border-top: 1px solid var(--border-2);
  border-bottom: 1px solid var(--border-2);
}

/* ── loading / empty state inside a projects grid ── */
.proj-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 0;
  color: var(--text-muted);
  font-family: var(--f-mono);
  font-size: 0.82rem;
}

/* ── media count badge on a card image ── */
.card-media-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  color: var(--text);
  background: rgba(14, 17, 23, 0.8);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.15rem 0.5rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.card-media-badge i {
  font-size: 0.75rem;
}

/* ============================================================
   ALL PROJECTS PAGE — grouped sections
   ============================================================ */
.proj-group {
  margin-bottom: 3.5rem;
}
.proj-group:last-child {
  margin-bottom: 0;
}
.proj-group-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--f-head);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.proj-group-title i {
  color: var(--amber);
  font-size: 1.2rem;
}

/* ============================================================
   EXPERIENCE — vertical timeline (new)
   ============================================================ */
.xp-timeline {
  margin-top: 3rem;
  position: relative;
}
.xp-empty {
  color: var(--text-muted);
  font-family: var(--f-mono);
  font-size: 0.82rem;
}

.xp-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 1.25rem;
  position: relative;
  padding-bottom: 1.75rem;
}
.xp-item:last-of-type {
  padding-bottom: 0;
}

.xp-marker {
  position: relative;
  display: flex;
  justify-content: center;
}
.xp-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--accent);
  margin-top: 8px;
  z-index: 1;
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.08);
}
.xp-line {
  position: absolute;
  top: 22px;
  bottom: -8px;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: var(--border);
}
.xp-item:last-of-type .xp-line {
  display: none;
}

.xp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.4rem 1.5rem;
  transition:
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
/* On the alternate surface (experience.html) lift the card off the bg */
.side-projects .xp-card,
.exp-page-body .xp-card {
  background: var(--surface-2);
}
.xp-card:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.xp-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.xp-role {
  font-family: var(--f-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.xp-company {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}
.xp-company-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-dim);
  transition: color 0.2s;
}
.xp-company-link:hover {
  color: var(--amber);
}
.xp-company-link i {
  font-size: 0.72rem;
}
.xp-type {
  flex-shrink: 0;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 30px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}
.xp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 0.55rem 0 0.9rem;
}
.xp-dur {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}
.xp-loc {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.xp-loc i {
  font-size: 0.85rem;
}
.xp-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.xp-highlights li {
  position: relative;
  padding-left: 1.2rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}
.xp-highlights li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.xp-more-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

@media (max-width: 480px) {
  .xp-top {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ============================================================
   PROJECT DETAIL POPUP (shared by index + projects pages)
   ============================================================ */
.pm-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.pm-overlay[hidden] {
  display: none;
}
.pm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 10, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: pmFade 0.2s ease;
}
.pm-dialog {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: pmPop 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
}
@keyframes pmFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pmPop {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.pm-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 3;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  background: rgba(14, 17, 23, 0.72);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 1.3rem;
  transition: var(--ease);
}
.pm-close:hover {
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.4);
}
.pm-scroll {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.pm-scroll::-webkit-scrollbar {
  width: 6px;
}
.pm-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
.pm-media {
  background: var(--bg);
}
.pm-img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}
.pm-video {
  display: block;
  width: 100%;
  max-height: 440px;
  background: #000;
  border-bottom: 1px solid var(--border);
}
.pm-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--border);
}
.pm-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.pm-content {
  padding: 1.75rem;
}
.pm-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}
.pm-kind {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}
.pm-kind--work {
  color: var(--amber);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.22);
}
.pm-kind--side {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
}
.pm-chip {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
}
.pm-title {
  font-family: var(--f-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.6rem;
  line-height: 1.2;
}
.pm-desc {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.7;
}
.pm-sep {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
}
.pm-details {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}
.pm-tech-wrap {
  margin-bottom: 1.5rem;
}
.pm-tech-label {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.6rem;
}
.pm-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.pm-tag {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  color: var(--blue);
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
}
.pm-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.pm-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: var(--r-sm);
  border: 1px solid;
  transition: var(--ease);
}
.pm-link--live {
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
}
.pm-link--live:hover {
  background: rgba(245, 158, 11, 0.16);
  border-color: var(--amber);
}
.pm-link--repo {
  color: var(--text-dim);
  border-color: var(--border);
  background: transparent;
}
.pm-link--repo:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--surface-2);
}

/* ============================================================
   RÉSUMÉ VIEWER — embedded PDF modal
   ============================================================ */
.resume-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.resume-modal[hidden] {
  display: none;
}
.resume-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 10, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: pmFade 0.2s ease;
}
.resume-dialog {
  position: relative;
  width: 100%;
  max-width: 920px;
  height: 90vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: pmPop 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.resume-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.9rem 0.7rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  flex-shrink: 0;
}
.resume-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}
.resume-title i {
  color: var(--red);
  font-size: 1.15rem;
}
.resume-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.42rem 0.85rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: transparent;
  cursor: pointer;
  transition: var(--ease);
}
.resume-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--surface);
}
.resume-btn--primary {
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
}
.resume-btn--primary:hover {
  background: rgba(245, 158, 11, 0.16);
  border-color: var(--amber);
}
.resume-close {
  padding: 0.42rem 0.55rem;
  font-size: 1.15rem;
}
.resume-frame-wrap {
  flex: 1;
  min-height: 0;
  background: #303030;
}
.resume-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 640px) {
  .resume-modal {
    padding: 0;
  }
  .resume-dialog {
    height: 100vh;
    max-width: 100%;
    border-radius: 0;
    border: 0;
  }
  /* Save space: show icons only on the secondary action */
  #resumeOpen span {
    display: none;
  }
}
