/* ── CSS VARIABLES ── */
:root {
  --bg-canvas: #f4f7fc;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f7ff;
  --accent-primary: #2563eb;
  --accent-primary-hover: #1d4ed8;
  --accent-glow: #e0f2fe;
  --accent-glow-subtle: #e0e7ff;
  --text-primary: #0f172a;
  --text-muted: #475569;
  --border-subtle: #e2e8f0;
  --border-focus: #3b82f6;

  /* Font variables */
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}
.hero-stat-num {
  font-family: var(--font-mono) !important;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 400;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 4px;
}

/* ── GLOW BACKGROUND EFFECTS ── */
body::after {
  content: '';
  position: fixed;
  width: 600px;
  height: 600px;
  top: -200px;
  left: -100px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(100px);
  z-index: -1;
  pointer-events: none;
}

.glow-second {
  position: fixed;
  width: 500px;
  height: 500px;
  bottom: -150px;
  right: -100px;
  background: radial-gradient(circle, var(--accent-glow-subtle) 0%, transparent 70%);
  filter: blur(100px);
  z-index: -1;
  pointer-events: none;
}

/* ── CUSTOM SCROLLBAR ── */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-canvas);
}
::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 5px;
  border: 2px solid var(--bg-canvas);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}


/* ── NOISE TEXTURE OVERLAY ── */
html::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* ── NAV STYLES ── */
.nav-capsule {
  position: fixed;
  top: 1.5rem; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 2rem;
  width: 90%;
  max-width: 1200px;
  border-radius: 50px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
  transition: padding 0.3s ease, top 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.nav-capsule.scrolled {
  padding: 0.5rem 1.5rem;
  top: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}
.nav-logo-wrap .nav-logo {
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}
.nav-logo-wrap .accent-dot { color: var(--accent-primary); }
.nav-links { display: flex; align-items: center; gap: 1.5rem; list-style: none; }
.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--accent-primary); }
.nav-links .nav-btn-contact {
  background: var(--accent-primary);
  color: white;
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  transition: background 0.2s ease;
}
.nav-links .nav-btn-contact:hover {
  background: var(--accent-primary-hover);
  color: white;
}

/* ── BENTO CARD SYSTEM ── */
.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 2rem;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.02);
}
.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  border-color: var(--border-focus);
}

/* ── HERO GRID STYLES ── */
.hero-bento-section {
  padding: 7.5rem 2rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.5rem;
}
.intro-card {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-greeting {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.wave-emoji {
  display: inline-block;
  animation: wave 2s infinite;
  transform-origin: 70% 70%;
}
.hero-role {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
}
.hero-bio {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 580px;
  margin-bottom: 2.5rem;
}
.hero-actions { display: flex; gap: 1rem; }
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-primary { background: var(--accent-primary); color: white; }
.btn-primary:hover { background: var(--accent-primary-hover); }
.btn-secondary { background: var(--bg-canvas); color: var(--text-primary); border: 1px solid var(--border-subtle); }
.btn-secondary:hover { background: var(--border-subtle); }

.photo-card {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 1 / 1.1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.photo-wrapper { width: 100%; height: 100%; }
.profile-photo {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.photo-card:hover .profile-photo { transform: scale(1.05); }

.stats-card {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
}
.card-subtitle {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.stats-subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.stat-item {
  background: var(--bg-canvas);
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
}
.stat-num {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-primary);
}
.stat-lbl {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

@keyframes wave {
  0% { transform: rotate( 0.0deg) }
  10% { transform: rotate(14.0deg) }
  20% { transform: rotate(-8.0deg) }
  30% { transform: rotate(14.0deg) }
  40% { transform: rotate(-4.0deg) }
  50% { transform: rotate(10.0deg) }
  60% { transform: rotate( 0.0deg) }
  100% { transform: rotate( 0.0deg) }
}

/* ── SECTION COMMON ── */
section { border-bottom: 1px solid var(--border-subtle); }

/* ── EDUCATION & CREDENTIALS BENTO grid ── */
.education-section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.section-n {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #1e3a8a;
  background: var(--accent-glow);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 700;
}
.section-tit {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* ── EDU BENTO GRID ── */
.edu-bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.edu-uni-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.uni-logo-wrapper {
  background: var(--accent-glow);
  color: var(--accent-primary);
  font-size: 1.75rem;
  padding: 1.25rem;
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.uni-name { font-size: 1.35rem; font-weight: 800; margin-bottom: 0.25rem; }
.uni-degree { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.honors-badge {
  background: #dbeafe;
  color: #1e3a8a;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
}
.uni-years { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-primary); margin-bottom: 1rem; }
.uni-desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }

/* ── SKILLS ── */
.edu-skills-card {
  display: flex;
  flex-direction: column;
}
.skills-category-group { display: flex; flex-direction: column; gap: 1rem; }
.skill-category h4 { font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.5rem; font-weight: 700; }
.skills-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  /* Global bento tag styling using monospace font */
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.tag:hover {
  color: white;
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

/* ── CERTIFICATIONS ── */
.edu-certs-card {
  grid-column: 1 / 2;
}
.certs-list { display: flex; flex-direction: column; gap: 0.75rem; }
.cert-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
  gap: 0.5rem;
}
.cert-item:last-child { border-bottom: none; }
.cert-prov { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; color: var(--accent-primary); }
.cert-title { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
.cert-date { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }

/* ── ACTIVITIES TIMELINE ── */
.edu-acts-card {
  grid-column: 2 / 3;
}
.activities-timeline { display: flex; flex-direction: column; gap: 1rem; }
.act-item { display: flex; gap: 1.25rem; align-items: flex-start; }
.act-left { display: flex; flex-direction: column; gap: 0.25rem; width: 85px; flex-shrink: 0; }
.act-year { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; color: var(--text-muted); }
.act-badge-cmu {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: var(--accent-glow);
  padding: 0.15rem 0.4rem;
  border-radius: 8px;
  text-transform: uppercase;
  text-align: center;
}
.act-right { display: flex; flex-direction: column; }
.act-title { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.2rem; }
.act-text { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }

/* ── WORK EXPERIENCE ── */
.experience-section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.experience-console {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  padding: 2.5rem;
}
.exp-sidebar {
  border-right: 1px solid var(--border-subtle);
  padding-right: 1.5rem;
}
.exp-sidebar-header {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.exp-tabs-list { display: flex; flex-direction: column; gap: 0.5rem; }
.exp-tab {
  background: transparent;
  border: none;
  border-radius: 12px;
  padding: 1rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.exp-tab:hover { background: var(--bg-canvas); }
.exp-tab.active { background: var(--accent-glow); }
.exp-tab:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: -2px;
}
.exp-tab-role {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}
.exp-tab.active .exp-tab-role { color: #1e3a8a; }
.exp-tab-company { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--text-muted); margin-top: 0.2rem; }

.exp-content-panel {
  position: relative;
  min-height: 280px;
}
.exp-detail-pane {
  display: none;
  animation: expFadeIn 0.4s ease forwards;
}
.exp-detail-pane.active { display: block; }
.pane-title { font-size: 1.35rem; font-weight: 800; margin-bottom: 0.5rem; }
.comp-link { color: var(--accent-primary); }
.pane-meta { display: flex; gap: 1.5rem; font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.pane-meta i { color: var(--accent-primary); }
.pane-bullets { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.pane-bullets li { font-size: 0.9rem; line-height: 1.6; color: var(--text-muted); display: flex; gap: 0.75rem; }
.pane-bullets li::before {
  content: '→';
  color: var(--accent-primary);
  font-weight: 700;
}

@keyframes expFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .experience-console { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.5rem; }
  .exp-sidebar { border-right: none; border-bottom: 1px solid var(--border-subtle); padding-right: 0; padding-bottom: 1rem; }
  .exp-tabs-list { flex-direction: row; overflow-x: auto; padding-bottom: 0.5rem; }
  .exp-tab { width: max-content; flex-shrink: 0; }
  .exp-content-panel { min-height: auto; }
}

/* ── FEATURED PROJECTS ── */
.projects-section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.project-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
}
.project-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.project-card:hover .project-img {
  transform: scale(1.05);
}
.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(37, 99, 235, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.project-card:hover .project-overlay,
.project-card:focus-within .project-overlay {
  opacity: 1;
}
.overlay-btn {
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  border: 2px solid white;
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  transition: all 0.2s ease;
}
.overlay-btn:hover {
  background: white;
  color: var(--accent-primary);
}
.project-details {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.project-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.project-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}
.tag-accent-blue {
  font-family: var(--font-mono);
  background: var(--accent-glow);
  color: #1e3a8a;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
}
.pj-minitags {
  display: flex;
  gap: 0.3rem;
}
.project-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── CONTACT BENTO ── */
.contact-bento {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--accent-glow) 100%);
  border: 1px solid var(--border-subtle);
  padding: 3rem;
  border-radius: 24px;
  text-align: center;
  margin-top: 3rem;
}
.contact-header {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.contact-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}
.contact-btn-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── FOOTER ── */
.footer-bento {
  max-width: 1200px;
  margin: 2rem auto 4rem;
  padding: 2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-title {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-primary);
}
.footer-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.footer-right {
  font-family: var(--font-mono);
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.hire-status {
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: #10b981;
  font-size: 0.75rem;
}
.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

@media (max-width: 768px) {
  .projects-grid { grid-template-columns: 1fr; }
  .footer-bento { flex-direction: column; text-align: center; gap: 1rem; }
  .footer-right { text-align: center; align-items: center; }
}

/* ── UTILITY ── */


/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .nav-capsule {
    width: 95%;
    padding: 0.5rem 1rem;
    top: 1rem;
  }
  .nav-capsule.scrolled {
    padding: 0.5rem 1rem;
    top: 0.75rem;
  }
  .nav-links { gap: 0.75rem; }
  .nav-links a { font-size: 0.75rem; }
  .hero-bento-section { padding-top: 6rem; }
  .hero-grid { grid-template-columns: 1fr; }
  .intro-card { grid-column: 1/2; grid-row: auto; }
  .photo-card { grid-column: 1/2; grid-row: auto; }
  .stats-card { grid-column: 1/2; grid-row: auto; }
  .edu-bento-grid { grid-template-columns: 1fr; }
  .edu-certs-card, .edu-acts-card { grid-column: 1 / 2; }
  .cert-item { grid-template-columns: 1fr; gap: 0.2rem; }


  .edu-uni-card {
    flex-direction: column;
    gap: 1rem;
  }
  .act-item {
    flex-direction: column;
    gap: 0.5rem;
  }
  .act-left {
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }
  .contact-bento {
    padding: 1.5rem;
  }
}