/* ===== Global ===== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  background-color: #fafafa;
  margin: 0;
  color: #333;
}

/* Prevent scroll anchor from hiding under fixed navbar */
[id] {
  scroll-margin-top: 90px;
}

/* ===== Navbar ===== */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: white;
  box-shadow: 0 1px 8px rgba(0,0,0,0.08);
  z-index: 1000;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 960px;
  margin: 0 auto;
  padding: 0.7rem 1rem;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  color: #0070f3;
  font-size: 1.1rem;
  gap: 0.45rem;
}

.logo-img {
  height: 36px;
  width: auto;
  border-radius: 4px;
  object-fit: contain;
}

/* Nav links */
.nav-links {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.nav-links li a,
nav a {
  color: #0070f3;
  text-decoration: none;
  margin: 0 0.8rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links li a:hover,
nav a:hover {
  color: #0055cc;
}

/* Burger menu */
.menu-toggle {
  display: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: #0070f3;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 220px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  border-radius: 8px;
  z-index: 999;
  overflow: hidden;
}

.dropdown-content a {
  color: #0070f3;
  padding: 10px 14px;
  display: block;
  font-weight: 500;
  border-bottom: 1px solid #f5f5f5;
}

.dropdown-content a:last-child {
  border-bottom: none;
}

.dropdown-content a:hover {
  background: #f1f6ff;
  color: #0055cc;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* ===== Layout ===== */
section {
  padding: 6rem 1.5rem 3rem;
  max-width: 800px;
  margin: auto;
}

.card {
  text-align: center;
  background: #fff;
  padding: 3rem 2rem;
  border-radius: 1.5rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transition: all 0.3s ease-in-out;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin-bottom: 1rem;
  border: 3px solid #0070f3;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
  color: #111;
}

h1 {
  font-size: 1.8rem;
  margin: 0.3em 0;
}

h2 {
  font-size: 1.4rem;
  border-bottom: 2px solid #0070f3;
  display: inline-block;
  margin-bottom: 1rem;
}

h3 {
  margin-top: 1.5rem;
}

p {
  line-height: 1.6;
  color: #444;
}

ul {
  list-style-type: "▹ ";
  padding-left: 0;
}

li {
  margin: 0.4em 0;
}

/* ===== Project Cards ===== */
.project-item {
  background: white;
  border-radius: 0.8rem;
  padding: 1.2rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.2s ease-in-out;
  margin-bottom: 1rem;
}

.project-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.project-item h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

/* ===== Articles ===== */
.article-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 3px 12px rgba(0,0,0,0.05);
  padding: 1.2rem 1.5rem;
  margin-bottom: 1rem;
  transition: transform 0.2s;
}

.article-card:hover {
  transform: translateY(-3px);
}

.article-card a {
  color: #0070f3;
  font-weight: 600;
  text-decoration: none;
}

.article-card small {
  display: block;
  color: #777;
  margin-top: 0.3rem;
}

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.9em;
  color: #777;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .logo-img {
    height: 32px;
  }

  .nav-links {
    position: absolute;
    top: 58px;
    left: 0;
    width: 100%;
    background: #fff;
    flex-direction: column;
    align-items: center;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  }

  .nav-links.active {
    max-height: 400px;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #f0f0f0;
  }
}

@media (max-width: 600px) {
  nav a {
    margin: 0 0.6rem;
  }
}
