:root {
  --bg-dark: #F9FAFB; /* light background */
  --bg-card: #FFFFFF;
  --text-light: #111827; /* main text */
  --text-secondary: #6B7280;
  --accent-color: #3B82F6;
  --accent-hover: #2563EB;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Franklin Gothic Medium', sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
}

/* Left Sidebar */
.left-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 520px;
  height: 100%;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 30px;
  gap: 20px;
  box-shadow: 4px 0 20px rgba(0,0,0,0.05);
}

.profile-pic img {
  border-radius: 50%;
  width: 120px;
  height: 120px;
}

.profile-name {
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  margin-top: 0px;
}

.social-links {
  display: flex;
  gap: 45px;
  margin-top: 90px;
}

.social-links a {
  color: var(--text-secondary);
  font-size: 2rem;
  transition: var(--transition);
}

.social-links a:hover {
  color: var(--accent-color);
  transform: translateY(-5px) scale(1.1);
  text-shadow: 0 0 8px rgba(59,130,246,0.5);
}

/* Contact Box */
.contact-box {
  margin-top: auto;
  background: #F3F4F6;
  width: 100%;
  padding: 25px;
  margin-bottom: 90px;
  padding-bottom: 40px;
  border-radius: 15px;
  text-align: center;
  font-size: 1rem;
  color: var(--text-secondary);
}

.contact-box p { margin: 12px 0; }

/* Top Navigation */
.top-nav {
  position: fixed;
  left: 520px;
  top: 0;
  display: flex;
  justify-content: center;
  padding: 25px 0;
  gap: 20px;
  width: calc(100% - 520px);
  background: var(--bg-dark);
  z-index: 100;
  border-bottom: 1px solid #E5E7EB;
}

.nav-btn {
  padding: 18px 25px;
  border: none;
  border-radius: 12px;
  background: #E5E7EB;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.nav-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
  transition: all 0.5s ease;
  z-index: 0;
  border-radius: 12px;
}

.nav-btn:hover::before,
.nav-btn.active::before { left: 0; }

.nav-btn span, .nav-btn i {
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

.nav-btn:hover span, .nav-btn.active span,
.nav-btn:hover i, .nav-btn.active i { color: #fff; }

/* Main Content */
main {
  margin-left: 520px;
  padding: 110px 40px 40px 40px;
  width: calc(100% - 520px);
  display: flex;
  justify-content: center;
}

.section {
  padding-top: 200px;
  display: none;
  width: 100%;
  height: 100%;
  max-width: 1000px;
}

.section.active { display: block; }

.content-box {
  background: var(--bg-card);
  padding: 40px;
  border-radius: 15px;
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 35px;
  font-size: 1.1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.scrollable { max-height: 800vh; overflow-y: auto; }

.content-box h1 { font-size: 2.5rem; color: var(--text-light); }

/* Traits */
.traits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.trait-box {
  background: #F3F4F6;
  padding: 20px;
  border-radius: 12px;
  border-left: 5px solid var(--accent-color);
  transition: transform 0.3s ease, background 0.5s ease, box-shadow 0.3s ease;
  color: var(--text-secondary);
}

.trait-box:hover {
  transform: translateY(-8px);
  background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  color: #fff;
}

.trait-box h3, .trait-box p { transition: color 0.3s ease; }
.trait-box:hover h3, .trait-box:hover p { color: #fff; }

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.project-card {
  position: relative;
  overflow: hidden;
  background: #FFFFFF;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 400px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.project-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  transition: transform 0.3s ease;
}

.project-card h3 {
  margin: 12px 0 8px;
  color: var(--text-light);
}

.project-card a {
  position: relative;
  z-index: 2;
  color: var(--accent-color);
  display: block;
  margin-top: 12px;
  font-size: 1.1rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.project-card a:hover { color: var(--accent-hover); }

/* Overlay */
.project-card .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(59,130,246,0.85);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 25px;
  opacity: 0;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.5;
  border-radius: 12px;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.project-card:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 12px 30px rgba(37,99,235,0.3);
}

.project-card:hover img { transform: scale(1.1); }
.project-card:hover .overlay { opacity: 1; }

/* Resume */
.resume-box {
  background: #F3F4F6;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  transition: transform 0.3s ease, background 0.5s ease, box-shadow 0.3s ease;
  color: var(--text-secondary);
}

.resume-box:hover {
  transform: translateY(-8px);
  background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
  box-shadow: 0 10px 25px rgba(37,99,235,0.2);
  color: #fff;
}

.skill {
  background: #fff;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.skill:hover {
  background: #3B82F6;
  color: white;
  transform: translateY(-5px);
}
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.contact-boxes{
  display: none;
}

/* Typed Effect */
#typed-text::after {
  content: '|';
  animation: blink 0.7s infinite;
}


@keyframes blink {
  0%,50%,100% {opacity:1;}
  25%,75%{opacity:0;}
}

/* Responsive */
@media (max-width: 1024px) {
  .left-sidebar { width: 400px; }
  .top-nav { left: 220px; width: calc(100% - 220px); }
  main { margin-left: 220px; width: calc(100% - 220px); padding: 100px 25px 25px; }
}

@media (max-width: 768px) {
  .left-sidebar { display: none; }
  .top-nav { left: 0; width: 100%; flex-wrap: wrap; }
  main { margin-left: 0; width: 100%; padding: 130px 20px 20px; }
  .project-card { min-height: 350px; }
  .project-card img { height: 200px; }
}
/* Responsive: Show all sections stacked on smaller screens */
/* Responsive */
@media (max-width: 1024px) {
  .left-sidebar { width: 220px; }
  .top-nav { left: 220px; width: calc(100% - 220px); }
  main { margin-left: 220px; width: calc(100% - 220px); padding: 100px 25px 25px; }
}

@media (max-width: 768px) {
  /* Sidebar stays visible */
  .left-sidebar {
    position: relative;
    width: 100%;
    height: auto;
    flex-direction: row;
    justify-content: space-between;
    padding: 20px;
    box-shadow: none;
  }

  .profile-pic img {
    width: 60px;
    height: 60px;
  }

  .profile-name {
    font-size: 1.4rem;
  }

  .social-links {
    gap: 15px;
    margin: 0;
  }

 .contact-boxes {
  display: block;
  margin-top: auto;
  background: #F3F4F6;
  width: 100%;
  padding: 25px;
  margin-bottom: 90px;
  padding-bottom: 40px;
  border-radius: 15px;
  text-align: center;
  font-size: 1rem;
  color: var(--text-secondary);
}
  /* Navigation becomes fixed on top */
  .top-nav {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    flex-wrap: nowrap;
    justify-content: space-around;
    background: var(--bg-card);
    border-bottom: 1px solid #E5E7EB;
    padding: 15px 0;
    z-index: 100;
  }

  .nav-btn {
    font-size: 1rem;
    padding: 10px;
    gap: 5px;
  }

  /* Stack all sections vertically */
  main {
    margin-left: 0;
    width: 100%;
    padding: 40px 15px;
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  .section {
    display: block !important;
    width: 100%;
    padding-top: 20px;
  }

  .content-box {
    width: 100%;
    padding: 25px;
    font-size: 1rem;
  }

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

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

  .project-card {
    min-height: 350px;
  }

  .skills-list {
    flex-direction: column;
  }
}
/* Contact box text wrapping fix */
.contact-box p {
  margin: 12px 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-all;
  font-size: 0.95rem; /* slightly smaller for tablets */
}

/* Tablet view (max-width: 1024px) */
@media (max-width: 1024px) {
  .contact-box {
    font-size: 0.9rem;
    padding: 20px;
  }

  .contact-box p {
    font-size: 0.9rem;
  }
}

/* Mobile view (max-width: 768px) */
@media (max-width: 768px) {
  .contact-box {
    font-size: 0.85rem;
    padding: 18px;
  }

  .contact-box p {
    text-align: center;
    font-size: 0.85rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
  }
}
