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

:root {
  --bg-outer: #FAFBFC; /* A very light, clean background */
  --sidebar-bg: #363638; /* Kept for the dark cards like "About me" */
  --main-bg: #FFFFFF;
  --text-dark: #2C2C2E;
  --text-muted: #64748b;
  --primary: #F25F4C;
  --yellow: #FBE47F;
  --purple: #E6DAFF;
  --blue: #D6F1FA;
  --border: #E2E8F0;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

body {
  background-color: var(--bg-outer);
  font-family: var(--font-body);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* NAVBAR */
.navbar {
  background-color: var(--main-bg);
  border-bottom: 1.5px solid var(--border);
  padding: 0 40px;
  height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-dark);
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
}

.nav-brand-icon {
  width: 40px;
  height: 40px;
  background-color: var(--text-dark);
  color: white;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 800;
  font-size: 22px;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 15px;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.nav-link.active {
  color: var(--text-dark);
  font-weight: 600;
}

.nav-link svg {
  width: 18px;
  height: 18px;
}

/* MOBILE NAV TOGGLE */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-dark);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* CONTAINER */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 50px 20px;
  flex: 1;
}

/* HEADER AREA (Replaces old .header) */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 600px;
  line-height: 1.5;
}

.search-bar {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 4px 4px 4px 20px;
  width: 300px;
  background: var(--main-bg);
}

.search-bar input {
  border: none;
  outline: none;
  flex: 1;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-dark);
  background: transparent;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-btn {
  background-color: var(--primary);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
}

.search-btn svg {
  width: 16px;
  height: 16px;
}

/* SECTIONS */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  margin-top: 40px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
}

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

.filter-tag {
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: var(--main-bg);
  color: var(--text-dark);
  text-decoration: none;
}

.filter-tag.active {
  background-color: var(--text-dark);
  color: white;
  border-color: var(--text-dark);
}

/* CARDS GRID */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.course-card {
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1.5px solid rgba(0,0,0,0.05);
  text-decoration: none;
  color: var(--text-dark);
  background-color: var(--main-bg);
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  transition: transform 0.2s, box-shadow 0.2s;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px rgba(0,0,0,0.05);
}

.course-card.yellow { background-color: var(--yellow); }
.course-card.purple { background-color: var(--purple); }
.course-card.blue { background-color: var(--blue); }

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-tag {
  background: var(--text-dark);
  color: white;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 12px;
  font-weight: 500;
}
.course-card.purple .card-tag { background: #D9A05B; }
.course-card.blue .card-tag { background: #C59BFF; }

.bookmark {
  background: transparent;
  border: none;
  color: var(--text-dark);
  cursor: pointer;
}
.bookmark svg { width: 20px; height: 20px; fill: currentColor; }

.card-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 24px;
}

.card-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(0,0,0,0.1);
  border-radius: 3px;
  margin-bottom: 20px;
  overflow: hidden;
}
.card-progress-fill {
  height: 100%;
  background: var(--text-dark);
  border-radius: 3px;
}
.course-card.purple .card-progress-fill { background: #5534A5; }

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.card-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 16px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
}
.card-btn:hover {
  filter: brightness(1.1);
}

/* BOTTOM GRID */
.bottom-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.lessons-panel {
  border: 1.5px solid var(--border);
  border-radius: 32px;
  padding: 30px;
  background-color: var(--main-bg);
}

.lessons-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.lessons-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
}

.lessons-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

/* TABLE */
.lessons-table {
  width: 100%;
  border-collapse: collapse;
}

.lessons-table th {
  text-align: left;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  padding-bottom: 16px;
  border-bottom: 1.5px solid var(--border);
}

.lessons-table td {
  padding: 16px 0;
  border-bottom: 1.5px solid var(--border);
  vertical-align: middle;
}

.lessons-table tr:last-child td {
  border-bottom: none;
  padding-bottom: 0;
}

.lesson-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lesson-num-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-dark);
}

.lesson-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.lesson-teacher {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
}

.teacher-pic {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-outer);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: var(--text-dark);
}

.lesson-duration {
  font-size: 14px;
  font-weight: 500;
  text-align: right;
  color: var(--text-dark);
}

/* RIGHT PANEL (DARK COMPONENT) */
.right-panel {
  background-color: var(--sidebar-bg);
  border-radius: 32px;
  padding: 30px;
  color: white;
  display: flex;
  flex-direction: column;
}

.rp-subtitle {
  font-size: 14px;
  color: #A0A0A0;
  margin-bottom: 20px;
}

.rp-tag {
  background: var(--yellow);
  color: var(--text-dark);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 16px;
}

.rp-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 24px;
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.skill-chip {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  color: #E0E0E0;
}

.rp-btn {
  background: var(--primary);
  color: white;
  border: none;
  width: 100%;
  padding: 16px;
  border-radius: 20px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: auto;
  text-decoration: none;
  text-align: center;
  transition: 0.2s;
}
.rp-btn:hover {
  filter: brightness(1.1);
}

/* Content Blocks for general text like writeups */
.text-content {
  color: var(--text-dark);
  font-size: 15px;
  line-height: 1.6;
}

.text-content h1, .text-content h2, .text-content h3 {
  font-family: var(--font-heading);
  margin-bottom: 16px;
  margin-top: 24px;
  color: var(--text-dark);
}

.text-content p {
  margin-bottom: 16px;
}

/* TERMINAL / SPECIAL VIEWS */
.terminal-container {
  background-color: var(--sidebar-bg);
  border-radius: 24px;
  padding: 20px;
  color: #F8FAFC;
  font-family: monospace;
  height: 500px;
  overflow-y: auto;
}

/* FOOTER */
.footer {
  border-top: 1.5px solid var(--border);
  background-color: var(--main-bg);
  padding: 40px;
  margin-top: 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 12px;
}
.footer-links a {
  color: var(--text-dark);
  font-weight: 500;
  text-decoration: none;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .navbar { padding: 0 20px; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--main-bg);
    padding: 20px;
    border-bottom: 1.5px solid var(--border);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  }
  .page-header { flex-direction: column; gap: 20px; align-items: flex-start; }
  .cards-grid { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; gap: 15px; align-items: flex-start; }
  .lessons-table th:nth-child(2), .lessons-table td:nth-child(2) { display: none; }
}
