:root {
  --font-sans: "Nunito", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Amatic SC", cursive;

  --color-cream-50: #fffaf2;
  --color-cream-100: #f8f0e4;
  --color-cream-200: #f0e4d2;

  --color-ink-900: #4a3a2a;
  --color-ink-700: #5a4a3a;
  --color-ink-500: #7a6a5a;
  --color-ink-300: #8a7a6a;
  --color-ink-200: #a09080;

  --color-sky-accent: #7a9ab0;
  --color-sky-accent-hover: #5a7a90;
  --color-teal-accent: #7ab8c0;

  --color-tan-border: rgba(200, 180, 150, 0.35);
  --color-tan-chip: rgba(160, 140, 120, 0.12);

  --shadow-card: 0 4px 24px rgba(80, 60, 40, 0.12);
  --shadow-card-hover: 0 8px 32px rgba(80, 60, 40, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  background: var(--color-cream-200);
  color: var(--color-ink-700);
  font-family: var(--font-sans);
  font-size: 17px;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background: rgba(122, 154, 176, 0.25);
  color: var(--color-ink-900);
}

:focus-visible {
  outline: 2px solid var(--color-sky-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* Soft cream-blob background — same warm field the main site has,
   without the Three.js scene. Gives the glass panels something to refract. */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.scene-blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(80px);
  opacity: 0.55;
}

.scene-blob-a {
  top: -8rem;
  left: -6rem;
  width: 28rem;
  height: 28rem;
  background: rgba(122, 154, 176, 0.35);
}

.scene-blob-b {
  top: 30%;
  right: -10rem;
  width: 32rem;
  height: 32rem;
  background: rgba(220, 180, 140, 0.5);
}

.scene-blob-c {
  bottom: -10rem;
  left: 25%;
  width: 30rem;
  height: 30rem;
  background: rgba(122, 184, 192, 0.32);
}

/* Layout */
.overlay {
  position: relative;
  z-index: 10;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
  color: var(--color-ink-700);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
}

@media (min-width: 640px) {
  .overlay {
    padding: 0 2rem;
  }
}

/* Hero — soft cream glass panel */
.hero {
  position: relative;
  padding: 1.75rem 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 2rem;
  border-radius: 24px;
  background: rgba(255, 250, 242, 0.85);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid var(--color-tan-border);
  box-shadow: 0 4px 24px rgba(80, 60, 40, 0.08);
}

@media (min-width: 640px) {
  .hero {
    padding: 3rem 2.5rem;
    margin-top: 4rem;
    margin-bottom: 3rem;
  }
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  color: var(--color-ink-700);
  margin-bottom: 0.75rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.75rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--color-ink-900);
}

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

.hero-bio {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--color-ink-700);
  max-width: 36rem;
}

@media (min-width: 640px) {
  .hero-bio {
    margin-top: 1.25rem;
    font-size: 1.125rem;
  }
}

/* Section title (cream pill on a centered line) */
.section-title {
  display: flex;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: 0.04em;
  color: var(--color-ink-900);
  margin-top: 2.25rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

@media (min-width: 640px) {
  .section-title {
    font-size: 2.25rem;
    margin-top: 3rem;
  }
}

.section-title span {
  padding: 0.35rem 1.1rem 0.5rem;
  background: rgba(255, 250, 242, 0.92);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  backdrop-filter: blur(10px) saturate(1.1);
  border: 1px solid var(--color-tan-border);
  border-radius: 12px;
  white-space: nowrap;
  line-height: 1;
}

@media (min-width: 640px) {
  .section-title span {
    padding: 0.4rem 1.6rem 0.55rem;
    border-radius: 14px;
  }
}

/* Grid */
.work {
  margin-top: 0;
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: 1.5rem;
}

.loading,
.empty {
  grid-column: 1 / -1;
  color: var(--color-ink-500);
  text-align: center;
  padding: 2rem;
  border: 1px dashed var(--color-tan-border);
  border-radius: 16px;
}

/* Project card — same glass language as main site */
.project {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 250, 242, 0.92);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  backdrop-filter: blur(12px) saturate(1.1);
  border: 1px solid var(--color-tan-border);
  box-shadow: var(--shadow-card);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.project:hover,
.project:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  outline: none;
}

.project-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-cream-100);
}

.project-screenshot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fdf6e8 0%, #f0e4d2 100%);
  overflow: hidden;
}

.project-placeholder::before,
.project-placeholder::after {
  content: "";
  position: absolute;
  border-radius: 9999px;
  filter: blur(40px);
}

.project-placeholder::before {
  top: -4rem;
  right: -3rem;
  width: 13rem;
  height: 13rem;
  background: rgba(200, 170, 130, 0.22);
}

.project-placeholder::after {
  bottom: -5rem;
  left: -4rem;
  width: 16rem;
  height: 16rem;
  background: rgba(122, 154, 176, 0.15);
}

.project-placeholder-text {
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: 0.04em;
  color: var(--color-ink-300);
  text-transform: uppercase;
}

/* Card body */
.project-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  flex: 1;
}

@media (min-width: 640px) {
  .project-body {
    padding: 1.5rem;
  }
}

.project-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--color-ink-900);
}

.project-desc {
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-ink-500);
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  list-style: none;
  margin-top: 0.5rem;
}

.project-tags li {
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  color: var(--color-ink-500);
  background: var(--color-tan-chip);
  border-radius: 9999px;
}

/* Footer pill — matches main site */
.page-footer {
  display: flex;
  justify-content: center;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.page-footer span {
  padding: 0.5rem 1.1rem;
  background: rgba(255, 250, 242, 0.92);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  backdrop-filter: blur(10px) saturate(1.1);
  border: 1px solid var(--color-tan-border);
  border-radius: 12px;
  font-size: 0.875rem;
  color: var(--color-ink-700);
  line-height: 1.3;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
