/* ---------- CSS VARIABLES: edit colors once, whole site updates ---------- */
:root {
  --bg: #0f1419;
  --panel: #18202a;
  --text: #e6edf3;
  --muted: #8b98a5;
  --accent: #3fb8af;
  --line: #243040;
}

* { box-sizing: border-box; }          /* width includes padding: predictable layout math */
html { scroll-behavior: smooth; }       /* animated jump when a nav link is clicked */

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;   /* stays pinned, above other content */
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .5rem;
  padding: 1rem 2rem;
  background: rgba(15, 20, 25, 0.95);
  border-bottom: 1px solid var(--line);
}
.nav nav a { margin-left: 1.25rem; color: var(--muted); }
.nav nav a:hover { color: var(--text); text-decoration: none; }
.brand { font-weight: 700; color: var(--text); }

/* ---------- LAYOUT ---------- */
main { max-width: 960px; margin: 0 auto; padding: 0 1.5rem; }
section { padding: 2.5rem 0; scroll-margin-top: 4rem; } /* keeps headings from hiding under the sticky nav */
h1 { font-size: clamp(2.5rem, 6vw, 4rem); margin: 0; }
h2 { border-bottom: 2px solid var(--accent); display: inline-block; padding-bottom: .25rem; }

.hero { padding: 5rem 0 2rem; }
.tagline { color: var(--muted); font-size: 1.2rem; margin-bottom: .25rem; }
.loc { color: var(--muted); margin-top: 0; }

.button {
  display: inline-block; margin: 1rem .75rem 0 0;
  padding: .7rem 1.4rem;
  background: var(--accent); color: #062321; font-weight: 600;
  border-radius: 6px;
}
.button:hover { text-decoration: none; filter: brightness(1.1); }
.button.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

/* ---------- EXPERIENCE / EDUCATION ---------- */
.item { margin-bottom: 1.75rem; }
.item h3 { margin-bottom: 0; }
.meta { color: var(--muted); margin: .2rem 0 .6rem; }
.item ul { padding-left: 1.2rem; }
.item li { margin-bottom: .45rem; }

/* ---------- PROJECT CARDS ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 1.25rem; }
.card { background: var(--panel); padding: 1.25rem; border-radius: 10px; border: 1px solid var(--line); }
.card h3 { margin: .9rem 0 .4rem; }
.tags { color: var(--muted); font-size: .85rem; }

/* Snapshot box: fixed 16:10 shape so all cards line up even with different image sizes */
.shot {
  margin: 0; aspect-ratio: 16 / 10;
  border: 1px dashed var(--line); border-radius: 8px;
  background: #0c1117; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
/* object-fit: cover crops to fill the box without stretching the picture */
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shot figcaption { color: var(--muted); font-size: .8rem; padding: .5rem; text-align: center; }
/* When a real image loads, hide the placeholder caption.
   The img sits on top, so the caption is covered; this also removes it from screen readers' view of the photo. */
.shot img + figcaption { visibility: hidden; }

/* ---------- SKILLS ---------- */
.skills { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; }
.skills dt { font-weight: 600; }
.skills dd { margin: 0; color: var(--muted); }
@media (max-width: 600px) { .skills { grid-template-columns: 1fr; } } /* stack on phones */

/* ---------- CONTACT / FOOTER ---------- */
.contact { list-style: none; padding: 0; }
.contact li { margin-bottom: .4rem; }
footer { text-align: center; color: var(--muted); padding: 2rem; border-top: 1px solid var(--line); }

/* On narrow phones a 400px minimum would overflow, so let the card shrink to the screen width */
@media (max-width: 480px) { .grid { grid-template-columns: 1fr; } }

/* The snapshot link must fill the box so the whole picture is clickable */
.shot a { position: absolute; inset: 0; display: block; }
