:root {
  --bg: #f8fafc;
  --text: #2d3748;
  --sidebar-bg: #1a202c;
  --accent: #00bfa6; /* Mint Green */
  --accent-dark: #00a08a;
  --white: #fff;
  --code-font: 'Roboto Mono', monospace;
  --body-font: 'Poppins', sans-serif;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-accent: linear-gradient(135deg, #00bfa6 0%, #00a08a 100%);
}

body.dark {
  --bg: #0f172a;
  --text: #f1f5f9;
  --sidebar-bg: #1e293b;
  --accent: #38bdf8; /* Sky Blue */
  --accent-dark: #0ea5e9;
  --white: #1e293b;
  --card-bg: #334155;
  --border-color: #475569;
  --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --gradient-primary: linear-gradient(135deg, #4338ca 0%, #7c3aed 100%);
  --gradient-accent: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  background-color: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
}

h1, h2, h3 {
  font-weight: 600;
  font-family: var(--body-font);
}

p, li, a {
  font-weight: 400;
  line-height: 1.7;
}

.dashboard {
   display: flex;
}

/* --- SIDEBAR --- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  background-color: var(--sidebar-bg);
  color: white;
  width: 250px;
  padding: 25px;
  box-sizing: border-box;
  transition: background 0.3s ease;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  text-align: center;
}

.profile-photo {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 0 auto 10px;
  border: 3px solid var(--accent);
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.sidebar h2 {
  font-size: 1.3rem;
  margin-bottom: 5px;
}

.sidebar-subtitle {
  font-family: var(--code-font);
  color: #ccc;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

#toggleTheme {
  background: var(--accent);
  color: white;
  border: none;
  padding: 8px 15px;
  margin: 10px auto;
  display: block;
  border-radius: 5px;
  cursor: pointer;
  font-family: var(--body-font);
  font-weight: 600;
  transition: background 0.3s;
}

#toggleTheme:hover {
  background: var(--accent-dark);
}

.sidebar nav ul {
  list-style: none;
  margin-top: 20px;
  text-align: left;
}

.sidebar nav a {
  text-decoration: none;
  color: white;
  display: block;
  padding: 12px 15px;
  border-radius: 5px;
  transition: background 0.3s, color 0.3s;
  font-weight: 500;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  background-color: var(--accent);
  color: var(--sidebar-bg);
}

/* --- CONTENT --- */
.content {
  flex-grow: 1;
  padding: 40px 50px 40px 300px;
  box-sizing: border-box;
  background: var(--bg);
  transition: background 0.3s ease;
}

section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  padding-top: 20px;
  margin-bottom: 50px;
}

section.show {
  opacity: 1;
  transform: translateY(0);
}

.content h1 {
  font-size: 2.5rem;
  border-bottom: 3px solid var(--accent);
  padding-bottom: 10px;
  margin-bottom: 25px;
  display: inline-block;
}

/* --- Typewriter Effect --- */
#typewriter {
  font-family: var(--code-font);
}
.typewriter-cursor {
  display: inline-block;
  background-color: var(--text);
  width: 10px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { background-color: transparent; }
  50% { background-color: var(--text); }
}

/* --- Experience Timeline --- */
.timeline {
  position: relative;
  margin-left: 20px;
  border-left: 2px solid var(--accent);
  padding: 20px 0;
}
.timeline-item {
  position: relative;
  margin-bottom: 30px;
  padding-left: 40px;
}
.timeline-dot {
  position: absolute;
  left: -9px;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
}
.timeline-date {
  font-family: var(--code-font);
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
  font-weight: 500;
}
.timeline-content h3 {
  margin-bottom: 5px;
}
.timeline-content ul {
  padding-left: 20px;
  margin-top: 10px;
}

/* --- Project Cards --- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  box-shadow: var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
}
.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-medium);
}
.project-card h3 {
  margin-bottom: 10px;
  color: var(--accent);
}
.project-tags {
  margin: 15px 0;
}
.tag {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-family: var(--code-font);
  margin-right: 5px;
  margin-bottom: 5px;
}
.project-link {
  margin-top: auto;
  text-decoration: none;
  font-weight: 600;
  color: var(--accent);
  transition: color 0.3s;
}
.project-link:hover {
  color: var(--accent-dark);
}

/* --- Skills --- */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 20px 0;
}
.skill-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 18px 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: var(--shadow-light);
}
.skill-item:hover {
  transform: translateY(-3px);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--shadow-medium);
}
.skill-item i {
  font-size: 2rem;
  color: var(--accent);
}
.cert-list {
  padding-left: 20px;
}

/* --- Contact Section --- */
.contact-links {
  margin-top: 20px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}
.contact-btn {
  background: var(--accent);
  color: white;
  padding: 12px 20px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: background 0.3s;
}
.contact-btn:hover {
  background: var(--accent-dark);
}

/* --- Mobile Responsive --- */
@media screen and (max-width: 992px) {
  .content {
    padding-left: 270px; /* Adjust padding for smaller desktop */
  }
  
  .progress-header {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .progress-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
}

@media screen and (max-width: 768px) {
  .dashboard {
    flex-direction: column;
  }
  .sidebar {
    position: relative;
    height: auto;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }
  .sidebar nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
  }
  .sidebar nav li {
    flex-grow: 1;
    text-align: center;
  }
  .content {
    padding: 20px;
  }
  .content h1 {
    font-size: 2rem;
  }
  
  .progress-header {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .progress-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .progress-info h3 {
    font-size: 1.1rem;
  }
  
  .progress-details {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
}

.ci-cd-pipeline {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0;
  padding: 20px;
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.stage {
  padding: 10px 20px;
  border-radius: 5px;
  background-color: #ccc;
  color: #333;
  position: relative;
  overflow: hidden;
}
.stage::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: translateX(-100%);
  transition: transform 0.8s ease;
}
/* This class will be added by JavaScript */
.stage.active::after {
  transform: translateX(0);
}
.stage span {
  position: relative;
  z-index: 2;
  color: white; /* Text will be visible on top of the animation */
}
.arrow {
  font-size: 1.5rem;
  color: var(--accent);
}

/* hosting info */
.hosting-info {
  font-family: var(--code-font);
  font-size: 0.75rem;
  color: #4fa3ff;
  text-align: left;
  margin-top: 15px;
  padding: 8px 10px;
  background: rgba(79, 163, 255, 0.1);
  border-radius: 5px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(79, 163, 255, 0.2);
}
.hosting-info i {
  margin-right: 8px;
  font-size: 1rem;
}

/* --- Progress Learning Section --- */
.progress-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
  margin-top: 30px;
}

.progress-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.progress-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-accent);
}

.progress-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.progress-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.progress-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8rem;
  box-shadow: 0 4px 15px rgba(0, 191, 166, 0.3);
}

.progress-info h3 {
  margin: 0 0 5px 0;
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 600;
}

.progress-year {
  font-family: var(--code-font);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin: 15px 0;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: 4px;
  transition: width 1.5s ease-in-out;
  position: relative;
  overflow: hidden;
  width: 0%;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 15px 0;
}

.progress-percentage {
  font-family: var(--code-font);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
}

.progress-status {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.progress-description {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.progress-description p {
  color: var(--text);
  opacity: 0.8;
  line-height: 1.6;
  margin: 0;
}

/* system operational */
.status-widget {
  font-family: var(--code-font);
  font-size: 0.8rem;
  color: #ADFF2F; /* Green Yellow */
  text-align: left;
  margin-top: 0px;
  padding: 8px 10px;
  background: rgba(0,0,0,0.3);
  border-radius: 5px;
  display: flex;
  align-items: center;
}
.status-dot {
  width: 10px;
  height: 10px;
  background: #ADFF2F;
  border-radius: 50%;
  margin-right: 8px;
  animation: blink-live 1.5s infinite;
}
@keyframes blink-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* --- Education Section --- */
.education-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.education-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 25px;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: var(--shadow-light);
}
.education-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}
.education-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 5px;
}
.education-header i {
  font-size: 1.5rem;
  color: var(--accent);
}
.education-date {
  font-family: var(--code-font);
  color: var(--text);
  opacity: 0.7;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

/* --- New Contact Section --- */
#contact p {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 30px auto;
  font-size: 1.1rem;
}
.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}
.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  box-shadow: var(--shadow-light);
}
.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
  border-color: var(--accent);
}
.contact-card i {
  font-size: 2rem;
  color: var(--accent);
}
.contact-info h4 {
  margin: 0 0 5px 0;
}
.contact-info span {
  font-size: 0.9rem;
  opacity: 0.8;
}