:root {
  --background: #ffffff;
  --foreground: #16151a;
  --accent: #c4531c;
  --border: rgba(0, 0, 0, 0.08);
  --font-display: "Bitter", Georgia, serif;
  --font-sans: "Poppins", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #100f13;
    --foreground: #f2f1ee;
    --accent: #ff8a4c;
    --border: rgba(255, 255, 255, 0.12);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.5;
}

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

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

.section-inner {
  max-width: 79.5rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .section-inner {
    padding: 0 2rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.btn-solid {
  background: var(--foreground);
  color: var(--background);
  border: 1px solid var(--foreground);
}

.btn-solid:hover {
  transform: scale(1.05);
}

.btn-outline {
  border: 1px solid var(--border);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--foreground);
}


/* Hero */
.hero-dots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero > *:not(.hero-dots) {
  position: relative;
  z-index: 1;
}

.hero {
  position: relative;
  min-height: 68vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 0 2.5rem;
  overflow: hidden;
}

.hero-inner {
  width: 100%;
  max-width: 79.5rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.eyebrow {
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.hero-greeting {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0 0 1.75rem;
  animation: fade-up 0.8s ease both;
}

.hero-greeting-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.hero-greeting-bubble {
  position: relative;
  padding: 0.5rem 0.9rem;
  border-radius: 999px 999px 999px 4px;
  background: #f2f2f2;
  font-size: 1rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--foreground) 75%, transparent);
  white-space: nowrap;
}

.hero-greeting-wave {
  display: inline-block;
  transform-origin: 70% 70%;
  animation: hero-wave 0.5s ease 2;
}

.hero-greeting:hover .hero-greeting-wave {
  animation: hero-wave 0.5s ease infinite;
}

@keyframes hero-wave {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-15deg); }
  40% { transform: rotate(12deg); }
  60% { transform: rotate(-10deg); }
  80% { transform: rotate(8deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-greeting-wave {
    animation: none;
  }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  max-width: 32ch;
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
  animation: fade-up 0.8s ease both;
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 2.625rem;
  }
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3.25rem;
  }
}

@media (min-width: 1100px) {
  .hero-title {
    font-size: 3.75rem;
  }
}

.hero-sub {
  margin-top: 1.5rem;
  max-width: none;
  font-size: 1.125rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--foreground) 70%, transparent);
  animation: fade-up 0.8s ease 0.1s both;
}

@media (min-width: 768px) {
  .hero-sub {
    font-size: 1.25rem;
  }
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  animation: fade-up 0.8s ease 0.2s both;
}

.scroll-hint {
  display: none;
  position: absolute;
  bottom: 1rem;
  left: 1.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: color-mix(in srgb, var(--foreground) 40%, transparent);
}

@media (min-width: 640px) {
  .scroll-hint {
    display: block;
  }
}

@media (min-width: 768px) {
  .scroll-hint {
    left: 2.5rem;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections */
.section-title {
  font-family: "Poppins", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: normal;
  color: var(--foreground);
  margin: 0;
}

@media (min-width: 640px) {
  .section-title {
    font-size: 1.5rem;
  }
}

/* Work */
.work {
  padding: 0 0 7rem;
}

@media (min-width: 768px) {
  .work {
    padding: 0 0 9rem;
  }
}

/* jump target for the nav's "Work" link — offset clears the 4.5rem
   sticky nav so the heading isn't hidden under it */
#work {
  scroll-margin-top: 6rem;
}

.work-header {
  margin-bottom: 4rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.section-title-arrow {
  display: inline-block;
  margin-left: 0.35rem;
  color: inherit;
  /* the ↓ glyph hangs ~0.2em below the baseline — lift it so its
     bottom sits level with the bottom of the text */
  position: relative;
  top: -0.2em;
}

.section-intro {
  max-width: 46rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.6;
  color: color-mix(in srgb, var(--foreground) 70%, transparent);
}

@media (max-width: 640px) {
  .section-intro {
    font-size: 0.9375rem;
  }
}

.work-count {
  display: none;
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--foreground) 50%, transparent);
}

@media (min-width: 640px) {
  .work-count {
    display: block;
  }
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem 2rem;
}

@media (min-width: 640px) {
  .work-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* single column on phones, so the 4rem row gap that separates two columns
   is more air than the stack needs */
@media (max-width: 640px) {
  .work-grid {
    row-gap: 2.75rem;
  }

  .work-header {
    margin-bottom: 2.5rem;
  }
}

.project-card {
  display: block;
}

.project-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 1rem;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  will-change: transform;
}

.project-card:hover .project-thumb {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.35);
}

.project-thumb--image {
  background: #e9eff9;
}

/* Each card carries its own case study's hero background */
/* the mesh is 1.887 wide-to-tall against the card's 1.333, so `cover` cut
   15% off each side and lost the pale corner. It's a smooth gradient, so
   stretching to the full card shows the whole sweep undistorted. */
.project-thumb--ai {
  background-image: url("assets/ai-summaries/hero-mesh-gradient.png");
  background-size: 100% 100%;
  background-position: center;
}

/* matches the Creative Library hero band exactly, grain layer included */
.project-thumb--cl {
  background-image: linear-gradient(
    139.548deg,
    rgb(240, 244, 254) 1.4615%,
    rgb(228, 237, 254) 20%,
    rgb(205, 223, 255) 55%,
    rgb(186, 211, 255) 92%
  );
}

/* The other three cards inherit their case study's hero as a photographic
   background; this one rebuilds it as a flat CSS gradient, so it was missing
   the grain the real hero carries. Same noise layer, same 0.5 opacity. */
.project-thumb--cl::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("assets/creative-library/hero-noise.png");
  background-size: 1440px 763px;
  background-position: top left;
  background-repeat: repeat;
  opacity: 0.5;
  pointer-events: none;
}

.project-thumb--cl .project-thumb-img {
  z-index: 1;
}

/* Rebuilt from the hero art's own palette — it runs lavender on the left to
   pale blue on the right. Held to the violet end so it stays distinct from
   the Creative Library card's blue. */
.project-thumb--harvi {
  background-image: linear-gradient(
    139.548deg,
    rgb(246, 243, 254) 1.4615%,
    rgb(236, 231, 252) 20%,
    rgb(219, 211, 248) 55%,
    rgb(203, 196, 245) 92%
  );
}

.project-thumb--harvi::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("assets/creative-library/hero-noise.png");
  background-size: 1440px 763px;
  background-position: top left;
  background-repeat: repeat;
  opacity: 0.5;
  pointer-events: none;
}

.project-thumb--harvi .project-thumb-img {
  z-index: 1;
}

/* The hero art is 2400x556, so `cover` cropped a 4:3 window out of its
   middle and the sweep flattened to near-solid peach. Rebuilt from that
   image's own endpoints — cream through to peach. */
.project-thumb--epe {
  background-image: linear-gradient(
    139.548deg,
    rgb(253, 247, 233) 1.4615%,
    rgb(252, 233, 210) 20%,
    rgb(251, 212, 181) 55%,
    rgb(249, 190, 160) 92%
  );
}

.project-thumb--epe::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("assets/creative-library/hero-noise.png");
  background-size: 1440px 763px;
  background-position: top left;
  background-repeat: repeat;
  opacity: 0.5;
  pointer-events: none;
}

.project-thumb--epe .project-thumb-img {
  z-index: 1;
}

.project-thumb-img {
  position: absolute;
  inset: 1.75rem;
  width: auto;
  height: auto;
  max-width: calc(100% - 3.5rem);
  max-height: calc(100% - 3.5rem);
  margin: auto;
  object-fit: contain;
  object-position: center;
}

.project-meta {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-meta h3 {
  margin: 0;
  /* stays a step below .section-title, which drops to 1.25rem on phones */
  font-size: 1.125rem;
  font-weight: 500;
}

@media (min-width: 640px) {
  .project-meta h3 {
    font-size: 1.25rem;
  }
}

.project-category {
  margin: 0.15rem 0 0;
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--foreground) 60%, transparent);
}

.project-year {
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--foreground) 50%, transparent);
  /* keeps a date from breaking across lines in the narrow flex slot */
  white-space: nowrap;
}

@media (max-width: 640px) {
  .project-year {
    font-size: 0.8125rem;
  }
}

.project-desc {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--foreground) 60%, transparent);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.project-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: color-mix(in srgb, var(--foreground) 65%, transparent);
}

.gradient-aurora  { background: linear-gradient(to bottom right, #ff9a76, #ff6b6b, #c94b4b); }
.gradient-meridian{ background: linear-gradient(to bottom right, #6ee7f7, #3b82f6, #1e3a8a); }
.gradient-folio   { background: linear-gradient(to bottom right, #fde68a, #f59e0b, #b45309); }
.gradient-nomad   { background: linear-gradient(to bottom right, #a7f3d0, #10b981, #065f46); }
.gradient-vessel  { background: linear-gradient(to bottom right, #e9d5ff, #a855f7, #581c87); }
.gradient-signal  { background: linear-gradient(to bottom right, #fecaca, #ef4444, #7f1d1d); }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* About */
.about {
  border-top: 1px solid var(--border);
  padding: 7rem 0;
}

@media (min-width: 768px) {
  .about {
    padding: 9rem 0;
  }
}

.about--page {
  border-top: none;
  padding-top: 9rem;
  min-height: calc(100vh - 4.5rem);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1.2fr;
  }
}

.about-body {
  max-width: 42rem;
  font-size: 1.125rem;
  color: color-mix(in srgb, var(--foreground) 70%, transparent);
}

.about-body p {
  margin: 0 0 1.5rem;
}

.skills {
  padding-top: 1rem;
}

.skills-label {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: color-mix(in srgb, var(--foreground) 50%, transparent);
  font-weight: 400;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skills-list li {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.875rem;
}

/* Contact */
@media (min-width: 768px) {
  .footer--contact {
    padding: 5rem 0 2.5rem;
  }
}


.contact-title {
  font-family: var(--font-sans);
  font-weight: 500;
  max-width: 42rem;
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: normal;
}

@media (min-width: 768px) {
  .contact-title {
    font-size: 1.5rem;
  }
}

.contact-sub {
  margin: 0.75rem 0 0;
  max-width: 32rem;
  font-size: 1rem;
  font-weight: 300;
  color: color-mix(in srgb, var(--foreground) 70%, transparent);
}

.contact .hero-actions {
  margin-top: 1.75rem;
}

.contact-links {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground);
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.contact-links svg {
  width: 1.375rem;
  height: 1.375rem;
  display: block;
}

.contact-links a:hover,
.contact-links a:focus-visible {
  opacity: 1;
  transform: translateY(-2px);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

/* Homepage: contact + footer merged into one block */
.footer--contact {
  position: relative;
  overflow: hidden;
  padding: 4rem 0 2.5rem;
  border-top: none;
  background-color: var(--background);
}

.footer-dots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.footer--contact > .section-inner {
  position: relative;
  z-index: 1;
}


.footer-bottom {
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--foreground) 70%, transparent);
}

.footer-bottom a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-bottom a:hover {
  color: var(--foreground);
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--foreground) 50%, transparent);
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-inner a:hover {
  color: var(--foreground);
}
