/* ==========================================================
   Michael Hoskinson — portfolio
   Mobile-first. Navy + neutral palette, one blue accent.
   Fonts: Plus Jakarta Sans (headings), Inter (body).
   ========================================================== */

:root {
  --bg: #F7F6F3;
  --surface: #FFFFFF;
  --text: #1E2430;
  --text-muted: #5B6575;
  --primary: #1F3A5F;
  --primary-hover: #162B47;
  --on-primary: #FFFFFF;
  --accent: #3E7CB1;
  --border: #E2E0DA;
  --link: var(--primary);   /* accent is too light for small text on light bg */
  --brass: #B08442;         /* second color: lines, dots, card edges */
  --brass-text: #8A6327;    /* darker brass for small text (5:1 on --bg) */

  /* Navy hero band + header */
  --hero-bg: #1F3A5F;
  --hero-text: #FFFFFF;
  --hero-muted: #C9D3E0;
  --hero-brass: #D4A962;
  --hero-btn-hover: #E2BD7E;
  --hero-btn-text: #1F3A5F;
  --input-border: #B5BAC3;
  --shadow: rgb(15 30 50 / 0.28);

  --font-head: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 10px;
  --header-h: 60px;
  --space: clamp(4rem, 10vw, 7rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1623;
    --surface: #182233;
    --text: #E8ECF2;
    --text-muted: #9AA7B8;
    --primary: #6FA8DC;
    --primary-hover: #8DBBE5;
    --on-primary: #0F1623;
    --accent: #A9C7E8;
    --border: #26334A;
    --link: var(--accent);
    --brass: #D4A962;
    --brass-text: #D4A962;
    --hero-bg: #182233;
    --hero-text: #E8ECF2;
    --hero-muted: #9AA7B8;
    --hero-btn-text: #0F1623;
    --input-border: #3A4A63;
    --shadow: rgb(0 0 0 / 0.5);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h3 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0 0 1.1em; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }

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

.container { width: min(100% - 32px, 1080px); margin-inline: auto; }
.container--narrow { width: min(100% - 32px, 680px); }

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--primary); color: var(--on-primary);
  padding: 0.6em 1em; border-radius: var(--radius); text-decoration: none;
}
.skip-link:focus { top: 12px; }


/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--hero-bg) 94%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.is-scrolled { border-bottom-color: rgb(255 255 255 / 0.08); }
.site-header :focus-visible,
.hero :focus-visible { outline-color: var(--hero-brass); }

.nav {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav__brand {
  font-family: var(--font-head); font-weight: 700; font-size: 1.1rem;
  color: var(--hero-text); text-decoration: none; white-space: nowrap; letter-spacing: -0.01em;
}
.nav__brand:hover { color: var(--hero-text); }
.nav__brand-full { display: none; }
.nav__links {
  display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0;
}
.nav__links a {
  display: block; padding: 0.5rem 0.55rem; border-radius: 6px;
  color: var(--hero-muted); text-decoration: none; font-size: 0.95rem; font-weight: 500;
}
.nav__links a:hover,
.nav__links a[aria-current="true"] { color: var(--hero-brass); }

@media (max-width: 380px) {
  .nav { gap: 0.5rem; }
  .nav__links { gap: 0; }
  .nav__links a { padding: 0.5rem 0.4rem; font-size: 0.875rem; }
}

@media (min-width: 560px) {
  .nav__brand-full { display: inline; }
  .nav__brand-short { display: none; }
  .nav__links { gap: 0.5rem; }
  .nav__links a { padding: 0.5rem 0.75rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.7rem 1.6rem;
  border-radius: 8px; border: 2px solid var(--primary);
  font: 600 1rem/1 var(--font-head); text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
.btn--ghost { background: transparent; color: var(--primary); }
.btn--ghost:hover { background: var(--primary); color: var(--on-primary); }

/* ---------- Hero ---------- */
.hero {
  padding: 2.5rem 0 clamp(3.5rem, 8vw, 5.5rem);
  background: var(--hero-bg);
  color: var(--hero-text);
}
.hero .btn--primary { background: var(--hero-brass); border-color: var(--hero-brass); color: var(--hero-btn-text); }
.hero .btn--primary:hover { background: var(--hero-btn-hover); border-color: var(--hero-btn-hover); color: var(--hero-btn-text); }
.hero .btn--ghost { border-color: var(--hero-text); color: var(--hero-text); }
.hero .btn--ghost:hover { background: var(--hero-text); color: var(--hero-bg); }
.hero__inner { display: grid; gap: 2.5rem; align-items: center; }
.hero__photo { order: -1; }

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--hero-brass); font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.85rem;
}
.hero h1 { font-size: clamp(2.4rem, 7vw, 3.75rem); margin-bottom: 1.25rem; letter-spacing: -0.02em; color: var(--hero-text); }

.hero__tagline {
  margin: 0 0 2rem; padding-left: 1.1rem;
  border-left: 3px solid var(--hero-brass);
  font-size: clamp(1.1rem, 2.6vw, 1.25rem); line-height: 1.55;
  color: var(--hero-muted);
}
.hero__tagline p { margin: 0; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero__photo img {
  width: 100%; max-width: 240px; margin-inline: 0 auto;
  aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 24px 50px -24px rgb(0 0 0 / 0.55);
}

@media (min-width: 820px) {
  .hero { padding-top: 4.5rem; }
  .hero__inner { grid-template-columns: 1.15fr 0.85fr; gap: 4rem; }
  .hero__photo { order: 0; }
  .hero__photo img { max-width: 420px; margin-inline: auto; }
}

/* ---------- Sections ---------- */
.section { padding: var(--space) 0; }
.section--tint {
  background: var(--surface);
  border-block: 1px solid var(--border);
}
.section__intro { color: var(--text-muted); margin-top: -0.25rem; margin-bottom: 2rem; }
.lead { font-size: 1.2rem; color: var(--text); }

/* ---------- About ---------- */
.about { display: grid; gap: 2.5rem; }
.about__photo { margin: 0; max-width: 360px; }
.about__photo img { border-radius: 14px; aspect-ratio: 2 / 3; object-fit: cover; }
.about__photo figcaption { margin-top: 0.6rem; font-size: 0.9rem; color: var(--text-muted); }
@media (min-width: 820px) {
  .about { grid-template-columns: 1fr 320px; gap: 4rem; align-items: start; }
  .about__photo { position: sticky; top: calc(var(--header-h) + 24px); }
}

.facts {
  margin: 2rem 0 0; padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid; gap: 0.75rem;
}
.facts div { display: grid; gap: 0.1rem; }
.facts dt { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass-text); }
.facts dd { margin: 0; }
@media (min-width: 560px) {
  .facts div { grid-template-columns: 9.5rem 1fr; gap: 1rem; align-items: baseline; }
}

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 2rem 0 3rem; padding: 0; border-left: 2px solid var(--border); }
.timeline__item { position: relative; padding: 0 0 2rem 1.5rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: ""; position: absolute; left: -7px; top: 0.4rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--brass); box-shadow: 0 0 0 4px var(--surface);
}
.timeline__item h3 { margin-bottom: 0.15rem; }
.timeline__dates { margin: 0 0 0.2rem; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass-text); }
.timeline__type { font-family: var(--font-body); font-size: 0.85rem; font-weight: 400; color: var(--text-muted); margin-left: 0.35rem; }
.timeline__place { color: var(--text-muted); margin-bottom: 0.5rem; }
.timeline__item p:last-child { margin-bottom: 0; }
.timeline__list { margin: 0.5rem 0 0; padding-left: 1.1rem; }
.timeline__list li { margin-bottom: 0.4rem; }
.timeline__list li::marker { color: var(--brass); }

/* ---------- Experience cards ---------- */
.cards {
  display: grid; gap: 1rem;
  list-style: none; margin: 0; padding: 0;
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: 3px solid var(--brass);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card p:last-child { margin-bottom: 0; }

@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; } }

/* ---------- Media ---------- */
.videos { display: grid; gap: 2rem; }
@media (min-width: 760px) { .videos { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; } }

.video { margin: 0; }
.video figcaption { margin-top: 0.6rem; font-family: var(--font-head); font-weight: 600; color: var(--primary); }
.video figcaption span { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.9rem; color: var(--text-muted); }

.video__frame {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius); background: #0F1623;
}
.video__frame iframe,
.video__frame img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }

.video__play {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: grid; place-items: center;
  border: 0; padding: 0; background: transparent; cursor: pointer;
}
.video__play img { transition: transform 0.3s, filter 0.3s; filter: brightness(0.85); }
.video__play:hover img, .video__play:focus-visible img { transform: scale(1.03); filter: brightness(0.7); }
.video__play-icon {
  position: relative; width: 68px; height: 68px; border-radius: 50%;
  background: rgb(255 255 255 / 0.94); display: grid; place-items: center;
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.35);
}
.video__play-icon::after {
  content: ""; margin-left: 5px;
  border-style: solid; border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #1F3A5F;
}
.video__frame:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.video__play:focus-visible { outline: none; }

.video__empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #9AA7B8; font-style: italic; border: 2px dashed #26334A; border-radius: var(--radius);
}

/* ---------- Contact form ---------- */
.form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: clamp(1.25rem, 4vw, 2rem);
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 500; margin-bottom: 0.35rem; }
.field input,
.field textarea {
  width: 100%; padding: 0.75rem 0.9rem;
  font: inherit; font-size: 1rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--input-border); border-radius: 8px;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form .btn { width: 100%; }
@media (min-width: 480px) { .form .btn { width: auto; } }

.form__status { margin: 1rem 0 0; min-height: 1.5em; font-weight: 500; }
.form__status.is-error { color: #B42318; }
@media (prefers-color-scheme: dark) { .form__status.is-error { color: #FF9B8F; } }

/* ---------- Social ---------- */
.social {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.5rem;
  list-style: none; margin: 2.5rem 0 0; padding: 0;
}
.social a {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 44px; padding: 0 0.25rem;
  color: var(--text-muted); text-decoration: none; font-weight: 500;
}
.social a:hover { color: var(--link); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 2rem 0; text-align: center;
  color: var(--text-muted); font-size: 0.9rem;
}
.site-footer p { margin: 0; }
