/*
  Brendon Morgan portfolio
  ------------------------
  Quick edits: change the colours, width and spacing variables below.
  The page uses no framework, font download or JavaScript dependency.
*/

:root {
  --ink: #0c111b;
  --ink-soft: #141b28;
  --paper: #f4efe7;
  --paper-bright: #fffaf2;
  --muted: #aeb7c6;
  --muted-dark: #556070;
  --line: rgba(244, 239, 231, 0.16);
  --line-dark: rgba(12, 17, 27, 0.14);
  --accent: #ff704f;
  --accent-light: #ffb29f;
  --mint: #8ed9c9;
  --max-width: 1180px;
  --section-space: clamp(4.25rem, 7vw, 6.75rem);
  --radius: 1.25rem;
  --shadow: 0 2rem 5rem rgba(1, 5, 12, 0.24);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 82% 8%, rgba(255, 112, 79, 0.13), transparent 26rem),
    radial-gradient(circle at 8% 55%, rgba(142, 217, 201, 0.07), transparent 28rem);
  content: "";
  pointer-events: none;
}

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

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

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

h1,
h2,
h3,
p,
ul,
ol,
figure,
blockquote {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 13ch;
  margin-bottom: 1.75rem;
  font-size: clamp(3.4rem, 7.4vw, 7rem);
}

h2 {
  max-width: 14ch;
  margin-bottom: 1.5rem;
  font-size: clamp(2.5rem, 5.4vw, 5rem);
}

h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
}

em {
  color: var(--accent-light);
  font-family: inherit;
  font-weight: 500;
}

.shell {
  width: min(calc(100% - 2.5rem), var(--max-width));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-space);
}

.section-lined {
  border-block: 1px solid var(--line);
}

.section-soft {
  background: var(--paper);
  color: var(--ink);
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  transform: translateY(-150%);
  border-radius: 0.5rem;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(244, 239, 231, 0.09);
  background: rgba(12, 17, 27, 0.84);
  backdrop-filter: blur(18px);
}

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

.wordmark {
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.wordmark span {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.4rem);
}

.site-nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 650;
}

.site-nav a:not(.nav-linkedin)::after {
  position: absolute;
  right: 0;
  bottom: -0.35rem;
  left: 0;
  height: 1px;
  transform: scaleX(0);
  transform-origin: right;
  background: var(--accent);
  content: "";
  transition: transform 180ms ease;
}

.site-nav a:hover {
  color: var(--paper);
}

.site-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-linkedin {
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

/* Hero */

.hero {
  display: flex;
  min-height: calc(100svh - 5rem);
  align-items: center;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
}

.eyebrow,
.section-kicker {
  color: var(--accent-light);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.eyebrow span {
  width: 2.5rem;
  height: 1px;
  background: var(--accent);
}

.hero-intro {
  max-width: 43rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.button {
  display: inline-flex;
  min-height: 3.2rem;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.8rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 750;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

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

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

.button-primary:hover {
  background: var(--accent-light);
}

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

.button-secondary:hover {
  border-color: var(--paper);
  background: rgba(244, 239, 231, 0.07);
}

.button-large {
  min-height: 3.7rem;
  padding-inline: 1.5rem;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.5rem;
  padding: 0;
  list-style: none;
}

.hero-facts li {
  display: flex;
  flex-direction: column;
}

.hero-facts strong {
  font-size: 0.92rem;
}

.hero-facts span {
  color: var(--muted);
  font-size: 0.73rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.portrait-wrap {
  position: relative;
  max-width: 25rem;
  justify-self: end;
}

.portrait-accent {
  position: absolute;
  top: -2.5rem;
  right: -3rem;
  width: 14rem;
  height: 14rem;
  border: 1px solid rgba(255, 112, 79, 0.5);
  border-radius: 50%;
}

.portrait-accent::after {
  position: absolute;
  inset: 1rem;
  border: 1px solid rgba(142, 217, 201, 0.28);
  border-radius: inherit;
  content: "";
}

.portrait {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12rem 12rem 1.5rem 1.5rem;
  box-shadow: var(--shadow);
  filter: saturate(0.9) contrast(1.03);
}

.portrait-note {
  position: relative;
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.65rem;
  margin: 1rem 0 0 auto;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(244, 239, 231, 0.22);
  border-radius: 999px;
  background: rgba(20, 27, 40, 0.88);
  font-size: 0.8rem;
}

.status-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0.25rem rgba(142, 217, 201, 0.14);
}

/* Shared section layouts */

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(3rem, 7vw, 6.5rem);
}

.section-kicker {
  margin-bottom: 1rem;
}

.prose {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
}

.prose p {
  margin-bottom: 1.5rem;
}

.skill-cloud,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.about-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(11rem, 0.72fr);
  align-items: end;
  gap: 1.25rem;
  margin-top: 2rem;
}

.skill-cloud span,
.tag-list li {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--paper);
  font-size: 0.73rem;
  font-weight: 650;
}

.about-moment {
  width: 100%;
  aspect-ratio: 3 / 2;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--ink-soft);
}

.about-moment img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 34%;
  filter: saturate(0.78) contrast(1.05);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 3rem;
  margin-bottom: clamp(2.5rem, 4.5vw, 4rem);
}

.section-heading > p {
  max-width: 22rem;
  margin-bottom: 1.75rem;
  color: var(--muted);
}

.compact-heading {
  margin-bottom: 3.5rem;
}

.compact-heading h2 {
  max-width: 16ch;
}

/* Projects */

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

.work-moment {
  width: 100%;
  aspect-ratio: 16 / 6.5;
  grid-column: 1 / -1;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-soft);
}

.work-moment img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: saturate(0.72) contrast(1.04);
}

.project-card {
  position: relative;
  display: grid;
  min-height: 23rem;
  grid-template-rows: auto 1fr;
  padding: clamp(1.4rem, 3vw, 2.3rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111823;
  transition: transform 220ms ease, border-color 220ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 112, 79, 0.55);
}

.project-card::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(12, 17, 27, 0.25) 0%, rgba(12, 17, 27, 0.72) 48%, rgba(12, 17, 27, 0.98) 100%);
  content: "";
}

.project-featured::before {
  background: linear-gradient(180deg, rgba(12, 17, 27, 0.16) 0%, rgba(12, 17, 27, 0.68) 46%, rgba(16, 18, 25, 0.98) 100%);
}

.project-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: grayscale(1) saturate(0) contrast(1.18);
  transform: scale(1.02);
  transition: opacity 220ms ease, transform 320ms ease;
}

.project-card:hover .project-art {
  opacity: 0.38;
  transform: scale(1.055);
}

.project-number {
  position: relative;
  z-index: 2;
  color: var(--accent-light);
  font-size: 0.73rem;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.project-body {
  position: relative;
  z-index: 2;
  align-self: end;
}

.project-meta {
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-body h3 {
  margin-bottom: 1rem;
  font-size: clamp(1.9rem, 3.8vw, 3rem);
  transition: color 180ms ease;
}

.project-card:hover .project-body h3 {
  color: var(--accent-light);
}

.project-body > p:not(.project-meta) {
  max-width: 36rem;
  color: var(--muted);
}

.tag-list {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

/* Strengths */

.section-soft .section-kicker,
.section-soft em {
  color: #b23d27;
}

.strengths-section {
  padding-block: clamp(3.5rem, 6vw, 5.5rem);
}

.strengths-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(28rem, 1.15fr);
  align-items: end;
  gap: clamp(2rem, 6vw, 6rem);
}

.strengths-inner h2 {
  margin-bottom: 0;
  font-size: clamp(2.25rem, 4vw, 3.75rem);
}

.strength-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-dark);
  border-left: 1px solid var(--line-dark);
  list-style: none;
}

.strength-list li {
  display: grid;
  min-height: 6.5rem;
  align-content: space-between;
  gap: 0.75rem;
  padding: 1.25rem;
  border-right: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  font-size: 1rem;
  font-weight: 750;
}

.strength-list span {
  color: #b23d27;
  font-size: 0.7rem;
  font-weight: 800;
}

/* Experience */

.experience-layout {
  align-items: start;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}

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

.timeline-date {
  color: var(--accent-light);
  font-size: 0.78rem;
  font-weight: 700;
}

.timeline h3 {
  margin-bottom: 0.3rem;
}

.timeline p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Quotes and contact */

.quotes-section {
  padding-top: 0;
}

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

.quote-grid figure {
  margin: 0;
  padding: clamp(1.7rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.quote-grid blockquote {
  margin-bottom: 2.5rem;
  color: var(--paper);
  font-family: inherit;
  font-size: clamp(1.3rem, 2.4vw, 1.85rem);
  font-weight: 600;
  line-height: 1.35;
}

.quote-grid figcaption {
  display: flex;
  flex-direction: column;
}

.quote-grid figcaption strong {
  font-size: 0.88rem;
}

.quote-grid figcaption span {
  color: var(--muted);
  font-size: 0.78rem;
}

.contact-section {
  padding-bottom: 0;
  background:
    radial-gradient(circle at 72% 40%, rgba(255, 112, 79, 0.16), transparent 20rem),
    var(--ink-soft);
}

.contact-inner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 3rem;
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.contact-inner h2 {
  margin-bottom: 1rem;
}

.contact-inner p:not(.section-kicker) {
  max-width: 40rem;
  margin-bottom: 0;
  color: var(--muted);
}

.contact-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.85rem;
}

.contact-portrait {
  width: 4.75rem;
  height: 4.75rem;
  flex: 0 0 4.75rem;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 28%;
  border: 1px solid rgba(244, 239, 231, 0.18);
  border-radius: 1.25rem;
  box-shadow: 0 1rem 2rem rgba(2, 6, 13, 0.22);
  filter: grayscale(0.72) saturate(0.55) sepia(0.08) contrast(1.08);
}

.social-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.social-links a {
  display: flex;
  min-height: 4.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(12, 17, 27, 0.24);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.social-links a:hover {
  transform: translateY(-2px);
  border-color: var(--social-color);
  background: var(--social-tint);
}

.social-label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.65rem;
}

.social-icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  place-items: center;
  border-radius: 0.65rem;
  background: var(--social-tint);
  color: var(--social-color);
}

.social-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.social-icon-fill svg {
  fill: currentColor;
  stroke: none;
}

.social-arrow {
  color: var(--muted);
  transition: color 180ms ease, transform 180ms ease;
}

.social-links a:hover .social-arrow {
  transform: translate(0.1rem, -0.1rem);
  color: var(--social-color);
}

.social-mobygames {
  --social-color: #ff8b70;
  --social-tint: rgba(255, 139, 112, 0.12);
}

.social-bluesky {
  --social-color: #56a8ff;
  --social-tint: rgba(86, 168, 255, 0.12);
}

.social-threads {
  --social-color: #f4efe7;
  --social-tint: rgba(244, 239, 231, 0.09);
}

.social-flickr {
  --social-color: #ff57a7;
  --social-tint: rgba(255, 87, 167, 0.11);
}

.social-instagram {
  --social-color: #f6926d;
  --social-tint: rgba(246, 146, 109, 0.12);
}

.social-mastodon {
  --social-color: #9f91ff;
  --social-tint: rgba(159, 145, 255, 0.12);
}

.social-whatsapp {
  --social-color: #67d895;
  --social-tint: rgba(103, 216, 149, 0.11);
}

.site-footer {
  background: var(--ink-soft);
}

.footer-inner {
  display: flex;
  min-height: 6rem;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  color: var(--paper);
  text-decoration: none;
}

/* Responsive */

@media (max-width: 900px) {
  .hero {
    min-height: auto;
  }

  .hero-grid,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .portrait-wrap {
    width: min(80%, 25rem);
    justify-self: center;
  }

  .split-layout {
    gap: 2rem;
  }

  .about-details {
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 0.6fr);
  }

  .project-card {
    min-height: 22rem;
  }

  .strengths-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .contact-inner {
    align-items: start;
    flex-direction: column;
  }

  .social-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  :root {
    --section-space: 4rem;
  }

  .shell {
    width: min(calc(100% - 1.5rem), var(--max-width));
  }

  .header-inner {
    min-height: 4.4rem;
    gap: 1rem;
  }

  .site-nav {
    gap: 0.85rem;
  }

  .site-nav a {
    font-size: 0.75rem;
  }

  .site-nav a[href="#about"],
  .site-nav a[href="#experience"] {
    display: none;
  }

  .nav-linkedin {
    padding: 0.45rem 0.65rem;
  }

  h1 {
    font-size: clamp(3.1rem, 15vw, 4.6rem);
  }

  h2 {
    font-size: clamp(2.35rem, 12vw, 3.5rem);
  }

  .hero-grid {
    gap: 4rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .hero-facts {
    gap: 1rem 1.5rem;
  }

  .portrait-wrap {
    width: calc(100% - 2rem);
  }

  .about-details {
    grid-template-columns: 1fr;
  }

  .about-moment {
    aspect-ratio: 16 / 9;
  }

  .contact-actions {
    width: 100%;
    align-items: center;
    flex-direction: row;
  }

  .contact-portrait {
    width: 4.5rem;
    height: 4.5rem;
    flex-basis: 4.5rem;
  }

  .contact-actions .button {
    width: auto;
    min-width: 0;
    flex: 1;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 0;
  }

  .section-heading > p {
    margin-bottom: 0;
  }

  .project-grid,
  .quote-grid {
    grid-template-columns: 1fr;
  }

  .work-moment {
    aspect-ratio: 4 / 3;
  }

  .strength-list {
    grid-template-columns: 1fr 1fr;
  }

  .project-card {
    min-height: 22rem;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .social-links {
    grid-template-columns: 1fr 1fr;
  }

  .social-links a {
    min-height: 4.5rem;
  }

  .footer-inner {
    min-height: 5rem;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
