/* Reset & Variables */
:root {
  /* Colors */
  --bg-primary: #0a0f1e;
  --bg-secondary: #111827;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

  /* Typography */
  --font-body: 'Poppins', sans-serif;
  --font-heading: 'Space Grotesk', 'Product Sans Black', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; /* Offset for fixed navbar */
}

/* Reusable Timeline Styles */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background: var(--glass-border);
  top: 0;
  bottom: 0;
  left: 30px;
  margin-left: -1px;
}

.timeline-item {
  padding: 10px 40px 40px 80px;
  position: relative;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  right: -8px;
  background: var(--bg-primary);
  border: 4px solid var(--accent-cyan);
  top: 15px;
  left: 22px;
  border-radius: 50%;
  z-index: 1;
}

.timeline-content {
  padding: 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease;
}

.timeline-content:hover {
  transform: translateX(10px);
  border-color: rgba(6, 182, 212, 0.3);
}

.timeline-title {
  color: var(--text-primary);
  font-size: 1.3rem;
  margin-bottom: 5px;
  font-weight: 600;
}

.timeline-subtitle {
  color: var(--accent-blue);
  font-size: 1rem;
  margin-bottom: 15px;
  font-weight: 500;
}

.timeline-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.timeline-links {
  display: flex;
  gap: 12px;
}

.timeline-links a {
  font-size: 0.9rem;
  color: var(--accent-cyan);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.timeline-links a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .timeline::after {
    left: 20px;
  }
  .timeline-item {
    padding-left: 50px;
  }
  .timeline-item::after {
    left: 12px;
  }
}


/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  border-radius: 0 0 16px 16px;
  background: transparent;
  transition: all 0.4s ease;
}

.navbar.scrolled {
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  padding: 15px 40px;
}

.nav-logo {
  font-size: 1.6rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1.5px;
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
}

.hamburger {
  display: none;
}

/* Base Sections */
.about-section {
  padding: 60px 20px;
  display: flex;
  justify-content: center;
}

.about {
  width: 100%;
  max-width: 1000px;
  padding: 40px;
}

.about h2, .accordion-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: var(--text-primary);
  font-family: var(--font-heading);
}

.bio-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px;
}

.timeline-content p, .cert-card p, .project-card p {
  text-align: left !important;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: 1px solid var(--accent-blue);
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn:hover {
  background: var(--accent-blue);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Accordions / Cards (To be refactored further) */
.accordion {
  margin-bottom: 20px;
  padding: 0;
  overflow: hidden;
}

.accordion-header {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.2rem;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  transition: background-color 0.3s ease;
  color: var(--text-primary);
}

.accordion-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.3s ease, opacity 0.3s ease;
  padding: 0 20px;
  opacity: 0;
  color: var(--text-secondary);
}

.accordion.expanded .accordion-content {
  max-height: 500px;
  opacity: 1;
  padding: 20px;
  border-top: 1px solid var(--glass-border);
}

.accordion-content p {
  text-align: left;
  margin-bottom: 10px;
  font-size: 1rem;
}

.accordion-content a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 500;
}

.accordion-content a:hover {
  text-decoration: underline;
}

.accordion-list {
  list-style: none;
}

.accordion-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

ul.accordion-list strong {
    color: var(--text-primary);
}

/* Skills Section */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.skill-category {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 24px;
  flex: 1 1 300px;
  box-shadow: var(--card-shadow);
}

.skill-category h3 {
  color: var(--accent-blue);
  margin-bottom: 20px;
  font-size: 1.2rem;
  text-align: center;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 10px;
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.chip:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
  transform: translateY(-2px);
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  padding: 20px 0;
}

.project-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(6, 182, 212, 0.3);
}

.project-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #1a2333;
  border-bottom: 1px solid var(--glass-border);
}

.project-content {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  color: var(--text-primary);
  font-size: 1.25rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tech-tag {
  font-size: 0.8rem;
  padding: 4px 10px;
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-cyan);
  border-radius: 4px;
}

.project-links {
  display: flex;
  gap: 15px;
  margin-top: auto;
}

.project-link {
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s;
}

.project-link:hover {
  color: var(--accent-cyan);
}

/* Certifications Section */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.cert-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.cert-card:hover {
  transform: translateY(-5px);
  border-color: rgba(59, 130, 246, 0.3);
}

.cert-title {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.cert-issuer {
  color: var(--accent-cyan);
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.cert-date {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 15px;
}

.cert-link {
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: auto;
}

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

/* Hero Section Specifics */
.hero {
  display: flex;
  min-height: 100vh;
  align-items: center;
  padding: 80px 5% 0; /* Added top padding for navbar offset */
}

.hero-left, .hero-right {
  flex: 1; /* Stops jitter when text changes width */
}

.hero-left {
  display: flex;
  justify-content: flex-end; /* Push image to the right edge of its 50% half */
  padding-right: 40px;
}

.hero-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-left: 40px;
  text-align: left;
}

.hero-right h1 {
  font-size: 5rem;
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 10px;
  background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-right h3 {
  font-size: 1.5rem;
  color: var(--accent-cyan);
  margin-bottom: 10px;
  font-weight: 500;
}

.maker-line {
  font-size: 2rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rotator-wrapper {
  display: inline-flex;
  align-items: center;
  height: 1.2em;
  overflow: hidden;
  position: relative;
}

#rotating-word {
  display: inline-block;
  position: relative;
  transition: transform 0.6s ease;
  color: var(--accent-blue);
  font-weight: 600;
}

.scroll-btn {
  text-decoration: none;
  font-size: 1rem;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color 0.3s;
}

.scroll-btn:hover {
  color: var(--text-primary);
}

.hero-img-wrapper {
  position: relative;
  display: inline-block;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  overflow: hidden;
  margin: 0 auto;
  max-width: 400px; /* Constrain the wrapper */
}

.hero-img-wrapper::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #1e3a8a; /* Deep, dark blue */
  mix-blend-mode: multiply;
  opacity: 0.6;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.hero-img-wrapper:hover::after {
  opacity: 0;
}

.hero-img {
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  filter: grayscale(100%);
  display: block;
  transition: filter 0.5s ease;
}

.hero-img-wrapper:hover .hero-img {
  filter: grayscale(0%);
}

.hero-socials {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.social-icon {
  font-size: 1.8rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.social-icon:hover {
  color: var(--accent-cyan);
  transform: translateY(-3px);
}

/* Contact Section Redesign */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--card-shadow);
}

.contact-info-panel h3 {
  font-size: 2rem;
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin-bottom: 20px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.05rem;
  transition: color 0.3s;
}

.contact-item i {
  color: var(--accent-cyan);
  font-size: 1.5rem;
  width: 30px;
  text-align: center;
}

.contact-item:hover {
  color: var(--accent-blue);
}

.contact-form-panel {
  display: flex;
  flex-direction: column;
}

.contact-form .input-group {
  margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: var(--font-body);
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
  background: rgba(0, 0, 0, 0.5);
}

.contact-form textarea {
  min-height: 180px;
  resize: vertical;
}

.submit-btn {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
}

#status {
  margin-top: 20px;
  text-align: center;
  color: var(--accent-cyan);
}

/* Footer */
.footer {
  text-align: center;
  padding: 30px;
  color: var(--text-secondary);
  border-top: 1px solid var(--glass-border);
  margin-top: 50px;
}

/* Mobile Responsive */
@media (max-width: 900px) {
  .hero {
    flex-direction: column-reverse;
    justify-content: center;
    text-align: center;
    padding-top: 100px;
    padding-bottom: 40px;
  }
  
  .hero-right {
    text-align: center;
    padding: 20px;
    align-items: center;
  }
  
  .hero-left {
    padding-right: 0;
    margin-top: 20px;
    justify-content: center;
  }

  .hero-right h1 {
    font-size: 3.5rem;
  }
  
  .maker-line {
    font-size: 1.5rem;
    justify-content: center;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-primary);
    z-index: 1001;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    position: absolute;
    top: 70px;
    right: 20px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    min-width: 200px;
  }

  .nav-links.active {
    display: flex;
  }
  
  .contact-info-panel h3 {
    text-align: center;
  }
  
  .contact-details {
    align-items: center;
  }

  .contact-item {
    word-break: break-word;
    text-align: center;
  }

  .about-section {
    padding: 80px 15px 30px;
  }
  
  .about {
    padding: 15px;
  }
  
  .about h2, .accordion-title {
    font-size: 2.2rem;
    margin-bottom: 30px;
  }
  
  .stats-row {
    gap: 20px !important;
    padding: 25px 15px !important;
  }
  
  .stat-item h2 {
    font-size: 2rem !important;
  }
  
  .projects-grid, .cert-grid, .leadership-grid {
    grid-template-columns: 1fr !important;
  }
  
  .skill-category {
    flex: 1 1 100%;
  }
  
  .hero-img {
    max-width: 300px;
  }
  .hero-img-wrapper {
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .nav-logo {
    font-size: 1.3rem;
  }
  
  .hero-right h1 {
    font-size: 2.8rem;
  }
  
  .hero-right h3 {
    font-size: 1.2rem;
  }
  
  .maker-line {
    font-size: 1.2rem;
  }
  
  .hero-description {
    font-size: 1rem !important;
  }
  
  .about h2, .accordion-title {
    font-size: 1.8rem;
  }
  
  .timeline-item {
    padding-left: 30px;
    padding-right: 0;
  }

  .timeline::after {
    left: 8px;
  }

  .timeline-item::after {
    left: 0;
    width: 14px;
    height: 14px;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .stat-item h2 {
    font-size: 1.8rem !important;
  }
  
  .contact-container {
    padding: 30px 20px;
  }
  
  .contact-info-panel h3 {
    font-size: 1.6rem;
  }
  
  .timeline-title {
    font-size: 1.15rem;
  }
  
  .project-title, .cert-title {
    font-size: 1.1rem;
  }
}