/* ==========================================================================
   Stephen Telford — contracting homepage
   Dark, contemporary, single-page. No build step.
   ========================================================================== */

:root {
  --bg: #0a0c10;
  --bg-alt: #0d1016;
  --surface: #11151c;
  --surface-2: #161b24;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #e8ecf3;
  --text-muted: #9aa5b5;
  --text-dim: #6d7889;

  --accent: #4cc2ff;
  --accent-2: #7c8cff;
  --accent-soft: rgba(76, 194, 255, 0.12);
  --accent-line: rgba(76, 194, 255, 0.35);

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1200px;
  --header-h: 68px;

  --font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  --font-mono:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(
      900px 500px at 15% -10%,
      rgba(76, 194, 255, 0.1),
      transparent 60%
    ),
    radial-gradient(
      800px 500px at 95% 0%,
      rgba(124, 140, 255, 0.09),
      transparent 55%
    );
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.02em;
}
p {
  margin: 0;
}
ul,
ol,
dl,
dd {
  margin: 0;
  padding: 0;
  list-style: none;
}
img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: #7fd3ff;
}

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--surface-2);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    backdrop-filter 0.25s ease;
}
.site-header.scrolled {
  background: rgba(10, 12, 16, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand:hover {
  color: var(--text);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #06121b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px -8px rgba(76, 194, 255, 0.8);
}
.brand-text {
  font-size: 0.98rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav > a:not(.btn) {
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition:
    color 0.18s ease,
    background-color 0.18s ease;
}
.nav > a:not(.btn):hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.nav > a:not(.btn).active {
  color: var(--accent);
}
.nav > a:not(.btn).active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.nav-cta {
  margin-left: 8px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--text);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}
.btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}

.btn-primary {
  border-color: transparent;
  color: #06121b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 30px -14px rgba(76, 194, 255, 0.9);
}
.btn-primary:hover {
  color: #06121b;
  background: linear-gradient(135deg, #63cbff, #8e9cff);
  border-color: transparent;
}

.btn-sm {
  padding: 9px 16px;
  font-size: 0.88rem;
}
.btn-block {
  width: 100%;
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover {
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(64px, 11vw, 132px) 0 clamp(48px, 7vw, 84px);
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  inset: -20% 0 auto 0;
  height: 620px;
  background: radial-gradient(
    600px 320px at 50% 0%,
    rgba(76, 194, 255, 0.14),
    transparent 70%
  );
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 22px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(74, 222, 128, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
  }
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  background: linear-gradient(180deg, #ffffff 25%, #9fb0c8 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-role {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.hero-role::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin: 16px auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.hero-lede {
  max-width: 620px;
  color: var(--text-muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 6px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 0.88rem;
}
.hero-meta li {
  position: relative;
}
.hero-meta li + li::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-dim);
  transform: translateY(-50%);
}

/* --------------------------------------------------------------------------
   Highlight strip
   -------------------------------------------------------------------------- */
.strip {
  border-block: 1px solid var(--border);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0)
  );
}
.strip-viewport {
  position: relative;
}
.strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  padding-block: 30px 24px;
}

/* Page swap: cross-fade with a slight vertical scroll. The leaving page is
   taken out of flow so the incoming page defines the height and nothing jumps. */
.strip-enter-active,
.strip-leave-active {
  transition:
    opacity 0.5s ease,
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.strip-enter-from {
  opacity: 0;
  transform: translateY(16px);
}
.strip-leave-to {
  opacity: 0;
  transform: translateY(-16px);
}
.strip-leave-active {
  position: absolute;
  inset: 0;
}

.strip-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-inline: 24px;
  text-align: center;
  border-left: 1px solid var(--border);
}
.strip-item:first-child {
  border-left: 0;
}
.strip-value {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.strip-label {
  color: var(--text-dim);
  font-size: 0.82rem;
}

/* Rotation controls */
.strip-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding-bottom: 24px;
}
.strip-dots {
  display: flex;
  gap: 8px;
}
.strip-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition:
    width 0.25s ease,
    background-color 0.25s ease;
}
.strip-dot:hover {
  background: rgba(255, 255, 255, 0.4);
}
.strip-dot.active {
  width: 22px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.strip-pause {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}
.strip-pause:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section {
  padding: clamp(64px, 9vw, 104px) 0;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(32px, 5vw, 52px);
}
.section-head h2 {
  margin-top: 14px;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 700;
}
.section-sub {
  margin-top: 14px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 22px 50px -34px rgba(0, 0, 0, 0.9);
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.about-copy {
  display: grid;
  gap: 18px;
  color: var(--text-muted);
}
.about-copy p:first-child {
  color: var(--text);
  font-size: 1.06rem;
}

.about-card h3 {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.fact-list {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}
.fact {
  display: grid;
  gap: 2px;
}
.fact dt {
  color: var(--text-dim);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.fact dd {
  color: var(--text);
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   Skills
   -------------------------------------------------------------------------- */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.skill-card h3 {
  font-size: 1.08rem;
}
.skill-note {
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 0.87rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.tag {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.79rem;
  font-weight: 500;
  white-space: nowrap;
}
.tag-list-sm {
  margin-top: 18px;
}
.tag-list-sm .tag {
  font-size: 0.74rem;
  padding: 4px 9px;
}

/* --------------------------------------------------------------------------
   Timeline / experience
   -------------------------------------------------------------------------- */
.timeline {
  position: relative;
  display: grid;
  gap: 22px;
  padding-left: 34px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(
    180deg,
    var(--accent-line),
    rgba(124, 140, 255, 0.12)
  );
}
.timeline-item {
  position: relative;
}
.timeline-marker {
  position: absolute;
  left: -34px;
  top: 30px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(76, 194, 255, 0.1);
}
.section-alt .timeline-marker {
  background: var(--bg-alt);
}

.job-card {
  padding: 24px 26px;
}
.job-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.job-role {
  font-size: 1.12rem;
}
.job-company {
  margin-top: 3px;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
}
.job-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.job-period {
  color: var(--text-dim);
  font-size: 0.83rem;
  font-family: var(--font-mono);
  white-space: nowrap;
}
.badge {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bullet-list {
  margin-top: 16px;
  display: grid;
  gap: 9px;
}
.bullet-list li {
  position: relative;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.94rem;
}
.bullet-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.68em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.history-toggle {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}
.history-block {
  margin-top: 40px;
}
.history-title {
  margin: 0 0 20px;
  padding-left: 34px;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.history-block .timeline + .history-title {
  margin-top: 46px;
}
.timeline-compact {
  gap: 16px;
}
.timeline-compact .bullet-list {
  margin-top: 14px;
}
.timeline-compact .job-card {
  padding: 20px 24px;
}

/* --------------------------------------------------------------------------
   Results
   -------------------------------------------------------------------------- */
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.result-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.result-value {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.result-label {
  color: var(--text);
  font-weight: 600;
  font-size: 0.98rem;
}
.result-context {
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact {
  padding-bottom: clamp(72px, 10vw, 120px);
}
.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 40px;
  padding: clamp(28px, 4vw, 48px);
  background:
    radial-gradient(
      500px 260px at 0% 0%,
      rgba(76, 194, 255, 0.1),
      transparent 65%
    ),
    linear-gradient(180deg, var(--surface), var(--surface-2));
}
.contact-copy h2 {
  margin-top: 14px;
  font-size: clamp(1.6rem, 3.6vw, 2.1rem);
}
.contact-copy > p {
  margin-top: 16px;
  color: var(--text-muted);
}
.contact-list {
  margin-top: 20px;
  display: grid;
  gap: 8px;
}
.contact-list li {
  position: relative;
  padding-left: 22px;
  color: var(--text-muted);
  font-size: 0.93rem;
}
.contact-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-content: start;
}
.contact-location {
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 0.83rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Reveal animation
   -------------------------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s ease,
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

[v-cloak] {
  display: none;
}

.noscript {
  max-width: 640px;
  margin: 80px auto;
  padding: 0 24px;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .about-grid,
  .contact-card {
    grid-template-columns: 1fr;
  }
  .strip-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px 0;
    padding-block: 26px;
  }
  .strip-item:nth-child(odd) {
    border-left: 0;
  }
  .strip-item:nth-child(n + 3) {
    border-top: 1px solid var(--border);
    padding-top: 20px;
  }
}

@media (max-width: 780px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 24px 22px;
    background: rgba(10, 12, 16, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.2s ease,
      transform 0.2s ease,
      visibility 0.2s;
  }
  .nav.open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav > a:not(.btn) {
    padding: 12px 14px;
    font-size: 1rem;
  }
  .nav > a:not(.btn).active::after {
    display: none;
  }
  .nav-cta {
    margin: 8px 0 0;
  }
}

@media (max-width: 520px) {
  .container {
    padding-inline: 18px;
  }
  .timeline {
    padding-left: 26px;
  }
  .timeline-marker {
    left: -26px;
    width: 14px;
    height: 14px;
  }
  .timeline::before {
    left: 6px;
  }
  .history-title {
    padding-left: 26px;
  }
  .hero-actions {
    width: 100%;
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .job-card {
    padding: 20px;
  }
}

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