/* --------------------------
   Base Styles
--------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Light & Dark Theme Colors */
:root {
  --bg-color: #ffffff;
  --text-color: #333;
  --nav-bg: #f8f8f8;
  --accent-color: #6a0dad;
  --light-accent: rgba(106, 13, 173, 0.1);
  --card-bg: #f9f9f9;
  --border-color: #eaeaea;
}

body.dark {
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --nav-bg: #1e1e1e;
  --card-bg: #1f1f1f;
  --border-color: #333;
}

/* --------------------------
   Main Content Area
--------------------------- */
.main-content {
  flex: 1;
  padding-bottom: 120px; /* Space for footer */
}

/* --------------------------
   Navigation Bar
--------------------------- */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--nav-bg);
  padding: 1.2rem 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

nav h1 a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

nav ul a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
  padding: 0.5rem 0;
}

nav ul a.active,
nav ul a:hover {
  color: var(--accent-color);
}

nav ul a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-color);
}

#mode-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.3rem;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

#mode-toggle:hover {
  background: var(--light-accent);
}

/* --------------------------
   About Section
--------------------------- */
.about {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 3rem;
  padding: 4rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.about-left {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  flex: 1;
  min-width: 280px;
  max-width: 350px;
}

.profile-img {
  width: 100%;
  max-width: 255px;
  height: 330px;
  border-radius: 12px;
  object-fit: cover;
  margin-bottom: 0;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  border: 1px solid var(--border-color);
}

.role {
  margin-top: 1rem;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--accent-color);
  background: var(--light-accent);
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  display: inline-block;
}

.about-right {
  flex: 2;
  min-width: 300px;
  padding: 1rem 0;
}

.about h2 {
  margin-bottom: 1.5rem;
  color: var(--accent-color);
  font-size: 2rem;
  font-weight: 600;
}

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

/* --------------------------
   Skills Section
--------------------------- */
.skills {
  margin-top: 1.5rem;
}

.skills h3 {
  margin-bottom: 1rem;
  font-weight: 500;
  color: var(--text-color);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.skill-tag {
  background: var(--light-accent);
  color: var(--accent-color);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* --------------------------
   Projects Section
--------------------------- */
.projects {
  padding: 3rem 2rem;
  max-width: 1100px;
  margin: auto;
}

.projects h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--accent-color);
  font-size: 2rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.8rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid var(--border-color);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.project-card h3 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.project-card p {
  margin-bottom: 1.2rem;
  color: var(--text-color);
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-link {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: var(--light-accent);
  transition: background 0.3s;
}

.project-link:hover {
  background: rgba(106, 13, 173, 0.2);
}

/* --------------------------
   CV Section
--------------------------- */
.cv {
  padding: 3rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.cv h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--accent-color);
  font-size: 2rem;
}

.cv-content {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
}

.cv-left, .cv-right {
  flex: 1;
  min-width: 300px;
}

.cv-section {
  margin-bottom: 2.5rem;
}

.cv-section h3 {
  color: var(--accent-color);
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--light-accent);
}

.cv-item {
  margin-bottom: 1.5rem;
}

.cv-item h4 {
  color: var(--text-color);
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.cv-item .date {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

body.dark .cv-item .date {
  color: #aaa;
}

.cv-download {
  text-align: center;
  margin-top: 2rem;
}

.cv-btn {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  padding: 0.9rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s, transform 0.2s;
}

.cv-btn:hover {
  background: #540c9e;
  transform: translateY(-2px);
}

/* --------------------------
   CV Page Specific Styles
--------------------------- */
.coursework {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.cv-item ul {
  margin-top: 0.5rem;
  padding-left: 1.2rem;
}

.cv-item li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.cv-item h4 {
  margin-top: 1rem;
  margin-bottom: 0.3rem;
  color: var(--accent-color);
  font-size: 1rem;
}

.cv-item h4:first-child {
  margin-top: 0;
}

/* --------------------------
   CV Page Single Column Styles
--------------------------- */
.cv-single-column {
  max-width: 900px;
  margin: 0 auto;
}

.cv-section {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.cv-section:last-of-type {
  border-bottom: none;
  margin-bottom: 2rem;
}

.coursework {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.cv-item ul {
  margin-top: 0.5rem;
  padding-left: 1.2rem;
}

.cv-item li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.cv-item h4 {
  margin-top: 1rem;
  margin-bottom: 0.3rem;
  color: var(--accent-color);
  font-size: 1rem;
}

.cv-item h4:first-child {
  margin-top: 0;
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.skill-category {
  background: var(--light-accent);
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--accent-color);
}

.skill-category h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--accent-color);
  font-size: 1rem;
}

.skill-category p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Responsive Design for CV */
@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .cv-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
  }
}

/* --------------------------
   Footer - FIXED VERSION
--------------------------- */
footer {
  background: var(--nav-bg);
  text-align: center;
  padding: 1.5rem;
  width: 100%;
  box-shadow: 0 -1px 5px rgba(0,0,0,0.1);
  border-top: 1px solid var(--border-color);
  margin-top: auto; /* Push footer to bottom */
}

footer p {
  margin-bottom: 0.8rem;
  font-weight: 500;
  font-size: 1rem;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.socials a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: background 0.3s, transform 0.2s;
  font-size: 0.9rem;
}

.socials a:hover {
  background: var(--light-accent);
  transform: translateY(-2px);
}

/* --------------------------
   Responsive Design
--------------------------- */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  nav ul {
    gap: 1rem;
  }
  
  .about {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    padding: 2rem 1rem;
  }
  
  .about-left, .about-right {
    max-width: 100%;
  }
  
  .skill-tags {
    justify-content: center;
  }
  
  .cv-content {
    flex-direction: column;
    gap: 2rem;
  }
  
  .socials {
    flex-wrap: wrap;
    gap: 0.8rem;
  }
  
  footer {
    padding: 1rem;
  }
  
  .main-content {
    padding-bottom: 100px;
  }
}

@media (max-width: 480px) {
  .socials {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .socials a {
    display: block;
    padding: 0.5rem;
  }
  
  footer p {
    font-size: 0.9rem;
  }
}