:root {
  --bg: #07111f;
  --bg2: #081321;
  --panel: #0d1b2e;
  --panel2: #12233a;
  --text: #e8eef9;
  --muted: #b9c4d4;
  --line: #506786;
  --accent: #7cc6ff;
  --accent2: #9fd3ff;
  --shadow: rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: none;   /* removed underline */
}

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(3, 10, 18, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #10233b;
}

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

.brand a {
  color: #f4f7fb;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
}

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

.nav-links a {
  color: #edf3fb;
  font-size: 1.02rem;
  display: flex;
  align-items: center;
}


.theme-toggle {
  margin-left: 8px;

  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  border: 2px solid var(--accent);
  background: transparent;
  color: #facc15;
  text-shadow: 0 0 6px rgba(250, 204, 21, 0.6);
  font-size: 16px;
  cursor: pointer;
}

.theme-toggle:hover {
  background: rgba(122, 162, 255, 0.15);
}

/* PAGE */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 28px 60px;
}

/* LAYOUT */
.layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
}

/* SIDEBAR */
.sidebar-card {
  background: linear-gradient(180deg, var(--panel), var(--panel2));
  border: 1px solid #17304b;
  border-radius: 18px;
  box-shadow: 0 10px 30px var(--shadow);
  padding: 18px;
  position: sticky;
  top: 95px;
}

.profile-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 14px;
  border: 2px solid #35597d;
  margin-bottom: 8px;
}

.sidebar-role {
  text-align: center;
  color: var(--accent2);
  font-weight: 600;
  margin: 20px 0 18px;
  font-size: 1.2rem;
}

.sidebar-links {
  border: 1px solid #264261;
  border-radius: 14px;
  overflow: hidden;
}

.sidebar-link {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #243f5d;
  background: rgba(255, 255, 255, 0.01);
  color: #e7eef8;
}

.sidebar-link:last-child {
  border-bottom: none;
}

.sidebar-link .icon {
  width: 22px;
  color: var(--accent);
  font-weight: 700;
}



/* MAIN */
.main {
  min-width: 0;
}

/* INTRO TEXT */
.intro-text {
  max-width: 1100px;
}

.intro-text p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

/* SECTIONS */
.section-block {
  margin-top: 40px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.section-title h2 {
  font-size: 2.2rem;
  color: #f8fbff;
  margin: 0;
}

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

/* EDUCATION */
.edu-entry {
  margin-bottom: 24px;
}

.edu-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.edu-degree {
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
}

.edu-date {
  font-size: 0.95rem;
  color: var(--accent2);
}

.edu-school {
  font-size: 0.96rem;
  color: var(--muted);
  font-style: italic;
}

/* RESEARCH PAGE */
.research-main {
  max-width: 1100px;
  margin: 0 auto;
}

.research-page-title {
  font-size: 3.2rem;
  margin-bottom: 54px;
}

.research-content p {
  font-size: 1.1rem;
  margin-bottom: 22px;
  color: var(--muted);
}

.research-list {
  padding-left: 28px;
}

.research-list li {
  margin-bottom: 12px;
  font-size: 1.02rem;
  color: var(--muted);
}

.research-list.level-1 > li {
  margin-bottom: 16px;
}

.research-list.level-1 strong {
  color: #e9f0fa;
}

.research-list.level-2 {
  margin-top: 8px;
  padding-left: 30px;
}

/* FOOTER */
footer {
  max-width: 1200px;
  margin: auto;
  padding: 8px 28px 40px;
}

.footer-line {
  height: 1px;
  background: var(--line);
  margin: 26px 0 18px;
}

.footer-links {
  display: flex;
  gap: 22px;
  color: var(--muted);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar-card {
    position: static;
  }

  .nav-inner {
    flex-direction: column;
    gap: 14px;
  }

  .research-page-title {
    font-size: 2.4rem;
  }

  .edu-header {
    flex-direction: column;
    gap: 4px;
  }
}


.projects-main {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 6px;
}

.projects-page-title {
  margin: 0 0 28px;
  font-size: 3.2rem;
  font-weight: 700;
  color: #f8fbff;
}

.projects-intro {
  max-width: 980px;
  margin-bottom: 8px;
}

.projects-intro p {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0;
}

.projects-top-block {
  margin-top: 28px;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 6px;
}

.project-card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel2) 100%);
  border: 1px solid #17304b;
  border-radius: 16px;
  box-shadow: 0 10px 24px var(--shadow);
  padding: 22px 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
}

.project-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #f0f6ff;
  line-height: 1.45;
  margin-bottom: 8px;
}

.project-card-desc {
  max-width: 900px;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.6;
}

.project-card-links {
  margin-top: 12px;
}

.project-card-links a {
  color: var(--accent);
  font-size: 0.98rem;
  font-weight: 600;
}

.project-card-links a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .projects-page-title {
    font-size: 2.4rem;
    margin-bottom: 22px;
  }

  .project-card {
    padding: 18px 18px;
  }
}

/* ================= THEME TOGGLE ================= */
.theme-toggle {
  margin-left: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-size: 18px;
  cursor: pointer;
}

.theme-toggle:hover {
  background: rgba(122,162,255,0.15);
}

/* ================= LIGHT MODE ================= */
body.light-mode {
  --bg: #f3f4f6;
  --bg2: #e5e7eb;
  --text: #111827;
  --muted: #374151;
  --accent: #2563eb;
  --line: #94a3b8;

  background: linear-gradient(180deg, var(--bg), var(--bg2));
  color: var(--text);
}

body.light-mode .navbar {
  background: #222;
}

body.light-mode .brand a {
  color: #ffffff;
}

body.light-mode .nav-links a {
  color: #f3f4f6;
}

body.light-mode .sidebar-card {
  background: rgba(255,255,255,0.8);
}

body.light-mode .intro-text p {
  color: #374151;
}

body.light-mode .intro-text p:first-child {
  color: #111827;
}

body.light-mode .education-degree {
  color: #111827;
}

body.light-mode .education-school {
  color: #6b7280;
}


/* ---------- LIGHT MODE FIXES ---------- */

body.light-mode .sidebar-name {
  color: #111827;
}

body.light-mode .sidebar-role {
  color: #2563eb;
}

body.light-mode .sidebar-link {
  color: #374151;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

body.light-mode .sidebar-link:hover {
  color: #111827;
  background: rgba(0, 0, 0, 0.03);
}

body.light-mode .icon {
  color: #2563eb;
}

body.light-mode .section-header h2 {
  color: #111827;
}

body.light-mode .education-degree {
  color: #111827;
}

body.light-mode .education-school {
  color: #4b5563;
}

body.light-mode .line {
  background: #94a3b8;
}

body.light-mode .sidebar-card {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .profile-image {
  border: 1px solid rgba(0, 0, 0, 0.12);
}

/* ---------- FIX: LIGHT MODE EDUCATION VISIBILITY ---------- */

body.light-mode .section-header h2 {
  color: #111827;   /* dark text */
}

body.light-mode .education-degree {
  color: #111827;   /* strong dark */
}

body.light-mode .education-school {
  color: #4b5563;   /* medium gray */
}

/* FIX YEARS VISIBILITY */
body.light-mode .education-years {
  color: #2563eb;   /* stronger blue */
  font-weight: 500;
}

/* ensure divider is visible */
body.light-mode .line {
  background: #9ca3af;
}


/* ---------- FINAL LIGHT MODE FIXES FOR CURRENT CLASSES ---------- */

body.light-mode .section-title h2 {
  color: #111827 !important;
}

body.light-mode .edu-degree {
  color: #111827 !important;
}

body.light-mode .edu-school {
  color: #4b5563 !important;
}

body.light-mode .edu-date {
  color: #2563eb !important;
  font-weight: 600;
}

body.light-mode .line {
  background: #9ca3af !important;
}

/* ---------- THEME TOGGLE LIGHT MODE FIX ---------- */

body.light-mode .theme-toggle {
  color: #ffffff;     /* moon white */
  text-shadow: none;  /* remove yellow glow */
}


/* ---------- LIGHT MODE FIXES: PROJECTS PAGE ---------- */

body.light-mode .projects-page-title {
  color: #111827 !important;
}

body.light-mode .projects-intro p {
  color: #374151 !important;
}

body.light-mode .project-card {
  background: rgba(255, 255, 255, 0.85) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08) !important;
}

body.light-mode .project-card-title {
  color: #111827 !important;
}

body.light-mode .project-card-desc {
  color: #4b5563 !important;
}

body.light-mode .project-card-links a {
  color: #2563eb !important;
}


/* ---------- LIGHT MODE FIXES: RESEARCH PAGE ---------- */

body.light-mode .research-page-title {
  color: #111827 !important;
}

body.light-mode .research-content p {
  color: #374151 !important;
}

body.light-mode .research-list li {
  color: #374151 !important;
}

body.light-mode .research-list.level-1 strong,
body.light-mode .research-list strong {
  color: #111827 !important;
}
