:root {
  --bg: #0a0e14;
  --bg-elevated: #111721;
  --text-primary: #ccd6e3;
  --text-secondary: #8b98a8;
  --accent: #5ce1c9;
  --accent-dim: rgba(92, 225, 201, 0.1);
  --border: #1e2a38;
  --sidebar-width: 340px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.6;
}

h1, h2, h3, h4 { font-weight: 700; color: #e6edf3; }

a { color: inherit; text-decoration: none; }

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--border);
}

.sidebar-content { display: flex; flex-direction: column; }

.profile-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  margin-bottom: 1.5rem;
}

.sidebar h1 { font-size: 1.7rem; margin-bottom: 0.4rem; }

.tagline {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.6rem;
}

.location { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 2rem; }

.nav-links { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }

.nav-link {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s, padding-left 0.2s;
  border-left: 2px solid transparent;
  padding-left: 0.8rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent);
  border-left-color: var(--accent);
  padding-left: 1.1rem;
}

.social-links { display: flex; gap: 1.2rem; }
.social-links a { color: var(--text-secondary); transition: color 0.2s; }
.social-links a:hover { color: var(--accent); }

/* Main content */
.main-content {
  margin-left: var(--sidebar-width);
  padding: 5rem 4rem 3rem;
  max-width: 900px;
}

.section { padding-bottom: 6rem; scroll-margin-top: 2rem; }

.section-label {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}

.section-body p { color: var(--text-secondary); margin-bottom: 1rem; max-width: 700px; }
.section-body strong { color: var(--text-primary); }

/* Experience */
.experience-item { margin-bottom: 1.5rem; }
.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.experience-header h3 { font-size: 1.1rem; }
.experience-date {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  font-size: 0.85rem;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.2s, border-color 0.2s;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.project-card h3 {
  font-size: 1.05rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.6rem;
}

.project-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.project-card p { font-size: 0.9rem; margin-bottom: 1rem; }

.tech-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }

.tech-tags span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.project-links a {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}
.project-links a:hover { text-decoration: underline; }

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.skill-group h4 { font-size: 0.95rem; color: var(--accent); margin-bottom: 0.4rem; }
.skill-group p { font-size: 0.88rem; }

/* Certifications */
.cert-list { list-style: none; }
.cert-list li {
  color: var(--text-secondary);
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.cert-list li strong { color: var(--text-primary); }

/* Contact */
.contact-button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.9rem 1.8rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.contact-button:hover { background: var(--accent-dim); }

footer { margin-top: 4rem; color: var(--text-secondary); font-size: 0.8rem; }

/* Mobile menu toggle (hidden on desktop) */
.menu-toggle {
  display: none;
  position: fixed;
  top: 1.2rem; right: 1.2rem;
  z-index: 100;
  width: 44px; height: 44px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.menu-toggle span {
  width: 20px; height: 2px;
  background: var(--text-primary);
  transition: transform 0.3s, opacity 0.3s;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 90;
}
.overlay.visible { display: block; }

/* ---------- TABLET ---------- */
@media (max-width: 1024px) {
  :root { --sidebar-width: 280px; }
  .main-content { padding: 4rem 2.5rem 3rem; }
  .projects-grid, .skills-grid { grid-template-columns: 1fr; }
}

/* ---------- MOBILE ---------- */
@media (max-width: 768px) {
  .menu-toggle { display: flex; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 95;
    width: 280px;
    background: var(--bg);
  }
  .sidebar.open { transform: translateX(0); }

  .main-content {
    margin-left: 0;
    padding: 5rem 1.5rem 3rem;
  }

  .section-title { font-size: 1.5rem; }

  .experience-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .profile-photo { width: 90px; height: 90px; }
  .sidebar { padding: 2.5rem 1.8rem; width: 250px; }
  .main-content { padding: 4.5rem 1.2rem 2rem; }
}