/* =========================================================
   Dylan Allison — personal site
   Aesthetic: blueprint navy + hi-vis safety
   ========================================================= */

/* Fonts are self-hosted at /fonts/ (no outside requests), the same files the
   front page and the photo site use, so a visitor downloads them once. */
@font-face {
  font-family: 'Oswald';
  src: url('/fonts/oswald-latin.woff2') format('woff2');
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-latin-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette — deep observatory night */
  --bg:        #0c1622;   /* blueprint navy */
  --bg-2:      #111e2e;
  --surface:   #16263a;
  --line:      #2c4258;
  --line-soft: #1d3044;
  --text:      #eef3f7;   /* drafting white */
  --text-soft: #b3c3d1;
  --muted:     #71879c;
  --accent:    #f7b500;   /* hi-vis yellow */
  --accent-2:  #ff6b2c;   /* safety orange */

  /* Type */
  --display: 'Oswald', 'Arial Narrow', sans-serif;
  --body:    'Archivo', 'Segoe UI', sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --maxw:    1280px;
  --gutter:  clamp(1.25rem, 4vw, 3rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-weight: 380;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;

  /* Subtle atmospheric gradient + grain feel */
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(247,181,0,0.06), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(255,107,44,0.05), transparent 60%);
  background-attachment: fixed;
}

/* Faint film grain via SVG noise */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(120,160,200,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,160,200,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg { display: block; max-width: 100%; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 2;
}

/* ---------- Skip link (keyboard users) ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 14px;
  background: var(--text); color: var(--bg); font: 500 0.8125rem/1 var(--mono);
}
.skip:focus { top: 12px; }
main:focus { outline: none; }

/* ---------- Header ---------- */
.site-header {
  padding-block: 1.6rem 1rem;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
  z-index: 3;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
}

.brand .mark {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  padding: 0.28rem 0.5rem;
  border-radius: 2px;
}

.brand .name { color: var(--text); }

.nav {
  display: flex;
  gap: 1.75rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 400;
}

.nav a {
  position: relative;
  color: var(--text-soft);
  padding-bottom: 0.2rem;
  transition: color 220ms ease;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right 280ms cubic-bezier(0.6, 0, 0.2, 1);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  right: 0;
}

/* Phones: four links plus the full name don't fit on one line, so the
   DA badge stands in for the name (the big name is right below). */
@media (max-width: 560px) {
  .site-header .container { gap: 1rem; }
  .brand .mark { white-space: nowrap; }
  .brand .name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav { gap: 0.95rem; letter-spacing: 0.08em; }
}

/* Small phones: the badge shortens to the initials so the four menu links fit. */
@media (max-width: 400px) {
  .brand .mark .pg { display: none; }
  .site-header .container { gap: 0.75rem; }
  .nav { gap: 0.8rem; letter-spacing: 0.04em; }
}

/* ---------- Coordinate strip ---------- */
.coord-strip {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.coord-strip span { white-space: nowrap; }
.coord-strip .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 0.5rem;
  transform: translateY(-1px);
  box-shadow: 0 0 8px rgba(247,181,0,0.7);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.5rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 240ms ease, border-color 240ms ease, color 240ms ease, transform 240ms ease;
  border-radius: 2px;
}

.btn .arrow {
  transition: transform 240ms cubic-bezier(0.6, 0, 0.2, 1);
}

.btn:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.btn:hover .arrow {
  transform: translateX(4px);
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #14100a;
}

.btn--primary:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ---------- Section labels ---------- */
.section-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-label .num {
  color: var(--accent);
  margin-right: 0.55rem;
}

/* ---------- Page hero ---------- */
.page-hero {
  padding-block: clamp(3rem, 7vw, 5rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line-soft);
}

.page-hero h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0.6rem 0 1.4rem;
}

.page-hero .lede {
  font-family: var(--display);
  font-weight: 320;
  font-variation-settings: 'opsz' 60;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  line-height: 1.5;
  color: var(--text-soft);
  max-width: 60ch;
  margin: 0;
}

/* ---------- Résumé / CV page ---------- */
.cv-actions {
  margin-top: 1.8rem;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}

.btn .down {
  display: inline-block;
  transition: transform 240ms cubic-bezier(0.6, 0, 0.2, 1);
}

.btn:hover .down {
  transform: translateY(3px);
}

.cv-meta-note {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.cv-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  padding-block: clamp(3rem, 5vw, 4.5rem) clamp(3rem, 5vw, 4.5rem);
}

@media (max-width: 880px) {
  .cv-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.cv-sidebar {
  position: sticky;
  top: 2rem;
  align-self: start;
}

@media (max-width: 880px) {
  .cv-sidebar { position: static; }
}

.cv-block {
  margin-bottom: 1.9rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line-soft);
}

.cv-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.cv-block h2 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.7rem;
  font-weight: 500;
}

.cv-block p,
.cv-block ul,
.cv-block address {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-soft);
  font-style: normal;
}

.cv-block ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.cv-block .strong {
  color: var(--text);
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.3;
}

.cv-block a {
  color: var(--text-soft);
  border-bottom: 1px solid transparent;
  transition: color 220ms ease, border-color 220ms ease;
}

.cv-block a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.cv-block .cv-note {
  margin-top: 0.6rem;
  font-size: 0.86rem;
  color: var(--muted);
}

/* Main column */
.cv-section {
  margin-bottom: 2.6rem;
  padding-bottom: 2.6rem;
  border-bottom: 1px solid var(--line-soft);
}

.cv-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.cv-section-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6rem;
}

.cv-section-label .num {
  color: var(--accent);
  margin-right: 0.55rem;
}

.cv-section > h2 {
  font-family: var(--display);
  font-weight: 380;
  font-variation-settings: 'opsz' 90;
  font-size: clamp(1.6rem, 2.5vw, 2.05rem);
  letter-spacing: -0.01em;
  margin: 0 0 1.4rem;
  line-height: 1.15;
}

/* Competencies as compact rows */
.cv-skills {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.7rem;
}

.cv-skills li {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 1.2rem;
  padding-block: 0.55rem;
  border-top: 1px dashed var(--line-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

.cv-skills li:first-child { border-top: 0; padding-top: 0; }

@media (max-width: 640px) {
  .cv-skills li { grid-template-columns: 1fr; gap: 0.2rem; }
}

.cv-skills .label {
  font-family: var(--display);
  font-weight: 500;
  color: var(--text);
}

.cv-skills .detail {
  color: var(--text-soft);
}

/* Roles list */
.cv-roles {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.7rem;
}

.cv-role {
  display: grid;
  gap: 0.45rem;
}

.cv-role-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

.cv-role-meta .at { color: var(--accent); }

.cv-role h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.2rem;
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.cv-role h3 .org {
  display: block;
  font-weight: 400;
  color: var(--accent-2);
  font-size: 0.92em;
  margin-top: 0.1rem;
}

.cv-role ul {
  list-style: none;
  padding: 0;
  margin: 0.35rem 0 0;
  display: grid;
  gap: 0.4rem;
  color: var(--text-soft);
  font-size: 0.94rem;
  line-height: 1.55;
}

.cv-role ul li {
  padding-left: 1rem;
  position: relative;
}

.cv-role ul li::before {
  content: '\25B8';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line-soft);
  padding-block: 2.5rem 2rem;
  margin-top: 3rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.7rem 1.6rem;
}

/* Holds one line down to roughly a 990px viewport. Below that each
   item still stays whole; only under 700px may the copyright break. */
@media (min-width: 700px) {
  .site-footer .container > * { white-space: nowrap; }
}

@media (max-width: 560px) {
  .site-footer { letter-spacing: 0.09em; }
  .site-footer .container { gap: 0.6rem 1.1rem; }
}

.site-footer a {
  color: var(--text-soft);
  border-bottom: 1px solid transparent;
  transition: color 240ms ease, border-color 240ms ease;
}

.site-footer a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Animations ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  animation: rise 900ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.reveal.d1 { animation-delay: 80ms; }
.reveal.d2 { animation-delay: 220ms; }
.reveal.d3 { animation-delay: 360ms; }
.reveal.d4 { animation-delay: 500ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none !important; opacity: 1; }
}

/* ---------- Selection ---------- */
::selection {
  background: var(--accent);
  color: #14100a;
}

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