:root {
  --bg: #f8f6f1;
  --accent: #d4a373;
  --accent-dark: #b07a4e;
  --text: #2d2a26;
  --text-light: #6b645c;
  --glass: rgba(255, 255, 255, 0.6);
  --border: rgba(212, 163, 115, 0.25);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* Overlay */
.modal-page {
  min-height: 100vh;
  background: rgba(248, 246, 241, 0.75);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  animation: fadeIn 0.5s ease;
}

/* Card */
.modal-card {
  width: 100%;
  max-width: 900px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 52px;
  position: relative;
  box-shadow: 0 25px 60px rgba(0,0,0,0.12);
  animation: popIn 0.6s ease;
}

/* Close */
.close-btn {
  position: absolute;
  top: 20px;
  right: 25px;
  background: none;
  border: none;
  font-size: 2.2rem;
  color: var(--text-light);
  cursor: pointer;
  text-decoration: none; /* Remove underline for links */
}


/* Header */
.modal-header {
  margin-bottom: 50px;
}

.tag {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.8rem;
  margin-bottom: 16px;
}

h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.subtitle {
  max-width: 650px;
  color: var(--text-light);
  line-height: 1.7;
  font-size: 1rem;
}

/* Sections */
section {
  margin-bottom: 40px;
}

section h3 {
  font-family: 'Poppins', sans-serif;
  margin-bottom: 12px;
  font-size: 1.3rem;
}

section p,
section li {
  color: var(--text-light);
  line-height: 1.8;
  font-size: 1rem;
}

ul {
  padding-left: 20px;
}

/* Stack */
.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stack span {
  background: #fff;
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-family: 'Fira Code', monospace;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .modal-page {
    align-items: flex-start;
    padding: 20px 14px;
  }

  .modal-card {
    border-radius: 22px;
    padding: 28px 20px;
  }

  h1 {
    font-size: 1.85rem;
    padding-right: 36px;
  }

  .modal-header {
    margin-bottom: 32px;
  }

  section {
    margin-bottom: 28px;
  }

  section h3 {
    font-size: 1.15rem;
  }

  .close-btn {
    top: 14px;
    right: 16px;
    font-size: 1.8rem;
  }

  .stack {
    gap: 10px;
  }

  .stack span {
    font-size: 0.8rem;
    padding: 7px 12px;
  }
}

@media (max-width: 480px) {
  .modal-page {
    padding: 12px;
  }

  .modal-card {
    padding: 22px 16px;
    border-radius: 18px;
  }

  h1 {
    font-size: 1.55rem;
  }

  .subtitle,
  section p,
  section li {
    font-size: 0.95rem;
  }
}
