/* ========================================
   DEFINE LAYER STACK
   ======================================== */

@layer reset, layout, typography, components, pages;

/* ========================================
   DESIGN TOKENS & VARIABLES
   ======================================== */

:root {
  color-scheme: light;
  --accent-muted: #1f3f3f;
  --rule-muted: #e6e1d7;
  --tone-soft: rgba(31, 63, 63, 0.04);
}

/* ========================================
   RESET & BASE
   ======================================== */

@layer reset {
  body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Helvetica, Arial, sans-serif;
    color: #1a1a1a;
    background: #fdfcf9;
  }
}

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

@layer layout {
  main {
    max-width: 70ch;
    margin: 0 auto;
    padding: 32px 20px 40px;
    line-height: 1.6;
    font-size: 18px;
  }

  section {
    margin-bottom: 64px;
  }
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

@layer typography {
  /* Headings */
  h1,
  h2 {
    font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
    letter-spacing: -0.01em;
    line-height: 1.25;
  }

  h1 {
    font-size: 28px;
    margin-bottom: 28px;
    color: #0a0a0a;
  }

  h2 {
    font-size: 23px;
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--accent-muted);
    font-weight: 600;
  }

  h2::after {
    content: "";
    display: block;
    width: 2.5rem;
    height: 1px;
    background: var(--rule-muted);
    margin-top: 10px;
  }

  section > h2 {
    margin-bottom: 24px;
  }

  h3 {
    font-size: 18px;
    margin-top: 32px;
    margin-bottom: 12px;
    font-style: italic;
    color: #1f3f3f;
  }

  /* Body text & flow */
  p {
    margin: 0 0 18px;
  }

  p + p {
    margin-top: 8px;
  }

  /* Lists */
  ul {
    padding-left: 22px;
    margin: 12px 0 24px;
  }

  li {
    margin-bottom: 8px;
  }

  /* Links */
  a {
    color: #0f4873;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
  }

  a:hover {
    text-decoration-thickness: 2px;
  }
}

/* ========================================
   PAGE-SPECIFIC: CONTACT
   ======================================== */

#contact {
  text-align: center;
}

/* ========================================
   COMPONENTS: FOOTER
   ======================================== */

@layer components {
  footer {
    border-top: 1px solid var(--rule-muted);
    padding: 20px 20px 32px;
    max-width: 70ch;
    margin: 20px auto 0;
    font-size: 14px;
    color: #3a3a3a;
  }

  #footer-links {
    text-align: center;
  }

  #copyright {
    text-align: center;
    margin-top: 20px;
  }
}

/* ========================================
   PAGE-SPECIFIC: CONTACT
   ======================================== */

@layer pages {
  #contact {
    text-align: center;
  }

  #contact ul {
    list-style: none;
    padding-left: 0;
  }

  #contact img {
    display: block;
    width: 180px;
    max-width: 50%;
    margin: 24px auto 0;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
  }

  /* ========================================
     MAIN IMAGES: FULL-WIDTH, CIRCULAR
     ======================================== */
  main img {
    width: 100%;         /* always match main width */
    max-width: 100%;     /* prevent overflow */
    height: auto;        /* maintain aspect ratio */
    object-fit: cover;   /* crop nicely if needed */
    border-radius: 10%;  /* circular */
  }

}