
:root {
  --bg: #04070f;
  --surface: #0a1226;
  --surface-2: #101c3d;
  --line: #1d2d5c;
  --text: #e8f3ff;
  --muted: #9fb4d8;
  --blue: #2f5bff;
  --azure: #4a9bff;
  --cyan: #5cd0ff;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 62ch;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);

  color-scheme: dark;
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

a {
  color: var(--azure);
}

a:hover {
  color: var(--cyan);
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.6rem 1rem;
  background: var(--blue);
  color: #ffffff;
  border-radius: 0.25rem;
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}


/* Header ------------------------------------------------------------------ */

.site-header {
  padding-block: 1.25rem;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 16rem;
  height: auto;
  flex-shrink: 0;
}

.brand-name {
  line-height: 1.1;
}

.wordmark:hover {
  color: var(--text);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
}

.nav-list a:hover {
  color: var(--text);
  border-bottom-color: var(--cyan);
}


/* Hero -------------------------------------------------------------------- */

.hero {
  padding-top: clamp(2.5rem, 8vw, 5.5rem);
}

.hero h1 {
  max-width: 17ch;
  font-size: clamp(2.5rem, 7vw, 4.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.hero-lead {
  max-width: 48ch;
  margin-top: 1.5rem;
  font-size: clamp(1.125rem, 2.2vw, 1.3rem);
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 2rem;
}

.ridge {
  display: block;
  width: 100%;
  height: auto;
  margin-top: clamp(2rem, 6vw, 3.5rem);
  overflow: visible;
}

.ridge-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .ridge-line {
    animation: draw-ridge 1.8s ease-out both;
  }

  .ridge-nodes {
    animation: fade-in 0.6s ease-out 1.4s both;
  }
}

@keyframes draw-ridge {
  from {
    stroke-dashoffset: 1;
  }

  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}


/* Buttons and links ------------------------------------------------------- */

.button {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border: 0;
  border-radius: 0.375rem;
  background: var(--blue);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--cyan);
  color: var(--bg);
}

.text-link {
  font-weight: 600;
}


/* Sections ---------------------------------------------------------------- */

.section {
  padding-block: clamp(3.5rem, 9vw, 6rem);
  scroll-margin-top: 1rem;
}

.section h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  font-weight: 800;
}

.section-intro {
  margin-top: 0.75rem;
  color: var(--muted);
}


/* Services ---------------------------------------------------------------- */

.service-list {
  margin-top: 2.25rem;
}

.service {
  display: grid;
  gap: 0.5rem 3rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--line);
}

.service:last-child {
  border-bottom: 1px solid var(--line);
}

.service h3 {
  font-size: 1.35rem;
  font-weight: 700;
}

.service p {
  max-width: var(--measure);
  color: var(--muted);
}

@media (min-width: 48rem) {
  .service {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }
}


/* Projects ---------------------------------------------------------------- */

.project-list {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.25rem;
}

/*
   One column is used by default for smaller screens.
   At 48rem and above the project list becomes a two-column layout.
*/
@media (min-width: 48rem) {
  .project-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.project {
  padding: 1rem 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.5rem;

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

/*
   Gives every project screenshot the same 3:2 frame.
   object-fit crops an image where necessary without distorting it.
   object-position keeps the top of the website screenshot prioritised.
*/
.project img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  margin-bottom: 1.25rem;
  border-radius: 0.25rem;
  object-fit: cover;
  object-position: top;

  transition:
    filter 0.25s ease,
    transform 0.25s ease;
}

.project-content {
  display: grid;
  gap: 0.75rem;
}

.project h3 {
  font-size: 1.25rem;
}

.project-content > p {
  margin: 0;
  color: var(--muted);
}

.project-services {
  color: var(--azure) !important;
  font-size: 0.9rem;
  font-weight: 600;
}

.project-link {
  width: fit-content;
  margin-top: 0.25rem;
  font-weight: 700;
  text-decoration: none;
}

.more-projects {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}


.project-link:hover {
  color: var(--cyan);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .project:hover {
    transform: translateY(-0.4rem);
    border-color: var(--azure);
    box-shadow: 0 1rem 2.5rem rgba(47, 91, 255, 0.14);
  }

  .project:hover img {
    filter: brightness(1.05);
  }
}


/* About ------------------------------------------------------------------- */

.about-grid {
  display: grid;
  gap: 1.5rem 3rem;
}

.prose {
  display: grid;
  gap: 1.1rem;
  max-width: var(--measure);
  color: var(--muted);
}

@media (min-width: 48rem) {
  .about-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }
}


/* Why Work With Me -------------------------------------------------------- */

.reasons-grid {
  display: grid;
  margin-top: 2.25rem;
  border-top: 1px solid var(--line);
}

.reason {
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--line);
}

.reason h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.reason p {
  max-width: 42ch;
  color: var(--muted);
}

@media (min-width: 48rem) {
  .reasons-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reason {
    padding: 2rem 2.5rem;
  }

  .reason:nth-child(odd) {
    padding-left: 0;
    border-right: 1px solid var(--line);
  }

  .reason:nth-child(even) {
    padding-right: 0;
  }
}


/* Contact ----------------------------------------------------------------- */

.section-dark {
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.contact-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 56rem) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4rem;
  }
}

.contact-intro {
  max-width: 44ch;
  margin-top: 1rem;
  color: var(--muted);
}

.contact-action {
  margin-top: 1.75rem;
}

.contact-details {
  display: grid;
  align-content: start;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 56rem) {
  .contact-details {
    padding-top: 0.5rem;
  }
}

.detail-label {
  display: inline-block;
  min-width: 5.5rem;
  color: var(--muted);
}


/* Footer ------------------------------------------------------------------ */

.site-footer {
  padding-block: 1.75rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}