/* =========================
   Reset and Base Styles
========================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  margin: 0;
  padding: 0;

  line-height: 1.6;

  background-color: #f7f9f7;
  color: #333;
}

a {
  color: inherit;
}


/* =========================
   Navigation
========================= */

header {
  background-color: #1e3b1e;
  color: #fff;

  position: sticky;
  top: 0;

  z-index: 999;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.navbar {
  max-width: 960px;

  margin: 0 auto;
  padding: 1rem;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.4rem;
  font-weight: bold;
}

.nav-links {
  list-style: none;

  display: flex;

  gap: 0.5rem;

  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;

  color: #fff;

  text-decoration: none;

  padding: 0.5rem 0.75rem;

  border-radius: 4px;

  transition: background-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus {
  background-color: #2f4f2f;
}


/* =========================
   General Layout
========================= */

.container {
  max-width: 960px;

  margin: 0 auto;

  padding: 5rem 2rem;
}

section {
  scroll-margin-top: 80px;
}


/* =========================
   Hero
========================= */

.hero {
  min-height: 70vh;

  display: flex;
  flex-direction: column;

  justify-content: center;
}

.eyebrow {
  color: #3d7043;

  font-size: 0.85rem;

  font-weight: bold;

  text-transform: uppercase;

  letter-spacing: 0.08em;

  margin-bottom: 0.5rem;
}

h1,
h2,
h3 {
  color: #1e3b1e;

  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);

  margin: 0 0 1.5rem;
}

h2 {
  font-size: 2rem;

  margin-top: 0;
}

h3 {
  margin-top: 0;
}

.intro {
  font-size: 1.3rem;

  max-width: 700px;
}

.hero p {
  max-width: 750px;
}


/* =========================
   Buttons
========================= */

.hero-buttons {
  display: flex;

  flex-wrap: wrap;

  gap: 1rem;

  margin-top: 1.5rem;
}

.button {
  display: inline-block;

  background-color: #1e3b1e;

  color: white;

  padding: 0.7rem 1.2rem;

  border-radius: 5px;

  text-decoration: none;

  border: 2px solid #1e3b1e;

  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.button:hover,
.button:focus {
  background-color: #2f4f2f;

  transform: translateY(-2px);
}

.button-secondary {
  background-color: transparent;

  color: #1e3b1e;
}

.button-secondary:hover,
.button-secondary:focus {
  color: white;
}


/* =========================
   Section Headings
========================= */

.section-heading {
  margin-bottom: 2rem;
}


/* =========================
   Projects
========================= */

.projects-grid {
  display: grid;

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

  gap: 1.5rem;
}

.project-card {
  background-color: #fff;

  padding: 1.5rem;

  border-radius: 8px;

  border: 1px solid #e1e6e1;

  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.08);

  cursor: pointer;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;

  outline: none;
}

.project-card:hover,
.project-card:focus {
  transform: translateY(-5px);

  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.12);
}

.project-link {
  display: inline-block;

  margin-top: 1rem;

  color: #3d7043;

  font-weight: bold;
}


/* =========================
   Skills
========================= */

.skills-list {
  display: flex;

  flex-wrap: wrap;

  gap: 0.75rem;

  list-style: none;

  padding: 0;
}

.skills-list li {
  background-color: #e0f2e9;

  color: #1e3b1e;

  padding: 0.5rem 1rem;

  border-radius: 20px;

  font-weight: bold;
}

/* =========================
   Blog / Learning
========================= */

.blog-grid {
  display: grid;

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

  gap: 1.5rem;
}

.blog-card {
  background-color: #fff;

  padding: 1.5rem;

  border-radius: 8px;

  border: 1px solid #e1e6e1;

  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.08);

  display: flex;

  flex-direction: column;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-5px);

  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.12);
}

.blog-card h3 {
  margin-bottom: 0.75rem;
}

.blog-date {
  color: #3d7043;

  font-size: 1rem;

  font-weight: bold;

  text-transform: uppercase;

  letter-spacing: 0.05em;

  margin-top: 0;

  margin-bottom: 0.75rem;
}

.blog-card a {
  color: #1e3b1e;

  font-weight: bold;

  text-decoration: none;

  margin-top: auto;

  padding-top: 1rem;
}

.blog-card a:hover {
  text-decoration: underline;
}

.coming-soon {
  color: #777;

  font-weight: bold;

  margin-top: auto;

  padding-top: 1rem;
}


/* =========================
   Contact
========================= */

.contact-links {
  display: flex;

  flex-wrap: wrap;

  gap: 1rem;

  margin-top: 1.5rem;
}

.contact-links a {
  color: #1e3b1e;

  font-weight: bold;

  text-decoration: none;

  border-bottom: 2px solid #3d7043;
}

.contact-links a:hover {
  border-bottom-color: #1e3b1e;
}


/* =========================
   Footer
========================= */

footer {
  text-align: center;

  padding: 1.5rem;

  background-color: #1e3b1e;

  color: #fff;
}


/* =========================
   Modal
========================= */

.modal {
  display: none;

  position: fixed;

  z-index: 1001;

  left: 0;
  top: 0;

  width: 100%;
  height: 100%;

  overflow: auto;

  background-color: rgba(0, 0, 0, 0.6);

  padding: 2rem;
}

.modal-content {
  background-color: #fff;

  margin: 8% auto;

  padding: 2.5rem;

  border-radius: 8px;

  max-width: 600px;

  position: relative;

  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.25);
}

.modal-content .button {
  margin-top: 1rem;
}

.close {
  position: absolute;

  top: 1rem;
  right: 1rem;

  width: 40px;
  height: 40px;

  border: none;

  background: transparent;

  font-size: 2rem;

  cursor: pointer;

  color: #333;
}

.close:hover,
.close:focus {
  color: #1e3b1e;
}

/* =========================
   Blog Articles
========================= */

.blog-post {
  max-width: 800px;
}

.blog-post p,
.blog-post li {
  font-size: 1.1rem;
  line-height: 1.7;
}

.blog-post h1 {
  margin-bottom: 1.5rem;
}

.blog-post h2 {
  margin-top: 3rem;
}

.blog-introduction {
  font-size: 1.25rem;
  line-height: 1.7;
  color: #555;
  margin-bottom: 3rem;
}

.blog-post code {
  background-color: #eef2ee;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-family: Consolas, monospace;
}

.blog-post pre {
  background-color: #1e3b1e;
  color: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.blog-post pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.blog-post li {
  margin-bottom: 0.5rem;
}

.blog-post figure {
  margin: 2rem -3rem;
}

.blog-post img {
  display: block;
  width: calc(100% + 6rem);
  height: auto;
  border-radius: 8px;
}

.blog-post figcaption {
  font-size: 0.9rem;
  color: #666;
  text-align: center;
  margin-top: 0.75rem;
}

/* Mobile */
@media (max-width: 700px) {
  .navbar {
    flex-direction: column;
    gap: 0.75rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .container {
    padding: 3.5rem 1.25rem;
  }

  .hero {
    min-height: auto;
    padding-top: 4rem;
  }

  h1 {
    font-size: 3rem;
  }

  .intro {
    font-size: 1.15rem;
  }

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

  .modal {
    padding: 1rem;
  }

  .modal-content {
    margin: 15% auto;
    padding: 2rem 1.5rem;
  }

  .blog-post figure {
    margin: 2rem 0;
  }

  .blog-post img {
    width: 90%;
    max-width: 90%;
    height: auto;
    margin: 0 auto;
  }
}
