/* ===== COLORS: change these to restyle the whole site ===== */
:root {
  --bg: #f3f7f5;        /* page background */
  --ink: #15302b;       /* main text */
  --muted: #4d6660;     /* softer text */
  --accent: #e5a000;    /* buttons */
  --card: #ffffff;      /* project boxes */
  --line: #d3e0db;      /* thin borders */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.2;
}

/* Keeps content centered and easy to read */
section, .site-header, footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}
p { max-width: 60ch; }

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.logo { font-weight: 700; font-size: 1.15rem; }
nav a { margin-left: 1.25rem; }
a { color: var(--ink); }

/* Hero */
.hero { padding-top: 5rem; padding-bottom: 5rem; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); margin: 0 0 1rem; max-width: 16ch; }
.hero p { font-size: 1.15rem; color: var(--muted); }

/* Button */
.button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #1b1500;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
}
.button:hover { filter: brightness(0.92); }

/* Project boxes: automatically wrap on small screens */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem;
}
article h3 { margin-top: 0; }

/* Footer */
footer { border-top: 1px solid var(--line); color: var(--muted); }

/* Visible outline when using the keyboard */
a:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ===== Clickable project cards =====
   The link's ::after stretches over the whole card,
   so clicking anywhere on the card opens the project page. */
article { position: relative; }
article h3 a { text-decoration: none; }
article h3 a::after { content: ""; position: absolute; inset: 0; }
article:hover { border-color: var(--ink); }
article:focus-within { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ===== Project detail pages ===== */
.project h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 0.5rem; }
.project .lead { font-size: 1.15rem; color: var(--muted); }
.project h2 { font-size: 1.4rem; margin-top: 2.5rem; }
.project ul { max-width: 60ch; padding-left: 1.2rem; }
.back { display: inline-block; margin-bottom: 2rem; }
.project-nav { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 3rem; }

/* ===== Resume download button (outlined style) ===== */
.button-outline {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
  margin-left: 0.5rem;
}
.button-outline:hover { background: var(--ink); color: var(--bg); filter: none; }
@media (max-width: 480px) { .button-outline { margin-left: 0; } }

/* ===== Images and subheadings on project pages ===== */
.project h3 { font-size: 1.15rem; margin: 1.75rem 0 0.25rem; }
.project figure { margin: 1.25rem 0; max-width: 720px; }
.project figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.project figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; }

/* Inline code, such as network addresses */
code { background: #e3ece8; padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.92em; }

/* ===== About section ===== */
#about h3 { font-size: 1.1rem; margin: 1.75rem 0 0.75rem; }
.skills { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skills li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.9rem; font-size: 0.95rem; }
.about-link { margin-left: 0; }

/* ===== Hosting section ===== */
.flow { max-width: 60ch; padding-left: 1.2rem; }
.flow li { margin-bottom: 0.6rem; }

/* Email shown as plain text in the Contact section */
.email { font-size: 1.1rem; margin-bottom: 0; }
.email + .button-outline { margin-left: 0; }

/* ===== Profile photo in the About section (square) ===== */
.about-grid { display: flex; flex-wrap: wrap; gap: 2rem; align-items: flex-start; }
.profile-photo {
  width: 300px;               /* change this number to make the photo bigger or smaller */
  aspect-ratio: 1 / 1;        /* always a perfect square */
  max-width: 100%;            /* keeps it from overflowing on small phones */
  object-fit: cover;          /* crops the photo to fill the square */
  border-radius: 8px;         /* slightly rounded corners; use 0 for sharp corners */
  border: 3px solid var(--line);
  background: var(--card);
}
.about-text { flex: 1 1 320px; }
