:root {
  --sidebar-bg: rgb(25, 55, 71);
  --accent: rgb(79, 177, 186);
  --accent-dark: #2e8a92;
  --sidebar-width: 22rem;
  --text: #333;
  --heading: rgb(25, 55, 71);
}

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

body {
  font-family: 'Noto Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────── */

.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background-color: var(--sidebar-bg);
  background-image:
    linear-gradient(rgba(25, 55, 71, 0.82), rgba(25, 55, 71, 0.82)),
    url('IMG/Blue.jpg');
  background-size: cover;
  background-position: center;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  color: white;
}

.sidebar-inner {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
}

.avatar {
  display: block;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-title {
  font-family: 'Roboto Slab', serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
  display: block;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.site-title:hover {
  color: var(--accent);
}

.sidebar-tagline {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0;
}

.sidebar nav {
  margin-top: 2rem;
}

.sidebar nav ul {
  list-style: none;
}

.sidebar nav ul li a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.95rem;
  display: block;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: color 0.15s;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
  color: var(--accent);
}

.social {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.social a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
  text-decoration: none;
  transition: color 0.15s;
  display: flex;
  align-items: center;
}

.social a:hover {
  color: var(--accent);
}

.social svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

/* ── Main content ────────────────────────────────────── */

.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 3.5rem 4rem;
  max-width: 54rem;
}

h1.page-title {
  font-family: 'Roboto Slab', serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.4rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--accent);
}

h2 {
  font-family: 'Roboto Slab', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--heading);
  margin-top: 2.25rem;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

p {
  margin-bottom: 0.9rem;
}

ul.paper-list {
  list-style: none;
  margin-bottom: 0.5rem;
}

ul.paper-list li {
  margin-bottom: 0.5rem;
  padding-left: 0;
}

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

a:hover {
  text-decoration: underline;
}

/* Home page */
.home-photo {
  float: right;
  margin: 0 0 1.5rem 2.5rem;
  border-radius: 6px;
  max-width: 260px;
  width: 38%;
}

.home-bio {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-top: 1.5rem;
}

/* Code page */
.project {
  margin-top: 1.75rem;
}

.project h2 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 1.1rem;
}

.project h2 a {
  color: var(--heading);
}

.project h2 a:hover {
  color: var(--accent-dark);
  text-decoration: none;
}

.project p {
  font-size: 0.95rem;
  color: #444;
}

hr.section-divider {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 2rem 0;
}

footer {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid #eee;
  font-size: 0.82rem;
  color: #aaa;
}

/* ── Responsive ──────────────────────────────────────── */

@media (max-width: 820px) {
  body {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-height: auto;
    position: relative;
  }

  .sidebar-inner {
    padding: 1.75rem 1.5rem;
  }

  .avatar {
    width: 70px;
    height: 70px;
  }

  .social {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
  }

  .main {
    margin-left: 0;
    padding: 2rem 1.5rem;
    max-width: 100%;
  }

  .home-photo {
    float: none;
    width: 100%;
    max-width: 260px;
    margin: 1rem 0 1.5rem;
  }
}
