/* ============================
   GLOBAL VARIABLES & RESET
   ============================ */

:root {
  /* Nav */
  --nav-bg: rgba(15, 23, 42, 0.96);
  --nav-border: rgba(148, 163, 184, 0.45);
  --nav-text: #e5e7eb;
  --nav-muted: #9ca3af;
  --nav-accent: #818cf8;

  /* Page */
  --bg: #050814;
  --bg-elevated: #0b1020;
  --bg-card: #0f172a;
  --border-subtle: #1f2937;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.2);
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-soft: 0 18px 35px rgba(0, 0, 0, 0.6);

  /* Research section */
  --research-accent: #a855f7;
  --research-accent-soft: rgba(168, 85, 247, 0.35);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020617 60%, #000);
  color: var(--text-main);
}

/* ============================
   NAVBAR – PILL STYLE
   ============================ */

.nav-shell {
  width: 100%;
  padding: 1.25rem 0;
  display: flex;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  width: min(1120px, 96%);
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: var(--nav-bg);
  border: 1px solid var(--nav-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow:
    0 22px 60px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(18px);
}

/* Logo */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}

.brand-logo {
  height: 32px;
  width: auto;
  display: block;
}

/* If you ever add text next to the logo: */
.brand-text {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--nav-text);
}

/* Nav links */
.main-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  position: relative;
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: none;
  color: var(--nav-muted);
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: 0.16s ease;
}

.nav-link:hover {
  color: var(--nav-text);
}

/* Active glowing pill */
.nav-link.nav-active {
  color: #f9fafb;
  border-color: rgba(129, 140, 248, 0.9);
  box-shadow: 0 0 24px rgba(129, 140, 248, 0.85);
  background: radial-gradient(circle at top,
    rgba(129, 140, 248, 0.32),
    rgba(15, 23, 42, 0.98));
}

/* ============================
   SECTIONS BASE
   ============================ */

.section {
  padding: 4rem 6vw;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

.section-subtitle {
  color: var(--text-muted);
  max-width: 600px;
}

/* ============================
   HERO
   ============================ */

.hero {
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.hero-content {
  max-width: 600px;
}

.hero-tag {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 0.6rem;
}

.text-accent {
  background: linear-gradient(120deg, var(--accent), #a855f7);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 520px;
}

/* Hero buttons */

.hero-actions {
  display: flex;
  gap: 1.2rem;
  margin-top: 1.8rem;
}

.btn {
  padding: 0.8rem 1.4rem;
  border-radius: 30px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  border: none;
}

/* Primary gradient pill */
.btn.hero-primary {
  background: linear-gradient(135deg, #38bdf8, #a855f7);
  color: #ffffff;
  border-radius: 50px;
  padding: 0.9rem 2rem;
  font-size: 1.1rem;
  font-weight: 500;
  box-shadow: 0 8px 20px rgba(168, 85, 247, 0.35);
  transition: 0.28s ease;
}

.btn.hero-primary:hover {
  transform: translateY(-3px);
  box-shadow:
    0 12px 32px rgba(168, 85, 247, 0.55),
    0 0 20px rgba(56, 189, 248, 0.55);
}

/* Glass outline buttons */
.btn.hero-outline {
  border-radius: 50px;
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
  font-weight: 500;
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  transition: 0.28s ease;
}

.btn.hero-outline:hover {
  border-color: rgba(56, 189, 248, 0.9);
  color: #a855f7;
  box-shadow:
    0 0 18px rgba(56, 189, 248, 0.45),
    0 0 28px rgba(168, 85, 247, 0.45);
  transform: translateY(-3px);
}

/* Generic buttons for other sections */

.btn.primary {
  background: linear-gradient(120deg, var(--accent), #a855f7);
  color: #0b1020;
  box-shadow: 0 10px 22px rgba(56, 189, 248, 0.35);
}

.btn.ghost {
  border: 1px solid var(--accent-soft);
  color: var(--accent);
  background: transparent;
}

.hero-social {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.9rem;
}

.hero-social a {
  color: var(--accent);
  text-decoration: none;
}

.hero-social a:hover {
  text-decoration: underline;
}

.hero-meta {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Hero photo */

.hero-photo {
  width: 260px;
  height: 260px;
  border-radius: 24px;
  overflow: hidden;
  border: 2px solid var(--accent);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.25);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* ============================
   GRID & CARDS
   ============================ */

.grid {
  margin-top: 2rem;
  display: grid;
  gap: 1.5rem;
}

.skills-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.projects-grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1100px;
  margin-inline: auto;
  gap: 1.6rem;
}

.research-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.card {
  background: radial-gradient(circle at top left, #111827, #020617);
  padding: 1.3rem 1.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.card h3 {
  margin-bottom: 0.6rem;
}

.card ul {
  padding-left: 1.3rem;
}

/* Skills hover effect */

.skills-grid .card {
  position: relative;
  cursor: default;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 260px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.skills-grid .card ul li {
  margin-bottom: 0.3rem;
  line-height: 1.5;
}

.skills-grid .card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: radial-gradient(
    circle at top left,
    rgba(56, 189, 248, 0.85),
    transparent 60%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.skills-grid .card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(56, 189, 248, 0.9);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.95),
    0 0 35px rgba(56, 189, 248, 0.6);
  background: radial-gradient(
    circle at top left,
    #021827,
    #020617 65%
  );
}

.skills-grid .card:hover::before {
  opacity: 1;
}

/* ============================
   EXPERIENCE TIMELINE
   ============================ */

.timeline {
  margin-top: 2rem;
  position: relative;
  padding-left: 2.8rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(
    to bottom,
    rgba(56, 189, 248, 0.2),
    rgba(168, 85, 247, 0.7),
    rgba(56, 189, 248, 0.2)
  );
  box-shadow:
    0 0 18px rgba(56, 189, 248, 0.4),
    0 0 26px rgba(168, 85, 247, 0.3);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.4rem;
}

.timeline-dot {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #020617;
  border: 2px solid var(--accent);
  box-shadow: 0 0 14px var(--accent-soft);
  z-index: 2;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.timeline-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid rgba(56, 189, 248, 0.4);
  opacity: 0;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.timeline-content {
  margin-left: 2.6rem;
  padding: 1.3rem 1.6rem;
  border-radius: 18px;
  background: radial-gradient(circle at top left, #111827, #020617 70%);
  border: 1px solid rgba(31, 41, 55, 0.85);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.7);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.timeline-item:hover .timeline-content {
  transform: translateY(-6px) translateX(4px);
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.9),
    0 0 26px rgba(56, 189, 248, 0.4);
  background: radial-gradient(circle at top left, #0b172c, #020617 70%);
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.15);
  border-color: rgba(168, 85, 247, 0.9);
  box-shadow:
    0 0 18px rgba(168, 85, 247, 0.8),
    0 0 32px rgba(56, 189, 248, 0.5);
}

.timeline-item:hover .timeline-dot::after {
  opacity: 1;
  transform: scale(1.2);
}

.timeline-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: baseline;
  margin-bottom: 0.4rem;
}

.timeline-header h3 {
  font-size: 1.05rem;
}

.company {
  color: var(--accent);
  font-weight: 500;
}

.time {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.tag-list {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-chip {
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.85);
}

/* ============================
   PROJECTS
   ============================ */

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.5rem 1.8rem 1.6rem 2rem;
  border-radius: 20px;
  background: radial-gradient(circle at top left, #111827, #020617 75%);
  border: 1px solid rgba(31, 41, 55, 0.95);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.project-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: -20%;
  bottom: -20%;
  width: 4px;
  background: linear-gradient(180deg, #38bdf8, #a855f7);
  box-shadow:
    0 0 18px rgba(56, 189, 248, 0.6),
    0 0 26px rgba(168, 85, 247, 0.6);
  opacity: 0.8;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(56, 189, 248, 0.85);
  background: radial-gradient(circle at top left, #0b172c, #020617 75%);
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.95),
    0 0 28px rgba(56, 189, 248, 0.5);
}

.project-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
}

.project-header h3 {
  font-size: 1.05rem;
}

.project-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-summary {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.project-points {
  margin-top: 0.4rem;
  padding-left: 1.3rem;
}

.project-points li {
  margin-bottom: 0.25rem;
  line-height: 1.45;
}

.award-card {
  padding-bottom: 1.5rem;
}

/* ============================
   RESEARCH & ACHIEVEMENTS
   ============================ */

.research-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  padding: 1.6rem 1.8rem;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.6),
    0 0 18px rgba(142, 97, 255, 0.3);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    background 0.35s ease;
}

.research-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(168, 85, 247, 0.7);
  box-shadow:
    0 12px 35px rgba(0, 0, 0, 0.7),
    0 0 30px rgba(168, 85, 247, 0.55),
    0 0 60px rgba(56, 189, 248, 0.4);
}

.btn-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 1.2rem;
}

.small-btn {
  padding: 0.55rem 1.4rem;
  font-size: 0.95rem;
  border-radius: 30px;
  border: 2px solid rgba(56, 189, 248, 0.5);
  color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
  backdrop-filter: blur(6px);
  text-decoration: none;
  display: inline-block;
  transition: 0.3s ease;
  letter-spacing: 0.3px;
}

.small-btn:hover {
  color: #0b1020;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.55);
  transform: translateY(-2px);
}

.research-grid .small-btn {
  padding: 0.55rem 1.7rem;
  font-size: 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: linear-gradient(135deg, #22c1c3, #a855f7);
  color: #020617;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.3px;
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.7),
    0 0 18px rgba(168, 85, 247, 0.4);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.research-grid .small-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.9),
    0 0 22px rgba(34, 193, 195, 0.55);
}

/* ============================
   CERTIFICATIONS
   ============================ */

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.cert-card {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  border-left: 6px solid #ff9900;
  padding: 1.6rem;
  background: radial-gradient(circle at top left, #1b2538, #0f172a);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 25px rgba(255, 153, 0, 0.15);
}

.cert-badge {
  width: 92px;
  height: auto;
  filter: drop-shadow(0 0 8px rgba(255, 153, 0, 0.4));
}

.cert-right h3 {
  margin-bottom: 0.4rem;
}

.cert-id {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0.8rem 0 1rem;
}

.cert-btn {
  margin-top: 0.5rem;
}

/* ============================
   CONTACT
   ============================ */

.contact-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.contact-card p a {
  color: var(--accent);
  text-decoration: none;
}

.contact-card p a:hover {
  text-decoration: underline;
}

/* Upgraded info card */

.contact-info-card {
  position: relative;
  overflow: hidden;
  padding: 1.6rem 1.8rem 1.8rem;
}

.contact-info-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 0 0 rgba(56, 189, 248, 0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, box-shadow 0.25s ease;
}

.contact-info-card:hover::before {
  opacity: 1;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.35);
}

.contact-title {
  margin-bottom: 0.75rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-top: 1rem;
}

.contact-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: radial-gradient(circle at 30% 0%, rgba(56, 189, 248, 0.2), rgba(15, 23, 42, 0.9));
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.contact-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.12rem;
}

.contact-value {
  display: inline-block;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

.contact-value:hover {
  text-decoration: underline;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.contact-form input,
.contact-form textarea {
  background: #020617;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 0.6rem 0.8rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.form-status {
  margin-top: 0.3rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================
   FOOTER
   ============================ */

.footer {
  padding: 1.5rem 6vw;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(31, 41, 55, 0.5);
  background: #020617;
}

/* ============================
   RESPONSIVE / MOBILE
   ============================ */

@media (max-width: 768px) {
  /* Nav becomes scrollable pills */
  .nav-shell {
    padding: 0.9rem 0;
  }

  .nav-inner {
    padding: 0.6rem 1rem;
    gap: 0.75rem;
  }

  .brand-logo {
    height: 26px;
  }

  .main-nav {
    gap: 0.6rem;
    font-size: 0.82rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    padding: 0.35rem 0.9rem;
    flex: 0 0 auto;
  }

  /* Layout */
  .section {
    padding: 3rem 5vw;
  }

  .hero-wrapper {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 2rem;
  }

  .hero,
  .hero-content {
    text-align: left;
  }

  .hero h1 {
    font-size: 2.1rem;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    max-width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .hero-photo {
    width: 200px;
    height: 200px;
    max-width: 260px;
    margin: 0 auto;
  }

  .grid,
  .skills-grid,
  .projects-grid,
  .research-grid,
  .cert-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .cert-card {
    flex-direction: column;
    text-align: center;
  }

  .cert-badge {
    width: 110px;
  }

  .timeline {
    padding-left: 2rem;
    margin-left: 0;
  }
}
