/* =========================
   GLOBAL RESET
========================= */

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

/* =========================
   PAGE LAYOUT
========================= */

body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  color: #222;
  background: #f4f4f4;

  min-height: 100vh;

  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* =========================
   REUSABLE CONTAINER
========================= */

.container {
  width: min(1100px, 90%);
  margin: 0 auto;
}

/* =========================
   HEADER
========================= */

.site-header {
  background: #1f2937;
  color: white;
  padding: 2rem 0;
}

.site-header .container {
  display: grid;
  gap: 1rem;
  justify-items: center;
}

.tagline {
  color: #d1d5db;
}

/* =========================
   NAVIGATION
========================= */

.nav-list {
  list-style: none;

  display: grid;
  grid-auto-flow: column;
  gap: 2rem;
}

.nav-list a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.nav-list a:hover {
  text-decoration: underline;
}

/* =========================
   MAIN CONTENT
========================= */

main {
  display: grid;
  gap: 4rem;
  padding: 3rem 0;
}

/* =========================
   HERO / ABOUT SECTION
========================= */

.hero-grid {
  display: grid;

  grid-template-columns:
    repeat(auto-fit, minmax(300px, 1fr));

  gap: 2rem;

  align-items: center;
}

.hero-section article,
.profile-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
}

.profile-card {
  display: grid;
  place-items: center;
}

.profile-card img {
  width: 100%;
  max-width: 300px;
  border-radius: 10px;
}

/* =========================
   PROJECTS SECTION
========================= */

.projects-grid {
  display: grid;

  grid-template-columns:
    repeat(auto-fit, minmax(280px, 1fr));

  gap: 2rem;
}

.project-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
}

/* =========================
   CONTACT SECTION
========================= */

.contact-section .container {
  display: grid;
  gap: 1rem;
}

.contact-section a {
  color: #2563eb;
  text-decoration: none;
}

.contact-section a:hover {
  text-decoration: underline;
}

/* =========================
   CSS DEMONSTRATION SECTION
========================= */

.css-demo-section .container {
  display: grid;
  gap: 2rem;
}

.demo-article {
  background: white;
  padding: 2rem;
  border-radius: 12px;

  display: grid;
  gap: 1rem;
}

/* =========================
   BOX MODEL DEMO
========================= */

.box-model-demo {
  background: #60a5fa;

  padding: 30px;
  border: 8px solid #1e40af;
  margin: 20px;

  text-align: center;
  color: white;
  font-weight: bold;
}

/* =========================
   GRID REPLACING FLEXBOX
========================= */

.flex-demo {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 1rem;
}

.flex-item {
  background: #10b981;
  color: white;
  padding: 1rem;
  text-align: center;
  border-radius: 8px;
}

/* =========================
   GRID DEMO
========================= */

.grid-demo {
  display: grid;

  grid-template-columns:
    repeat(2, 1fr);

  gap: 1rem;
}

.grid-item {
  background: #f59e0b;
  color: white;

  padding: 2rem;

  text-align: center;
  border-radius: 8px;
  font-weight: bold;
}

/* =========================
   FOOTER
========================= */

.site-footer {
  background: #111827;
  color: white;
  padding: 2rem 0;
}

.site-footer .container {
  display: grid;
  justify-items: center;
}

/* =========================
   HEADINGS
========================= */

h1,
h2,
h3 {
  margin-bottom: 1rem;
}

/* =========================
   RESPONSIVE DESIGN
========================= */

@media (max-width: 768px) {
  .nav-list {
    grid-auto-flow: row;
    justify-items: center;
  }

  .flex-demo {
    grid-template-columns: 1fr;
  }

  .grid-demo {
    grid-template-columns: 1fr;
  }
}