/* =========================================================
   THEME VARIABLES & GLOBAL TYPOGRAPHY
========================================================= */
:root {
  --accent: #1a73e8;
  --accent-glow: rgba(26, 115, 232, 0.45);
  --glass-light: rgba(255, 255, 255, 0.7);
  --glass-dark: rgba(20, 20, 20, 0.7);
  --bg-light: #eef1f6;
  --bg-dark: #0d0d0d;
  --text-light: #1a1a1a;
  --text-dark: #e8e8e8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

/* Global font & text */
html,
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-weight: 400;
  letter-spacing: 0.2px;
  -webkit-font-smoothing: antialiased;
  color: var(--text-light);
}

body {
  margin: 0;
  background: var(--bg-light);
  color: var(--text-light);
  transition: background 0.4s ease, color 0.4s ease;
}

[data-theme="dark"] body {
  background: var(--bg-dark);
  color: var(--text-dark);
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Slightly looser headings */
h1,
h2 {
  letter-spacing: 0.5px;
}

/* Paragraphs & inline text */
p,
li,
a,
span {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  line-height: 1.6;
}

/* h2 gradient styling */
h2 {
  text-align: center;
  font-weight: 800;
  font-size: 26px;
  margin-bottom: 24px;
  background: linear-gradient(90deg, #0099ff, #00c8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =========================================================
   NAVBAR & LOGO
========================================================= */
nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  padding: 14px 24px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  backdrop-filter: blur(12px);
  background: var(--glass-light);
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  transition: background 0.4s ease, border-color 0.4s ease;
}

[data-theme="dark"] nav {
  background: var(--glass-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* CUSTOM NAV LOGO */
.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 1.6px;
  user-select: none;
}

.logo .om {
  font-family: "Noto Sans Devanagari", sans-serif;
  color: #ff9100;
  text-shadow: 0 0 10px rgba(255, 145, 0, 0.6);
  animation: omPulse 3s ease-in-out infinite alternate;
}

.logo .name {
  background: linear-gradient(90deg, #00aaff, #00ffcc, #0077ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
  transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.logo:hover .name {
  transform: scale(1.08);
  text-shadow: 0 0 14px rgba(0, 255, 255, 0.7),
    0 0 30px rgba(0, 170, 255, 0.5);
}

@keyframes omPulse {
  from {
    text-shadow: 0 0 8px rgba(255, 145, 0, 0.4);
  }
  to {
    text-shadow: 0 0 18px rgba(255, 180, 0, 0.8);
  }
}

/* Nav links */
.nav-links a {
  margin: 0 10px;
  text-decoration: none;
  font-weight: 700;
  color: var(--accent);
  font-size: 16px;
}

/* Theme toggle button */
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: white;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
  box-shadow: 0 0 10px var(--accent-glow);
}

.theme-toggle:hover {
  background: white;
  color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

[data-theme="dark"] .theme-toggle {
  background: var(--bg-dark);
  border: 2px solid white;
  color: #ffdc00;
}

[data-theme="dark"] .theme-toggle:hover {
  background: #222;
  color: white;
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  font-size: 26px;
  cursor: pointer;
  color: var(--accent);
  user-select: none;
}

/* Mobile nav layout */
@media (max-width: 850px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
}

/* MOBILE SLIDE PANEL */
.mobile-panel {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background: var(--glass-light);
  backdrop-filter: blur(14px);
  transition: right 0.35s ease;
  padding: 70px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  z-index: 1500;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}

.mobile-panel a {
  font-size: 18px;
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.mobile-panel.open {
  right: 0;
}

[data-theme="dark"] .mobile-panel {
  background: var(--glass-dark);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

/* =========================================================
   HEADER
========================================================= */
header {
  padding: 140px 20px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Floating aura behind profile */
.aura {
  position: absolute;
  width: 320px;
  height: 320px;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  filter: blur(35px);
  animation: pulse 5s infinite;
  z-index: -1;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

/* Profile image */
.profile-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--accent);
  box-shadow: 0 0 30px var(--accent-glow);
}

/* === TYPEWRITER WRAPPER — PERFECT CENTER + BUTTON BELOW === */
.typewriter-wrapper {
  display: flex;             
  justify-content: center;
  align-items: center;

  width: 100%;
  height: 28px;
  line-height: 28px;

  margin: 6px auto 18px auto;
  white-space: nowrap;
}

/* === TYPEWRITER TEXT === */
.typewriter {
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
}

/* === MOVING CURSOR === */
.cursor {
  height: 28px;
  width: 3px;
  background: var(--accent);
  margin-left: 3px;
  animation: blinkCursor 0.7s infinite;
}
@keyframes blinkCursor {
  50% { opacity: 0; }
}

@keyframes blinkCursor {
  50% { opacity: 0; }
}

[data-theme="dark"] .cursor {
  background: #00b4ff;
}

/* === Tighten spacing under the H1 === */
header h1 {
  margin-bottom: 8px !important; /* reduced from default */
}
.color-analyst { color: #00aaff; }
.color-dev     { color: #00aaff; }
.color-edu     { color: #00aaff; }

/* === HEADER SPACING === */
header p {
  margin-top: 10px;
  margin-bottom: 25px;
}

/* Dark mode cursor adjustment */
[data-theme="dark"] .cursor {
  background: #00b4ff;
}

/* Download button */
.download-btn {
  margin-top: 18px;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-weight: 900;
  display: inline-block;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.download-btn:active {
  transform: scale(0.98);
}

/* =========================================================
   GLOBAL SECTION & CARD STYLING
========================================================= */
section {
  position: relative;
  border-radius: 14px;
  padding: 48px 32px;
  margin: 40px auto;
  max-width: 1000px;
  overflow: hidden;
  transition: all 0.3s ease;
  z-index: 1;
  background: rgba(250, 250, 255, 0.95);
  border: 1px solid rgba(0, 110, 255, 0.25);
  box-shadow: 0 0 18px rgba(0, 110, 255, 0.18),
    inset 0 0 10px rgba(0, 110, 255, 0.06);
}

/* Hover glow – balanced for light mode */
section:hover {
  border-color: rgba(0, 110, 255, 1);
  box-shadow: 0 0 26px rgba(0, 110, 255, 0.55),
    0 0 60px rgba(0, 160, 255, 0.25),
    inset 0 0 18px rgba(0, 110, 255, 0.1);
  transform: translateY(-3px);
}

/* Animated subtle hue shift only on hover */
section:hover {
  animation: glowShift 6s ease-in-out infinite alternate;
}

@keyframes glowShift {
  0% {
    box-shadow: 0 0 26px rgba(0, 110, 255, 0.6),
      0 0 60px rgba(0, 160, 255, 0.25),
      inset 0 0 18px rgba(0, 110, 255, 0.1);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 140, 255, 0.75),
      0 0 70px rgba(0, 200, 255, 0.35),
      inset 0 0 22px rgba(0, 140, 255, 0.15);
  }
  100% {
    box-shadow: 0 0 24px rgba(0, 110, 255, 0.55),
      0 0 55px rgba(0, 160, 255, 0.2),
      inset 0 0 16px rgba(0, 110, 255, 0.1);
  }
}

/* Dark mode section base */
[data-theme="dark"] section {
  background: rgba(10, 15, 30, 0.88);
  border: 1px solid rgba(0, 200, 255, 0.18);
  box-shadow: 0 0 14px rgba(0, 200, 255, 0.18),
    inset 0 0 14px rgba(0, 200, 255, 0.08);
}

/* Dark mode section hover */
[data-theme="dark"] section:hover {
  border-color: rgba(0, 200, 255, 0.7);
  box-shadow: 0 0 28px rgba(0, 200, 255, 0.5),
    0 0 50px rgba(0, 200, 255, 0.2),
    inset 0 0 20px rgba(0, 200, 255, 0.12);
}

/* Generic glass cards inside sections */
.card {
  position: relative;
  backdrop-filter: blur(16px);
  background: var(--glass-light);
  padding: 24px;
  margin: 22px 0;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Dark mode interior cards */
[data-theme="dark"] .card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(0, 200, 255, 0.18);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45),
    0 0 20px rgba(0, 200, 255, 0.1) inset;
}

[data-theme="dark"] .card:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55),
    0 0 32px rgba(0, 200, 255, 0.18) inset;
  transform: translateY(-2px);
}

/* Text legibility inside dark cards */
[data-theme="dark"] .card h3 {
  color: #eaf6ff;
}
[data-theme="dark"] .card p {
  color: #d7e6ff;
  opacity: 0.9;
}

/* =========================================================
   SKILLS GRID
========================================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  margin-top: 24px;
}

/* Base skill card style */
.skill-box {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .skill-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(0, 200, 255, 0.25);
  box-shadow: 0 0 18px rgba(0, 200, 255, 0.25),
    inset 0 0 10px rgba(0, 200, 255, 0.08);
}

.skill-box h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Skill subtitles */
.skill-subtitle {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.85;
  margin-bottom: 12px;
  color: #444;
}

[data-theme="dark"] .skill-subtitle {
  color: #d8f3ff;
}

/* Tags inside each box */
.skill-box .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-box .tags span {
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #111;
  font-weight: 500;
  transition: 0.25s ease;
}

.skill-box .tags span:hover {
  background: rgba(0, 120, 255, 0.14);
  box-shadow: 0 0 12px rgba(0, 120, 255, 0.25);
  transform: translateY(-2px);
}

/* Dark mode tag styling */
[data-theme="dark"] .skill-box .tags span {
  background: rgba(0, 180, 255, 0.12);
  border: 1px solid rgba(0, 180, 255, 0.25);
  color: #bfefff;
}

/* Optional color-themed icons (if used) */
.skill-blue h3 i {
  color: #0099ff;
}
.skill-pink h3 i {
  color: #ff66b2;
}
.skill-cyan h3 i {
  color: #00c8ff;
}
.skill-orange h3 i {
  color: #ffa040;
}
.skill-red h3 i {
  color: #ff5050;
}

/* =========================================================
   EXPERIENCE SECTION
========================================================= */
.experience-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.experience-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 18px;
  border-radius: 14px;
  background: var(--glass-light);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .experience-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(0, 200, 255, 0.16);
}

/* Company logo */
.company-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  padding: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

/* Exp text layout */
.exp-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.exp-role {
  font-weight: 800;
  font-size: 18px;
}

.exp-company {
  font-weight: 700;
  opacity: 0.9;
}

.exp-meta {
  text-align: right;
  min-width: 190px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.exp-dates {
  font-weight: 700;
  color: var(--accent);
}

.exp-location {
  opacity: 0.8;
}

/* Tags for experience */
.exp-tags {
  grid-column: 2 / 4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.exp-tags span {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .exp-tags span {
  background: rgba(0, 200, 255, 0.12);
  border: 1px solid rgba(0, 200, 255, 0.25);
  color: #bfefff;
}

/* Responsive layout for experience */
@media (max-width: 640px) {
  .experience-card {
    grid-template-columns: 44px 1fr;
  }

  .exp-meta {
    grid-column: 2;
    text-align: left;
    margin-top: 4px;
  }
}

/* =========================================================
   PROJECTS SECTION
========================================================= */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  margin-top: 20px;
}

/* Each project card wrapper */
.project-card {
  perspective: 1000px;
  position: relative;
  height: 260px; /* uniform height for all cards */
}

/* Inner project card */
.project-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Balanced hover – light mode */
.project-inner:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
}

/* Dark mode project cards */
[data-theme="dark"] .project-inner {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(0, 200, 255, 0.18);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45),
    inset 0 0 10px rgba(0, 200, 255, 0.08);
}

[data-theme="dark"] .project-inner:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 0 26px rgba(0, 200, 255, 0.5),
    0 0 60px rgba(0, 200, 255, 0.25),
    inset 0 0 18px rgba(0, 200, 255, 0.15);
}

/* Project text */
.project-title {
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-light);
}

[data-theme="dark"] .project-title {
  color: #e8f5ff;
}

.project-inner p {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* max visible lines */
  -webkit-box-orient: vertical;
}

/* Project link */
.project-link {
  display: inline-block;
  margin-top: 8px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.project-link:hover {
  text-shadow: 0 0 8px rgba(0, 200, 255, 0.6);
  color: #00caff;
}

/* =========================================================
   CONTACT SECTION
========================================================= */
#contact {
  text-align: center;
}

/* Contact text clarity */
#contact a,
#contact p,
#contact span {
  color: var(--text-light);
  transition: color 0.25s ease;
}

[data-theme="dark"] #contact a,
[data-theme="dark"] #contact p,
[data-theme="dark"] #contact span {
  color: #eaf6ff;
}

[data-theme="dark"] #contact a:hover {
  color: #00c8ff;
  text-shadow: 0 0 6px rgba(0, 200, 255, 0.5);
}

#contact .info-line {
  margin: 8px 0;
  font-size: 17px;
  font-weight: 600;
}

/* Contact icons */
.contact-icons {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
}

.contact-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #00c8ff;
  background: rgba(255, 255, 255, 0.05);
  border: 1.6px solid rgba(0, 200, 255, 0.3);
  box-shadow: 0 0 12px rgba(0, 200, 255, 0.15),
    inset 0 0 8px rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

/* Hover pulse */
.contact-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 0 22px rgba(0, 200, 255, 0.5),
    0 0 50px rgba(0, 200, 255, 0.25),
    inset 0 0 16px rgba(0, 200, 255, 0.12);
  animation: contactPulse 0.8s ease-out;
}

/* Pulse animation */
@keyframes contactPulse {
  0%,
  100% {
    box-shadow: 0 0 22px rgba(0, 200, 255, 0.5),
      0 0 50px rgba(0, 200, 255, 0.25),
      inset 0 0 16px rgba(0, 200, 255, 0.12);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 220, 255, 0.75),
      0 0 70px rgba(0, 220, 255, 0.45),
      inset 0 0 18px rgba(0, 200, 255, 0.2);
  }
}

/* Dark mode contact buttons */
[data-theme="dark"] .contact-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #bfefff;
}

/* Light mode refinement */
[data-theme="light"] .contact-btn {
  background: rgba(240, 240, 255, 0.9);
  color: #007bff;
  border-color: rgba(0, 120, 255, 0.25);
  box-shadow: 0 0 12px rgba(0, 120, 255, 0.15),
    inset 0 0 8px rgba(0, 120, 255, 0.08);
}

/* =========================================================
   FOOTER
========================================================= */
footer {
  text-align: center;
  padding: 42px 20px;
  color: #777;
  font-size: 14px;
}

/* =========================================================
   RESPONSIVE ADJUSTMENTS
========================================================= */
@media (max-width: 640px) {
  header {
    padding: 100px 20px 60px;
  }

  section {
    padding: 32px 18px;
  }
}
