:root {
  /* Modular scale */
  --step--1: 0.875rem;
  /* small text */
  --step-0: 1rem;
  /* base text */
  --step-1: 1.25rem;
  /* h6-ish */
  --step-2: 1.563rem;
  /* h5 */
  --step-3: 1.953rem;
  /* h3/h4 */
  --step-4: 2.441rem;
  /* h1 */

  /* Rhythm */
  --lh-tight: 1.1;
  --lh-snug: 1.15;
  --lh-relaxed: 1.6;

  /* Font stack: system first, then Inter if you already load it */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    Inter, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol";

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
}

html {
  font-size: 16px;
  line-height: var(--lh-relaxed);
}

body {
  font-family: var(--font-sans);
  color: #111;
}

/* Reset + base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "Roboto", sans-serif;
  margin: 0;
  background-color: #f4f4f4;
  overflow-x: hidden;
}

/* Container */
.container {
  max-width: 1000px;
  width: 90%;
  margin: 24px auto;
}

/* Intro */
.intro {
  text-align: center;
  margin-bottom: 24px;
}

/* About */
#about {
  background-color: #ffffff;
  padding: 20px;
  border-radius: 8px;
  max-width: 600px;
  margin: 24px auto;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Projects */
#projects h2 {
  text-align: center;
  margin-bottom: 20px;
}

.projects-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  background: #f9fbff;
  border: 2px solid #e0e7ff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);

  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}

.project-card h3 {
  margin: 0 0 8px 0;
  color: #0b3d91;
}

.project-card p {
  margin: 0 0 14px 0;
  line-height: 1.5;
}

.btn {
  align-self: start;
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  background: #60a5fa;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  text-transform: uppercase;
  transition: transform 0.08s ease, opacity 0.08s ease, box-shadow 0.08s ease;
  box-shadow: 0 2px 6px rgba(11, 61, 145, 0.25);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  opacity: 0.97;
  outline: none;
}

/* Global spacing consistency */
section {
  padding: var(--space-4) var(--space-2);
}

.container {
  max-width: 72ch;
  margin: 0 auto;
  padding: 0 var(--space-2);
}

.project-card {
  margin: var(--space-2) 0;
  padding: var(--space-2);
  border-radius: 12px;
  border: 1px solid #e6e6e6;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.portfolio .container {
  max-width: 900px;
}

.portfolio {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f3f1ed;
}

.portfolio #projects {
  padding-top: 0;
}

.portfolio #projects h2 {
  margin-top: 0;
}

.portfolio #about h2 {
  margin-top: 0;
}

.portfolio #about p {
  margin-bottom: 0;
}

.portfolio #about {
  background-color: #fffdf9;
  border-radius: 16px;
  border: 1px solid #e2ddd5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

.portfolio .project-card {
  background-color: #fffdf9;
  border-color: #e2ddd5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.portfolio .btn {
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 0.8rem;
  text-transform: none;
}