/* --- ROOT VARIABLES (Electric Blue Theme) --- */
:root {
  --bg-dark: #0B1120;
  --bg-card: #151F32;
  --primary: #38BDF8;
  --secondary: #22D3EE;
  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --border: #1E293B;
  --card-radius: 16px;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* Git/GitHub Icon Pulse */
@keyframes pulse-blue {
  0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(56, 189, 248, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

.git-animated {
  border-radius: 50%;
}
.git-animated:hover {
  animation: pulse-blue 1.5s infinite;
  color: var(--secondary);
  background: rgba(56, 189, 248, 0.1);
}

/* --- NAVIGATION --- */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(11, 17, 32, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}

.nav-link:hover { color: var(--primary); }

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--primary);
  transition: width 0.3s;
}

.nav-link:hover::after { width: 100%; }

/* Mobile Menu */
.burger-icon {
  display: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-list {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--primary);
  }
  .nav-list.show { display: flex; }
  .burger-icon { display: block; }
}

/* --- MAIN LAYOUT --- */
.main-container {
  max-width: 1200px;
  margin: 100px auto 0;
  padding: 0 20px 80px;
}

/* --- HERO --- */
.hero {
  text-align: center;
  padding: 80px 0 120px;
}

.hero h1 {
  font-size: 3.5rem;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
}

.btn-primary {
  padding: 12px 30px;
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: all 0.3s;
}

.btn-primary:hover {
  background: rgba(56, 189, 248, 0.1);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

/* --- HEADERS --- */
.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
  gap: 15px;
}

.section-header span {
  color: var(--primary);
  font-family: monospace;
  font-size: 1.2rem;
}

.section-header h2 {
  font-size: 2rem;
  color: var(--text-main);
}

.section-header .line {
  height: 1px;
  background: var(--border);
  flex-grow: 1;
}

/* --- EXPERIENCE TIMELINE --- */
.timeline {
  border-left: 2px solid var(--border);
  margin-left: 10px;
  padding-left: 30px;
}

.timeline-item {
  margin-bottom: 40px;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -36px;
  top: 6px;
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 0 5px var(--bg-dark);
}

.timeline-item h3 {
  color: var(--text-main);
  font-size: 1.3rem;
  margin-bottom: 5px;
}

.timeline-item .role {
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 5px;
}

.timeline-item .date {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: monospace;
  margin-bottom: 10px;
}

/* --- EDUCATION (BOXED) --- */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.education-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 25px;
  transition: transform 0.3s, border-color 0.3s;
  position: relative;
  overflow: hidden;
}

.education-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

/* Gradient Top Bar for "Box Image" feel */
.education-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.education-card h3 {
  color: var(--text-main);
  margin-bottom: 5px;
  font-size: 1.2rem;
}

.education-card .degree {
  color: var(--primary);
  font-weight: bold;
  margin-bottom: 10px;
  display: block;
}

.education-card .courses {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 10px;
  line-height: 1.5;
}

/* --- PROJECTS (CARDS) --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.project-card {
  background-color: var(--bg-card);
  border-radius: var(--card-radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.3s ease;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.card-top {
  height: 180px;
  width: 100%;
}

.gradient-1 { background: linear-gradient(135deg, #0f172a 0%, #38bdf8 100%); }
.gradient-2 { background: linear-gradient(135deg, #1e293b 0%, #0ea5e9 100%); }
.gradient-3 { background: linear-gradient(135deg, #111827 0%, #22d3ee 100%); }

.card-bottom {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-bottom h3 {
  font-size: 1.2rem;
  margin-bottom: 5px;
  color: var(--text-main);
}

.project-details {
  display: none;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
  animation: fadeIn 0.5s;
}

.project-details.active { display: block; }

.toggle-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  margin-top: auto;
  align-self: flex-start;
  transition: all 0.3s;
}

.toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.project-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
  color: var(--primary);
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
}

/* --- ENGAGEMENTS (LIST) --- */
.engagement-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 15px;
}

.engagement-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 15px 20px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s;
}

.engagement-item:hover {
  border-color: var(--secondary);
  background: rgba(34, 211, 238, 0.05);
  transform: translateX(5px);
}

.engagement-content h4 {
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 2px;
}

.engagement-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.engagement-date {
  font-size: 0.8rem;
  color: var(--primary);
  font-family: monospace;
  text-align: right;
  min-width: 80px;
}

/* --- CERTIFICATES (BOXED) --- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 25px;
  border-radius: var(--card-radius);
  position: relative;
  transition: transform 0.3s;
  overflow: hidden;
}

.cert-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.cert-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
}

.cert-card h4 {
  color: var(--text-main);
  margin-bottom: 10px;
}

.cert-card .issuer {
  color: var(--primary);
  font-size: 0.9rem;
}

.cert-card .date {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
  margin-top: 5px;
  display: block;
}

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

.skill-category h4 {
  color: var(--primary);
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  background: rgba(56, 189, 248, 0.1);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 5px;
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: all 0.3s;
}

.tag:hover {
  border-color: var(--primary);
  transform: scale(1.05);
}

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

.contact-card {
  background: var(--bg-card);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  color: var(--text-muted);
  transition: all 0.3s;
}

.contact-card:hover {
  border-color: var(--primary);
  color: var(--text-main);
  transform: translateY(-3px);
}

.contact-card i {
  font-size: 1.5rem;
  color: var(--primary);
}

/* Footer */
footer {
  text-align: center;
  padding: 40px;
  border-top: 1px solid var(--border);
  margin-top: 60px;
  color: var(--text-muted);
}