/* makiwardle.com — dark, high-contrast, DIY edge */

:root {
  --bg: #0a0a0a;
  --bg-elevated: #121212;
  --text: #f2f2f2;
  --text-muted: #c2c2c2;
  --text-faint: #9a9a9a;
  --accent: #e10600;
  --stroke: #2a2a2a;
  --stroke-strong: #3d3d3d;
  --font-display: "Syne", sans-serif;
  --font-body: "Public Sans", sans-serif;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --max: 1100px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* —— Nav —— */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  border-bottom-color: var(--stroke);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem var(--pad);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.05em;
  font-size: 1.05rem;
  line-height: 1;
}

.logo .heart {
  color: var(--accent);
  font-size: 0.95em;
  padding: 0 0.05em;
}

.logo .tm {
  font-size: 0.55em;
  vertical-align: super;
  opacity: 0.7;
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-links {
  margin-left: auto;
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
}

/* —— Layout —— */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad) 4rem;
}

.section {
  padding: 3.5rem 0 1rem;
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 1.5rem;
}

.section-intro {
  color: var(--text-muted);
  max-width: 36rem;
  margin: -0.75rem 0 1.75rem;
  font-size: 0.95rem;
}

/* —— Hero —— */

.hero {
  padding: 2rem 0 1.75rem;
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: start;
}

.hero-photo {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--bg-elevated);
  border: 1px solid var(--stroke);
  overflow: hidden;
}

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

.hero-photo-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: var(--text-faint);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-photo.is-empty .hero-photo-fallback {
  display: grid;
}

.hero-copy {
  min-width: 0;
  padding-top: 0.15rem;
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.35rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0 0 0.85rem;
  max-width: 28ch;
  color: var(--text-muted);
}

.hero-tagline {
  font-size: 0.98rem;
  color: var(--text);
  max-width: 40rem;
  margin: 0 0 0.75rem;
  line-height: 1.55;
}

.hero-bio {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 40rem;
  margin: 0 0 1rem;
  line-height: 1.55;
}

.pillars {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.pillars li::before {
  content: "";
  display: inline-block;
  width: 0.3rem;
  height: 0.3rem;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 0.4rem;
  vertical-align: middle;
}

.hero-cv {
  margin: 1.1rem 0 0;
}

.hero-cv a {
  font-size: 0.9rem;
  color: var(--text);
  transition: color 0.2s var(--ease);
}

.hero-cv a:hover {
  color: var(--accent);
}

.section-projects {
  padding-top: 1.25rem;
}

/* —— Key projects —— */

.project-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  padding: 1.75rem 0;
  border-top: 1px solid var(--stroke);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.25s var(--ease);
}

.project-row:last-of-type {
  border-bottom: 1px solid var(--stroke);
}

a.project-row {
  cursor: pointer;
}

.project-row:hover {
  color: inherit;
  opacity: 0.92;
}

.project-row:hover .project-cta {
  color: var(--accent);
}

.project-row:hover .project-title {
  color: var(--accent);
}

div.project-row {
  cursor: default;
}

.project-media {
  aspect-ratio: 16 / 10;
  background: var(--bg-elevated);
  border: 1px solid var(--stroke);
  overflow: hidden;
  position: relative;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}

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

.media-fallback {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  color: var(--text-faint);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-media.is-empty .media-fallback,
.pin-media.is-empty .media-fallback {
  display: grid;
}

.project-media.placeholder {
  display: grid;
  place-items: center;
  color: var(--text-faint);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-meta {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin: 0 0 0.4rem;
}

.project-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 0.65rem;
  transition: color 0.2s var(--ease);
}

.project-hook {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 0.85rem;
  max-width: 36rem;
}

.project-cta {
  font-size: 0.9rem;
  color: var(--text);
  transition: color 0.2s var(--ease);
}

.section-other {
  text-align: center;
}

.section-other .section-intro {
  margin-left: auto;
  margin-right: auto;
}

/* —— Pinboard (polaroids, slight scatter) —— */

.pinboard {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem 1.75rem;
  padding: 1rem 0 1.5rem;
  max-width: 920px;
  margin: 0 auto;
  text-align: left;
}

.pin {
  display: block;
  width: 260px;
  flex: 0 0 260px;
  background: var(--bg-elevated);
  border: 1px solid var(--stroke);
  padding: 0.65rem 0.65rem 1rem;
  color: inherit;
  transition:
    transform 0.35s var(--ease),
    border-color 0.25s var(--ease);
  transform-origin: center center;
  cursor: default;
}

.pin:hover {
  border-color: var(--stroke-strong);
  transform: rotate(0deg) translateY(-4px);
  z-index: 2;
}

.pin-media {
  width: 100%;
  aspect-ratio: 1;
  background: #161616;
  border: 1px solid var(--stroke);
  position: relative;
  overflow: hidden;
  color: var(--text-faint);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

.pin-caption {
  margin: 0.75rem 0.2rem 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.pin-title {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 0.88rem;
  color: var(--text);
  letter-spacing: -0.01em;
  display: block;
  margin-bottom: 0.25rem;
}

.pin-meta {
  display: block;
  font-size: 0.68rem;
  color: var(--text-faint);
  margin-bottom: 0.45rem;
  line-height: 1.35;
}

.pin-caption em {
  font-style: italic;
  color: inherit;
}

.pin-caption p {
  margin: 0;
}

/* Same size, irregular placement via tilt + small offsets */
.pin--a {
  transform: rotate(-2.4deg) translate(4px, 10px);
}

.pin--b {
  transform: rotate(1.8deg) translate(-6px, -4px);
}

.pin--c {
  transform: rotate(-1.2deg) translate(8px, 16px);
}

.pin--d {
  transform: rotate(2.6deg) translate(-10px, 6px);
}

.pin--e {
  transform: rotate(-1.8deg) translate(2px, -8px);
}

.pin--f {
  transform: rotate(1.4deg) translate(-4px, 12px);
}

.pin--a:hover,
.pin--b:hover,
.pin--c:hover,
.pin--d:hover,
.pin--e:hover,
.pin--f:hover {
  transform: rotate(0deg) translateY(-4px);
}

/* —— Footer —— */

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem var(--pad) 3rem;
  border-top: 1px solid var(--stroke);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* —— About / project pages —— */

.page-hero {
  padding: 3rem 0 2rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0.35rem 0 1rem;
}

.eyebrow {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin: 0;
}

.prose {
  max-width: 40rem;
  color: var(--text-muted);
}

.prose p {
  margin: 0 0 1rem;
}

.prose a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.prose a:hover {
  color: var(--accent);
}

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

.about-block h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

.about-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-block li {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--stroke);
}

.about-block li:last-child {
  border-bottom: none;
}

.about-block strong {
  color: var(--text);
  font-weight: 600;
}

.project-page-media {
  aspect-ratio: 21 / 9;
  background: var(--bg-elevated);
  border: 1px solid var(--stroke);
  margin: 0 0 2rem;
  display: grid;
  place-items: center;
  color: var(--text-faint);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  overflow: hidden;
}

.project-page-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* —— Carousel —— */

.carousel {
  margin: 0 0 2rem;
}

.carousel-viewport {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-elevated);
  border: 1px solid var(--stroke);
  overflow: hidden;
}

.carousel-track {
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 2.4s ease-in-out;
  pointer-events: none;
  z-index: 0;
  will-change: opacity;
}

.carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.carousel-slide.is-exiting {
  opacity: 0;
  z-index: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

.carousel.is-single .carousel-controls {
  display: none;
}

.carousel-btn {
  appearance: none;
  background: transparent;
  border: 1px solid var(--stroke);
  color: var(--text-muted);
  width: 2.25rem;
  height: 2.25rem;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition:
    color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.carousel-btn:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--stroke-strong);
}

.carousel-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.carousel-dots {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.carousel-dot {
  appearance: none;
  width: 0.45rem;
  height: 0.45rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--stroke-strong);
  cursor: pointer;
}

.carousel-dot.is-active {
  background: var(--accent);
}

.project-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--stroke);
  font-size: 0.9rem;
}

/* —— Motion —— */

@media (prefers-reduced-motion: no-preference) {
  .hero-title,
  .hero-tagline,
  .pillars {
    animation: rise 0.7s var(--ease) both;
  }

  .hero-tagline {
    animation-delay: 0.08s;
  }

  .pillars {
    animation-delay: 0.16s;
  }

  .project-row {
    animation: rise 0.55s var(--ease) both;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Responsive —— */

@media (max-width: 800px) {
  .project-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

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

  .hero {
    grid-template-columns: 120px minmax(0, 1fr);
    padding: 1.5rem 0 1.25rem;
    gap: 1rem;
  }

  .brand-name {
    display: none;
  }

  .pinboard {
    gap: 1.5rem 1.25rem;
  }

  .pin {
    width: 220px;
    flex-basis: 220px;
  }
}

@media (max-width: 520px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    width: min(160px, 45vw);
    aspect-ratio: 1;
  }

  .pinboard {
    gap: 1.25rem;
  }

  .pin {
    width: min(280px, 78vw);
    flex-basis: min(280px, 78vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pin,
  .pin--a,
  .pin--b,
  .pin--c,
  .pin--d,
  .pin--e,
  .pin--f,
  .pin:hover,
  .pin--a:hover,
  .pin--b:hover,
  .pin--c:hover,
  .pin--d:hover,
  .pin--e:hover,
  .pin--f:hover {
    transform: none;
    transition: none;
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: 0.85rem;
    font-size: 0.82rem;
  }
}
