@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
  --bg: #f9fafc;
  --text: #222;
  --card: #fff;
  --accent: #007bff;
  --muted: #666;
}

body.dark {
  --bg: #1e1e1e;
  --text: #f1f1f1;
  --card: #2b2b2b;
  --accent: #4da3ff;
  --muted: #aaa;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-top: 80px;
  transition: background 0.3s, color 0.3s;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--card);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  padding: 1rem 2rem;
}

nav .container {
  max-width: 1100px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav h1 {
  font-size: 1.4rem;
  color: var(--accent);
}

nav .socials a {
  margin-left: 1rem;
  color: var(--text);
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

nav .socials a:hover {
  color: var(--accent);
}

.toggle-theme {
  margin-left: 1rem;
  font-size: 1rem;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--accent);
}

/* Sections */
section {
  max-width: 960px;
  margin: auto;
  padding: 3rem 1.5rem;
  animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

h2 {
  font-size: 1.8rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  margin-bottom: 1rem;
}

p, li {
  color: var(--text);
}

/* Card Style */
section p, .project, .timeline-item, .about p {
  background: var(--card);
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Project section */
.project:hover {
  transform: translateY(-4px);
  transition: 0.3s ease;
}

.project h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* Timeline */
.timeline-item span {
  font-weight: 600;
  color: var(--accent);
  display: block;
  margin-bottom: 0.4rem;
}

/* Achievements */
.achievements ul {
  list-style: disc;
  padding-left: 2rem;
}

.achievements li {
  margin-bottom: 0.6rem;
}

/* Contact */
.contact a {
  color: var(--accent);
  text-decoration: none;
}

.contact a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  nav .container {
    flex-direction: column;
    align-items: flex-start;
  }

  nav .socials {
    margin-top: 0.5rem;
  }
}

/* Dark mode toggle button */
.toggle-theme {
  margin-left: 1rem;
  font-size: 1.2rem;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--accent);
  transition: transform 0.2s;
}

.toggle-theme:hover {
  transform: scale(1.2);
}

/* Enhanced Timeline */
.timeline {
  position: relative;
  margin: 2rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
}

.timeline-item {
  margin: 1rem 0;
  padding-left: 1rem;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 10px;
  width: 14px;
  height: 14px;
  background-color: var(--accent);
  border-radius: 50%;
}

/* Enhanced Achievements List */
.achievements ul {
  background: var(--card);
  border-radius: 10px;
  padding: 1rem 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-top: 1rem;
}

/* Enhanced Skills Section */
.skills {
  max-width: 960px;
  margin: auto;
  padding: 3rem 1.5rem;
  animation: fadeIn 1s ease-in-out;
  text-align: left;
}

.skills .section-heading {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.skill-tags {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.skill-tags span {
  background: var(--accent);
  color: #fff;
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.about-container {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.profile-photo {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.about-text {
  flex: 1;
  min-width: 250px;
}

.about-text p {
  margin-bottom: 1rem;
  background: var(--card);
  padding: 1rem 1.2rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

@media (max-width: 600px) {
  .about-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-text {
    width: 100%;
  }
}

.project-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
  padding: 1.5rem;
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.project-row.reverse {
  flex-direction: row-reverse;
}

.project-img {
  width: 280px;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.project-content {
  flex: 1;
}

.project-content h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.project-content p {
  margin-bottom: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
  .project-row, .project-row.reverse {
    flex-direction: column;
    text-align: center;
  }

  .project-img {
    width: 100%;
    max-width: 400px;
  }
}