/* ============================================================
   DOMINIQUE GOWENS — PORTFOLIO SITE
   Dark theme: black background, 9Dime brand red accents.

   Mobile-first: the plain rules are the PHONE layout.
   @media (min-width: …) blocks ADD complexity for bigger screens.
   ============================================================ */

/* ---------- 1. DESIGN TOKENS ----------
   Both brand colours are sampled directly from the logo file:
   it contains exactly two — #ffffff and #ff0000.

   Every value below was measured for contrast, not chosen by eye.
   Ratios are against --bg (#000). WCAG AA needs 4.5:1 for normal
   text, 3:1 for large text and for UI components like input borders. */
:root {
  --bg:          #000000;
  --bg-soft:     #0d0d0d;   /* alternating section bands */
  --surface:     #151515;   /* cards, tags, inputs — lifted off the page */

  --ink:         #f2f2f2;   /* body text            18.76:1  ✓ */
  --muted:       #a8a8a8;   /* secondary text        8.83:1  ✓ */

  --line:        #262626;   /* decorative dividers — no contrast requirement */
  --line-ui:     #6b6b6b;   /* input borders         3.94:1  ✓ (UI components need 3:1) */

  --accent:      #ff0000;   /* brand red             5.25:1  ✓ */
  --accent-soft: #ff4d4d;   /* hover / emphasis      6.42:1  ✓ */
  --accent-dim:  #7a0000;   /* deep red for fills and rings */

  /* Text placed ON a red background.
     Counterintuitive but measured: white on #ff0000 is only 4.00:1 and FAILS AA.
     Black on #ff0000 is 5.25:1 and passes. So red buttons get black labels. */
  --on-accent:   #000000;

  --radius:      10px;
  --maxw:        1080px;
  --maxw-narrow: 680px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  /* Tells the browser this is a dark page, so scrollbars, form controls
     and autofill styling render dark instead of light-on-dark. */
  color-scheme: dark;
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--on-accent); }

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

/* ---------- 3. LAYOUT HELPERS ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.container--narrow { max-width: var(--maxw-narrow); }

.section { padding-block: 3.5rem; }
.section--alt { background: var(--bg-soft); border-block: 1px solid var(--line); }

.section__title {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin-bottom: 1.75rem;
  position: relative;
  padding-bottom: 0.75rem;
  color: #fff;
}
.section__title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 42px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.section__lede { color: var(--muted); margin-bottom: 1.75rem; }

/* ---------- 4. ACCESSIBILITY ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  padding: 0.75rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

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

/* ---------- 5. HEADER / NAV ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
  flex-wrap: wrap;
}
.nav__brand { display: flex; align-items: center; }
.nav__brand img {
  height: 30px;              /* width follows the 4.9:1 aspect ratio */
  width: auto;
}

.nav__toggle {
  display: grid; gap: 5px;
  background: none; border: 0; cursor: pointer;
  padding: 0.5rem;
}
.nav__toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s, background 0.2s;
}
.nav__toggle[aria-expanded="true"] span { background: var(--accent); }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__menu {
  display: none;
  width: 100%;
  padding-block: 0.75rem 1rem;
  gap: 0.25rem;
  flex-direction: column;
}
.nav__menu.is-open { display: flex; }

.nav__menu a {
  display: block;
  padding: 0.6rem 0.25rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.15s;
}
.nav__menu a:hover { color: var(--accent); }
.nav__cta { color: var(--ink) !important; font-weight: 600; }

/* ---------- 6. HERO ---------- */
.hero {
  padding-block: 3.5rem 3rem;
  background:
    radial-gradient(900px 400px at 12% -15%, rgba(255, 0, 0, 0.16) 0%, transparent 62%),
    var(--bg);
}
.hero__eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.hero__title {
  font-size: clamp(2.1rem, 8vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #ffffff;
}
.hero__subtitle {
  font-size: clamp(1.05rem, 3.6vw, 1.35rem);
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.4rem;
}
.hero__lede {
  margin-top: 1.25rem;
  max-width: 60ch;
  color: var(--muted);
  font-size: 1.03rem;
}
.hero__actions {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  margin-top: 1.75rem;
}
.hero__stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.hero__stats strong {
  display: block;
  font-size: 1.6rem;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.hero__stats span { color: var(--muted); font-size: 0.9rem; }

/* ---------- 7. BUTTONS ---------- */
.btn {
  display: inline-block;
  padding: 0.72rem 1.35rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, transform 0.08s, border-color 0.15s, color 0.15s;
}
.btn:active { transform: translateY(1px); }

/* Black label on red — see the --on-accent note in the tokens block */
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-soft); }

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent-dim);
}
.btn--ghost:hover { border-color: var(--accent); background: rgba(255,0,0,0.08); }
.btn--full { width: 100%; }

/* ---------- 8. TIMELINE (experience) ---------- */
.timeline { display: grid; gap: 2rem; }
.timeline__item {
  position: relative;
  padding-left: 1.25rem;
  border-left: 2px solid var(--line);
}
.timeline__item::before {
  content: "";
  position: absolute;
  left: -7px; top: 0.55rem;
  width: 12px; height: 12px;
  background: var(--bg);
  border: 3px solid var(--accent);
  border-radius: 50%;
}
.timeline__meta {
  display: flex; align-items: center; gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}
.timeline__dates {
  font-size: 0.82rem; font-weight: 600;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.timeline__badge {
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--accent); color: var(--on-accent);
  padding: 0.15rem 0.5rem; border-radius: 999px;
}
/* Muted variant: deep red fill with a light red label */
.timeline__badge--soft {
  background: rgba(255, 0, 0, 0.15);
  color: var(--accent-soft);
  border: 1px solid var(--accent-dim);
}
.timeline__role { font-size: 1.1rem; color: #fff; letter-spacing: -0.01em; }
.timeline__lead { color: var(--accent-soft); font-weight: 500; }
.timeline__org { color: var(--muted); font-size: 0.92rem; margin-bottom: 0.7rem; }
.timeline__points { display: grid; gap: 0.45rem; }
.timeline__points li {
  position: relative; padding-left: 1.1rem;
  font-size: 0.95rem; color: #d6d6d6;
}
.timeline__points li::before {
  content: "";
  position: absolute; left: 0; top: 0.62em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}
.timeline__points strong { color: #fff; }

/* ---------- 9. SKILLS ---------- */
.skills { display: grid; gap: 1.75rem; }
.skills__group h3 {
  font-size: 0.82rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent);
  margin-bottom: 0.8rem;
}
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tags li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.87rem;
  color: #d6d6d6;
  transition: border-color 0.15s, color 0.15s;
}
.tags li:hover { border-color: var(--accent-dim); color: #fff; }

/* ---------- 10. CARDS (certifications) ---------- */
.cards { display: grid; gap: 1rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.card__status {
  display: inline-block;
  font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  padding: 0.18rem 0.55rem; border-radius: 999px;
  margin-bottom: 0.6rem;
}
/* Both states are red now, distinguished by fill weight rather than hue:
   solid = earned, outlined = in progress. */
.card__status--done { background: var(--accent); color: var(--on-accent); }
.card__status--wip  {
  background: transparent; color: var(--accent-soft);
  border: 1px solid var(--accent-dim);
}
.card__title { font-size: 1rem; color: #fff; }
.card__meta { font-size: 0.87rem; color: var(--muted); margin-top: 0.2rem; }

.education { margin-top: 2.25rem; }
.education__title {
  font-size: 0.82rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent); margin-bottom: 0.8rem;
}
.education__list { display: grid; gap: 0.9rem; }
.education__list strong { display: block; color: #fff; font-size: 0.98rem; }
.education__list span { color: var(--muted); font-size: 0.9rem; }

/* ---------- 11. PROSE ---------- */
.prose { max-width: 68ch; display: grid; gap: 1rem; }
.prose p { color: #d6d6d6; }

/* ---------- 12. FORM ---------- */
.form { display: grid; gap: 1rem; }
.form__row { display: grid; gap: 1rem; }
.form__field { display: grid; gap: 0.35rem; }
.form__field span { font-size: 0.85rem; font-weight: 600; color: #fff; }

.form input, .form textarea {
  font: inherit;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line-ui);   /* 3.94:1 — inputs are UI components */
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  width: 100%;
}
.form input::placeholder, .form textarea::placeholder { color: #8a8a8a; }
.form input:focus, .form textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.25);
}
.form textarea { resize: vertical; }

.form__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}
.form__note { font-size: 0.9rem; color: var(--muted); min-height: 1.2em; }
.form__note[data-state="error"] { color: var(--accent-soft); }
.form__note[data-state="ok"]    { color: #4ade80; }

/* ---------- 13. FOOTER ---------- */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding-block: 2rem;
  margin-top: 1rem;
}
.site-footer__inner { display: grid; gap: 1rem; }
.site-footer__name { color: #fff; font-weight: 700; }
.social { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.social a {
  color: var(--muted); text-decoration: none; font-size: 0.92rem;
  border-bottom: 1px solid transparent; transition: color 0.15s, border-color 0.15s;
}
.social a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.site-footer__copy { font-size: 0.85rem; color: #8a8a8a; }

/* ============================================================
   14. WIDER SCREENS
   ============================================================ */

@media (min-width: 640px) {
  .hero__stats { grid-template-columns: repeat(3, 1fr); }
  .form__row   { grid-template-columns: 1fr 1fr; }
  .cards       { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .section     { padding-block: 4.5rem; }
  .nav__brand img { height: 34px; }
}

@media (min-width: 860px) {
  .nav__toggle { display: none; }
  .nav__menu {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    width: auto;
    gap: 1.75rem;
    padding-block: 0;
  }
  .nav__cta {
    border: 1px solid var(--accent-dim);
    border-radius: var(--radius);
    padding: 0.45rem 0.95rem !important;
    color: var(--accent) !important;
  }
  .nav__cta:hover { background: rgba(255,0,0,0.1); }

  .hero { padding-block: 5.5rem 4.5rem; }
  .skills { grid-template-columns: repeat(3, 1fr); gap: 2.25rem; }
  .timeline__item { padding-left: 1.75rem; }
  .section__title { font-size: 1.75rem; }

  .site-footer__inner { grid-template-columns: 1fr auto; align-items: center; }
  .site-footer__copy { grid-column: 1 / -1; }
}

/* ---------- 15. PRINT ----------
   Printing a black page wastes ink and looks wrong, so the print
   stylesheet flips back to dark-on-white. */
@media print {
  .site-header, .nav, .hero__actions, .form, .skip-link { display: none; }
  body { color: #000; background: #fff; }
  .hero, .section--alt, .site-footer, .card, .tags li { background: none !important; }
  .hero__title, .section__title, .timeline__role, .card__title,
  .education__list strong, .site-footer__name { color: #000; }
  .hero__subtitle, .hero__eyebrow, .hero__stats strong,
  .skills__group h3, .education__title { color: #c00; }
  a { text-decoration: none; color: #000; }
}
