/* -------- Fonts -------- */
@import url("https://fonts.googleapis.com/css2?family=Bree+Serif&family=Inter:wght@400;600;800&display=swap");

/* -------- Reset & Base -------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Poppins", sans-serif;
  background: var(--bg) no-repeat center center fixed;
  background-size: cover; /* makes it scale properly */
  color: var(--text);
  line-height: 1.6;
  padding-top: 60px;
  transition: background 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
p {
  font-family: "Bree Serif", serif;
}

/* -------- Theme Variables -------- */
:root {
  --bg: #f9fafb;
  --text: #606061;
  --header-text: rgb(49, 49, 49);
  --card-bg: rgba(255, 255, 255, 0.7);
  --nav-bg: rgba(255, 255, 255, 0.6);
  --border: rgba(0, 0, 0, 0.1);
  --accent: #3b82f6;
}

body.dark-mode {
  --bg: #0f172a;
  background: var(--bg) url("images/dark-bg.jpg") no-repeat center center fixed;
  --text: #e2e8f0;
  --header-text: rgb(233, 233, 233);
  --card-bg: rgba(255, 255, 255, 0.08);
  --nav-bg: rgba(15, 23, 42, 0.65);
  --border: rgba(255, 255, 255, 0.1);
  --accent: #60a5fa;
}

/* -------- Navbar -------- */
.navbar {
  position: fixed;
  top: 20px; /* floating offset from top */
  left: 50%;
  transform: translateX(-50%); /* center horizontally */
  backdrop-filter: blur(15px);
  background: rgba(255, 255, 255, 0.7); /* semi-transparent */
  border: 1px solid var(--border);
  border-radius: 12px; /* rounded edges */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1.5rem;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  height: 60px;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.navbar:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}
body {
  padding-top: 100px; /* increase so content isn't hidden under navbar */
}
.navbar h1 {
  font-weight: 700;
  font-size: 1.25rem;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  white-space: nowrap;
}

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

.hamburger {
  display: none;
  font-size: 1.6rem;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
}

/* Theme toggle button */
.theme-toggle {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.15);
}

/* -------- Hero / Tagline -------- */
header .tagline {
  text-align: center;
  margin: 3rem 1rem 0;
  font-size: 1.1rem;
  color: var(--text);
  opacity: 0.8;
}

/* -------- Sections -------- */
section {
  padding: 3rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: var(--header-text);
}

/* -------- Cards -------- */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow-wrap: break-word;
}

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

/* -------- About Section -------- */
.about-content {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.profile-image {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px solid var(--border);
  flex-shrink: 0;
}

/* -------- Projects Grid -------- */
#projects .card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.5rem;
}

.entry h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
  color: var(--accent);
}

.entry .meta {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: 0.2rem;
}

.entry a {
  display: inline-block;
  margin-right: 1rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}

.entry a:hover {
  text-decoration: underline;
}

/* -------- Skills Grid -------- */
#skills .card ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  list-style: none;
}

#skills .card li {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.6rem;
  border-radius: 12px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
}

/* -------- Contact -------- */
#contact .card p {
  margin-bottom: 0.6rem;
}

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

#contact a:hover {
  text-decoration: underline;
}

/* -------- Footer -------- */
footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* -------- Responsive Fixes -------- */
@media (max-width: 900px) {
  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .profile-image {
    margin-bottom: 1rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background: var(--nav-bg);
    position: absolute;
    top: 60px;
    right: 0;
    width: 220px;
    padding: 1.2rem;
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }

  .nav-links.active {
    display: flex;
  }

  .hamburger {
    display: block;
  }

  header .tagline {
    font-size: 1rem;
    margin-top: 2rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 0.95rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .card {
    padding: 1rem;
  }

  .entry h3 {
    font-size: 1rem;
  }
}
