:root {
  --paper: #f2f5f1;
  --paper-strong: #ffffff;
  --ink: #17201b;
  --muted: #607067;
  --line: #d6ded6;
  --charcoal: #20241f;
  --charcoal-soft: #303830;
  --coral: #e85d3f;
  --teal: #0f8f8c;
  --gold: #f0b84a;
  --leaf: #b5c86a;
  --shadow: 0 22px 70px rgba(32, 36, 31, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(15, 143, 140, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 143, 140, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

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

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

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 20;
  padding: 10px 14px;
  transform: translateY(-140%);
  background: var(--ink);
  color: var(--paper);
  border-radius: 6px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 16px 32px;
  border-bottom: 1px solid rgba(222, 215, 201, 0.72);
  background: rgba(242, 245, 241, 0.9);
  backdrop-filter: blur(18px);
}

.brand-mark {
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.main-nav a,
.header-cta {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--charcoal-soft);
  font-size: 0.94rem;
  transition: background 180ms ease, color 180ms ease;
}

.main-nav a:hover,
.header-cta:hover {
  background: rgba(15, 143, 140, 0.12);
  color: var(--ink);
}

.header-cta {
  border: 1px solid var(--line);
  background: var(--paper-strong);
}

.section-band {
  padding: 96px 0;
}

.section-band.alt {
  background: #e8efe8;
}

.section-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  min-height: 86vh;
  display: grid;
  align-items: center;
  padding-top: 72px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 1.05fr);
  align-items: center;
  gap: 56px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: 4.1rem;
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 2.45rem;
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 640px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.17rem;
}

.hero-actions,
.contact-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 7px;
  border: 1px solid transparent;
  font-weight: 800;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--coral);
  color: white;
  box-shadow: 0 12px 26px rgba(232, 93, 63, 0.23);
}

.button.secondary {
  background: var(--paper-strong);
  border-color: var(--line);
  color: var(--ink);
}

.button.compact {
  min-height: 40px;
  padding: 9px 13px;
  font-size: 0.92rem;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 38px 0 0;
}

.hero-facts div {
  min-height: 116px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.72);
}

.hero-facts dt {
  font-size: 1.85rem;
  line-height: 1;
  font-weight: 900;
}

.hero-facts dd {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-showcase {
  position: relative;
  min-height: 560px;
}

.browser-frame,
.mini-preview,
.spotlight,
.project-card,
.service-card,
.timeline-item,
.skill-column,
.contact-panel {
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: 8px;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
}

.browser-frame {
  position: relative;
  overflow: hidden;
  transform: rotate(1deg);
}

.primary-preview {
  min-height: 481px;
}

.browser-bar {
  display: flex;
  gap: 7px;
  padding: 13px;
  background: var(--charcoal);
}

.browser-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--leaf);
}

.browser-bar span:nth-child(2) {
  background: var(--gold);
}

.browser-bar span:nth-child(3) {
  background: var(--coral);
}

.primary-preview img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 438px;
  object-fit: cover;
  object-position: top;
  background: #dce4dc;
}

.fallback-title {
  position: absolute;
  inset: 43px 0 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(15, 143, 140, 0.14), rgba(240, 184, 74, 0.2)),
    #dce4dc;
  color: rgba(23, 32, 27, 0.58);
  font-size: 1.7rem;
  font-weight: 900;
  text-align: center;
}

.mini-preview {
  position: absolute;
  width: 250px;
  overflow: hidden;
  background: var(--paper-strong);
}

.mini-preview img {
  width: 100%;
  height: 142px;
  object-fit: cover;
  object-position: top;
}

.mini-preview span {
  display: block;
  padding: 11px 13px;
  color: var(--charcoal-soft);
  font-size: 0.83rem;
  font-weight: 800;
}

.preview-one {
  left: -28px;
  bottom: 58px;
  transform: rotate(-4deg);
}

.preview-two {
  right: 4px;
  bottom: 4px;
  transform: rotate(3deg);
}

.cred-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--charcoal);
  color: var(--paper);
  overflow: hidden;
}

.ticker {
  width: min(1180px, calc(100% - 40px));
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 auto;
  padding: 12px 0;
}

.ticker span {
  padding: 7px 11px;
  border: 1px solid rgba(255, 250, 240, 0.22);
  border-radius: 999px;
  color: rgba(255, 250, 240, 0.88);
  font-size: 0.88rem;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
  gap: 54px;
}

.about-copy {
  color: var(--charcoal-soft);
  font-size: 1.08rem;
}

.about-copy p:first-child {
  margin-top: 0;
}

.work-header {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.filter-group {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-strong);
  color: var(--charcoal-soft);
  cursor: pointer;
}

.filter-button.active,
.filter-button:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.spotlight {
  position: sticky;
  top: 96px;
  overflow: hidden;
}

.spotlight-media {
  position: relative;
  min-height: 250px;
  background:
    linear-gradient(135deg, rgba(15, 143, 140, 0.22), rgba(240, 184, 74, 0.24)),
    #dce4dc;
}

.spotlight-media::before {
  content: "Website preview";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(23, 32, 27, 0.52);
  font-size: 1.45rem;
  font-weight: 900;
}

.spotlight-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 270px;
  object-fit: cover;
  object-position: top;
}

.spotlight-body {
  padding: 22px;
}

.spotlight-body p:not(.eyebrow) {
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0 20px;
}

.tag-list span,
.project-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(15, 143, 140, 0.1);
  color: #16615f;
  font-size: 0.75rem;
  font-weight: 800;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  overflow: hidden;
  box-shadow: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 143, 140, 0.4);
  box-shadow: 0 18px 40px rgba(32, 36, 31, 0.1);
}

.project-card.active {
  border-color: var(--coral);
}

.project-media {
  position: relative;
  height: 174px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(232, 93, 63, 0.14), rgba(181, 200, 106, 0.22)),
    #dce4dc;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 240ms ease;
}

.project-card:hover .project-media img {
  transform: scale(1.03);
}

.project-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(23, 32, 27, 0.48);
  font-size: 2rem;
  font-weight: 900;
}

.project-card-body {
  padding: 16px;
}

.project-card-body p {
  min-height: 74px;
  margin: 9px 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 58px;
}

.project-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

.text-button {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
}

.text-button:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.live-link {
  color: var(--coral);
  font-size: 0.84rem;
  font-weight: 900;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.service-card {
  min-height: 274px;
  padding: 22px;
  box-shadow: none;
}

.service-card span {
  display: inline-flex;
  margin-bottom: 32px;
  color: var(--coral);
  font-weight: 900;
}

.service-card p {
  color: var(--muted);
  font-size: 0.94rem;
}

.resume-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.resume-grid .button {
  margin-top: 24px;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  padding: 22px;
  box-shadow: none;
}

.timeline-item > p {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.timeline-item ul {
  margin: 15px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.timeline-item li + li {
  margin-top: 8px;
}

.skills-shell {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 38px;
}

.skill-column {
  padding: 20px;
  box-shadow: none;
}

.skill-column p {
  color: var(--muted);
  font-size: 0.94rem;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 32px;
  align-items: center;
  padding: 38px;
  background: var(--charcoal);
  color: var(--paper);
}

.contact-panel .eyebrow {
  color: var(--leaf);
}

.contact-panel .button.secondary {
  background: transparent;
  color: var(--paper);
  border-color: rgba(255, 250, 240, 0.26);
}

.contact-actions {
  margin-top: 0;
}

.contact-actions p {
  width: 100%;
  margin: 6px 0 0;
  color: rgba(255, 250, 240, 0.72);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 26px 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 800;
  color: var(--ink);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1040px) {
  .hero-grid,
  .work-header,
  .project-layout,
  .resume-grid,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-showcase {
    min-height: 500px;
  }

  .filter-group {
    justify-content: flex-start;
  }

  .spotlight {
    position: static;
  }

  .service-grid,
  .skills-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: auto 1fr;
    padding: 12px 18px;
  }

  .brand-mark {
    grid-column: 1;
    grid-row: 1;
  }

  .main-nav {
    order: 3;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
  }

  .header-cta {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .section-band {
    padding: 68px 0;
  }

  .section-shell {
    width: min(100% - 28px, 1180px);
  }

  h1 {
    font-size: 2.65rem;
  }

  h2 {
    font-size: 1.88rem;
  }

  .hero-lede {
    font-size: 1.02rem;
  }

  .hero-facts,
  .split-layout,
  .project-grid,
  .service-grid,
  .skills-shell {
    grid-template-columns: 1fr;
  }

  .hero-facts div {
    min-height: auto;
  }

  .hero-showcase {
    min-height: auto;
  }

  .browser-frame {
    transform: none;
  }

  .primary-preview img {
    height: 320px;
  }

  .mini-preview {
    position: relative;
    width: 100%;
    margin-top: 14px;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
  }

  .project-card-body p,
  .project-tags {
    min-height: auto;
  }

  .contact-panel {
    padding: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
