/* ==========================================================
   styles.css — shared stylesheet for every page on wyattloy.com
   Every HTML page links to this one file, so a change here
   (a color, a font size) updates the whole site at once.
   ========================================================== */

/* ---------- 1. Design settings ("variables") ----------
   Values defined once here and reused below with var(--name).
   Change a color in one place instead of hunting through the file. */
:root {
  --text: #000000;          /* body text: black, same as the old site */
  --background: #ffffff;    /* page background: white */
  --link: #345c00;          /* the dark green link color from the old theme */
  --muted: #e9e9e9;         /* light gray for dividers and icon circles */
  --content-width: 650px;   /* max line length, matches the old theme */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif; /* each device's built-in font */
}

/* ---------- 2. Base page setup ---------- */

/* Makes width calculations include padding, which keeps layouts predictable */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.1rem;        /* about 17.6px, same as the old site */
  line-height: 1.6;
}

a {
  color: var(--link);
}

img {
  max-width: 100%;          /* images never spill outside their container */
  height: auto;
  display: block;
}

/* ---------- 3. Header: name + menu ---------- */
.site-header {
  display: flex;
  justify-content: center;  /* centers the name and menu, like the old site */
  align-items: center;
  flex-wrap: wrap;          /* lets items drop to a new line on narrow phones */
  gap: 0.5rem 1.5rem;
  padding: 1.5rem 1rem 2.5rem;
}

.site-title {
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
}

.site-nav ul {
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;         /* removes bullet points from the menu */
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-title:hover {
  text-decoration: underline;
}

/* Underlines the menu item for the page you're on */
.site-nav a[aria-current="page"] {
  text-decoration: underline;
}

/* ---------- 4. Main content area ---------- */
main {
  max-width: var(--content-width);
  margin: 0 auto;           /* "auto" side margins center the column */
  padding: 0 1rem 4rem;     /* 1rem side padding keeps text off phone edges */
}

h1 {
  font-size: clamp(2.25rem, 6vw, 3.25rem); /* scales with screen width, within limits */
  font-weight: 400;
  text-align: center;
  margin: 0.5rem 0 2.5rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--muted);
  margin: 2rem 0;
}

li {
  margin-bottom: 0.25rem;
}

/* ---------- 5. Homepage: photo beside the intro ---------- */

/* On wider screens the photo floats left and the text wraps around it,
   the same way the old WordPress page looked. */
.headshot {
  float: left;
  width: 60%;
  max-width: 426px;
  margin: 0 1.5rem 1rem 0;
}

.intro p:first-child {
  margin-top: 0;
}

/* Stops the icons below from wrapping up beside the photo */
.clear {
  clear: both;
}

/* On phones (screens narrower than 600px) the photo sits on its own row */
@media (max-width: 600px) {
  .headshot {
    float: none;
    width: 100%;
    max-width: 426px;
    margin: 0 auto 1.5rem;
  }
}

/* ---------- 6. Contact icons (LinkedIn, email) ---------- */
.contact-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.contact-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;              /* 44px is the recommended minimum tap size on phones */
  height: 44px;
  border-radius: 50%;       /* turns the square into a circle */
}

.contact-links a.linkedin {
  background: #0d66c2;      /* LinkedIn's brand blue */
  color: #ffffff;
}

.contact-links a.email {
  background: var(--muted);
  color: var(--text);
}

.contact-links a:hover {
  opacity: 0.85;
}

.contact-links svg {
  width: 22px;
  height: 22px;
  fill: currentColor;       /* the icon takes on the link's text color */
}

/* Hides text visually but keeps it for screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
