/* ====== RESET & BASE ====== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #050816;
  --bg-alt: #070b1f;
  --card-bg: #0b1024;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --accent-strong: rgba(99, 102, 241, 0.3);
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --border-subtle: #111827;
  --danger: #f97373;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --shadow-soft: 0 20px 40px rgba(15, 23, 42, 0.7);
  --transition: 0.25s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top left, #111827 0, var(--bg) 40%);
  color: var(--text-main);
  line-height: 1.6;
}

/* ====== UTILITIES ====== */
.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

.section {
  padding: 6rem 0;
}

.section-alt {
  background: radial-gradient(circle at top right, #111827 0, var(--bg-alt) 45%);
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  font-size: 2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-header p {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* GRID */
.grid {
  display: grid;
  gap: 1.8rem;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* CARDS */
.card {
  background: linear-gradient(145deg, #050816, #0d1024);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 1.6rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.soft-shadow {
  box-shadow: var(--shadow-soft);
}

.card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at top left, var(--accent-soft), transparent 55%);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: -1;
}

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

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}

.card p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition),
    background var(--transition), color var(--transition), border var(--transition);
  white-space: nowrap;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: #f9fafb;
  box-shadow: 0 18px 35px rgba(79, 70, 229, 0.55);
}

.btn.primary:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 24px 45px rgba(79, 70, 229, 0.75);
}

.btn.ghost {
  background: transparent;
  color: var(--text-main);
  border-color: var(--accent-strong);
}

.btn.ghost:hover {
  background: var(--accent-soft);
}

.btn.full-width {
  width: 100%;
}

.center {
  text-align: center;
}

.mt-lg {
  margin-top: 2.5rem;
}

/* BADGES / PILLS */
.badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.pill-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.7rem 0 1rem;
}

.pill-list li {
  font-size: 0.76rem;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--accent-strong);
  color: var(--text-muted);
}

/* SKILL BARS */
.skill-bars {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.skill {
  font-size: 0.82rem;
}

.skill span {
  display: block;
}

.bar {
  height: 6px;
  border-radius: 999px;
  background: #111827;
  overflow: hidden;
  margin-top: 0.25rem;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
}

/* ====== HEADER / NAVBAR ====== */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(22px);
  background: rgba(3, 7, 18, 0.8);
  border-bottom: 1px solid rgba(15, 23, 42, 0.8);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.75rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top left, var(--accent), #0f172a);
  font-size: 0.9rem;
  font-weight: 700;
}

.logo-text {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-link {
  text-decoration: none;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #a855f7);
  transition: width var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--text-main);
}

/* MOBILE NAV TOGGLE */
.nav-toggle {
  display: none;
  width: 32px;
  height: 28px;
  position: relative;
  border: none;
  outline: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  inset-inline: 0;
  height: 2px;
  background: var(--text-main);
  border-radius: 999px;
  transition: transform var(--transition), opacity var(--transition), top var(--transition),
    bottom var(--transition);
}

.nav-toggle span:nth-child(1) {
  top: 6px;
}
.nav-toggle span:nth-child(2) {
  top: 13px;
}
.nav-toggle span:nth-child(3) {
  bottom: 6px;
}

.nav-toggle.open span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(42deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  bottom: auto;
  top: 50%;
  transform: translateY(-50%) rotate(-42deg);
}

/* ====== HERO ====== */
.hero {
  padding: 6rem 0 5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr);
  gap: 2.4rem;
  align-items: center;
}

.hero-eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.hero-title {
  font-size: clamp(2.1rem, 3.1vw + 1.4rem, 3rem);
  line-height: 1.1;
}

.hero-title span {
  background: linear-gradient(120deg, #e5e7eb, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin-top: 0.6rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.hero-text {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.hero-meta {
  margin-top: 1.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.meta-item {
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--accent-strong);
  background: rgba(15, 23, 42, 0.9);
}

.meta-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

.meta-value {
  font-size: 0.85rem;
}

/* HERO CARD */
.hero-card {
  background: radial-gradient(circle at top right, var(--accent-soft), transparent 55%),
    linear-gradient(145deg, #020617, #020617);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(31, 41, 55, 0.9);
  padding: 1.6rem 1.4rem 1.7rem;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(circle at top, rgba(96, 165, 250, 0.08), transparent 55%),
    radial-gradient(circle at bottom right, rgba(129, 140, 248, 0.1), transparent 55%);
  opacity: 0.9;
  pointer-events: none;
  z-index: -1;
}

.hero-avatar {
  display: flex;
  justify-content: flex-end;
}

.avatar-circle {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  background:
    conic-gradient(from 150deg, rgba(99, 102, 241, 0.3), rgba(14, 165, 233, 0.2),
      rgba(236, 72, 153, 0.25), rgba(99, 102, 241, 0.3));
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-circle::before {
  content: "";
  position: absolute;
  width: 92px;
  height: 92px;
  border-radius: inherit;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  opacity: 0.3;
}

.avatar-initials {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  background: radial-gradient(circle at top left, #020617, #020617);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.2rem;
}

.hero-card-content {
  margin-top: 1.1rem;
}

.hero-card h2 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.hero-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ====== TIMELINE ====== */
.timeline {
  position: relative;
  padding-left: 1.6rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 0.45rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-strong), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.4rem;
}

.timeline-marker {
  position: absolute;
  left: -0.1rem;
  top: 0.5rem;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--bg);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.25);
}

.timeline-content {
  margin-left: 1.5rem;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.7rem;
  margin-bottom: 0.6rem;
}

.timeline-header h3 {
  font-size: 1rem;
}

.timeline-date {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.timeline-list {
  margin-top: 0.65rem;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.timeline-list li {
  margin-bottom: 0.22rem;
}

/* ====== EDUCATION ====== */
.edu-grid .edu-institute {
  font-size: 0.9rem;
  font-weight: 500;
}

.edu-year {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin: 0.3rem 0;
}

.edu-desc {
  font-size: 0.9rem;
}

/* ====== CERTIFICATIONS ====== */
.filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 2rem;
}

.filter-btn {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.95);
  padding: 0.4rem 0.95rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border var(--transition),
    transform var(--transition);
}

.filter-btn:hover {
  transform: translateY(-1px);
}

.filter-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent-strong);
  color: var(--text-main);
}

.cert-card .cert-provider,
.cert-card .cert-year {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cert-card .cert-year {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-top: 0.2rem;
}

/* ====== PROJECTS ====== */
.project-grid .project-tag {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.project-list {
  margin-top: 0.6rem;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.project-list li {
  margin-bottom: 0.2rem;
}

.project-link {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.86rem;
  text-decoration: none;
  color: #a5b4fc;
}

/* ====== CONTACT ====== */
.contact-grid {
  align-items: flex-start;
}

.contact-list {
  list-style: none;
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contact-list li + li {
  margin-top: 0.25rem;
}

.contact-list span {
  color: var(--text-main);
  font-weight: 500;
  margin-right: 0.25rem;
}

.contact-form .form-group {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.9rem;
}

.contact-form label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.contact-form input,
.contact-form textarea {
  background: #020617;
  border-radius: 12px;
  border: 1px solid #1f2937;
  padding: 0.6rem 0.75rem;
  color: var(--text-main);
  font: inherit;
  outline: none;
  transition: border var(--transition), box-shadow var(--transition), background var(--transition);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #6b7280;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.6);
  background: #020617;
}

.form-status {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ====== FOOTER ====== */
.footer {
  border-top: 1px solid #111827;
  padding: 1.6rem 0 1.4rem;
  background: #020617;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-links a {
  text-decoration: none;
  color: #9ca3af;
}

/* ====== ANIMATIONS ====== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.5fr);
  }

  .hero-card {
    max-width: 420px;
    margin-inline: auto;
  }

  .two-col {
    grid-template-columns: minmax(0, 1fr);
  }

  .three-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline::before {
    left: 0.35rem;
  }

  .timeline-marker {
    left: -0.2rem;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    inset-inline: 0;
    top: 56px;
    background: rgba(3, 7, 18, 0.97);
    border-bottom: 1px solid #111827;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
  }

  .nav.open {
    transform: translateY(0%);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.9rem 1.5rem 1.2rem;
    gap: 0.8rem;
  }

  .hero {
    padding-top: 5rem;
  }

  .three-col {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    flex-direction: column;
  }

  .timeline {
    padding-left: 1.2rem;
  }

  .section,
  .section-alt {
    padding: 4rem 0;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 1.6rem, 100%);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
/* ====== CERTIFICATE CARDS (EXTRA UI) ====== */
.cert-card-header {
  margin-bottom: 0.6rem;
}

.cert-card-header h3 {
  margin-bottom: 0.15rem;
}

.cert-provider {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cert-year {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-top: 0.2rem;
}

.cert-desc {
  margin-top: 0.6rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.cert-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.cert-card-footer .btn {
  font-size: 0.78rem;
  padding: 0.45rem 0.9rem;
}

/* Empty text when no certificates */
.empty-text {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 1.6rem 0.8rem;
}

/* ====== CERTIFICATE MODAL ====== */
.cert-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.cert-modal.open {
  display: flex;
}

.cert-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(10px);
}

.cert-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(1040px, 100% - 2rem);
  max-height: min(95vh, 860px);
  background: radial-gradient(circle at top left, #111827, #020617);
  border-radius: 22px;
  border: 1px solid #1f2937;
  padding: 1.4rem 1.5rem 1.6rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}

/* close button */
.cert-modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.9rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
}

.cert-modal h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.cert-modal-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

/* ==== FIXED PREVIEW SIZE (897 x 732) ==== */
.cert-modal-body {
  flex: 0 0 auto;
  width: 100%;
  max-width: 897px;
  height: 732px;
  margin: 0.75rem auto 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #111827;
  background: #020617;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.cert-modal-body img,
.cert-modal-body iframe {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: none;
}

.cert-modal-body iframe {
  background: #020617;
}

.cert-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
  justify-content: flex-end;
}

/* Responsive modal */
@media (max-width: 1024px) {
  .cert-modal-dialog {
    width: min(100% - 1.5rem, 960px);
  }

  .cert-modal-body {
    max-width: 100%;
    height: min(70vh, 732px);
  }
}

@media (max-width: 640px) {
  .cert-modal-dialog {
    padding: 1.2rem 1rem 1.3rem;
    border-radius: 18px;
  }

  .cert-modal-actions {
    justify-content: stretch;
  }

  .cert-modal-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}
