@import url('https://fonts.googleapis.com/css2?family=Special+Elite&family=Vollkorn:ital,wght@0,400..900;1,400..900&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES — edit these to theme your site!
   TODO: Try asking Copilot to suggest a color palette for you.
   ============================================================ */
:root {
  /* Brand palette */
  --forest-green: #2d4a32;
  --moss-green: #5a6e3f;
  --sage-green: #8a9a5b;
  --terracotta: #c1666b;
  --rust: #b5651d;
  --amber: #d8a657;
  --cream: #f4ecd6;
  --bark: #2f2923;
  --cream-2: #eae0c4;
  --cream-3: #ded2b0;
  --bark-2: #3a312a;
  --amber-deep: #a9761f;
  --rust-deep: #8f4e16;

  /* Default to warm-dark mode */
  --color-bg: var(--bark);
  --color-bg-alt: var(--bark-2);
  --color-text: var(--cream);
  --color-text-muted: var(--sage-green);
  --color-accent: var(--amber);
  --color-accent-hover: var(--cream);
  --color-border: var(--moss-green);
  --color-heading: var(--amber);
  --color-link: var(--amber);
  --color-link-hover: var(--cream);
  --color-button-bg: var(--rust);
  --color-button-text: var(--cream);
  --color-surface: var(--bark-2);
  --color-surface-alt: var(--forest-green);
  --color-surface-hover: #453b32;
  --font-display: 'Special Elite', monospace;
  --font-body: 'Vollkorn', serif;
  --font-mono: ui-monospace, SFMono-Regular, monospace;
  --font-hero: var(--font-display);
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.18);
  --transition: 0.2s ease;
}

[data-theme="light"] {
  --color-bg: var(--cream);
  --color-bg-alt: var(--cream-2);
  --color-text: var(--forest-green);
  --color-text-muted: var(--moss-green);
  --color-accent: var(--terracotta);
  --color-accent-hover: var(--forest-green);
  --color-border: var(--cream-3);
  --color-heading: var(--amber-deep);
  --color-link: var(--rust-deep);
  --color-link-hover: var(--forest-green);
  --color-button-bg: var(--rust);
  --color-button-text: var(--cream);
  --color-surface: #ffffff;
  --color-surface-alt: var(--cream-2);
  --color-surface-hover: #ffffff;
  --shadow: 0 8px 22px rgba(38, 33, 28, 0.12);
  --shadow-soft: 0 4px 14px rgba(38, 33, 28, 0.08);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--color-bg);
  color-scheme: dark;
  overflow-x: hidden;
}

[data-theme="light"] html {
  color-scheme: light;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
}

body {
  background-image:
    radial-gradient(circle at top left, rgba(216, 166, 87, 0.08), transparent 28%),
    radial-gradient(circle at bottom right, rgba(193, 102, 107, 0.08), transparent 24%);
  background-attachment: fixed;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition);
}

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

/* ============================================================
   NAVIGATION
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-heading);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-body);
  color: var(--color-link);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--color-heading);
}

/* TODO: The nav isn't responsive on mobile yet.
   Ask Copilot: "Make this navbar collapse into a hamburger menu on small screens" */

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 80vh;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
  background: var(--color-bg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    rgba(38, 33, 28, 0.58),
    rgba(38, 33, 28, 0.42)
  );
}

[data-theme="light"] .hero::before {
  background: linear-gradient(
    rgba(244, 236, 214, 0.42),
    rgba(244, 236, 214, 0.24)
  );
}

.hero-content {
  max-width: 700px;
  position: relative;
  z-index: 1;
  padding: 2rem 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: calc(var(--radius) * 1.6);
  background: color-mix(in srgb, var(--color-bg) 36%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero h1 {
  font-family: var(--font-hero);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--color-heading);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.28);
}

.highlight {
  color: var(--color-accent);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: var(--color-button-bg);
  color: var(--color-button-text) !important;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background var(--transition), transform var(--transition), color var(--transition), border-color var(--transition);
  box-shadow: var(--shadow-soft);
}

.theme-toggle-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 1rem;
}

.toggle,
.toggle:before,
.toggle:after {
  transition: transform var(--dur, 0.3s);
}

.toggle {
  --dur: 0.3s;
  background: currentColor;
  border-radius: 0.75rem;
  cursor: pointer;
  width: 3rem;
  height: 1.5rem;
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  color: var(--color-border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), var(--shadow-soft);
  -webkit-tap-highlight-color: transparent;
}

.toggle:before,
.toggle:after {
  border-radius: 50%;
  content: "";
  display: block;
  top: 0.25rem;
  left: 0.25rem;
  width: 1rem;
  height: 1rem;
  position: absolute;
}

.toggle:before {
  background: var(--color-bg);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-border) 55%, transparent);
  transform: translateX(-1.5rem);
}

.toggle:after {
  background: var(--color-accent);
}

.toggle:checked {
  color: var(--color-heading);
}

.toggle:checked:before {
  transform: translateX(1.5rem);
}

.toggle:checked:after {
  transform: translateX(3rem);
}

.toggle:focus {
  outline: transparent;
}

.toggle:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 35%, transparent), var(--shadow-soft);
}

.theme-toggle-shell .sr {
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
  color: transparent;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.theme-toggle-shell .sr,
.toggle {
  overflow: hidden;
}

.btn:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--color-heading) !important;
  border: 2px solid var(--color-border);
}

.btn-outline:hover {
  background: var(--color-surface);
  color: var(--color-text) !important;
}

/* ============================================================
   SECTIONS
   ============================================================ */
/* Every section shares one centered column, so all section headings line
   up along the same left edge down the page. */
.section,
.section-alt {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

/* Alt sections show the lighter brown as a full-bleed band while their
   content stays in the shared centered column (so headings stay aligned).
   The box-shadow paints the band edge-to-edge; clip-path trims it to the
   section's own height so it never bleeds into neighboring sections. */
.section-alt {
  background: var(--color-bg-alt);
  box-shadow: 0 0 0 100vmax var(--color-bg-alt);
  clip-path: inset(0 -100vmax);
}

.now-playing-section h2 {
  display: block;
  text-align: center;
}

.now-playing-section h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.now-playing-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  align-items: center;
}

/* All three Now Playing embeds share one fixed-size box so they read as
   a matched set on the same line, regardless of what each one renders
   internally (an image, an iframe, or the Wordle widget). */
.now-playing-card,
.linkedin-card,
.wordle-card {
  width: 340px;
  height: 560px;
  box-sizing: border-box;
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius) * 1.2);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.now-playing-card img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.linkedin-card iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================================
   SPROUT WORDLE
   ============================================================ */
.wordle-card {
  justify-content: flex-start;
  gap: 0.9rem;
  overflow-y: auto;
}

.wordle-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.wordle-message {
  min-height: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.wordle-board {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.wordle-row {
  display: grid;
  grid-template-columns: repeat(5, 2.4rem);
  gap: 0.4rem;
}

.wordle-tile {
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-text);
}

.wordle-tile.correct {
  background: var(--moss-green);
  border-color: var(--moss-green);
  color: var(--cream);
}

.wordle-tile.present {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--bark);
}

.wordle-tile.absent {
  background: var(--color-surface-hover);
  border-color: var(--color-border);
  color: var(--color-text-muted);
}

.wordle-keyboard {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.wordle-krow {
  display: flex;
  gap: 0.3rem;
  width: 100%;
}

.wordle-key {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition);
}

.wordle-key:hover,
.wordle-key:focus-visible {
  border-color: var(--color-accent);
  outline: none;
}

.wordle-key.correct {
  background: var(--moss-green);
  border-color: var(--moss-green);
  color: var(--cream);
}

.wordle-key.present {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--bark);
}

.wordle-key.absent {
  background: var(--color-surface-hover);
  border-color: var(--color-border);
  color: var(--color-text-muted);
}

.wordle-key.wide {
  flex: 1.6;
  font-size: 0.6rem;
}

.wordle-footer {
  display: flex;
  gap: 0.6rem;
}

.wordle-footer[hidden] {
  display: none;
}

.wordle-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--color-accent);
  border-radius: 4px;
  color: var(--color-accent);
  background: transparent;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}

.wordle-btn:hover,
.wordle-btn:focus-visible {
  background: var(--color-accent);
  color: var(--color-bg);
}

h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

/* Accent underline on section headings */
h2::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 40px;
  height: 4px;
  background: var(--color-accent);
  border-radius: 2px;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 44rem) auto;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
  justify-content: space-between;
}

.about-text p + p {
  margin-top: 1rem;
}

.about-image {
  justify-self: center;
}

.about-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.about-photo-image {
  width: 220px;
  height: 220px;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  background: var(--color-surface-alt);
  border: 3px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.about-photo-caption {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-heading);
  text-align: center;
}

/* ============================================================
   PROJECTS
   ============================================================ */
/* Only two projects — use a wider section so the cards feel roomier and
   the screenshots can breathe without changing the overall layout. */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 2rem;
  width: 100%;
}

/* The card height follows its screenshot at natural aspect ratio, so
   no part of the project is cut off. A hovercard panel slides up on
   hover/focus. */
.project-card {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  outline: none;
}

.project-card:focus-visible {
  border-color: var(--color-accent);
}

/* --- Resting state: the screenshot preview --- */
/* Media sizes the card. The image shows in full (no crop); the card
   height simply follows the image's natural aspect ratio. */
.project-media {
  position: relative;
  display: block;
}

/* Show the full screenshot at its natural aspect ratio — nothing cropped. */
.project-media-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Fallback when no screenshot is provided — keep a pleasant ratio */
.project-media-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--color-button-text);
  background:
    radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--color-accent) 55%, transparent), transparent 60%),
    linear-gradient(135deg, var(--color-surface-alt), var(--color-button-bg));
}

/* Scrim keeps the title readable over any screenshot */
.project-media-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(38, 33, 28, 0.72) 0%, rgba(38, 33, 28, 0) 55%);
}

.project-title {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--cream);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  margin: 0;
}

/* --- Hovercard: slides up over the screenshot --- */
.project-preview {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.15rem 1.25rem;
  background: color-mix(in srgb, var(--color-surface) 94%, transparent);
  backdrop-filter: blur(6px);
  transform: translateY(101%);
  opacity: 0;
  transition: transform var(--transition), opacity var(--transition);
  overflow-y: auto;
}

.project-card:hover .project-preview,
.project-card:focus-within .project-preview {
  transform: translateY(0);
  opacity: 1;
}

.project-preview-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0;
  color: var(--color-heading);
}

.project-preview-desc {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
}

.project-highlights {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-muted);
}

.project-links {
  display: flex;
  gap: 0.75rem;
}

.project-links a {
  font-size: 0.875rem;
  font-weight: 600;
}

/* Touch devices can't hover — reveal the panel by default so the
   information is never trapped behind an interaction they can't do. */
@media (hover: none) {
  .project-preview {
    transform: none;
    opacity: 1;
    position: static;
    backdrop-filter: none;
  }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  .project-card,
  .project-preview {
    transition: opacity var(--transition);
  }

  .project-preview {
    transform: none;
  }
}

/* ============================================================
   CONTRIBUTION GARDEN — GitHub activity as growing plants
   Each contribution-graph day renders as a soil tile with a plant
   sprite; growth stage (bare soil → bloom) maps to GitHub's own
   0-4 contribution level for that day.
   ============================================================ */
.commit-garden-section {
  --cg-soil: color-mix(in srgb, var(--color-border) 55%, transparent);
  --cg-sprout: var(--sage-green);
  --cg-leaf: var(--moss-green);
  --cg-moss: var(--forest-green);
  --cg-bloom: var(--amber);
}

[data-theme="light"] .commit-garden-section {
  --cg-soil: color-mix(in srgb, var(--color-border) 70%, transparent);
  --cg-bloom: var(--rust-deep);
}

.commit-garden-intro {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  max-width: 46ch;
}

.commit-garden {
  max-width: 100%;
}

.cg-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 1fr);
  gap: 4px;
  overflow-x: auto;
  padding: 0.25rem 0.25rem 0.75rem;
}

.cg-cell {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: var(--cg-soil);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cg-cell.empty {
  background: transparent;
}

.cg-cell:not(.empty):hover {
  transform: scale(1.35);
  z-index: 1;
}

.cg-cell svg {
  width: 100%;
  height: 100%;
}

.cg-cell.cg-level-sprout svg { stroke: var(--cg-sprout); }
.cg-cell.cg-level-leaf svg { stroke: var(--cg-leaf); }
.cg-cell.cg-level-moss svg { stroke: var(--cg-moss); }
.cg-cell.cg-level-bloom svg { stroke: var(--cg-bloom); }

.cg-status {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  padding: 0.75rem 0;
}

.cg-status a {
  color: var(--color-link);
}

.cg-status a:hover {
  color: var(--color-link-hover);
}

@media (prefers-reduced-motion: reduce) {
  .cg-cell {
    transition: none;
  }

  .cg-cell:not(.empty):hover {
    transform: none;
  }
}

/* ============================================================
   SKILLS — vinyl record crate carousel
   ============================================================ */
.skills-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.record-crate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 3vw, 2rem);
  width: 100%;
}

.crate-stage {
  position: relative;
  width: min(340px, 76vw);
  /* sleeve art (square) + tracklist + headroom for the vinyl to rise */
  height: calc(min(340px, 76vw) + 350px);
  perspective: 1200px;
  outline: none;
}

.crate-stage:focus-visible {
  outline: 2px dashed var(--color-accent);
  outline-offset: 12px;
}

.record {
  position: absolute;
  inset: 0;
  padding-top: 110px;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s ease;
}

.record[data-offset="0"] {
  transform: translateX(0) scale(1);
  z-index: 3;
  cursor: default;
}

.record[data-offset="-1"] {
  transform: translateX(-56%) rotateY(30deg) scale(0.8);
  opacity: 0.45;
  z-index: 2;
}

.record[data-offset="1"] {
  transform: translateX(56%) rotateY(-30deg) scale(0.8);
  opacity: 0.45;
  z-index: 2;
}

.record[data-offset="-2"] {
  transform: translateX(-80%) scale(0.6);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.record[data-offset="2"] {
  transform: translateX(80%) scale(0.6);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

/* --- The vinyl disc hiding inside the sleeve --- */
.record-vinyl {
  position: absolute;
  top: 110px;
  left: 50%;
  width: 84%;
  aspect-ratio: 1;
  transform: translate(-50%, 6%);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}

.record.is-active .record-vinyl {
  transform: translate(-50%, -28%);
}

.vinyl-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.14), transparent 42%),
    repeating-radial-gradient(circle at center, #17130f 0 2px, #232128 2px 4px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
}

.record.is-active .vinyl-disc {
  animation: vinyl-spin 16s linear infinite;
}

@keyframes vinyl-spin {
  to {
    transform: rotate(1turn);
  }
}

.vinyl-label {
  width: 38%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0.4rem;
  background: var(--amber);
  color: var(--bark);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.25);
}

/* --- The sleeve (album cover + tracklist) --- */
.record-sleeve {
  position: relative;
  z-index: 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.sleeve-art {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.3rem;
  padding: 1.4rem;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--color-surface-alt) 85%, transparent), transparent 70%),
    var(--color-surface);
  border-bottom: 1px dashed var(--color-border);
}

.sleeve-side {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  color: var(--color-text-muted);
}

.sleeve-cat {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.sleeve-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 6vw, 2rem);
  line-height: 1.1;
  color: var(--color-heading);
}

.sleeve-artist {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-text-muted);
}

.sleeve-tracks {
  list-style: none;
  counter-reset: track;
  padding: 1rem 1.4rem 1.3rem;
}

.sleeve-track {
  counter-increment: track;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.32rem 0;
  border-bottom: 1px dotted color-mix(in srgb, var(--color-border) 55%, transparent);
  font-size: 0.92rem;
}

.sleeve-track:last-child {
  border-bottom: none;
}

.sleeve-track::before {
  content: counter(track, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.track-name {
  font-weight: 600;
}

.track-note {
  margin-left: auto;
  font-size: 0.74rem;
  font-style: italic;
  color: var(--color-text-muted);
  text-align: right;
}

/* --- Controls --- */
.crate-arrow {
  position: relative;
  z-index: 4;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-accent);
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), color var(--transition);
}

.crate-arrow:hover,
.crate-arrow:focus-visible {
  background: var(--color-accent);
  color: var(--color-bg);
  transform: scale(1.08);
}

.crate-dots {
  display: flex;
  gap: 0.6rem;
}

.crate-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--color-accent);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), transform var(--transition);
}

.crate-dot.is-active {
  background: var(--color-accent);
  transform: scale(1.2);
}

@media (max-width: 640px) {
  .record[data-offset="-1"],
  .record[data-offset="1"] {
    opacity: 0.18;
  }
}

@media (prefers-reduced-motion: reduce) {
  .record,
  .record-vinyl {
    transition: none;
  }

  .record.is-active .vinyl-disc {
    animation: none;
  }
}

/* ============================================================
   CONTACT — "Let's Grow Something" garden ledger
   Each link is a growth stage: Seed → Sprout → Bloom → Harvest.
   ============================================================ */
.grow-contact {
  --gc-leaf: #a3c585;
  --gc-soil: var(--amber);
  max-width: 760px;
}

[data-theme="light"] .grow-contact {
  --gc-leaf: var(--moss-green);
  --gc-soil: var(--rust-deep);
}

.contact-intro {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  font-size: 1.1rem;
  max-width: 46ch;
}

.gc-rows {
  display: flex;
  flex-direction: column;
  border-top: 1px dashed var(--color-border);
}

.gc-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0.5rem;
  border-bottom: 1px dashed var(--color-border);
  text-decoration: none;
  color: var(--color-text);
  transition: padding-left 0.25s ease, background-color 0.25s ease;
}

.gc-row:hover,
.gc-row:focus-visible {
  padding-left: 0.9rem;
  background: color-mix(in srgb, var(--gc-leaf) 8%, transparent);
  outline: none;
}

/* Vine underline that grows from the root on hover */
.gc-row::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--gc-soil), var(--gc-leaf));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.gc-row:hover::after,
.gc-row:focus-visible::after {
  transform: scaleX(1);
}

/* Growth-stage label — typewriter type, seed-packet vibes */
.gc-stage {
  position: relative;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gc-soil);
  width: 72px;
  flex-shrink: 0;
  transition: color 0.25s ease;
}

.gc-row:hover .gc-stage,
.gc-row:focus-visible .gc-stage {
  color: var(--gc-leaf);
}

/* Each stage blooms its emoji up out of the soil on hover */
.gc-stage::before {
  content: attr(data-bloom);
  position: absolute;
  left: 50%;
  top: -0.25rem;
  font-size: 1rem;
  opacity: 0;
  transform: translate(-50%, 0) scale(0.4) rotate(-8deg);
  pointer-events: none;
}

.gc-row:hover .gc-stage::before,
.gc-row:focus-visible .gc-stage::before {
  animation: gc-bloom 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes gc-bloom {
  0% {
    opacity: 0;
    transform: translate(-50%, 0.4rem) scale(0.4) rotate(-8deg);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -1.6rem) scale(1.05) rotate(10deg);
  }
}

/* Line-drawn plant icon: redraws itself, then sways in the breeze */
.gc-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  stroke: var(--gc-leaf);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  transform-origin: 50% 100%;
}

.gc-icon path,
.gc-icon circle {
  stroke-dasharray: 48;
  stroke-dashoffset: 0;
}

.gc-row:hover .gc-icon,
.gc-row:focus-visible .gc-icon {
  animation: gc-sway 2.2s ease-in-out 0.7s infinite;
}

.gc-row:hover .gc-icon path,
.gc-row:hover .gc-icon circle,
.gc-row:focus-visible .gc-icon path,
.gc-row:focus-visible .gc-icon circle {
  animation: gc-draw 0.7s ease-out;
}

@keyframes gc-draw {
  from {
    stroke-dashoffset: 48;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes gc-sway {
  0%, 100% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(5deg);
  }
}

.gc-text {
  flex: 1;
  min-width: 0;
}

.gc-label {
  display: block;
  font-weight: 600;
  font-size: 1.05rem;
  transition: color 0.25s ease;
}

.gc-row:hover .gc-label,
.gc-row:focus-visible .gc-label {
  color: var(--gc-leaf);
}

.gc-sub {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.gc-arrow {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease;
}

.gc-row:hover .gc-arrow,
.gc-row:focus-visible .gc-arrow {
  transform: translateX(6px);
  color: var(--gc-leaf);
}

@media (prefers-reduced-motion: reduce) {
  .gc-row,
  .gc-row::after,
  .gc-arrow {
    transition: none;
  }

  .gc-row:hover .gc-icon,
  .gc-row:focus-visible .gc-icon,
  .gc-row:hover .gc-icon path,
  .gc-row:hover .gc-icon circle,
  .gc-row:focus-visible .gc-icon path,
  .gc-row:focus-visible .gc-icon circle,
  .gc-row:hover .gc-stage::before,
  .gc-row:focus-visible .gc-stage::before {
    animation: none;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-bg) 96%, transparent);
}

::selection {
  background: color-mix(in srgb, var(--color-accent) 30%, transparent);
  color: var(--color-text);
}

/* ============================================================
   RESPONSIVE
   TODO: This is a start, but there's more to do on mobile.
   Ask Copilot: "Improve the responsive styles for screens under 600px"
   ============================================================ */
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-photo-image {
    width: 150px;
    height: 150px;
  }
}

@media (max-width: 600px) {
  .navbar {
    padding: 0.9rem 1rem;
    gap: 0.75rem;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nav-links {
    width: 100%;
    order: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    justify-content: center;
    margin-top: 0.25rem;
  }

  .nav-links li {
    flex: 0 0 auto;
  }

  .nav-logo {
    font-size: 1rem;
  }

  .theme-toggle-shell {
    margin-left: auto;
  }

  .hero {
    min-height: 72vh;
    padding: 3rem 1rem;
  }

  .hero-content {
    padding: 1.5rem 1.25rem;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .section,
  .section-alt {
    padding: 3.5rem 1rem;
  }

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

  .gc-row {
    gap: 0.75rem;
    padding: 0.85rem 0.25rem;
  }

  .gc-stage {
    width: 56px;
    font-size: 0.62rem;
  }

  .gc-sub {
    font-size: 0.78rem;
  }
}
