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

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column; /* Vertical stacking */
  min-height: 100vh; /* Full viewport height */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #1e1e2f;
  color: #e0e6f0;
  line-height: 1.6;
}

/* Header */
header {
  background: linear-gradient(to right, #23174b, #000000);
  color: #fff;
  padding: 3rem 1rem;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

header h1 {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
}

header p {
  font-size: 1.3rem;
  opacity: 0.9;
}

/* Main Layout */
main {
  flex: 1; /* Take remaining space */
  display: flex;
  flex-direction: column; /* Stack sections vertically */
  gap: 2rem; /* Space between sections */
  padding: 2rem;
  max-width: 1000px;
  margin: auto;
}

/* Sections */
section {
  display: flex;
  flex-direction: column;
}

h2 {
  font-size: 1.6rem;
  color: #64b5f6;
  margin-bottom: 1rem;
  border-bottom: 2px solid #64b5f6;
  padding-bottom: 0.5rem;
}

/* Links */
a {
  color: #90caf9;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Lists */
ul {
  list-style: disc;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.75rem;
}

/* Contact */
#contact a { word-break: break-word; }

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  background-color: #292c36;
  color: #888;
  font-size: 0.9rem;
  border-top: 1px solid #3a3d4d;
}

/* ---- Projects: filters + grid + cards ---- */

.filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filter-btn {
  border: 1px solid #3a3d4d;
  background: #222338;
  color: #e0e6f0;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.filter-btn:hover,
.filter-btn:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}

.filter-btn.active {
  background: linear-gradient(135deg, #5b68ff, #7f53ac);
  border-color: transparent;
  color: #fff;
}

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

.project-card {
  position: relative;
  background: radial-gradient(1200px 200px at 10% -10%, rgba(91, 104, 255, 0.15), transparent 60%),
              #23253a;
  border: 1px solid #34384d;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 26px rgba(0,0,0,0.35);
  border-color: #495072;
}

.project-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.project-card h3 {
  font-size: 1.15rem;
  margin: 0;
}

/* Badges */
.badges {
  list-style: none;
  display: flex;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.badge {
  margin: 0;
  padding: 0.25rem 0.55rem;
  background: #2c2f44;
  border: 1px solid #3a3e58;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #b9c4e2;
}

/* Details toggle */
.details-toggle {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 600;
  text-underline-offset: 2px;
}

.details {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dashed #3a3d4d;
  animation: details-in 200ms ease;
}

@keyframes details-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hidden state helper for filtering (set via JS) */
.project-card[hidden] { display: none !important; }

/* Responsive tweaks */
@media (min-width: 768px) {
  header h1 { font-size: 3.1rem; }
  header p { font-size: 1.25rem; }
}
