/* =========================================================
   Adi Tapiero — Portfolio
   Premium minimalist design, dark + light themes
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --accent: #6366f1;        /* indigo */
  --accent-soft: rgba(99, 102, 241, 0.14);
  --accent-strong: #4f46e5;

  --bg: #0b0c10;
  --bg-elev: #0f1117;
  --bg-elev-2: #14171f;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text: #e7e9ee;
  --text-muted: #a0a4ad;
  --text-faint: #6b7280;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.55);

  --nav-blur: saturate(160%) blur(14px);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 1180px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

/* Light theme overrides */
[data-theme="light"] {
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.12);
  --accent-strong: #4338ca;

  --bg: #fafaf9;
  --bg-elev: #ffffff;
  --bg-elev-2: #f4f4f3;
  --surface: rgba(0, 0, 0, 0.02);
  --surface-strong: rgba(0, 0, 0, 0.04);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);

  --text: #1a1a1a;
  --text-muted: #4d525c;
  --text-faint: #6b7280;

  --shadow-sm: 0 1px 2px rgba(20, 20, 30, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(20, 20, 30, 0.12);
  --shadow-lg: 0 24px 60px -20px rgba(20, 20, 30, 0.16);
}

/* ---------- Resets ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4, p { margin: 0; }

/* Focus states */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- NAVBAR ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: var(--nav-blur);
  -webkit-backdrop-filter: var(--nav-blur);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.navbar.scrolled {
  border-bottom-color: var(--border);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: opacity 0.2s var(--ease);
}
.brand:hover { opacity: 0.85; }
.brand-name { font-size: 0.98rem; }

.monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 20px -8px var(--accent);
}
.monogram.small { width: 28px; height: 28px; font-size: 0.7rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  position: relative;
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-radius: 8px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  transform: translateX(-50%);
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

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

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.icon-btn:hover {
  background: var(--surface-strong);
  border-color: var(--border-strong);
}
.icon-btn:active { transform: scale(0.96); }
.icon-sun, .icon-moon { transition: opacity 0.25s var(--ease), transform 0.25s var(--ease); }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 0;
}
.hamburger span {
  display: block;
  width: 18px;
  height: 1.8px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.25rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.25s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.btn-sm {
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
  border-radius: 8px;
}
.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 10px 24px -10px var(--accent);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -10px var(--accent);
}
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--surface-strong);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: 5rem 0 4rem;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto auto;
  width: 720px;
  height: 720px;
  background: radial-gradient(circle at center, var(--accent-soft), transparent 60%);
  filter: blur(50px);
  z-index: -1;
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-content { max-width: 640px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  margin-bottom: 1.5rem;
}
.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero-title {
  font-size: clamp(2.8rem, 6.2vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin-bottom: 0.85rem;
  background: linear-gradient(180deg, var(--text), color-mix(in srgb, var(--text) 60%, transparent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}
.hero-subtitle .sep { color: var(--accent); margin: 0 0.4rem; }
.hero-lead {
  font-size: 1.04rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 560px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.25rem;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.socials a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}
.socials a:hover {
  color: var(--text);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* Hero card (terminal style) */
.hero-card {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.card-glow {
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-soft), transparent 50%);
  z-index: 0;
  pointer-events: none;
}
.terminal-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev-2);
  z-index: 1;
}
.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}
.terminal-bar span:nth-child(1) { background: #ff5f57; }
.terminal-bar span:nth-child(2) { background: #febc2e; }
.terminal-bar span:nth-child(3) { background: #28c840; }
.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-left: auto;
}
.terminal-body {
  position: relative;
  padding: 1.25rem 1.25rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.85;
  color: var(--text);
  z-index: 1;
}
.terminal-body p { margin: 0; }
.t-prompt { color: var(--accent); margin-right: 0.5rem; }
.t-out { color: var(--text-muted); padding-left: 1.25rem; }
.t-accent { color: var(--accent); }

/* Metrics strip */
.metrics {
  margin-top: 4rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.metric { text-align: left; }
.metric-num {
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.metric-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* ---------- SECTIONS ---------- */
.section {
  padding: 6rem 0;
  position: relative;
}
.section-alt { background: var(--bg-elev); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head {
  max-width: 760px;
  margin-bottom: 3rem;
}
.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}
.section-title {
  font-size: clamp(1.85rem, 3.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--text);
}
.section-sub {
  margin-top: 0.85rem;
  font-size: 1.02rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---------- ABOUT ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: start;
}
.about-text p {
  font-size: 1.02rem;
  line-height: 1.78;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}
.about-text strong { color: var(--text); font-weight: 600; }

.focus-list { display: grid; gap: 0.9rem; }
.focus-list li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), background 0.25s var(--ease);
}
.focus-list li:hover {
  border-color: var(--accent);
  background: var(--surface-strong);
  transform: translateY(-2px);
}
.focus-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 600;
}
.focus-list h4 { font-size: 0.98rem; font-weight: 600; color: var(--text); margin-bottom: 0.2rem; }
.focus-list p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.55; }

/* ---------- SKILLS ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.skill-card {
  padding: 1.5rem 1.5rem 1.4rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.skill-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.skill-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.1rem;
}
.skill-bullet {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
}
.skill-head h3 { font-size: 1.02rem; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.78rem;
  font-size: 0.83rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.chip-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  font-weight: 500;
}

/* ---------- PROJECTS ---------- */
.project-featured {
  position: relative;
  padding: 2.25rem 2.25rem 2.1rem;
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-elev-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.75rem;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.project-featured::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(600px circle at 0% 0%, var(--accent-soft), transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.project-featured:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.project-featured > * { position: relative; z-index: 1; }

.featured-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}
.badge {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
}
.featured-period {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
}
.featured-title {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.85rem;
}
.featured-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  max-width: 760px;
}
.featured-highlights {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
}
.featured-highlights li {
  display: flex;
  gap: 0.6rem;
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.featured-highlights span {
  color: var(--accent);
  font-family: var(--font-mono);
}
.featured-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.tech {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.project-card {
  padding: 1.6rem 1.6rem 1.5rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), background 0.25s var(--ease);
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.pc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}
.pc-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.pc-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}
.pc-title {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 0.55rem;
  color: var(--text);
}
.pc-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.1rem;
}
.pc-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.pc-stack li {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  background: var(--surface);
}

.pc-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}
.pc-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.pc-link:hover { border-bottom-color: var(--accent); }

.projects-note {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.92rem;
}
.projects-note a { color: var(--accent); border-bottom: 1px dotted var(--accent); }
.projects-note strong { color: var(--text); font-weight: 600; }

/* ---------- EXPERIENCE TIMELINE ---------- */
.timeline {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border);
  display: grid;
  gap: 1.5rem;
}
.timeline-item {
  position: relative;
  padding-left: 1rem;
}
.timeline-dot {
  position: absolute;
  left: -1.55rem;
  top: 1.4rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg-elev), 0 0 0 5px var(--accent-soft);
}
.timeline-card {
  padding: 1.5rem 1.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.timeline-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.tl-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.tl-head h3 {
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
}
.tl-period {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-faint);
}
.tl-company {
  font-size: 0.92rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.7rem;
}
.tl-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---------- EDUCATION ---------- */
.education-card {
  padding: 2rem 2.1rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  transition: border-color 0.25s var(--ease);
}
.education-card:hover { border-color: var(--border-strong); }
.edu-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.edu-degree {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.edu-school {
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-size: 0.95rem;
}
.edu-period {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-faint);
}
.edu-sub {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.85rem;
}
.edu-extra { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.edu-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.55rem 1rem;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 999px;
}
.edu-pill-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.edu-pill-value {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- CERTIFICATIONS ---------- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}
.cert-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1rem;
  padding: 1.3rem 1.4rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  align-items: center;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.cert-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.cert-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.cert-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.2rem;
}
.cert-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ---------- CONTACT ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.contact-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 1.25rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), background 0.25s var(--ease);
  color: var(--text);
}
.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  background: var(--bg-elev);
}
.contact-card-static { cursor: default; }
.contact-card-static:hover { transform: none; border-color: var(--border); background: var(--bg-elev-2); }
.contact-card-cta {
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.contact-ic {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--accent);
}
.contact-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}
.contact-value {
  display: block;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
  word-break: break-word;
}

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 2.5rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.footer-name { font-weight: 600; font-size: 0.95rem; }
.footer-copy { font-size: 0.82rem; color: var(--text-faint); margin-top: 0.1rem; }

.footer-socials {
  display: flex;
  gap: 0.4rem;
}
.footer-socials a {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.footer-socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ---------- REVEAL ANIMATIONS ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-visible { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .pulse { animation: none; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .skills-grid, .projects-grid, .cert-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .metrics { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .section { padding: 4.5rem 0; }
}

@media (max-width: 720px) {
  .hamburger { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    right: 1.5rem;
    left: 1.5rem;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.6rem;
    margin-top: 0.5rem;
    box-shadow: var(--shadow-lg);
    transform-origin: top right;
    transform: translateY(-8px) scale(0.97);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s linear;
    gap: 0.1rem;
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }
  .nav-link {
    padding: 0.75rem 0.9rem;
    font-size: 0.95rem;
  }
  .nav-link.active::after { display: none; }
  .nav-link.active { background: var(--accent-soft); color: var(--accent); }

  .brand-name { display: none; }
  .hero { padding: 3.5rem 0 3rem; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .contact-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); padding: 1.25rem; }
  .section { padding: 4rem 0; }
  .education-card { padding: 1.5rem 1.4rem; }
  .project-featured { padding: 1.75rem 1.5rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .metrics { grid-template-columns: 1fr; }
  .container { padding: 0 1.1rem; }
  .nav-inner { padding: 0.75rem 1.1rem; }
  .nav-links { left: 1.1rem; right: 1.1rem; }
}
