/* Maps brand-tokens.css shared values to site-specific variables.
   brand-tokens.css must be loaded before this file.
   Colors here use Option A: slate-tinted white backgrounds —
   cool, modern, professional. Pairs with sage accents. */
:root {
  /* Backgrounds — from brand tokens */
  --cream:          #F4F5F7;         /* var(--brand-cool-bg) */
  --cream-dark:     #ECEEF1;         /* var(--brand-cool-bg-alt) */
  --off-white:      #FAFBFC;

  /* Sage family — from brand tokens */
  --sage:           #A3B087;         /* var(--brand-sage-bright) */
  --sage-deep:      #7A8A60;
  --sage-btn:       #5A7045;         /* var(--brand-sage-dark) — accessible button */
  --sage-label:     #4A5E30;         /* var(--brand-sage-deep) — accessible text */

  /* Slate family */
  --slate:          #435663;         /* var(--brand-slate) */
  --slate-deep:     #313647;         /* var(--brand-dark) */
  --slate-mid:      #4E6070;         /* var(--brand-slate-mid) */
  --slate-light:    #A8B8C2;         /* var(--brand-slate-light) */

  /* Typography — from brand tokens */
  --font-display:   'Archivo Black', sans-serif;   /* var(--brand-font-mt) */
  --font-mono:      'Courier Prime', 'Courier New', monospace; /* var(--brand-font-mono) */
  --font-body:      'DM Sans', sans-serif;          /* var(--brand-font-body) — shared */
}

/* Standard box-model reset. border-box on everything so padding
   doesn't blow out widths — saves a lot of headaches with grid layouts. */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html { scroll-behavior: smooth; }
body {
  background-color: var(--cream);
  color: var(--slate-deep);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Skip link — visually hidden until focused. Lets keyboard/screen reader
   users jump to main content without tabbing through the entire nav. */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--slate-deep);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
}

/* Fixed nav with backdrop blur so it feels glass-like over the hero.
   rgba opacity at 0.95 so the cream shows through slightly when scrolling.
   Box shadow gets added via JS after 50px scroll — starts clean. */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1.2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(244, 245, 247, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(67, 86, 99, 0.15);
  transition: box-shadow 0.3s ease;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--slate-deep);
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}
/* Full name shown on desktop, initials on mobile.
   Initials are slightly larger since MT at 1rem
   looks too small as a monogram. */
.nav-logo-full     { display: inline; }
.nav-logo-initials { display: none; font-size: 1.2rem; letter-spacing: 0.08em; }
.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--slate);
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--sage);
  transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--sage-deep); }
.nav-links a:hover::after { width: 100%; }

/* Two-column grid: text left, photo right. Min-height 100vh so it always
   fills the screen on first load. Photo column fades to transparent at the
   bottom using a CSS mask so it blends into the section below. */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 4rem;
  padding: 9rem 3rem 5rem;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 70% at 85% 50%, rgba(163, 176, 135, 0.22) 0%, transparent 70%),
    radial-gradient(ellipse 30% 40% at 100% 0%, rgba(163, 176, 135, 0.12) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero-deco {
  position: absolute;
  right: -1%;
  bottom: -4%;
  font-family: var(--font-display);
  font-size: 22rem;
  color: rgba(49, 54, 71, 0.04);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  letter-spacing: -0.05em;
}
.hero-content {
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 1.4rem;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.7s ease 0.2s forwards;
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 5.8vw, 5.2rem);
  line-height: 1.0;
  color: var(--slate-deep);
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(22px);
  animation: fadeUp 0.8s ease 0.38s forwards;
}
.hero-name .last {
  color: var(--sage-deep);
  display: block;
}
.hero-specialty {
  margin-top: 1.8rem;
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 1.6vw, 1.1rem);
  color: var(--slate);
  min-height: 2rem;
  letter-spacing: 0.03em;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.65s forwards;
}
.cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background-color: var(--sage);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}
.hero-desc {
  margin-top: 1.6rem;
  max-width: 460px;
  font-size: 0.92rem;
  color: var(--slate-mid);
  line-height: 1.88;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.85s forwards;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  margin-top: 2.4rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s ease 1.05s forwards;
}
.hero-visual {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  animation: fadeIn 1s ease 0.5s forwards;
  overflow: hidden;
}

.hero-photo {
  width: 100%;
  max-width: 500px;
  height: 580px;
  object-fit: cover;
  object-position: center top;
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

/* Skill tags sit below the hero in their own row rather than inside the
   hero grid — easier to control wrapping on mobile this way. */
.hero-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 1.2rem 3rem 2rem;
  background-color: var(--cream);
  border-top: 1px solid var(--cream-dark);
}
.hero-tags-row .skill-tag {
  margin-left: 0 !important;
}

/* All three button types share the same base so they're always the same
   height. The trick: btn-primary and btn-sage get border: 1px solid transparent
   to match btn-secondary's visible border — otherwise they render at
   different heights and look misaligned, especially on mobile. */
.btn-primary,
.btn-sage,
.btn-secondary {
  display: inline-block;
  padding: 0.85rem 2.1rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
}
.btn-primary {
  background-color: var(--slate-deep);
  color: var(--cream);
}
.btn-primary:hover {
  background-color: var(--slate);
  transform: translateY(-1px);
}
.btn-sage {
  background-color: #5A7045;
  color: var(--off-white);
}
.btn-sage:hover {
  background-color: #3E5230;
  transform: translateY(-1px);
}
.btn-secondary {
  background-color: transparent;
  color: var(--slate-deep);
  border-color: var(--slate-light);
  font-weight: 400;
}
.btn-secondary:hover {
  border-color: var(--sage);
  color: var(--sage-deep);
}

/* Left-border accent color changes per tag to add variety without
   using completely different styles. The staggered margin-left on desktop
   creates an offset cascade effect — removed on mobile. */
.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 1.3rem;
  background-color: var(--off-white);
  border: 1px solid var(--cream-dark);
  border-left: 3px solid var(--sage);
  font-size: 1rem;
  font-weight: 400;
  color: var(--slate);
  letter-spacing: 0.02em;
  box-shadow: 2px 4px 18px rgba(49, 54, 71, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}
.skill-tag:hover {
  transform: translateX(5px);
  box-shadow: 6px 8px 24px rgba(49, 54, 71, 0.1);
}
.skill-tag:nth-child(2) { border-left-color: var(--slate);     margin-left: 1.8rem; }
.skill-tag:nth-child(3) { border-left-color: var(--sage-deep); margin-left: 1rem;   }
.skill-tag:nth-child(4) { border-left-color: var(--slate-mid); margin-left: 2.6rem; }
.skill-tag:nth-child(5) { border-left-color: var(--sage);      margin-left: 0.5rem; }
.skill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--sage);
  flex-shrink: 0;
}
.skill-tag:nth-child(2) .skill-dot { background-color: var(--slate); }
.skill-tag:nth-child(3) .skill-dot { background-color: var(--sage-deep); }
.skill-tag:nth-child(4) .skill-dot { background-color: var(--slate-mid); }
.skill-tag:nth-child(5) .skill-dot { background-color: var(--sage); }

/* Section padding, headings, and dividers used across all sections.
   clamp() on section-title means I don't need separate breakpoint overrides
   for font size — it scales fluidly between the min and max values. */
section { padding: 6.5rem 3rem; }

.section-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #4A5E30;
  margin-bottom: 0.7rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  line-height: 1.1;
  color: var(--slate-deep);
  letter-spacing: -0.01em;
}
.section-title strong {
  color: var(--sage-deep);
}
.divider {
  width: 2.5rem;
  height: 2px;
  background-color: var(--sage);
  margin: 1.4rem 0 2rem;
}

/* Reveal animations — sections fade up as they scroll into view.
   Default state is visible so if JS fails, content still shows.
   The .js-loaded class gets added by JS on load, which activates
   the hidden starting state. Means no flash of invisible content. */
.reveal {
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js-loaded .reveal {
  opacity: 0;
  transform: translateY(28px);
}
.js-loaded .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }

/* Global img reset so images never overflow their containers.
   project-thumb images scale up slightly on card hover — subtle
   zoom effect that makes the cards feel interactive. */
img {
  display: block;
  max-width: 100%;
  height: auto;
}
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}
.project-card:hover .project-thumb img {
  transform: scale(1.04);
}

/* Two-column layout: bio text left, stat grid right. Removed the
   headshot that was here — redundant since the hero already has a photo.
   Six stat cards with real numbers (550M, 40+, 10K+) do more work
   than a second headshot would. */
#about {
  background-color: var(--off-white);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.about-text p {
  font-size: 1rem;
  color: var(--slate-mid);
  line-height: 1.92;
  margin-bottom: 1.1rem;
}
.about-text p strong {
  color: var(--slate-deep);
  font-weight: 500;
}
.about-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.3rem;
}
.stat-card {
  padding: 1.7rem;
  background-color: var(--cream);
  border: 1px solid var(--cream-dark);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}
.stat-card:hover { transform: translateY(-3px); }
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--sage);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.stat-card:hover::before { transform: scaleX(1); }
.stat-number {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--slate-deep);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 0.9rem;
  color: var(--slate-mid);
  margin-top: 0.4rem;
  line-height: 1.5;
}

/* Cards use auto-fill with a 300px minimum so the grid self-adjusts
   to any screen width without media query overrides.
   Filter tabs toggle a .hidden class — display:none in CSS,
   toggled by JS based on data-cat attribute on each card. */
#portfolio { background-color: var(--cream); }
.portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 2rem;
}
.filter-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.filter-tab {
  padding: 0.42rem 1.2rem;
  background-color: transparent;
  border: 1px solid var(--slate-light);
  color: var(--slate);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
}
.filter-tab:hover,
.filter-tab.active {
  background-color: var(--slate-deep);
  border-color: var(--slate-deep);
  color: var(--cream);
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.4rem;
}
.project-card {
  background-color: var(--off-white);
  border: 1px solid var(--cream-dark);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(49, 54, 71, 0.1);
}
.project-card.hidden { display: none; }
.project-thumb {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.project-card[data-cat="email"]     .project-thumb { background: linear-gradient(140deg, #C8D4DC 0%, #B0C0CC 100%); }
.project-card[data-cat="quadient"]  .project-thumb { background: linear-gradient(140deg, #C4D0AC 0%, #A8BA90 100%); }
.project-card[data-cat="microsite"] .project-thumb { background: linear-gradient(140deg, #E4E8D4 0%, #CED4B8 100%); }
.project-card[data-cat="freelance"] .project-thumb { background: linear-gradient(140deg, #C4CED8 0%, #B0BEC8 100%); }
.project-thumb-icon { font-size: 2.6rem; opacity: 0.35; }
.project-cat-badge {
  position: absolute;
  top: 0.8rem; left: 0.8rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background-color: rgba(244, 245, 247, 0.94);
  color: var(--slate);
}
.project-info { padding: 1.5rem; }
.project-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--slate-deep);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.project-desc {
  font-size: 1rem;
  color: var(--slate-mid);
  line-height: 1.75;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-top: 1rem;
}
.tag {
  padding: 0.16rem 0.6rem;
  background-color: var(--cream-dark);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  color: var(--slate);
}

/* Dark section using slate-deep background — creates strong contrast
   after the light portfolio section. Grid gap of 1px with a matching
   background color creates the divider lines between service items
   without actual borders. */
#services {
  background-color: var(--slate-deep);
  color: var(--cream);
}
#services .section-label  { color: #B8C8D4; } /* lightened slightly for contrast on dark bg */
#services .section-title  { color: var(--cream); }
#services .section-title strong { color: var(--sage); }
#services .divider        { background-color: var(--sage); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 1px;
  background-color: rgba(163, 176, 135, 0.15);
  margin-top: 3rem;
  border: 1px solid rgba(163, 176, 135, 0.15);
}
.service-item {
  padding: 2.5rem 2rem;
  background-color: var(--slate-deep);
  transition: background-color 0.3s ease;
}
.service-item:hover { background-color: rgba(163, 176, 135, 0.07); }
.service-num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--sage);
  line-height: 1;
  opacity: 0.6;
  margin-bottom: 1rem;
}
.service-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--cream);
  margin-bottom: 0.7rem;
}
.service-desc {
  font-size: 1rem;
  color: var(--slate-light);
  line-height: 1.85;
}

/* Two-column: contact info left, form right. cream-dark background
   gives this section a distinct feel from the portfolio above it
   without going full dark like services. */
#contact {
  background-color: var(--cream-dark);
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 5rem;
  align-items: start;
}
.contact-intro p {
  font-size: 1rem;
  color: var(--slate);
  line-height: 1.9;
  margin-bottom: 1.2rem;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1.8rem;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--slate);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease;
}
.contact-link:hover { color: var(--sage-deep); }
.contact-link-icon {
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--cream);
  border: 2px solid var(--slate-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  color: var(--slate);
}
.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--slate);
}
.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.82rem 1rem;
  background-color: var(--off-white);
  border: 1px solid var(--slate-light);
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--slate-deep);
  outline: none;
  transition: border-color 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--sage); }
.form-group textarea { height: 110px; resize: vertical; }
#form-success {
  display: none;
  font-size: 1rem;
  color: var(--sage-deep);
  margin-top: 0.4rem;
}

/* Keeps the same slate-deep as services so the page ends on
   a dark note — feels grounded rather than just cutting off. */
footer {
  background-color: var(--slate-deep);
  color: var(--slate-light);
  padding: 2.2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-links { display: flex; gap: 2rem; list-style: none; }
.footer-links a {
  color: var(--slate-light);
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-links a:hover { color: var(--sage); }

.btn-about {
  display: inline-block;
  margin-top: 1.6rem;
}
.btn-submit {
  width: fit-content;
}

/* Focus styles — keyboard users need to see where focus is.
   Using focus-visible so mouse users don't see the ring,
   only keyboard users do. Outline offset keeps it from
   overlapping the element border. */
*:focus-visible {
  outline: 2px solid #4A5E30;
  outline-offset: 3px;
}
.card-link:focus-visible {
  outline: 2px solid #4A5E30;
  outline-offset: 0;
  box-shadow: inset 0 0 0 2px #4A5E30;
}
.filter-tab:focus-visible {
  outline: 2px solid #4A5E30;
  outline-offset: 2px;
}

/* fadeUp used for hero content elements staggered with animation-delay.
   fadeIn used for the hero photo — no upward movement, just opacity.
   blink is for the typewriter cursor. */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Hamburger menu for mobile — hidden on desktop, shown below 580px.
   Uses a button toggle handled by JS. Pure CSS transitions
   for the open/close animation. */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 200;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--slate-deep);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(242, 238, 232, 0.98);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}
.nav-mobile-menu.open {
  display: flex;
}
.nav-mobile-menu a {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--slate-deep);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}
.nav-mobile-menu a:hover {
  color: #4A5E30;
}

/* Below 960px: hero drops to single column, about and contact
   sections also go single column. Skill tag margins reset to zero
   since the cascade offset only works on wider screens. */
@media (max-width: 960px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { gap: 1.5rem; }

  .hero {
    grid-template-columns: 1fr;
    padding: 7rem 1.5rem 4rem;
    gap: 3rem;
  }
  .hero-bg,
  .hero-deco { display: none; }
  .hero-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .skill-tag:nth-child(2),
  .skill-tag:nth-child(3),
  .skill-tag:nth-child(4),
  .skill-tag:nth-child(5) { margin-left: 0; }

  #about  { grid-template-columns: 1fr; gap: 3rem; }
  #contact { grid-template-columns: 1fr; gap: 3rem; }
  section { padding: 4.5rem 1.5rem; }
}

/* Below 580px: hamburger replaces the nav links. */
@media (max-width: 580px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  /* Swap full name for MT initials — removes the duplicate
     with the h1 hero heading directly below the nav */
  .nav-logo-full     { display: none; }
  .nav-logo-initials { display: inline; }
  .hero-visual { grid-template-columns: 1fr; }
  .portfolio-header { flex-direction: column; align-items: flex-start; }
  .about-stats { grid-template-columns: 1fr; }
  footer { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }

  /* Buttons stack full width and match exactly */
  .hero-cta {
    flex-direction: column;
  }
  .hero-cta .btn-primary,
  .hero-cta .btn-sage,
  .hero-cta .btn-secondary,
  .btn-about,
  .btn-submit {
    width: 100%;
    text-align: center;
  }
}

/* Testimonial from Andri Koiava, Senior Design Manager at Scrip Companies —
   placed between Services and Contact because that's where a visitor is
   deciding whether to reach out. A real colleague quote at that moment
   carries more weight than it would anywhere else on the page. */
#testimonials {
  background-color: var(--off-white);
}
.testimonial-grid {
  display: grid;
  grid-template-columns: minmax(0, 720px);
  gap: 1.5rem;
  margin-top: 1rem;
  /* Single card — constrain width and center it. When a second
     testimonial is added, change to: repeat(auto-fill, minmax(480px, 1fr)) */
}
.testimonial-card {
  background-color: var(--cream);
  border: 1px solid var(--cream-dark);
  border-left: 4px solid var(--sage);
  padding: 2.2rem 2.4rem;
  margin: 0;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.testimonial-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(49, 54, 71, 0.08);
}
.testimonial-card::before {
  content: '\201C';
  font-family: Georgia, serif;
  font-size: 5rem;
  color: var(--sage);
  opacity: 0.25;
  position: absolute;
  top: 0.5rem;
  left: 1.4rem;
  line-height: 1;
}
.testimonial-quote {
  font-size: 1rem;
  color: var(--slate-mid);
  line-height: 1.9;
  font-style: italic;
  margin: 0 0 1.4rem;
  padding-left: 0.5rem;
}
.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-left: 0.5rem;
  border-top: 1px solid var(--cream-dark);
  padding-top: 1rem;
}
.testimonial-name {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--slate-deep);
  letter-spacing: -0.01em;
}
.testimonial-title {
  font-size: .9rem;
  color: var(--sage-deep);
  font-weight: 400;
}
.testimonial-context {
  font-size: 0.875rem;
  color: var(--slate-light);
  letter-spacing: 0.03em;
}
@media (max-width: 580px) {
  .testimonial-grid { grid-template-columns: 1fr; }
}

/* Project cards are wrapped in anchor tags linking to the contact
   section. No live project URLs yet — when real screenshots and case
   study pages exist, update the href on each card to the actual URL.
   The "View Details" label uses ::after so it doesn't affect the DOM. */
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.card-link:hover {
  outline: none;
}
/* Slides up from the bottom on hover rather than fading in place —
   feels more purposeful, like you're revealing something. */
.project-thumb::after {
  content: 'View Details \2192';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.6rem 1rem;
  background: rgba(49, 54, 71, 0.82);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.project-card:hover .project-thumb::after {
  opacity: 1;
  transform: translateY(0);
}

/* === Section transition band ===
   A 6px sage strip sits between the cream portfolio and the dark
   services section. Small but makes the transition feel intentional. */
.section-transition {
  height: 6px;
  background: var(--sage);
  width: 100%;
}

/* === Hall of Fame ===
   Grid of Outlook rendering bugs + fixes. Monospace numbers and code
   snippets match the Courier Prime typewriter font used elsewhere.
   Border-grid layout means adding more items just extends the grid. */
#hall-of-fame {
  background-color: var(--off-white);
  border-top: 1px solid var(--cream-dark);
  border-bottom: 1px solid var(--cream-dark);
}
.hof-header { max-width: 760px; }
.hof-intro {
  font-size: 1rem;
  color: var(--slate-mid);
  line-height: 1.85;
  max-width: 640px;
  margin-top: 0.5rem;
}
.hof-aside {
  display: inline-block;
  margin-left: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #4A5E30;
}
.hof-list {
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 0;
  border-top: 1px solid var(--cream-dark);
  border-left: 1px solid var(--cream-dark);
}
.hof-item {
  display: flex;
  gap: 1.4rem;
  padding: 2rem;
  border-right: 1px solid var(--cream-dark);
  border-bottom: 1px solid var(--cream-dark);
  background: var(--off-white);
  transition: background-color 0.25s ease;
}
.hof-item:hover { background: var(--cream); }
.hof-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #4A5E30;
  letter-spacing: 0.1em;
  flex-shrink: 0;
  padding-top: 0.2rem;
}
.hof-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--slate-deep);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.hof-desc {
  font-size: 0.95rem;
  color: var(--slate-mid);
  line-height: 1.8;
}
.hof-desc code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background-color: var(--cream);
  color: var(--slate-deep);
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
}
@media (max-width: 580px) {
  .hof-list { grid-template-columns: 1fr; }
}

/* === Featured Case Study ===
   Two-column: narrative copy left, stats sidebar right.
   The stats sidebar uses the same left-border accent as skill tags.
   cs-link uses an underline style instead of a button — feels
   more editorial, less "click here". */
#case-study {
  background-color: var(--cream);
  border-top: 1px solid var(--cream-dark);
}
.cs-wrap {}
.cs-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
  align-items: start;
  margin-top: 1rem;
}
.cs-copy p {
  font-size: 1rem;
  color: var(--slate-mid);
  line-height: 1.92;
  margin-bottom: 1.1rem;
}
.cs-link {
  display: inline-block;
  margin-top: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: #4A5E30;
  text-decoration: none;
  border-bottom: 1px solid var(--sage);
  padding-bottom: 0.2rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.cs-link:hover {
  color: var(--slate-deep);
  border-color: var(--slate-deep);
}
.cs-link:focus-visible {
  outline: 2px solid #4A5E30;
  outline-offset: 3px;
}
.cs-stats {
  display: grid;
  gap: 1rem;
  padding: 2rem;
  background: var(--off-white);
  border: 1px solid var(--cream-dark);
  border-left: 4px solid var(--sage);
}
.cs-stat {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--cream-dark);
}
.cs-stat:last-child { border-bottom: 0; padding-bottom: 0; }
.cs-stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--slate-deep);
  letter-spacing: -0.02em;
  line-height: 1;
  min-width: 4rem;
}
.cs-stat-label {
  font-size: 0.9rem;
  color: var(--slate-mid);
  line-height: 1.4;
}
@media (max-width: 760px) {
  .cs-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* === Inline quote above Contact ===
   Andri's quote pulled out of the card and placed full-width in
   display type at the decision point. max-width + auto margins
   keep it from getting too wide on large screens. */
.inline-quote {
  max-width: 100%;
  padding: 3.5rem 3rem 0.5rem;
  text-align: center;
  background: var(--cream-dark);
}
.inline-quote p {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  line-height: 1.45;
  color: var(--slate-deep);
  letter-spacing: -0.01em;
  max-width: 800px;
  margin: 0 auto;
}
.inline-quote-attr {
  display: block;
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #4A5E30;
  letter-spacing: 0.04em;
}

/* === Footer rebuild ===
   Two rows: top has the tagline + email, bottom has copyright + nav.
   Tagline in Courier Prime matches the typewriter/technical aesthetic.
   border-bottom on footer-top uses a semi-transparent sage so the
   divider is subtle but visible. */
footer {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  padding: 0 !important;
}
.footer-top {
  padding: 2.4rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(163, 176, 135, 0.18);
}
.footer-tagline {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--cream);
  letter-spacing: 0.02em;
  margin: 0;
}
.footer-email {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--sage);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}
.footer-email:hover { color: var(--off-white); }
.footer-email:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }
.footer-bottom {
  padding: 1.4rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--slate-light);
}
@media (max-width: 580px) {
  .footer-top { padding-left: 1.5rem; padding-right: 1.5rem; }
  .footer-bottom { padding-left: 1.5rem; padding-right: 1.5rem; flex-direction: column; text-align: center; }
}


/* ═══════════════════════════════════════════════════
   UX ENHANCEMENTS
   All subtle — user feels the quality without
   being able to name exactly what's different.
   ═══════════════════════════════════════════════════ */

/* 1. SCROLL PROGRESS BAR
   Fixed to top of viewport, z-index above the nav.
   Width driven by JS. transition makes it smooth
   rather than jumping in pixel increments. */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #4A5E30, var(--sage));
  z-index: 200;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* 2. STAT COUNTER
   No extra CSS needed — numbers are plain text and
   the animation is handled entirely in JS.
   The stat-card hover already handles the visual lift. */

/* 3. SCROLL SPY — active nav item
   Underline appears on the link matching the current section.
   Uses the same sage underline as hover so it feels consistent,
   not like a separate "selected" treatment. */
.nav-links a.nav-active {
  color: var(--sage-deep);
}
.nav-links a.nav-active::after {
  width: 100%;
}

/* 4. STAGGERED PORTFOLIO CARDS
   Cards start invisible and slightly shifted down.
   JS adds .card-visible with a per-card delay.
   Using opacity + transform instead of display so
   the transition is GPU-accelerated. */
.portfolio-grid .project-card {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease, box-shadow 0.3s ease;
}
.portfolio-grid .project-card.card-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Cards that are hidden by filter stay hidden
   regardless of the card-visible class */
.portfolio-grid .project-card.hidden {
  display: none;
}

/* 5. FLOATING FORM LABELS
   Labels use absolute positioning to sit inside the field,
   then slide up and shrink when the field is focused or has a value.
   form-group needs relative positioning as the anchor. */
.form-group {
  position: relative;
}
.form-group label {
  position: absolute;
  top: 0.82rem;
  left: 1rem;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: none;
  color: var(--slate-mid);
  pointer-events: none;
  transition: top 0.2s ease, font-size 0.2s ease, color 0.2s ease, letter-spacing 0.2s ease;
  background: transparent;
  padding: 0 2px;
  z-index: 1;
}
/* Label floats up when focused or has value */
.form-group.focused label,
.form-group.has-value label {
  top: -0.55rem;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4A5E30;
  background-color: var(--off-white);
  padding: 0 4px;
}
/* Input gets extra top padding so text doesn't overlap
   the floating label position */
.form-group input,
.form-group textarea {
  padding-top: 1rem;
}
/* Select doesn't use floating label — kept static since
   the placeholder option handles the empty state */
.form-group select + label,
.form-group:has(select) label {
  position: static;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--slate);
  background: transparent;
  pointer-events: auto;
  transition: none;
}

/* 6. BACK TO TOP BUTTON
   Fixed bottom-right. Starts invisible (opacity 0, shifted down).
   JS adds .visible class after scrolling past the hero.
   Arrow character scales up slightly on hover. */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 2.8rem;
  height: 2.8rem;
  background-color: #5A7045;
  color: var(--off-white);
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
  z-index: 90;
  pointer-events: none;
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#back-to-top:hover {
  background-color: #3E5230;
  transform: translateY(-2px);
}
#back-to-top:focus-visible {
  outline: 2px solid #4A5E30;
  outline-offset: 3px;
}

/* HERO SPECIALTY — fade rotation
   Opacity transition creates the cross-fade effect.
   JS adds .fading class to trigger the fade-out,
   swaps the text, then removes it for fade-in. */
#hero-specialty-text {
  display: inline-block;
  transition: opacity 0.4s ease;
}
#hero-specialty-text.fading {
  opacity: 0;
}
