/* ===== Base ===== */
:root {
  --bg: #0b0d12;
  --bg-elevated: #12161f;
  --bg-card: rgba(20, 25, 36, 0.85);
  --bg-card-hover: rgba(28, 35, 50, 0.95);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #eef1f7;
  --text-muted: #9aa3b5;
  --text-soft: #6f7a90;
  --accent: #7c9cff;
  --accent-2: #5eead4;
  --accent-soft: rgba(124, 156, 255, 0.14);
  --whatsapp: #25d366;
  --whatsapp-bg: rgba(37, 211, 102, 0.12);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1120px;
  --header-h: 72px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --display: "Playfair Display", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body.nav-open {
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #0b0d12;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

main,
section,
.container,
.hero-grid,
.about-grid,
.skills-grid,
.projects-grid,
.contact-grid,
.timeline,
.hero-content,
.hero-visual,
.about-copy,
.about-card,
.skill-card,
.project-card,
.exp-card,
.contact-card,
.edu-card {
  min-width: 0;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
  padding-inline: 0;
}

.section {
  padding: clamp(3rem, 7vw, 6.5rem) 0;
  position: relative;
  overflow: clip;
}

/* ===== Animated background ===== */
.bg-scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.bg-glow {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(ellipse 55% 40% at 18% 8%, rgba(124, 156, 255, 0.2), transparent 58%),
    radial-gradient(ellipse 45% 35% at 88% 12%, rgba(94, 234, 212, 0.12), transparent 52%),
    radial-gradient(ellipse 50% 40% at 55% 95%, rgba(124, 156, 255, 0.1), transparent 58%),
    radial-gradient(ellipse 35% 30% at 70% 55%, rgba(167, 139, 250, 0.07), transparent 60%);
  animation: glow-drift 18s ease-in-out infinite alternate;
  will-change: transform;
}

.bg-grid {
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(rgba(124, 156, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 156, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, #000 20%, transparent 75%);
  animation: grid-pan 40s linear infinite;
  opacity: 0.7;
}

.bg-orbs {
  position: absolute;
  inset: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
  will-change: transform;
}

.orb-1 {
  width: clamp(180px, 28vw, 340px);
  height: clamp(180px, 28vw, 340px);
  top: 8%;
  left: -4%;
  background: radial-gradient(circle at 35% 35%, rgba(124, 156, 255, 0.55), rgba(124, 156, 255, 0.08) 55%, transparent 70%);
  animation: float-a 22s ease-in-out infinite;
}

.orb-2 {
  width: clamp(160px, 24vw, 300px);
  height: clamp(160px, 24vw, 300px);
  top: 18%;
  right: -2%;
  background: radial-gradient(circle at 40% 40%, rgba(94, 234, 212, 0.4), rgba(94, 234, 212, 0.06) 55%, transparent 72%);
  animation: float-b 26s ease-in-out infinite;
}

.orb-3 {
  width: clamp(140px, 20vw, 260px);
  height: clamp(140px, 20vw, 260px);
  bottom: 12%;
  left: 18%;
  background: radial-gradient(circle at 40% 35%, rgba(167, 139, 250, 0.35), rgba(167, 139, 250, 0.05) 55%, transparent 72%);
  animation: float-c 20s ease-in-out infinite;
}

.orb-4 {
  width: clamp(100px, 14vw, 180px);
  height: clamp(100px, 14vw, 180px);
  top: 48%;
  left: 55%;
  background: radial-gradient(circle at 40% 40%, rgba(124, 156, 255, 0.28), transparent 70%);
  animation: float-a 16s ease-in-out infinite reverse;
  opacity: 0.4;
}

.orb-5 {
  width: clamp(90px, 12vw, 150px);
  height: clamp(90px, 12vw, 150px);
  bottom: 22%;
  right: 14%;
  background: radial-gradient(circle at 40% 40%, rgba(94, 234, 212, 0.28), transparent 70%);
  animation: float-b 18s ease-in-out infinite reverse;
  opacity: 0.35;
}

.bg-particles {
  position: absolute;
  inset: 0;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(238, 241, 247, 0.75);
  box-shadow: 0 0 8px rgba(124, 156, 255, 0.35);
  opacity: 0;
  animation-name: particle-rise;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}

.particle.teal {
  background: rgba(94, 234, 212, 0.85);
  box-shadow: 0 0 10px rgba(94, 234, 212, 0.4);
}

.particle.blue {
  background: rgba(124, 156, 255, 0.9);
  box-shadow: 0 0 10px rgba(124, 156, 255, 0.45);
}

.bg-beams {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.beam {
  position: absolute;
  width: 1px;
  height: 42vh;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(124, 156, 255, 0.18),
    rgba(94, 234, 212, 0.12),
    transparent
  );
  filter: blur(0.5px);
  opacity: 0.5;
  animation: beam-sweep 14s ease-in-out infinite;
}

.beam-1 {
  left: 22%;
  top: -10%;
  transform: rotate(18deg);
}

.beam-2 {
  right: 28%;
  top: 10%;
  height: 48vh;
  animation-duration: 18s;
  animation-delay: -6s;
  transform: rotate(-14deg);
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(94, 234, 212, 0.14),
    rgba(124, 156, 255, 0.1),
    transparent
  );
}

@keyframes glow-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(2%, -1.5%, 0) scale(1.04); }
  100% { transform: translate3d(-1.5%, 2%, 0) scale(1.02); }
}

@keyframes grid-pan {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(64px, 64px, 0); }
}

@keyframes float-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(4vw, 3vh, 0) scale(1.06); }
  66% { transform: translate3d(-2vw, 5vh, 0) scale(0.96); }
}

@keyframes float-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  40% { transform: translate3d(-5vw, 4vh, 0) scale(1.08); }
  70% { transform: translate3d(3vw, -3vh, 0) scale(0.94); }
}

@keyframes float-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(5vw, -4vh, 0) scale(1.1); }
}

@keyframes particle-rise {
  0% {
    opacity: 0;
    transform: translate3d(0, 20px, 0) scale(0.6);
  }
  12% { opacity: var(--p-opacity, 0.55); }
  80% { opacity: var(--p-opacity, 0.55); }
  100% {
    opacity: 0;
    transform: translate3d(var(--p-drift, 20px), -110vh, 0) scale(1);
  }
}

@keyframes beam-sweep {
  0%, 100% {
    opacity: 0.15;
    transform: translate3d(0, 0, 0) rotate(var(--beam-rot, 18deg));
  }
  50% {
    opacity: 0.55;
    transform: translate3d(18px, 30px, 0) rotate(var(--beam-rot, 18deg));
  }
}

.beam-1 { --beam-rot: 18deg; }
.beam-2 { --beam-rot: -14deg; }

/* Soft parallax shift from pointer (parent only — keeps child float animations intact) */
body.has-pointer .bg-orbs,
body.has-pointer .bg-particles,
body.has-pointer .bg-beams {
  transition: transform 0.65s var(--ease);
}

body.has-pointer .bg-orbs {
  transform: translate3d(calc(var(--mx, 0) * 20px), calc(var(--my, 0) * 16px), 0);
}

body.has-pointer .bg-particles {
  transform: translate3d(calc(var(--mx, 0) * 10px), calc(var(--my, 0) * 8px), 0);
}

body.has-pointer .bg-beams {
  transform: translate3d(calc(var(--mx, 0) * -12px), calc(var(--my, 0) * -8px), 0);
}

/* ===== Typography ===== */
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.85rem;
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head h2,
.edu-card h2 {
  font-family: var(--display);
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-sub {
  color: var(--text-muted);
  margin-top: 0.75rem;
  max-width: 48ch;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  white-space: nowrap;
  max-width: 100%;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, #7c9cff, #6b8af5);
  color: #0b0d12;
  box-shadow: 0 10px 30px rgba(124, 156, 255, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 14px 36px rgba(124, 156, 255, 0.38);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn-link {
  padding-inline: 0.4rem;
  color: var(--text-muted);
  border: none;
}

.btn-link:hover {
  color: var(--accent);
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
}

.btn-whatsapp {
  background: var(--whatsapp-bg);
  border-color: rgba(37, 211, 102, 0.35);
  color: #6ef0a3;
}

.btn-whatsapp:hover {
  background: rgba(37, 211, 102, 0.2);
  border-color: rgba(37, 211, 102, 0.55);
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  backdrop-filter: blur(16px);
  background: rgba(11, 13, 18, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(11, 13, 18, 0.88);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.5rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-cta {
  padding: 0.5rem 1rem !important;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text) !important;
}

.nav-cta:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
  z-index: 120;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
  padding-top: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: clamp(4rem, 8vw, 6rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}

.hero-content h1 {
  font-family: var(--display);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin-bottom: 1.15rem;
}

.hero-content h1 span {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  color: var(--text-muted);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  max-width: 48ch;
  margin-bottom: 1.25rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.75rem;
}

.hero-meta span {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-soft);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.25rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 480px;
}

.hero-stats div {
  padding: 1rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.hero-stats strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.hero-stats span {
  font-size: 0.75rem;
  color: var(--text-soft);
}

/* Portrait slot */
.hero-visual {
  display: flex;
  justify-content: center;
}

.portrait-frame {
  position: relative;
  width: min(100%, 380px);
  max-width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background:
    linear-gradient(160deg, rgba(124, 156, 255, 0.12), transparent 45%),
    var(--bg-elevated);
  box-shadow: var(--shadow);
}

.portrait-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(124, 156, 255, 0.45), transparent 40%, rgba(94, 234, 212, 0.25));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.portrait-fallback {
  display: none;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  background:
    radial-gradient(circle at 50% 30%, rgba(124, 156, 255, 0.18), transparent 55%),
    var(--bg-elevated);
}

.portrait-fallback span {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  background: var(--accent-soft);
  border: 1px solid rgba(124, 156, 255, 0.3);
}

.portrait-fallback p {
  font-size: 0.88rem;
  line-height: 1.5;
}

.portrait-fallback code {
  font-size: 0.78rem;
  color: var(--accent-2);
}

.portrait-badge {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: max-content;
  max-width: calc(100% - 1.5rem);
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(11, 13, 18, 0.72);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.portrait-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18); }
  50% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0.08); }
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr);
  gap: 1.5rem;
  align-items: start;
}

.about-copy {
  display: grid;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 1.02rem;
}

.about-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.about-card h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.about-card li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
}

.about-card li:first-of-type {
  border-top: none;
  padding-top: 0;
}

.about-card li span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
}

.about-card li strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.about-card a:hover {
  color: var(--accent);
}

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  width: 100%;
}

.skill-card {
  padding: 1.45rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: transform 0.3s var(--ease), border-color 0.3s ease, background 0.3s ease;
  height: 100%;
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 156, 255, 0.28);
  background: var(--bg-card-hover);
}

.skill-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  margin-bottom: 1rem;
  font-size: 1.15rem;
}

.skill-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.85rem;
  letter-spacing: -0.01em;
}

.skill-card ul {
  display: grid;
  gap: 0.55rem;
}

.skill-card li {
  position: relative;
  padding-left: 0.95rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.skill-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.8;
}

/* ===== Projects ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  width: 100%;
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 260px;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    linear-gradient(165deg, rgba(124, 156, 255, 0.07), transparent 42%),
    var(--bg-card);
  transition: transform 0.3s var(--ease), border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(124, 156, 255, 0.3);
  box-shadow: var(--shadow);
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.85rem;
}

.project-card h3 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.7rem;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ===== Experience ===== */
.timeline {
  display: grid;
  gap: 1.1rem;
}

.exp-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.3s ease;
}

.exp-card:hover {
  border-color: rgba(124, 156, 255, 0.22);
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}

.exp-role {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.exp-header h3 {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.exp-header h3 span {
  color: var(--text-soft);
  font-weight: 500;
  font-size: 0.95rem;
}

.exp-header time {
  font-size: 0.88rem;
  color: var(--text-soft);
  white-space: nowrap;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.exp-points {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.exp-points li {
  position: relative;
  padding-left: 1rem;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.exp-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.tech-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tech-row span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-soft);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.exp-more {
  display: grid;
  gap: 1.1rem;
}

.exp-more[hidden] {
  display: none !important;
}

.exp-actions {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
}

/* ===== Education ===== */
.education {
  padding-top: 0;
}

.edu-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    linear-gradient(120deg, rgba(94, 234, 212, 0.06), transparent 50%),
    var(--bg-card);
}

.edu-card p:last-child {
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.edu-card time {
  font-size: 0.9rem;
  color: var(--text-soft);
  white-space: nowrap;
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
  width: 100%;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: transform 0.25s var(--ease), border-color 0.25s ease, background 0.25s ease;
  min-height: 110px;
}

a.contact-card:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 156, 255, 0.35);
  background: var(--bg-card-hover);
}

.contact-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.contact-card strong {
  font-size: 0.95rem;
  font-weight: 600;
  word-break: break-word;
}

.contact-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.footer-inner a:hover {
  color: var(--accent);
}

/* ===== Reveal animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }

/* ===== Responsive ===== */

/* Large tablet / small laptop */
@media (max-width: 1100px) {
  .nav-links {
    gap: 0.15rem 0.9rem;
  }

  .nav-links a {
    font-size: 0.84rem;
  }
}

/* Tablet */
@media (max-width: 980px) {
  .hero-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
    justify-content: center;
  }

  .hero-content {
    text-align: left;
  }

  .portrait-frame {
    width: min(100%, 300px);
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-stats {
    max-width: none;
  }
}

/* Mobile + compact tablet: hamburger nav */
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    top: calc(var(--header-h) + 0.5rem);
    left: 1rem;
    right: 1rem;
    width: auto;
    max-width: none;
    inset: unset;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    padding: 0.85rem;
    border-radius: 16px;
    border: 1px solid var(--border-strong);
    background: rgba(18, 22, 31, 0.97);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    z-index: 110;
    max-height: calc(100vh - var(--header-h) - 1.5rem);
    overflow-y: auto;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
  }

  .nav-links a:hover,
  .nav-links a:active {
    background: rgba(255, 255, 255, 0.05);
  }

  .nav-cta {
    text-align: center;
    margin-top: 0.35rem;
  }

  .logo {
    font-size: 1.25rem;
  }

  .projects-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-actions .btn-link {
    text-align: center;
    justify-content: center;
    padding: 0.75rem 1rem;
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    max-width: none;
  }

  .hero-stats div {
    padding: 0.85rem 0.5rem;
    text-align: center;
  }

  .hero-stats strong {
    font-size: 1.15rem;
  }

  .hero-stats span {
    font-size: 0.68rem;
    line-height: 1.3;
  }

  .exp-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .exp-header time {
    white-space: normal;
  }

  .project-card {
    min-height: 0;
  }

  .edu-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .edu-card time {
    white-space: normal;
  }

  /* Lighter background motion on small screens */
  .beam {
    display: none;
  }

  .orb-4,
  .orb-5 {
    display: none;
  }

  .orb-1,
  .orb-2,
  .orb-3 {
    opacity: 0.28;
    filter: blur(4px);
  }

  .bg-grid {
    opacity: 0.35;
    background-size: 48px 48px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Phones */
@media (max-width: 560px) {
  :root {
    --header-h: 64px;
    --radius: 16px;
  }

  .container {
    width: min(100% - 1.25rem, var(--container));
  }

  .section {
    padding: 3rem 0;
  }

  .hero {
    padding-top: 1.5rem;
    padding-bottom: 3rem;
  }

  .section-head {
    margin-bottom: 1.5rem;
  }

  .section-head h2,
  .edu-card h2 {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .hero-content h1 {
    font-size: clamp(2.15rem, 10.5vw, 2.85rem);
    margin-bottom: 0.9rem;
  }

  .hero-lead {
    font-size: 0.98rem;
  }

  .hero-meta {
    gap: 0.4rem;
  }

  .hero-meta span {
    font-size: 0.72rem;
    padding: 0.3rem 0.65rem;
  }

  .portrait-frame {
    width: min(100%, 260px);
    border-radius: 22px;
  }

  .portrait-badge {
    left: 50%;
    bottom: 0.65rem;
    transform: translateX(-50%);
    max-width: calc(100% - 1.1rem);
    font-size: 0.72rem;
    padding: 0.45rem 0.7rem;
  }

  .about-copy {
    font-size: 0.96rem;
  }

  .about-card,
  .skill-card,
  .project-card,
  .exp-card,
  .edu-card,
  .contact-card {
    padding: 1.15rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    min-height: 0;
  }

  .contact-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-cta .btn {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-stats div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    text-align: left;
    padding: 0.9rem 1rem;
  }

  .hero-stats strong {
    font-size: 1.25rem;
  }

  .hero-stats span {
    font-size: 0.8rem;
  }

  .project-links {
    width: 100%;
  }

  .project-links .btn {
    flex: 1 1 auto;
  }

  .exp-points li,
  .skill-card li {
    font-size: 0.9rem;
  }

  .tech-row span {
    font-size: 0.7rem;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .container {
    width: min(100% - 1rem, var(--container));
  }

  .logo {
    font-size: 1.1rem;
  }

  .btn {
    padding: 0.8rem 1.1rem;
    font-size: 0.88rem;
  }

  .portrait-frame {
    width: min(100%, 220px);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn:hover,
  .skill-card:hover,
  .project-card:hover,
  .contact-card:hover {
    transform: none;
  }
  .bg-glow,
  .bg-grid,
  .orb,
  .particle,
  .beam {
    animation: none !important;
  }
  body.has-pointer .bg-orbs,
  body.has-pointer .bg-particles,
  body.has-pointer .bg-beams {
    transform: none !important;
    transition: none !important;
  }
}
