* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --blue: #006bb6;
  --blue-light: #1a80c8;
  --blue-pale: #e8f3fc;
  --orange: #f58426;
  --grey: #9ea0a2;
  --black: #0a0a0a;
  --white: #ffffff;
  --off-white: #f7f6f4;
  --sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  /* Text colour tokens (replaces scattered hardcoded values) */
  --text-secondary: #444444;
  --text-body: #555555;
  --text-on-dark: #aaaaaa;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--white);
  color: var(--black);
  overflow-x: hidden;
}

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

/* ── NAV ── */
.main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--black);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 48px;
  height: 60px;
}

.nav-name {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
}
.nav-name span { color: var(--white); }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--blue); }

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Animate hamburger → X when menu is open */
.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── SECTIONS ── */
section {
  padding: 100px 0 80px;
  scroll-margin-top: 60px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ── HOME ── */
#home {
  display: flex;
  align-items: center;
  min-height: 100vh;
  background: var(--white);
  padding-top: 60px;
  position: relative;
  overflow: hidden;
}

.home-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px;
  position: relative;
  z-index: 1;
}

.home-eyebrow {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 900;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.home-eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1.5px;
  background: var(--orange);
}

.home-name {
  font-family: var(--sans);
  font-size: clamp(52px, 6vw, 88px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 28px;
}

.home-name .dunseath {
  color: var(--blue);
}

.home-tagline {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 420px;
  margin-bottom: 40px;
  border-left: 3px solid var(--blue);
  padding-left: 18px;
}

.home-socials {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1.5px solid var(--black);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--black);
  transition: all 0.25s;
  border-radius: 2px;
}

.social-btn:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,107,182,0.25);
}

.social-btn svg { width: 14px; height: 14px; fill: currentColor; }

/* CV button — .social-btn.cv-btn has higher specificity than .social-btn:hover,
   so no !important needed */
.social-btn.cv-btn {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}
.social-btn.cv-btn:hover {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}

.home-photo-wrap {
  position: relative;
}

.home-photo {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(8%);
  border-radius: 2px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
}

/* ── SECTION HEADERS ── */
.section-label {
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 900;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1.5px;
  background: var(--orange);
}

.section-title {
  font-family: var(--sans);
  font-size: clamp(36px, 4vw, 58px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--black);
  margin-bottom: 56px;
}

.title-accent { color: var(--blue); }

/* ── WORK ── */
#work { background: var(--off-white); }

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.work-card {
  background: var(--white);
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}

/* Last card spans both columns so the grid stays balanced */
.work-card--wide {
  grid-column: 1 / -1;
}

.work-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 0;
  background: var(--orange);
  transition: height 0.35s;
}

.work-card:hover::after { height: 100%; }
.work-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.10);
  z-index: 1;
}

.work-card-label {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--grey);
  font-weight: 900;
  margin-bottom: 14px;
}

.work-card-title {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 14px;
  color: var(--black);
}

.work-card-body {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-body);
}

.work-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1.5px solid var(--blue);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s, gap 0.2s;
}

.work-card-link:hover {
  color: var(--orange);
  border-color: var(--orange);
  gap: 10px;
}

.skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.skill-tag {
  padding: 5px 13px;
  background: var(--blue-pale);
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  border: 1px solid rgba(0,107,182,0.2);
}

/* ── ABOUT ── */
#about {
  background: var(--black);
  position: relative;
  overflow: hidden;
}

#about::after {
  content: 'TD';
  position: absolute;
  right: -0.05em;
  bottom: -0.1em;
  font-family: var(--sans);
  font-size: 28vw;
  font-weight: 400;
  color: rgba(255,255,255,0.025);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

#about .section-title { color: var(--white); font-size: clamp(3rem, 8vw, 6rem); }
#about .section-label { color: var(--orange); }
#work .section-title  { font-size: clamp(3rem, 8vw, 6rem); }
#contact .section-title { font-size: clamp(3rem, 8vw, 6rem); }

.about-body {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.85;
  color: var(--text-on-dark);
  max-width: 780px;
  position: relative;
  z-index: 1;
}

.about-body p + p { margin-top: 22px; }

/* ── CONTACT ── */
#contact { background: var(--white); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-intro {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-secondary);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: var(--black);
  transition: all 0.2s;
}

.contact-item:first-child { border-top: 1px solid #eee; }

.contact-item:hover .contact-item-arrow { transform: translate(6px, -6px); color: var(--blue); }
.contact-item:hover .contact-item-label { color: var(--blue); }

.contact-item-left { display: flex; flex-direction: column; gap: 4px; }

.contact-item-type {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--grey);
  font-weight: 700;
}

.contact-item-label {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}

.contact-item-arrow {
  font-size: 22px;
  color: var(--black);
  transition: transform 0.2s, color 0.2s;
}

/* ── FOOTER ── */
footer {
  background: var(--black);
  padding: 28px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-name {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
}
.footer-name span { color: var(--blue); }

.footer-copy {
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.footer-nav {
  display: flex;
  gap: 28px;
  list-style: none;
}

.footer-nav a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--grey);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav a:hover { color: var(--blue); }

/* ── STRIPE ── */
.stripe {
  height: 4px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-light) 50%, var(--orange) 100%);
}

/* ── SCROLL TO TOP ── */
.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 2px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s, background 0.2s;
  z-index: 99;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  background: var(--black);
  transform: translateY(-3px);
}

/* ── ANIMATIONS ── */
/* Only run motion for users who haven't requested reduced motion */
@media (prefers-reduced-motion: no-preference) {
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .home-eyebrow  { animation: fadeUp 0.6s ease both; animation-delay: 0.10s; }
  .home-name     { animation: fadeUp 0.6s ease both; animation-delay: 0.25s; }
  .home-tagline  { animation: fadeUp 0.6s ease both; animation-delay: 0.40s; }
  .home-socials  { animation: fadeUp 0.6s ease both; animation-delay: 0.55s; }
  .home-photo-wrap { animation: fadeUp 0.7s ease both; animation-delay: 0.30s; }
}

/* Kill all remaining animations and transitions for motion-sensitive users */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .home-inner { gap: 48px; }
  .work-grid  { gap: 2px; }
}

@media (max-width: 768px) {
  .main-nav { padding: 0 20px; }

  .nav-links {
    display: none;
    position: fixed;
    top: 60px; left: 0; right: 0;
    background: var(--black);
    flex-direction: column;
    gap: 0;
    padding: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 18px 24px;
    border-bottom: 1px solid #1a1a1a;
    font-size: 12px;
  }

  .nav-toggle { display: flex; }

  .home-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 0 20px;
  }

  .home-photo-wrap { order: -1; max-width: 280px; }
  .home-name     { font-size: clamp(44px, 12vw, 68px); }
  .home-tagline  { font-size: 15px; }

  .work-grid { grid-template-columns: 1fr; }
  .work-card { padding: 28px 24px; }
  .work-card--wide { grid-column: auto; }
  .capabilities-inner { grid-template-columns: 1fr; gap: 20px; }

  .contact-grid { grid-template-columns: 1fr; gap: 40px; }

  .container { padding: 0 20px; }
  section    { padding: 80px 0 60px; }

  footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding: 28px 20px;
  }
  .footer-nav { justify-content: center; flex-wrap: wrap; gap: 20px; }

  .scroll-top { bottom: 20px; right: 20px; }
}

@media (max-width: 480px) {
  .home-name   { font-size: clamp(38px, 13vw, 56px); }
  .home-socials { gap: 10px; }
  .social-btn  { padding: 9px 16px; font-size: 10px; }
  .section-title { font-size: clamp(30px, 8vw, 46px); margin-bottom: 36px; }
  .work-card   { padding: 24px 20px; }
  nav          { padding: 0 16px; }
  .container   { padding: 0 16px; }
}
