/* Premium design system */
:root {
  --font-family: 'Inter', sans-serif;
  --bg-dark: #121212;
  --bg-glass: rgba(255, 255, 255, 0.08);
  --text-primary: #e0e0e0;
  --accent-primary: #c85a32;
  --accent-secondary: #e07a48;
  --gradient-bg: linear-gradient(135deg, #2a150e, #572212);
}

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

html, body {
  font-family: var(--font-family);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  scroll-behavior: smooth;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#header-placeholder {
  width: 100%;
}

.projects-section {
  flex: 1 0 auto;
}

#footer-placeholder,
.footer-section {
  margin-top: auto;
  width: 100%;
}

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

a:hover {
  text-decoration: underline;
}

.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* slightly stronger glass so it separates from dark content */
  background: rgba(18, 18, 18, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  /* subtle drop shadow to create depth against dark backgrounds */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.nav-brand a {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.5px;
  text-decoration: none;
}

.nav-brand a:hover {
  color: var(--accent-primary);
  text-decoration: none;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-list a {
  font-weight: 600;
  color: var(--text-primary);
}

.hero-section {
  height: 45vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--gradient-bg);
  color: #fff;
  text-align: center;
  padding: 2rem 1rem;
}

.hero-section h1 {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
}

.hero-section p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.cta-button {
  padding: 0.8rem 1.6rem;
  background: linear-gradient(135deg, #c85a32 0%, #9e3f1b 100%);
  color: #fff;
  border: 1px solid rgba(255, 200, 160, 0.25);
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(184, 82, 38, 0.3);
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  display: inline-block;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.cta-button:hover {
  transform: translateY(-3px);
  background: linear-gradient(135deg, #d8693f 0%, #ad4822 100%);
  box-shadow: 0 6px 18px rgba(184, 82, 38, 0.45);
  text-decoration: none;
}

.about-section {
  padding: 4rem 2rem;
  background: var(--bg-dark);
}

.about-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.profile-pic {
  width: min(40vw, 200px);
  height: auto;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-glass);
  max-width: 200px;
}

.about-text h2 {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
}

.projects-section {
  padding: 4rem 2rem;
  background: var(--bg-dark);
}

.projects-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2.5rem;
}

.filter-bar {
  text-align: center;
  margin-bottom: 2rem;
}

.filter-btn {
  background: rgba(184, 82, 38, 0.1);
  border: 2px solid #c85a32;
  color: #f08b58;
  padding: 0.5rem 1.1rem;
  margin: 0 0.3rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
  background: linear-gradient(135deg, #c85a32, #9e3f1b);
  border-color: #c85a32;
  color: #fff;
  box-shadow: 0 4px 12px rgba(184, 82, 38, 0.35);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-glass);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.project-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.project-card h3 {
  margin: 0.8rem 1rem 0.4rem;
  font-size: 1.3rem;
}

.project-card .tags {
  margin: 0 1rem 0.8rem;
  font-size: 0.9rem;
  color: var(--accent-secondary);
}

.details-link {
  display: block;
  margin: 0 1rem 1rem;
  color: #f08b58;
  font-weight: 600;
  transition: color 0.2s;
}

.details-link:hover {
  color: #ffa475;
}

.footer-section {
  padding: 1.5rem 2rem;
  text-align: center;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  /* clear separation from page content */
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 -10px 24px rgba(0,0,0,0.45);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.social-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
  text-decoration: none;
}

.social-icons a:hover {
  transform: translateY(-2px) scale(1.1);
  opacity: 0.9;
}

.social-icons img,
.social-icons a img {
  width: 24px;
  height: 24px;
  max-width: 24px;
  max-height: 24px;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
}

.footer-section p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-primary);
  opacity: 0.85;
}

@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem;
  }
  .about-text {
    text-align: center;
  }
  .profile-pic {
    margin: 0 auto;
  }
  .hero-section h1 {
    font-size: 2rem;
  }
  .hero-section p {
    font-size: 1rem;
  }
  .about-section {
    padding: 2rem 1rem;
  }
  /* Responsive project filter buttons */
  .filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
  }
  .filter-btn {
    flex: 1 1 calc(50% - 1rem);
    max-width: 220px;
    padding: 0.6rem 0.9rem;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .filter-btn {
    flex-basis: 100%;
    max-width: none;
  }
}

/* Modal Overlay & Pop-up Window */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1.5rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  width: 100%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 2.5rem;
  color: var(--text-primary);
}

.modal-dialog::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.modal-overlay.active .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 10;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg);
}

/* Project Detail Page & Modal Body Styles */
.project-detail-container {
  max-width: 800px;
  margin: 0 auto;
}

.project-detail-header {
  margin-bottom: 2rem;
}

.project-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: rgba(200, 90, 50, 0.18);
  color: #f08b58;
  border: 1px solid rgba(240, 139, 88, 0.4);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.project-badge.uni-badge {
  background: rgba(180, 83, 9, 0.2);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
}

.project-title {
  font-size: 2.2rem;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.project-subtitle {
  font-size: 1.1rem;
  color: #a1a1aa;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.project-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: #71717a;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
}

.project-meta strong {
  color: #e4e4e7;
}

.project-hero-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-story h2 {
  font-size: 1.5rem;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  color: #f4f4f5;
  border-left: 4px solid var(--accent-primary);
  padding-left: 0.75rem;
}

.project-story p {
  color: #d4d4d8;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.project-story ul {
  margin-bottom: 1.5rem;
  padding-left: 1.25rem;
}

.project-story li {
  margin-bottom: 0.5rem;
  color: #d4d4d8;
}

.project-story li strong {
  color: #ffffff;
}

.project-detail-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: flex-end;
}

.project-detail-body {
  padding: 3rem 1.5rem;
  background: var(--bg-dark);
}
.error-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 150px);
}

.error-container h1 {
  font-family: 'Fire Code', 'JetBrains Mono', monospace;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
}

/* Thin dividers between major stacked sections to preserve visual barriers in dark mode */
section + section {
  border-top: 1px solid rgba(255,255,255,0.03);
}

/* Ensure hero and primary sections appear above thin dividers (avoid overlap with sticky navbar) */
section {
  position: relative;
  z-index: 0;
}

