/* =========================================================
   gavinmack.com — shared stylesheet
   Sky-blue backdrop, white panels framed in orange + yellow,
   pixel-font accents (the same palette as the original banner).
   ========================================================= */

@font-face {
  font-family: "Nokia";
  src: url("../fonts/nokiafc22.ttf") format("truetype");
  font-display: swap;
}

:root {
  --sky: #ade4fa;
  --sky-light: #d4f1fd;
  --sky-deep: #3a9fd1;
  --orange: #ff7a00;
  --orange-dark: #d96400;
  --yellow: #ffd400;
  --ink: #1b2430;
  --muted: #4d5b6b;
  --line: #e3eef4;
  --white: #ffffff;
  --radius: 18px;
  --radius-sm: 10px;
  --frame: 0 0 0 5px var(--orange), 0 0 0 10px var(--yellow);
  --lift: 0 18px 40px -18px rgba(20, 70, 110, 0.45);
  --max: 1100px;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pixel: "Nokia", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--sky);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(255,255,255,0.55) 0 120px, transparent 121px),
    radial-gradient(circle at 88% 30%, rgba(255,255,255,0.35) 0 90px, transparent 91px);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--orange-dark); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--orange); }

:focus-visible { outline: 3px solid var(--sky-deep); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--white); padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 16px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 4px solid var(--orange);
  box-shadow: 0 4px 0 var(--yellow);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink);
  font-weight: 900; font-size: 1.3rem; letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 0 5px var(--orange), 0 0 0 9px var(--yellow);
  margin: 9px;
  flex: none;
}

.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav > a, .nav .dropdown > a {
  display: inline-block; padding: 8px 14px; border-radius: 999px;
  color: var(--ink); font-weight: 800; text-decoration: none; font-size: 0.98rem;
}
.nav > a:hover, .nav .dropdown > a:hover,
.nav > a[aria-current="page"], .nav .dropdown > a[aria-current="page"] {
  background: var(--sky-light); color: var(--ink);
}
.nav > a[aria-current="page"], .nav .dropdown > a[aria-current="page"] {
  box-shadow: inset 0 0 0 2px var(--orange);
}

.dropdown { position: relative; }
.dropdown > a::after { content: " \25BE"; font-size: 0.8em; }
.dropdown-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px;
  background: var(--white); border-radius: var(--radius-sm);
  border: 3px solid var(--orange); box-shadow: var(--lift);
  padding: 6px; display: none; flex-direction: column;
}
.dropdown-menu::before { content: ""; position: absolute; inset: -12px 0 auto 0; height: 12px; }
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { display: flex; }
.dropdown-menu a {
  padding: 8px 12px; border-radius: 8px; text-decoration: none;
  color: var(--ink); font-weight: 700;
}
.dropdown-menu a:hover, .dropdown-menu a[aria-current="page"] { background: var(--sky-light); }

/* ---------- Panels (the orange/yellow frame) ---------- */
.panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--frame), var(--lift);
  padding: clamp(22px, 4vw, 44px);
  margin: 10px;
}

/* Speech-bubble variant with a tail, like the original banner */
.bubble { position: relative; }
.bubble::after {
  content: ""; position: absolute; left: 70px; bottom: -32px;
  border-width: 22px 18px 0 18px; border-style: solid;
  border-color: var(--yellow) transparent transparent transparent;
}
.bubble::before {
  content: ""; position: absolute; left: 75px; bottom: -20px; z-index: 1;
  border-width: 16px 13px 0 13px; border-style: solid;
  border-color: var(--orange) transparent transparent transparent;
}

main { flex: 1; padding-block: 40px 64px; }

/* ---------- Typography ---------- */
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 0.5em; font-weight: 900; }
h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }
.prose { max-width: 70ch; }

.eyebrow {
  font-family: var(--pixel); font-size: 0.8rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--orange-dark); margin: 0 0 10px;
}

/* ---------- Buttons & tags ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; font-weight: 800;
  text-decoration: none; font-size: 1rem; line-height: 1.2;
  border: 3px solid var(--orange); color: var(--ink); background: var(--white);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 0 var(--yellow); color: var(--ink); }
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: var(--orange-dark); color: var(--white); }
.btn svg { width: 18px; height: 18px; flex: none; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 14px 0 0; }
.tags li {
  font-family: var(--pixel); font-size: 0.72rem; letter-spacing: 0.04em;
  padding: 5px 10px; border-radius: 6px;
  background: var(--sky-light); color: var(--ink); border: 2px solid var(--sky);
}

/* ---------- Home hero ---------- */
.hero { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; margin-bottom: 72px; }
.avatar {
  width: clamp(140px, 22vw, 220px); aspect-ratio: 1; border-radius: 50%;
  object-fit: cover; object-position: 50% 18%;
  box-shadow: 0 0 0 10px var(--orange), 0 0 0 20px var(--yellow);
  margin: 20px;
  background: var(--white);
}
.hero h1 { margin-bottom: 6px; }
.hero .role { font-size: clamp(1.15rem, 2.4vw, 1.45rem); font-weight: 800; color: var(--muted); margin-bottom: 14px; }

/* ---------- Section headers ---------- */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 10px 22px; }
.section-head h2 { margin: 0; }

/* ---------- Project cards ---------- */
.cards { display: grid; gap: 34px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--frame), var(--lift);
  margin: 10px; text-decoration: none; color: var(--ink);
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-4px); color: var(--ink); }
.card-media { position: relative; aspect-ratio: 961 / 270; overflow: hidden; background: var(--sky-light); }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.3s ease; }
.card-media .alt { opacity: 0; }
.card:hover .card-media .alt, .card:focus-visible .card-media .alt { opacity: 1; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: 6px; }
.card-body p { color: var(--muted); margin: 0; }
.card-body .tags { margin-top: auto; padding-top: 16px; }
.card-cta { font-weight: 800; color: var(--orange-dark); margin-top: 14px; }

/* ---------- Project pages ---------- */
.page-head { margin-bottom: 40px; }
.banner-img { border-radius: 12px; width: 100%; margin-bottom: 28px; }
.stack > * + * { margin-top: 40px; }
.two-col { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: start; }

.video { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.gallery { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.gallery a { display: block; border-radius: 12px; overflow: hidden; border: 3px solid var(--sky); background: var(--sky-light); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.3s ease; }
.gallery a:hover img { transform: scale(1.04); }

.figure { margin: 0; }
.figure img { border-radius: 12px; border: 3px solid var(--sky); }
.figure figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 8px; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 26px 0 0; }
.facts div { background: var(--sky-light); border-radius: var(--radius-sm); padding: 12px 16px; }
.facts dt { font-family: var(--pixel); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-weight: 800; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.about-photo { border-radius: 14px; border: 5px solid var(--yellow); box-shadow: 0 0 0 5px var(--orange); margin: 5px; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 20%; width: calc(100% - 10px); }

/* ---------- Resume ---------- */
.pdf-frame { width: 100%; height: min(1100px, 80vh); border: 3px solid var(--sky); border-radius: 12px; margin-top: 28px; background: var(--sky-light); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--white);
  border-top: 4px solid var(--orange);
  box-shadow: 0 -4px 0 var(--yellow);
  padding: 26px 0;
  font-family: var(--pixel); font-size: 0.78rem; color: var(--muted);
}
.site-footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.social { display: flex; gap: 10px; }
.social a {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--sky-light); color: var(--ink); border: 2px solid var(--sky);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.social a:hover { background: var(--yellow); border-color: var(--orange); color: var(--ink); }
.social svg { width: 20px; height: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; justify-items: start; }
  .two-col, .about { grid-template-columns: 1fr; }
  .about-photo { max-width: 300px; }
  .site-header .wrap { padding-block: 8px; }
  .nav { width: 100%; justify-content: flex-start; margin-left: -12px; }
  .dropdown-menu { display: none !important; }
  .dropdown > a::after { content: ""; }
  .section-head { flex-direction: column; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
