/* =========================================
   CSS VARIABLES - SLEEK LIGHT THEME
   ========================================= */
:root {
  /* Colors */
  --bg-main: #FAFAFA;
  --bg-card: #FFFFFF;
  --bg-alt: #F3F4F6; /* Light gray for alternate sections */
  
  --text-primary: #111827; /* Dark Slate */
  --text-secondary: #4B5563; /* Medium Slate */
  --text-muted: #9CA3AF;
  
  --primary-color: #2563EB; /* Premium Blue */
  --primary-hover: #1D4ED8;
  
  --border-color: #E5E7EB;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Typography */
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Layout */
  --max-width: 1200px;
  --nav-height: 80px;
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   RESET & GLOBAL STYLES
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-secondary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  line-height: 1.2;
  font-weight: 600;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section {
  padding: 6rem 0;
}

.bg-light {
  background-color: var(--bg-alt);
}

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

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.underline {
  height: 4px;
  width: 60px;
  background-color: var(--primary-color);
  margin: 0 auto;
  border-radius: 2px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
  color: white;
}

.btn-secondary {
  background-color: white;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-alt);
  color: var(--text-primary);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
}

.btn-disabled {
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  cursor: default;
  opacity: 0.75;
}

.btn-disabled:hover {
  background-color: transparent;
  color: var(--text-muted);
  transform: none;
  box-shadow: none;
}

.w-100 {
  width: 100%;
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
.glass-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
  z-index: 1000;
  transition: var(--transition);
}

.glass-nav.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-container {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.nav-profile-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-list {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--primary-color);
}

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

/* Mobile Toggle Button */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

.mobile-toggle .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--text-primary);
  transition: var(--transition);
  border-radius: 2px;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
}

.hero-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-text {
  max-width: 800px;
}

.greeting {
  font-size: 1.25rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.home-name {
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.home-title {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 2.5rem;
  line-height: 1.3;
}

.hero-cta {
  display: flex;
  gap: 1rem;
}

/* =========================================
   ABOUT SECTION
   ========================================= */
.about-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: center;
}

.about-image-wrapper {
  position: relative;
}

.about-image-wrapper::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  width: 100%;
  height: 100%;
  border: 3px solid var(--primary-color);
  border-radius: var(--border-radius);
  z-index: -1;
  transition: var(--transition);
}

.about-photo {
  width: 100%;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  aspect-ratio: 1/1;
}

.about-image-wrapper:hover::after {
  top: 10px;
  left: 10px;
}

.about-text p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.highlight {
  font-weight: 500;
  color: var(--primary-color);
  background: rgba(37, 99, 235, 0.05);
  padding: 1rem;
  border-left: 4px solid var(--primary-color);
  border-radius: 0 8px 8px 0;
}

/* =========================================
   SKILLS SECTION
   ========================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-category {
  padding: 2rem;
}

.skill-category h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.skill-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.skill-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-primary);
  text-align: center;
}

.skill-list img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
  transition: var(--transition);
}

.skill-list li:hover img {
  transform: scale(1.1);
}

/* =========================================
   PROJECTS SECTION
   ========================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.project-image {
  height: 240px;
  background-size: cover;
  background-position: top center;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

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

.project-info {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background: white; /* Important to hide scaled image behind it */
  position: relative;
  z-index: 1;
}

.project-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.tech-stack {
  font-size: 0.85rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.project-desc {
  margin-bottom: 2rem;
  flex-grow: 1;
}

.project-info .btn {
  align-self: flex-start;
}

/* =========================================
   CERTIFICATES SECTION
   ========================================= */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.certificate-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cert-img-wrapper {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  background-color: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.certificate-card:hover .cert-img-wrapper img {
  transform: scale(1.05);
}

.certificate-card h4 {
  font-size: 1.1rem;
  margin: 0;
}

/* =========================================
   DEVELOPER NOTES
   ========================================= */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.note-card {
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.note-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--primary-color);
}

.note-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.note-card h3 {
  margin-bottom: 0.75rem;
}

/* =========================================
   FORMS (Contact & Account)
   ========================================= */
.single-form-container {
  max-width: 600px;
  margin: 0 auto;
}

.form-wrapper {
  padding: 3rem;
}

.form-header {
  margin-bottom: 2rem;
}

.form-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.contact-info-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.info-badge {
  background: var(--bg-alt);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  display: inline-block;
}

/* Modern Floating Label Inputs */
.custom-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.input-group {
  position: relative;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-main);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
}

.input-group textarea {
  resize: vertical;
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background-color: white;
}

.input-group label {
  position: absolute;
  left: 1rem;
  top: 1rem;
  color: var(--text-muted);
  transition: var(--transition);
  pointer-events: none;
  background-color: transparent;
  padding: 0 0.25rem;
}

/* The magic for floating labels */
.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:not(:placeholder-shown) ~ label {
  top: -0.65rem;
  left: 0.8rem;
  font-size: 0.8rem;
  color: var(--primary-color);
  background-color: white;
  font-weight: 500;
}



/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background-color: white;
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-socials {
  display: flex;
  gap: 1.5rem;
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: var(--bg-alt);
  transition: var(--transition);
}

.footer-socials img {
  width: 20px;
  height: 20px;
  opacity: 0.7;
  transition: var(--transition);
}

.footer-socials a:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

.footer-socials a:hover img {
  opacity: 1;
  filter: brightness(0) invert(1);
}

.footer-info {
  text-align: center;
  color: var(--text-secondary);
}

.designer {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* =========================================
   ANIMATIONS (JS Revealed)
   ========================================= */
.reveal, .reveal-stagger .card {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active, .reveal-stagger.active .card {
  opacity: 1;
  transform: translateY(0);
}

/* Add stagger delay for cards */
.reveal-stagger.active .card:nth-child(1) { transition-delay: 0.1s; }
.reveal-stagger.active .card:nth-child(2) { transition-delay: 0.2s; }
.reveal-stagger.active .card:nth-child(3) { transition-delay: 0.3s; }
.reveal-stagger.active .card:nth-child(4) { transition-delay: 0.4s; }


/* =========================================
   RESPONSIVE QUERIES
   ========================================= */
@media (max-width: 992px) {
  .about-content {
    grid-template-columns: 1fr;
  }
  .about-image-wrapper {
    max-width: 400px;
    margin: 0 auto;
  }

}

@media (max-width: 768px) {
  .section {
    padding: 4rem 0;
  }
  
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-cta .btn {
    width: 100%;
  }

  /* Hamburger Menu Logic */
  .mobile-toggle {
    display: block;
  }
  
  .mobile-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .mobile-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  .mobile-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--nav-height));
    background-color: white;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 2rem;
    transition: 0.4s;
    box-shadow: var(--shadow-md);
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-list {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
    width: 100%;
  }
  
  .nav-link {
    font-size: 1.25rem;
    display: block;
    padding: 0.5rem;
  }
  
  .form-wrapper {
    padding: 2rem 1.5rem;
  }
}