:root {
  --primary: #1f1c2c;
  --secondary: #928dab;
  --accent: #ff683c;
  --glow: #21c8f6;
  --dark: #121214;
  --white: #ddd;
  --text-light: #bbb;
}

/* Global reset / base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Montserrat", sans-serif;
  color: var(--white);
  background: var(--primary);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Reserve space for fixed navbar */
body {
  padding-top: 70px;
  max-width: 100vw;
}

/* Layout wrapper */
main {
  margin-left: 96px;
  margin-right: 96px;
}

@media (max-width: 900px) {
  main {
    margin-left: 24px;
    margin-right: 24px;
  }
}

@media (max-width: 600px) {
  main {
    margin-left: 12px;
    margin-right: 12px;
  }
}

/* Desktop navbar (same style as main site) */
.desktop-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(25, 25, 35, 0.96);
  z-index: 10000;
  padding: 1em 5vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  box-shadow: 0 4px 20px 0 #000b;
  transition: background-color 0.3s ease;
}

.desktop-nav.scrolled {
  background: rgba(25, 25, 35, 1);
}

.desktop-nav ul {
  display: flex;
  gap: 2.2em;
  margin: 0;
  padding: 0;
  list-style: none;
}

.desktop-nav .nav-link {
  color: var(--white);
  font-size: 1.05em;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}

.desktop-nav .nav-link:hover,
.desktop-nav .nav-link.active {
  color: var(--accent);
  border-color: var(--accent);
}

/* Focus outline for accessibility */
.desktop-nav .nav-link:focus,
.sidebar ul li a:focus {
  outline: 2px solid var(--glow);
  outline-offset: 2px;
}

.glow {
  color: var(--accent);
  font-weight: 700;
}

/* Hide desktop nav on small screens */
@media (max-width: 900px) {
  .desktop-nav {
    display: none;
  }
}

/* Sidebar (mobile / tablet) */
.sidebar {
  width: 260px;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  background-color: var(--primary);
  box-shadow: 4px 0 20px 3px rgba(79, 77, 102, 0.8);
  transform: translateX(-280px);
  transition: transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
  padding-top: 60px;
  overflow-y: auto;
  z-index: 10000;
  display: none;
}

.sidebar.active {
  display: block;
  transform: translateX(0);
}

@media (max-width: 900px) {
  .sidebar {
    display: block;
  }
}

.sidebar ul {
  padding-left: 25px;
  list-style: none;
  margin: 0;
}

.sidebar ul li {
  margin-bottom: 22px;
}

.sidebar ul li a {
  color: var(--white);
  font-size: 1.05em;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.25s;
}

.sidebar ul li a.active,
.sidebar ul li a:hover {
  color: var(--accent);
}

/* Hamburger button */
.hamburger {
  position: fixed;
  top: 18px;
  left: 20px;
  width: 28px;
  height: 22px;
  cursor: pointer;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  z-index: 10001;
  background: transparent;
  border: none;
  padding: 0;
}

.hamburger span {
  height: 4px;
  background-color: var(--accent);
  border-radius: 2px;
  transition: all 0.3s;
  display: block;
}

.hamburger span:nth-child(1),
.hamburger span:nth-child(3) {
  width: 100%;
}

.hamburger span:nth-child(2) {
  width: 70%;
}

@media (max-width: 900px) {
  .hamburger {
    display: flex;
  }
}

/* Section base */
.section {
  margin: 2.5rem 0;
}

/* Page hero */
.projects-hero {
  text-align: center;
  margin-top: 1rem;
}

.projects-hero h1 {
  margin: 0 0 0.6rem 0;
  font-size: 2.1rem;
}

.projects-hero p {
  margin: 0 auto;
  max-width: 700px;
  color: var(--text-light);
}

/* Section title */
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* Projects grid using CSS Grid (easy to extend with more cards) */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.7rem;
}

/* Project card styling (inspired by your card aesthetic) */
.project-card {
  background: var(--primary);
  border-radius: 12px;
  padding: 1.8rem 1.6rem;
  box-shadow: 0 0 32px var(--accent);
  color: var(--white);
  user-select: none;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease,
    background 0.3s ease;
  opacity: 0.9;
}

/* Subtle glow overlay on hover */
.project-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
    circle at top left,
    rgba(255, 104, 60, 0.15),
    transparent 60%
  );
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.project-card:hover {
  box-shadow: 0 0 55px 5px var(--accent);
  transform: translateY(-4px) scale(1.02);
  opacity: 1;
  background: linear-gradient(135deg, #19162b, #2d2747);
}

.project-card:hover::before {
  opacity: 1;
  transform: scale(1);
}

.project-title {
  margin: 0 0 0.6rem 0;
  font-size: 1.2rem;
  color: var(--accent);
}

.project-desc {
  margin: 0 0 1.1rem 0;
  color: var(--text-light);
  line-height: 1.6;
  text-align: left;
}

/* Meta (tag + year) */
.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  font-size: 0.9rem;
}

.project-tag {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.project-year {
  color: var(--text-light);
}

/* Action buttons */
.project-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55em 1.4em;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.25s ease, color 0.25s ease,
    box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.btn i {
  font-size: 0.95rem;
}

/* Primary = View Project */
.btn-primary {
  background: var(--accent);
  color: var(--dark);
  box-shadow: 0 0 18px var(--accent);
}

.btn-primary:hover {
  background: #ff7856;
  box-shadow: 0 0 24px var(--accent);
  transform: translateY(-1px);
}

/* Outline = View Report */
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--accent);
}

.btn-outline:hover {
  background: rgba(255, 104, 60, 0.1);
  box-shadow: 0 0 18px var(--accent);
  transform: translateY(-1px);
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .project-card {
    padding: 1.5rem 1.3rem;
  }
}

@media (max-width: 600px) {
  .projects-hero h1 {
    font-size: 1.8rem;
  }

  .project-card {
    padding: 1.4rem 1.1rem;
  }

  .project-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Footer */
.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1em 1vw;
  background-color: var(--primary);
  color: var(--text-light);
  border-top: 1px solid var(--accent);
  font-size: 0.95em;
  user-select: none;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
  min-height: 60px;
}

.footer-bottom {
  text-align: center;
}
