/* Tolu Agbaje-Daniels — backend engineering portfolio */

/* ---------- Tokens ---------- */
:root {
  --bg: #f6f7f9;
  --paper: #ffffff;
  --ink: #17212b;
  --ink-2: #46535e;
  --muted: #64717d;
  --faint: #8a969f;
  --line: #e2e7eb;
  --accent: #236b59;
  --accent-bright: #3a9878;
  --soft: #edf3f1;
  --dark: #17242d;
  --dark-2: #21323b;
  --header-bg: rgba(246, 247, 249, .86);
  --shadow: 0 1px 2px rgba(23, 33, 43, .04), 0 12px 32px -12px rgba(23, 33, 43, .18);
  --mono: "DM Mono", ui-monospace, monospace;
  --sans: "DM Sans", system-ui, sans-serif;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f171d;
    --paper: #152029;
    --ink: #e8eef1;
    --ink-2: #b9c5cc;
    --muted: #93a1aa;
    --faint: #6f7d86;
    --line: #24323c;
    --accent: #5cc09d;
    --accent-bright: #4fb592;
    --soft: #15262a;
    --dark: #16242d;
    --dark-2: #1d2f39;
    --header-bg: rgba(15, 23, 29, .82);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6);
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--accent); color: #fff; }

.section-wrap { width: min(1120px, calc(100% - 56px)); margin-inline: auto; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 20;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 6px; font-size: 13px;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  height: 72px;
  padding: 0 max(28px, calc((100% - 1120px) / 2));
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid transparent;
  background: var(--header-bg);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  transition: border-color .25s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.wordmark { font-weight: 700; font-size: 22px; letter-spacing: -1.5px; }
.wordmark span { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 30px; font-size: 13px; color: var(--ink-2); }
.nav a { position: relative; padding: 4px 0; transition: color .2s; }
.nav a:not(.nav-contact)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav a:hover, .nav a.active { color: var(--ink); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.nav-contact {
  color: var(--ink); font-weight: 600;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px !important;
  transition: border-color .2s, background .2s;
}
.nav-contact:hover { border-color: var(--ink); }
.menu-toggle {
  display: none; border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  padding: 8px 12px; border-radius: 6px; font: inherit; font-size: 13px; cursor: pointer;
}

/* ---------- Shared type ---------- */
.eyebrow, .meta-label, .project-number, .diagram-label, .timeline-date, .skill-index {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.1px; color: var(--muted);
}
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0; }
.eyebrow-divider { color: var(--faint); }
.status-dot {
  width: 7px; height: 7px; background: var(--accent-bright); border-radius: 50%;
  display: inline-block; flex: none; position: relative;
}
.status-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1.5px solid var(--accent-bright); opacity: 0; animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(.5); opacity: .7; } 100% { transform: scale(1.4); opacity: 0; } }

/* ---------- Buttons & links ---------- */
.button {
  display: inline-flex; align-items: center; gap: 18px;
  padding: 13px 20px; border-radius: 8px; font-size: 13.5px; font-weight: 600;
  transition: transform .2s, background .2s, box-shadow .2s;
}
.button:hover { transform: translateY(-2px); }
.button-dark { background: var(--ink); color: var(--bg); }
.button-dark:hover { box-shadow: var(--shadow); }
.button-light { background: #f3f6f5; color: #17242d; }
.button-light:hover { background: #fff; }
.text-link {
  font-size: 13.5px; font-weight: 600; padding-bottom: 3px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: color .2s, background-size .3s;
}
.text-link:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.35fr .85fr;
  grid-template-areas: "text photo" "meta meta";
  column-gap: 72px; align-items: center;
  padding-top: 96px; padding-bottom: 80px;
  position: relative;
}
.hero::before {
  content: ""; position: absolute; inset: -40px -10% auto auto; width: 520px; height: 520px; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 14%, transparent), transparent);
  pointer-events: none;
}
.hero-text { grid-area: text; }
.hero h1 {
  font-size: clamp(40px, 5.6vw, 70px); line-height: 1.06; letter-spacing: -0.045em;
  font-weight: 600; margin: 26px 0 22px; text-wrap: balance;
}
.muted-heading { color: var(--faint); }
.hero-copy { font-size: 18px; color: var(--muted); max-width: 600px; line-height: 1.75; margin: 0; }
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: 34px; flex-wrap: wrap; }

.hero-photo { grid-area: photo; margin: 0; position: relative; justify-self: end; width: 100%; max-width: 380px; }
.photo-frame {
  position: relative; aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden;
  background: linear-gradient(150deg, var(--dark-2), var(--dark));
  box-shadow: var(--shadow);
  transform: rotate(1.5deg); transition: transform .4s ease;
}
.hero-photo:hover .photo-frame { transform: rotate(0); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.photo-fallback {
  display: none; position: absolute; inset: 0; place-items: center;
  font-size: 84px; font-weight: 700; letter-spacing: -6px; color: #e8eef1;
}
.photo-frame.no-photo img { display: none; }
.photo-frame.no-photo .photo-fallback { display: grid; }
.photo-badge {
  position: absolute; left: -28px; bottom: 26px;
  display: flex; align-items: center; gap: 10px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; font-size: 12px; color: var(--ink-2); box-shadow: var(--shadow);
  max-width: 260px; line-height: 1.4;
}
.photo-badge strong { display: block; font: 500 9.5px var(--mono); letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }

.hero-meta {
  grid-area: meta; display: flex; gap: 72px; margin-top: 72px; padding-top: 22px;
  border-top: 1px solid var(--line);
}
.hero-meta div { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.meta-label { font-size: 9.5px; }

/* ---------- Sections ---------- */
.section-block { padding-top: 80px; padding-bottom: 80px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 50px; margin-bottom: 36px; }
.section-heading h2 { font-size: clamp(28px, 3.5vw, 42px); letter-spacing: -0.04em; line-height: 1.15; margin: 12px 0 0; font-weight: 600; }
.section-intro { max-width: 400px; color: var(--muted); font-size: 14.5px; margin: 0 0 4px; }

/* ---------- Project card ---------- */
.project-card {
  background: var(--dark); color: #f6f8f8; border-radius: 14px; padding: 28px 34px 36px; overflow: hidden;
  position: relative; border: 1px solid #2a3a44;
}
.project-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(#ffffff08 1px, transparent 1px), linear-gradient(90deg, #ffffff08 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at 80% 50%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 80% 50%, #000 10%, transparent 70%);
}
.project-topline { display: flex; justify-content: space-between; align-items: center; padding-bottom: 22px; border-bottom: 1px solid #35434c; position: relative; }
.project-number { color: #aebbc1; }
.project-status { font: 10px var(--mono); letter-spacing: .7px; color: #c5d6d0; display: flex; align-items: center; gap: 8px; }
.project-main { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; padding: 36px 0 6px; position: relative; }
.project-kicker { font: 10px var(--mono); letter-spacing: 1px; color: #9bb5aa; margin: 0; }
.project-copy h3 { font-size: 46px; letter-spacing: -0.045em; margin: 8px 0 10px; line-height: 1.1; }
.project-summary { max-width: 490px; color: #c0cbd0; font-size: 15.5px; margin: 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.tag-list span { border: 1px solid #4a5a63; background: #ffffff06; color: #d7e0e2; border-radius: 999px; padding: 5px 11px; font: 10.5px var(--mono); }
.project-link { display: inline-block; color: #fff; margin-top: 4px; }
.project-link:hover { color: #9fe0c6; }

.architecture-card { background: var(--dark-2); border: 1px solid #42535c; border-radius: 10px; padding: 22px 24px; text-align: center; }
.diagram-label { color: #aab8bd; margin: 0 0 16px; }
.diagram-node { border: 1px solid #5d6f77; border-radius: 6px; padding: 10px 12px; font: 11px var(--mono); color: #e6eeee; background: #2b4049; }
.diagram-client { max-width: 190px; margin: auto; }
.diagram-api { max-width: 220px; margin: auto; border-color: #8eb8a7; background: #28473f; box-shadow: 0 0 0 4px #8eb8a714; }
.diagram-node small { display: block; color: #b8cec4; font-size: 9px; margin-top: 4px; }
.diagram-arrow {
  height: 28px; width: 2px; margin: 0 auto;
  background: repeating-linear-gradient(to bottom, #9bb5aa 0 4px, transparent 4px 8px);
  background-size: 2px 16px; animation: flow 1s linear infinite;
}
@keyframes flow { to { background-position: 0 16px; } }
.diagram-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.diagram-grid .diagram-node { font-size: 10px; padding: 12px 4px; }
.diagram-footnote { font-size: 9.5px; color: #9cabb1; margin: 15px 0 0; }

/* ---------- Case study ---------- */
.case-study { padding: 44px 0 36px; border-bottom: 1px solid var(--line); }
.case-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; }
.case-heading h3 { font-size: 26px; letter-spacing: -0.03em; margin: 10px 0 0; }
.case-type { font: 10px var(--mono); color: var(--muted); border: 1px solid var(--line); padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.case-grid > div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.case-grid h4 { font-size: 14px; margin: 0 0 8px; }
.case-grid p { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.8; }
.case-note { margin-top: 20px; background: var(--soft); padding: 14px 16px; border-left: 2px solid var(--accent); border-radius: 0 6px 6px 0; font-size: 12.5px; color: var(--muted); }
.case-note strong { color: var(--ink); }

.project-placeholder {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  margin-top: 28px; padding: 28px 30px; border: 1.5px dashed var(--line); border-radius: var(--radius);
}
.project-placeholder h3 { font-size: 19px; margin: 6px 0; }
.project-placeholder p:not(.eyebrow) { font-size: 13.5px; color: var(--muted); margin: 4px 0 0; }
.placeholder-mark { font: 12px var(--mono); color: var(--faint); }

/* ---------- More work (NDA cards) ---------- */
.more-work { margin-top: 40px; }
.more-work-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.nda-pill { font: 10px var(--mono); letter-spacing: .6px; color: var(--accent); background: var(--soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); padding: 5px 10px; border-radius: 999px; }
.mini-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.mini-card {
  display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px; transition: transform .25s, border-color .25s, box-shadow .25s;
}
.mini-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }
.mini-index { font: 11px var(--mono); color: var(--faint); }
.mini-kicker { font: 10px var(--mono); letter-spacing: 1px; color: var(--accent); margin: 16px 0 0; }
.mini-card h3 { font-size: 24px; letter-spacing: -0.03em; margin: 4px 0 10px; }
.mini-card > p:not(.mini-kicker) { font-size: 13.5px; color: var(--muted); margin: 0 0 18px; line-height: 1.75; flex: 1; }
.mini-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-tags span { font: 10px var(--mono); color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 9px; }
.small-note { font-size: 12px; color: var(--faint); margin: 14px 0 0; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.timeline-item { display: grid; grid-template-columns: 220px 1fr; gap: 30px; padding: 28px 0; border-bottom: 1px solid var(--line); position: relative; }
.timeline-date { padding-top: 6px; }
.timeline-item h3 { font-size: 18px; margin: 0 0 8px; letter-spacing: -0.01em; }
.company-at { font-weight: 400; color: var(--muted); }
.timeline-item p { max-width: 680px; color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.skill-group {
  min-height: 150px; padding: 22px 24px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.skill-group:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }
.skill-index { color: var(--accent); }
.skill-group h3 { font-size: 16px; margin: 14px 0 6px; }
.skill-group p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.8; }

/* ---------- Contact ---------- */
.contact-section { background: var(--dark); color: #fff; padding: 96px 0; position: relative; overflow: hidden; }
.contact-section::before {
  content: ""; position: absolute; width: 600px; height: 600px; right: -150px; top: -200px;
  background: radial-gradient(closest-side, #3a987833, transparent); pointer-events: none;
}
.contact-inner { position: relative; }
.contact-inner h2 { font-size: clamp(34px, 5vw, 60px); line-height: 1.08; letter-spacing: -0.045em; margin: 18px 0; font-weight: 600; }
.contact-inner > p:not(.eyebrow) { color: #bac6cb; max-width: 480px; font-size: 15px; }
.contact-section .eyebrow { color: #9bb5aa; }
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 12px; margin-top: 36px; }
.contact-card {
  position: relative; display: grid; gap: 6px; padding: 18px 20px; border-radius: 10px;
  border: 1px solid #34454f; background: #ffffff08; color: #e8eef1;
  transition: transform .2s, border-color .2s, background .2s;
}
.contact-card:hover { transform: translateY(-2px); border-color: #6fbfa0; background: #ffffff10; }
.contact-card-primary { background: #f3f6f5; color: #17242d; border-color: transparent; }
.contact-card-primary:hover { background: #fff; border-color: transparent; }
.contact-label { font: 9.5px var(--mono); letter-spacing: 1.1px; color: #9bb5aa; }
.contact-card-primary .contact-label { color: #236b59; }
.contact-value { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; padding-right: 18px; }
.contact-arrow { position: absolute; right: 18px; top: 16px; font-size: 14px; opacity: .7; transition: transform .2s; }
.contact-card:hover .contact-arrow { transform: translate(2px, -2px); opacity: 1; }
.contact-foot { display: flex; align-items: center; gap: 10px; margin: 28px 0 0; font: 11px var(--mono); letter-spacing: .4px; color: #9fb0b6; }

/* ---------- Footer ---------- */
.site-footer { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--faint); font-size: 12px; }
.site-footer .wordmark { color: var(--ink); }
.back-top:hover { color: var(--ink); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.hero-text, .hero-photo { animation: rise .8s ease both; }
.hero-photo { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; grid-template-areas: "photo" "text" "meta"; padding-top: 56px; }
  .hero-photo { justify-self: start; max-width: 220px; margin-bottom: 36px; }
  .photo-badge { left: auto; right: -150px; bottom: 18px; }
  .hero-meta { gap: 40px; flex-wrap: wrap; }
  .project-main { grid-template-columns: 1fr; gap: 30px; }
  .architecture-card { max-width: 440px; width: 100%; }
  .mini-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .section-wrap { width: calc(100% - 32px); }
  .site-header { height: 64px; padding: 0 16px; }
  .menu-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 63px; left: 0; right: 0; background: var(--bg);
    padding: 18px 16px 22px; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start; gap: 16px;
  }
  .nav.open { display: flex; }
  .hero { padding-bottom: 56px; }
  .hero h1 { font-size: clamp(36px, 10vw, 56px); }
  .hero-copy { font-size: 16px; }
  .hero-photo { max-width: 180px; }
  .photo-badge { position: static; margin-top: 14px; max-width: none; width: max-content; }
  .hero-meta { flex-direction: column; gap: 20px; margin-top: 48px; }
  .section-block { padding-top: 60px; padding-bottom: 60px; }
  .section-heading { display: block; }
  .section-intro { margin-top: 14px; }
  .project-card { padding: 22px 18px 26px; }
  .project-copy h3 { font-size: 36px; }
  .case-heading { align-items: flex-start; flex-direction: column; }
  .case-grid { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; gap: 6px; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .skill-group { min-height: 135px; padding: 18px; }
  .contact-section { padding: 68px 0; }
  .site-footer { padding-top: 20px; padding-bottom: 20px; flex-wrap: wrap; }
}

@media (max-width: 440px) {
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 18px; }
  .mini-grid, .contact-grid { grid-template-columns: 1fr; }
  .more-work-head { flex-direction: column; align-items: flex-start; }
  .skills-grid { grid-template-columns: 1fr; }
  .skill-group { min-height: unset; }
  .project-topline { align-items: flex-start; gap: 12px; flex-direction: column; }
  .project-placeholder { flex-direction: column; align-items: flex-start; }
  .photo-badge { width: auto; }
}

/* ---------- Mobile polish ---------- */
/* Stop decorative glows from creating a sideways scroll (clip keeps the sticky header working). */
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button { -webkit-tap-highlight-color: transparent; }
.hero::before { right: 0; max-width: 100%; }

/* Hover lifts only on devices with a real pointer, so cards don't "stick" raised after a tap. */
@media (hover: none) {
  .button:hover, .skill-group:hover, .mini-card:hover, .contact-card:hover { transform: none; box-shadow: none; }
  .hero-photo:hover .photo-frame { transform: rotate(1.5deg); }
}

@media (max-width: 760px) {
  /* Comfortable tap targets (~44px) */
  .menu-toggle { min-height: 44px; min-width: 64px; }
  .wordmark { padding: 6px 0; }
  .text-link, .back-top { display: inline-flex; align-items: center; min-height: 44px; background-position: 0 calc(100% - 10px); }
  .button { min-height: 48px; }

  /* Mobile menu: full-width rows that are easy to tap */
  .nav { gap: 0; padding: 8px 16px 16px; box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .25); }
  .nav a { width: 100%; padding: 13px 0 !important; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav .nav-contact { border: 0; border-radius: 0; margin-top: 4px; color: var(--accent); }

  /* Readable small labels */
  .eyebrow, .meta-label, .project-number, .diagram-label, .timeline-date, .skill-index,
  .project-kicker, .project-status, .mini-kicker, .mini-index, .contact-label, .case-type, .nda-pill { font-size: 11.5px; }
  .tag-list span, .mini-tags span, .diagram-node, .diagram-grid .diagram-node { font-size: 11.5px; }
  .diagram-footnote, .small-note { font-size: 11.5px; }
  .eyebrow { flex-wrap: wrap; row-gap: 4px; }
  .section-intro, .timeline-item p, .case-grid p, .mini-card > p:not(.mini-kicker), .skill-group p { font-size: 15px; }

  /* Hero: photo and "currently" badge side by side, taking less vertical space */
  .hero { padding-top: 36px; }
  .hero-photo { display: flex; align-items: flex-end; gap: 14px; max-width: none; margin-bottom: 28px; }
  .photo-frame { width: 132px; flex: none; transform: none; border-radius: 14px; }
  .photo-badge { margin: 0 0 6px; width: auto; }
  .hero h1 { margin-top: 18px; }
  .hero-meta { margin-top: 40px; }

  .contact-inner h2 br { display: none; }
  .site-footer { gap: 6px 20px; }
}

@media (max-width: 440px) {
  .hero-actions .button { width: 100%; justify-content: space-between; }
  .photo-frame { width: 112px; }
  .photo-badge { font-size: 12.5px; padding: 9px 12px; }
  .project-copy h3 { font-size: 32px; }
  .case-type { white-space: normal; }
}

@media (max-width: 760px) {
  .diagram-node small, .photo-badge strong { font-size: 11px; }
}

/* Tablets and other touchscreens wider than the phone layout */
@media (pointer: coarse) and (min-width: 761px) {
  .nav a { padding: 12px 2px; }
  .nav-contact { min-height: 44px; display: inline-flex; align-items: center; }
  .text-link, .back-top { display: inline-flex; align-items: center; min-height: 44px; background-position: 0 calc(100% - 10px); }
  .wordmark { padding: 6px 0; }
  .eyebrow, .meta-label, .project-number, .diagram-label, .timeline-date, .skill-index,
  .project-kicker, .project-status, .mini-kicker, .mini-index, .contact-label, .case-type, .nda-pill,
  .tag-list span, .mini-tags span, .diagram-node, .diagram-grid .diagram-node, .diagram-footnote, .small-note { font-size: 11.5px; }
  .diagram-node small, .photo-badge strong { font-size: 11px; }
}
