/* =====================================================
   ROOT VARIABLES (Color Theme)
   Define reusable color variables for the entire site
===================================================== */
:root {
    --background-color: #0A192F;
    --main-text-color: #CCD6F6;
    --secondary-text-color: #8892B0;
    --accent-color: #64FFDA;
}
body.light-mode {
  --background-color: #f8fbff;
  --main-text-color: #10213a;
  --secondary-text-color: #4f5f79;
  --accent-color: #0ea5a4;
}

/* =====================================================
   GLOBAL STYLES
===================================================== */
/* Basic page setup */
body {
    margin: 0;
    font-family: 'poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--main-text-color);
}

/* Keep content below fixed header */
main {
  padding-top: 100px;
}

/* ---------- Global helpers ---------- */
* { box-sizing: border-box; }
html {scroll-behavior: smooth;}

/* =====================================================
   Theme toggle button
===================================================== */

.theme-toggle {
  margin-left: 1rem;
  background: transparent;
  border: none; /* ✅ removed border */
  color: var(--accent-color);
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background-color: rgba(100, 255, 218, 0.1);
} 

/* =====================================================
   HEADER & NAVBAR (DESKTOP)
===================================================== */
header {
  position: fixed;
  width: 100%;
  top: 0;
  background-color: var(--background-color);
  z-index: 1000;
  /*make the shadow smother*/
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

header.scrolled {
  background-color: rgba(10, 25, 47, 0.9);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/*navbar styles*/
.navbar {
    display: flex;
    align-items: center;
    padding: 1.5rem 4rem;
    height: 80px;
}
/*number before the nav item*/
.nav-number {
  color: var(--accent-color);
  font-size: 0.85rem;
  margin-right: 4px;
}

/*logo place and size*/
.logo img {
  height: 80px;
  width: auto;
  display: block;
}
/*nav items*/
.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
    /*let the nav links be on the right side of the navbar*/
    margin-left: auto;
    margin-right: 2rem;
}

/* Individual nav link styling */
.nav-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--secondary-text-color);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

/* Active section highlight */
.nav-links a.active {
  color: var(--accent-color);
}

/* Hover effect */
.nav-links a:hover {
    color: var(--accent-color);
}

/* Resume button styling */
.resume-btn {
    text-decoration: none;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.resume-btn:hover {
    background-color: rgba(100, 255, 218, 0.1);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  font-size: 1.1rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.25rem 1.25rem;
  background-color: rgba(10, 25, 47, 0.98);
  border-top: 1px solid rgba(136, 146, 176, 0.15);
}

.mobile-menu a {
  text-decoration: none;
  color: var(--secondary-text-color);
  font-size: 0.95rem;
}

.mobile-menu a:hover {
  color: var(--accent-color);
}

.mobile-menu.show {
  display: flex;
}

/* =====================================================
   CONTAINER & SECTION UTILITIES
===================================================== */
.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* General section spacing */
.section{
  padding: 75px 0;
}

.section-title{
  font-size: 1.6rem;
  margin: 0 0 1.25rem;
  color: var(--main-text-color);
}

.section-number{
  color: var(--accent-color);
  margin-right: 10px;
}

/* =====================================================
   HERO SECTION
===================================================== */
.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: flex-start;
  padding-top: 120px;
}

.hero-intro{
  color: var(--accent-color);
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.hero-title{
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
  color: var(--main-text-color);
}

.hero-subtitle{
  margin: 0.75rem 0 1rem;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  color: var(--secondary-text-color);
  font-weight: 600;
}

.hero-text{
  max-width: 60ch;
  color: var(--secondary-text-color);
  line-height: 1.8;
  margin-top: 1rem;
}

.hero-guide, .contact-guide {
  color: var(--secondary-text-color);
  line-height: 1.7;
  margin-top: 0.75rem;
  max-width: 60ch;
}

/* ---------- Buttons / Links ---------- */
.hero-actions{
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}


/* =====================================================
   BUTTONS & LINKS
===================================================== */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.1rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.25s ease;
}

.btn.primary{
  color: #0A192F;
  background: var(--accent-color);
  border: 1px solid var(--accent-color);
}

.btn.primary:hover{
  transform: translateY(-2px);
}

.btn.ghost{
  color: var(--accent-color);
  background: transparent;
  border: 1px solid var(--accent-color);
}

.btn.ghost:hover{
  background-color: rgba(100, 255, 218, 0.1);
}

.link{
  color: var(--accent-color);
  text-decoration: none;
}

.link:hover{
  text-decoration: underline;
}

/* ---------- About bullets ---------- */
.bullets{
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  color: var(--secondary-text-color);
}

.bullets li{
  margin: 0.4rem 0;
}

/* =====================================================
   PROJECTS SECTION
===================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
  align-items: start;
}

.no-projects {
  margin-top: 1rem;
  color: var(--secondary-text-color);
  font-size: 0.9rem;
}

.project-details {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(100, 255, 218, 0.15);
}

.project-details.open {
  display: block;
}

.details-toggle {
  margin-top: 0.75rem;
}

.project-details .tags {
  margin-top: 0.8rem;
  margin-bottom: 1rem;
}

.project-details .card-actions {
  margin-top: 1rem;
}

.placeholder-image {
  font-weight: 600;
}

.disabled-link {
  opacity: 0.7;
  cursor: default;
  text-decoration: none;
}

.card{
  background: rgba(17, 34, 64, 0.7);
  border: 1px solid rgba(136, 146, 176, 0.15);
  border-radius: 12px;
  padding: 1.25rem;
  transition: transform 0.3s ease, border-color 0.25s ease, opacity 0.3s ease;
  opacity: 1;
  align-self: start;
  height: fit-content;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(100, 255, 218, 0.35);
}

.card.hide {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

/* Image container */
.card-image{
  height: 180px;
  border-radius: 10px;
  background: rgba(100, 255, 218, 0.08);
  border: 1px dashed rgba(100, 255, 218, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-text-color);
  margin-bottom: 1rem;
  overflow: hidden;
}

.project-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  transition: transform 0.4s ease;
}

.card:hover .project-preview-image {
  transform: scale(1.05);
}

.placeholder-text {
  font-weight: 600;
  color: var(--secondary-text-color);
}

/* Image scaling effect */
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.4s ease;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-title{
  margin: 0.25rem 0 0.5rem;
  color: var(--main-text-color);
}

.card-text{
  margin: 0 0 1rem;
  color: var(--secondary-text-color);
  line-height: 1.6;
}


body.light-mode header {
  background-color: var(--background-color);
}

body.light-mode header.scrolled {
  background-color: rgba(248, 251, 255, 0.9);
  box-shadow: 0 8px 24px rgba(16, 33, 58, 0.08);
}

body.light-mode .card,
body.light-mode .skill,
body.light-mode .contact-form input,
body.light-mode .contact-form textarea,
body.light-mode .mobile-menu {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(79, 95, 121, 0.2);
}

body.light-mode .card-image {
  background: rgba(14, 165, 164, 0.08);
  border-color: rgba(14, 165, 164, 0.35);
}

.tags{
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag{
  font-size: 0.8rem;
  color: var(--accent-color);
  border: 1px solid rgba(100, 255, 218, 0.35);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.card-actions{
  display: flex;
  gap: 1rem;
}

/* Card filter */
.project-filter {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--accent-color);
  background-color: var(--background-color);
  color: var(--main-text-color);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}

.project-filter option {
  background-color: #0A192F;
  color: #CCD6F6;
}

.project-filter:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(100, 255, 218, 0.2);
}

.filter-label {
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  color: var(--secondary-text-color);
}

.filter-hint {
  margin-top: 0.3rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--secondary-text-color);
  opacity: 0.8;
}

body.light-mode .project-filter {
  background-color: #ffffff;
  color: var(--main-text-color);
}

.github-card .card-image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  border-radius: 12px;
  background: rgba(100, 255, 218, 0.08);
  color: var(--accent-color);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.github-card .tag {
  margin-bottom: 0.4rem;
}

/* =====================================================
   SKILLS SECTION
===================================================== */
.skills-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.skill{
  background: rgba(17, 34, 64, 0.7);
  border: 1px solid rgba(136, 146, 176, 0.15);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: var(--main-text-color);
}

/* =====================================================
   CONTACT SECTION
===================================================== */
.contact-form{
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
  max-width: 650px;
}

.contact-form label{
  display: grid;
  gap: 0.4rem;
  color: var(--main-text-color);
  font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea{
  background: rgba(17, 34, 64, 0.7);
  border: 1px solid rgba(136, 146, 176, 0.2);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  color: var(--main-text-color);
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus{
  border-color: rgba(100, 255, 218, 0.6);
}

.form-status {
  margin-top: 1rem;
  min-height: 1.4rem;
  font-size: 0.95rem;
}

.form-status.sending {
  color: #8892b0;
}

.form-status.success {
  color: var(--accent-color);
}

.form-status.error {
  color: #ff6b6b;
}

button:disabled,
.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.input-error {
  border-color: #ff6b6b !important;
}
  
/* =====================================================
   FOOTER
===================================================== */
.footer{
  padding: 40px 0;
  border-top: 1px solid rgba(136, 146, 176, 0.15);
  color: var(--secondary-text-color);
}
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* LinkedIn link layout */
.social-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--secondary-text-color);
  transition: transform 0.3s ease, color 0.3s ease;
}

/* Icon size */
.social-icon img {
  width: 22px;
  height: 22px;
}

/* Username text */
.linkedin-name {
  font-size: 0.9rem;
}

/* Hover effect (no color change) */
.social-icon:hover {
  transform: translateY(-2px);
  color: var(--main-text-color);
}

/* Make it match dark theme */
.social-icon img {
  filter: brightness(0.8);
}

.social-icon:hover img {
  transform: translateY(-3px);
  filter: brightness(1) saturate(1.3);
}

/* =====================================================
   RESPONSIVE DESIGN
===================================================== */
@media (max-width: 900px) {
  .navbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 72px;
    padding: 0 1rem;
  }

  .nav-links,
  .resume-btn {
    display: none;
  }

  .theme-toggle {
    position: absolute;
    left: 1rem;
  }

  .menu-toggle {
    display: inline-flex;
    position: absolute;
    right: 1rem;
    align-items: center;
    justify-content: center;
  }

  .logo {
    margin: 0 auto;
  }

  .logo img {
    height: 54px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

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

  main {
    padding-top: 72px;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .mobile-menu a.active {
    color: var(--accent-color);
  }
}

@media (max-width: 600px) {
  .projects-grid {
    grid-template-columns: 1fr !important;
  }

  .card-image {
    height: 160px;
  }
}