/* ---------- Theme ---------- */
:root {
  --bg: linear-gradient(135deg, #BEE3F8, #C9E2FF, #D9ECFF); /* Light water blue gradient for day mode */
  --text: #0f172a; /* Black text for day mode */
  --muted: #64748b;
  --primary-900: #1E3A8A;
  --primary-600: #3B82F6;
  --primary-300: #93c5fd;
  --card: #ffffff;
  --glass: rgba(255, 255, 255, 0.35);
  --shadow: 0 8px 30px rgba(2, 6, 23, 0.08); /* Base shadow */
  --day-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* Subtle shadow for day mode cards */
  --radius: 16px;
}

body.dark {
  --bg: linear-gradient(135deg, #0D1A36, #142B5A, #1E406F); /* Deep blue gradient for night mode */
  --text: #e5e7eb; /* White text for night mode */
  --muted: #9aa4b2;
  --card: #0f172a;
  --glass: rgba(15, 23, 42, 0.55);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px; /* fixed navbar offset */
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  transition: background 0.3s ease; /* Smooth transition between modes */
}

/* ---------- Global ---------- */
.section {
  padding: 96px 0;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  text-align: center;
  color: var(--text);
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}

.bg-soft {
  background: linear-gradient(180deg, rgba(59,130,246,0.06), rgba(30,58,138,0.06));
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary-900), var(--primary-600));
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 14px rgba(59,130,246,0.35);
  color: #fff; /* Ensure button text is visible */
}
.btn-primary:hover { transform: translateY(-2px); }

.btn-outline-light {
  border-color: rgba(255,255,255,0.6);
  color: #fff;
}
.btn-outline-primary {
  border-color: var(--primary-600);
  color: var(--text);
}
.btn-outline-primary:hover {
  background: var(--primary-600);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
}
.btn-ghost:focus { outline: 2px solid var(--primary-300); }

/* ---------- Navbar ---------- */
.glass-nav {
  background: transparent; /* Blend with body background */
  backdrop-filter: saturate(140%) blur(6px);
  box-shadow: var(--shadow);
}
.glass-nav .navbar-brand { color: var(--text); }
.glass-nav .nav-link { color: var(--text); opacity: 0.9; }
.glass-nav .nav-link.active, .glass-nav .nav-link:hover { opacity: 1; }
.glass-nav .brand-dot { background: var(--text); }

/* ---------- Hero ---------- */
.section-hero {
  background: transparent; /* Blend with body background */
  padding: 120px 0 100px;
  color: var(--text);
}

.eyebrow { 
  text-transform: uppercase; 
  letter-spacing: .2em; 
  opacity: .85; 
  font-size: 1.4rem; /* Increased by 2px from an assumed base of 1.2rem or default */
}
.name { 
  font-size: 2.7rem; 
  margin-bottom: .3rem; 
  font-weight: 600; /* Semibold */
}

.animated-title {
  min-height: 2.4rem;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: .02em;
  position: relative;
}
.animated-title::after {
  content: '|'; margin-left: 2px; animation: blink .7s infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.shadow-card {
  background: var(--card);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius);
  padding: 1.2rem 1.1rem;
  box-shadow: var(--day-shadow); /* Subtle shadow for day mode */
  color: var(--text);
}

body.dark .shadow-card {
  border: 1px solid rgba(255, 255, 255, 0.1); /* Keep night mode as is */
  box-shadow: var(--shadow); /* Original shadow for night mode */
}

/* Profile photo */
.profile-photo {
  max-width: 350px; width: 100%; height: auto;
  border-radius: 18px;
  box-shadow: var(--day-shadow); /* Subtle shadow for day mode */
  transform: translateY(0); transition: transform .3s ease;
}
.profile-photo:hover { transform: translateY(-4px); }

body.dark .profile-photo {
  box-shadow: var(--shadow); /* Original shadow for night mode */
}

/* ---------- About ---------- */
.about-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--day-shadow); /* Subtle shadow for day mode */
  padding: 2rem;
}
.about-points {
  list-style: none; padding-left: 0; margin: 1rem 0 0;
}
.about-points li { margin: .4rem 0; color: var(--muted); }
.about-points i { color: var(--primary-600); margin-right: .5rem; }

body.dark .about-card {
  box-shadow: var(--shadow); /* Original shadow for night mode */
}

/* ---------- Skills ---------- */
.skill-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--day-shadow); /* Subtle shadow for day mode */
  padding: 1.5rem 1rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
}

/* Reveal animation (on scroll load) */
.skill-card.reveal {
  animation: fadeUp 0.8s ease forwards;
}
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hover pop + glow */
.skill-card:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}
.skill-card i {
  transition: transform 0.3s ease, color 0.3s ease;
}
.skill-card:hover i {
  transform: scale(1.2);
  color: var(--primary-600);
}

body.dark .skill-card {
  box-shadow: var(--shadow); /* Original shadow for night mode */
}

/* ---------- Projects ---------- */
.project-card {
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--day-shadow); /* Subtle shadow for day mode */
  overflow: hidden;
  height: 100%;
  display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.project-card:hover { transform: translateY(-5px); }

.project-media { position: relative; overflow: hidden; }
.project-media img {
  width: 100%; height: 210px; object-fit: cover;
  display: block; transition: transform .35s ease;
}
.project-card:hover .project-media img { transform: scale(1.06); }

.project-overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(30,58,138,0.75);
  opacity: 0; transition: opacity .25s ease;
}
.project-card:hover .project-overlay { opacity: 1; }

.project-links { display: flex; gap: .6rem; }
.project-links .link-btn {
  padding: .55rem .95rem; border-radius: 10px; color: #fff; text-decoration: none;
  border: 1px solid rgba(255,255,255,.35);
  transition: transform .2s ease, background .2s ease;
}
.project-links .github { background: var(--primary-900); }
.project-links .live { background: var(--primary-600); }
.project-links .link-btn:hover { transform: translateY(-2px); }

.card-body { padding: 1rem 1rem 1.2rem; }
.card-title { font-size: 1.1rem; font-weight: 800; margin-bottom: .35rem; }
.card-text { color: var(--muted); }

body.dark .project-card {
  box-shadow: var(--shadow); /* Original shadow for night mode */
}

/* ---------- Resume ---------- */
.resume-box {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--day-shadow); /* Subtle shadow for day mode */
  padding: 1.5rem 1.25rem;
}
.resume-points {
  list-style: none; padding-left: 0; margin: 0 0 0.6rem 0;
}
.resume-points li { margin: .35rem 0; color: var(--muted); }
.resume-points i { color: var(--primary-600); margin-right: .5rem; }

body.dark .resume-box {
  box-shadow: var(--shadow); /* Original shadow for night mode */
}

/* ---------- Contact ---------- */
.contact-form {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--day-shadow); /* Subtle shadow for day mode */
  padding: 1rem 1rem 1.25rem;
}
.contact-meta a { text-decoration: none; }
.form-status { min-height: 1.25rem; }

body.dark .contact-form {
  box-shadow: var(--shadow); /* Original shadow for night mode */
}

/* ---------- Footer ---------- */
footer {
  background: transparent; /* Blend with body background */
}

/* ---------- Reveal on Scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Accessibility Focus ---------- */
a:focus-visible, button:focus-visible, .dot:focus-visible {
  outline: 3px solid var(--primary-300);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .section-hero { text-align: center; padding: 120px 0 70px; }
  .profile-photo { margin-top: 10px; }
}

/* ---------- Project Tags ---------- */
.project-tags {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  display: inline-block;
  background: linear-gradient(90deg, var(--primary-900), var(--primary-600));
  color: #fff;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.tag:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
  opacity: 0.9;
}

/* ---------- Side Nav Dots ---------- */
.side-nav {
  position: fixed; top: 50%; right: 18px; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px; z-index: 1030;
}
.side-nav .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--muted); display: block; transition: transform .25s, background .25s;
  outline: 2px solid transparent;
}
.side-nav .dot:hover { transform: scale(1.2); background: var(--primary-300); }
.side-nav .dot.active { transform: scale(1.45); background: var(--primary-600); }
@media (max-width: 992px) { .side-nav { display: none; } }

/* Top scroll progress bar */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--primary-900), var(--primary-600));
  z-index: 1100;
}
/* Profile photo container */
.profile-photo {
  max-width: 350px;  /* keeps it responsive */
  border-radius: 20px; /* rounded rectangle */
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Image inside */
.profile-photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px; /* same as container */
  object-fit: cover;
}

/* Mobile: make it smaller */
@media (max-width: 768px) {
  .profile-photo {
    max-width: 200px;
    margin: 0 auto; /* center on small screens */
  }
}
