/* reubensalisbury.co.uk - 2026 refresh. Dark theme, Geist. */

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface-2: #161616;
  --border: #232323;
  --border-strong: #333333;
  --text: #ededed;
  --muted: #a0a0a0;
  --faint: #6f6f6f;
  --accent: #f3ecd0; /* the cream from the profile photo */
  --accent-ink: #0a0a0a;
  --radius: 14px;
  --max: 1080px;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

.nav-links a {
  display: block;
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--muted);
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface-2);
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 88px;
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.35;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 0%, transparent 75%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 20px;
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 600;
}

.lead {
  margin: 0 0 32px;
  max-width: 34em;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
  color: var(--muted);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  font-size: 15px;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.btn:hover {
  background: var(--surface-2);
  border-color: #4a4a4a;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn.primary:hover {
  background: #fff8dc;
  transform: translateY(-1px);
}

.portrait {
  justify-self: end;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 0 8px rgba(243, 236, 208, 0.04), 0 40px 80px -20px rgba(0, 0, 0, 0.8);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Sections */

section {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.kicker {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 8px;
}

h2 {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.section-head p {
  margin: 14px 0 0;
  max-width: 40em;
  color: var(--muted);
  font-size: 17px;
}

.section-head p + p {
  margin-top: 12px;
}

/* Skills */

.grid {
  display: grid;
  gap: 16px;
}

.grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}

.skill {
  padding: 22px;
}

.skill .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
}

.skill h3 {
  margin: 14px 0 10px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.skill ul {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 14.5px;
}

.skill li {
  padding: 5px 0;
  border-top: 1px solid var(--border);
}

.skill li:first-child {
  border-top: 0;
}

/* Experience */

.roles {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.role {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 18px;
  align-items: start;
  padding: 22px 24px;
  border-top: 1px solid var(--border);
}

.role:first-child {
  border-top: 0;
}

.role .logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--border-strong);
}

.role h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.role .title {
  color: var(--accent);
  font-size: 14.5px;
  margin-top: 2px;
}

.role p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14.5px;
  max-width: 46em;
}

.role .dates {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--faint);
  white-space: nowrap;
  padding-top: 4px;
}

.badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(243, 236, 208, 0.3);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 2px;
}

/* Projects */

.project {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.project:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  background: var(--surface-2);
}

.project .shot {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1a1a1a;
  border-bottom: 1px solid var(--border);
}

.project .shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: saturate(0.92) brightness(0.92);
  transition: transform 0.5s ease, filter 0.3s;
}

.project:hover .shot img {
  transform: scale(1.03);
  filter: none;
}

.project .body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  padding: 18px 20px 20px;
}

.project h3 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tags li {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

.more {
  margin-top: auto;
  padding-top: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}

.more span {
  display: inline-block;
  transition: transform 0.2s;
}

.project:hover .more span {
  transform: translateX(3px);
}

/* LoopedIn feature */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.feature-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
}

.feature-body h3 {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.feature-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stats-card {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 24px 28px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
}

.stats strong {
  display: block;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.stats span {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.did {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 15px;
}

.did li {
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.did li:first-child {
  border-top: 0;
}

.did b {
  color: var(--text);
  font-weight: 500;
}

.feature-shot {
  display: block;
  overflow: hidden;
  background: #fff;
}

.feature-shot img {
  width: 100%;
  height: auto;
  transition: transform 0.5s ease;
}

.feature-shot:hover img {
  transform: scale(1.02);
}

.feature-body .more:hover span {
  transform: translateX(3px);
}

@media (max-width: 960px) {
  .feature {
    grid-template-columns: 1fr;
  }
  .feature-side {
    order: -1;
  }
}

@media (max-width: 720px) {
  .feature-body,
  .stats-card {
    padding: 20px;
  }
  .stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Contact */

.contact {
  border-bottom: 0;
}

.contact-box {
  padding: 56px 40px;
  text-align: center;
  background: radial-gradient(ellipse 60% 100% at 50% 0%, rgba(243, 236, 208, 0.07), transparent 70%), var(--surface);
}

.contact-box h2 {
  font-size: clamp(30px, 4.4vw, 46px);
}

.contact-box p {
  margin: 16px auto 28px;
  max-width: 32em;
  color: var(--muted);
  font-size: 17px;
}

.contact-box .actions {
  justify-content: center;
}

footer {
  padding: 28px 0 40px;
  color: var(--faint);
  font-size: 13.5px;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

footer a:hover {
  color: var(--text);
}

/* Responsive */

@media (max-width: 960px) {
  .grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .section-head {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 720px) {
  .wrap {
    padding: 0 16px;
  }
  .nav-links li.hide-sm {
    display: none;
  }
  .hero {
    padding: 56px 0 56px;
  }
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .portrait {
    order: -1;
    justify-self: start;
    max-width: 148px;
    border-radius: 22px;
  }
  section {
    padding: 56px 0;
  }
  .grid.cols-4,
  .grid.cols-3 {
    grid-template-columns: 1fr;
  }
  .role {
    grid-template-columns: 40px 1fr;
    padding: 18px;
    gap: 14px;
  }
  .role .logo {
    width: 40px;
    height: 40px;
  }
  .role .dates {
    grid-column: 2;
    padding-top: 0;
  }
  .contact-box {
    padding: 40px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
