:root {
  --bg: #f6f4f0;
  --surface: #fcfbf9;
  --surface-tint: #edeae4;
  --ink: #1c1a17;
  --muted: #524e49;
  --line: #e2ddd5;
  --purple: #5a2ca0;
  --purple-dark: #40206f;
  --sidebar: 264px;
  --max-width: 1360px;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

p {
  margin: 0;
  line-height: 1.72;
}

.site-shell {
  min-height: 100vh;
}

/* Hide template kickers across all pages */
.eyebrow,
.section-kicker,
.callout-kicker {
  display: none;
}

/* ---------------- Sidebar ---------------- */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  padding: 36px 28px 28px;
  display: flex;
  flex-direction: column;
  background: #161514;
  color: #f6f4f0;
  z-index: 30;
  overflow-y: auto;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
}

.brand {
  display: inline-block;
  width: fit-content;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
}

.profile-photo {
  width: 128px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 30px;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid #6b6661;
  color: #f6f4f0;
  border-radius: 8px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sidebar-nav,
.recent-projects {
  display: grid;
  gap: 10px;
}

.sidebar-nav a {
  color: #dedad3;
  font-size: 0.94rem;
  font-weight: 600;
  width: fit-content;
  transition: color 150ms ease;
}

.sidebar-nav a:hover,
.sidebar-nav a[aria-current="page"],
.recent-projects a:hover,
.recent-projects a[aria-current="page"] {
  color: #c4a3f3;
}

.recent-projects {
  margin-top: 36px;
}

.recent-projects h2 {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 0.78rem;
  line-height: 1.3;
  color: #969089;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.recent-projects ul {
  margin: 0;
  padding-left: 16px;
  display: grid;
  gap: 8px;
  color: #d6d1c9;
}

li::marker {
  content: "★ ";
  color: silver;
}

.recent-projects li {
  padding-left: 2px;
}

.recent-projects a {
  font-size: 0.88rem;
  color: inherit;
  transition: color 150ms ease;
}

.sidebar-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 30px;
}

.social-button,
.resume-button,
.pill-button {
  border: 1px solid #6b6661;
  background: transparent;
  color: inherit;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    border-color 150ms ease;
}

.social-button:hover,
.resume-button:hover {
  background: #f6f4f0;
  color: #161514;
  border-color: #f6f4f0;
}

.social-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  flex: 0 0 auto;
}

.social-button svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.resume-button {
  min-height: 34px;
  padding: 0 15px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
}

/* ---------------- Main & Buttons ---------------- */

.main {
  margin-left: var(--sidebar);
  min-height: 100vh;
}

.container {
  width: min(calc(100% - 88px), var(--max-width));
  margin: 0 auto;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  border-radius: 8px;
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.pill-button:hover {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

.pill-button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: #bdb6ac;
}

.pill-button.secondary:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.pill-button.small {
  min-height: 36px;
  padding: 0 16px;
  font-size: 0.82rem;
}

/* ---------------- Home Page ---------------- */

.hero {
  padding: 84px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
}

.hero-copy {
  max-width: 660px;
}

.hero h1 {
  font-size: clamp(3.2rem, 6vw, 5.4rem);
  line-height: 0.98;
}

.hero-note {
  margin-top: 24px;
  max-width: 600px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.75;
}

.hero-media {
  display: grid;
  place-items: center;
}

.hero-collage {
  width: 100%;
  max-width: 600px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: var(--radius);
}

.section {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  line-height: 1.1;
}

.project-list {
  display: grid;
  gap: 52px;
}

.project {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: center;
  padding-bottom: 52px;
  border-bottom: 1px solid var(--line);
}

.project:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.project-image-wrap {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-tint);
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 300ms ease;
}

.project:hover .project-image {
  transform: scale(1.015);
}

.project-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.1;
}

.project-title a:hover {
  color: var(--purple);
}

.project-meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.project-meta .dot {
  color: #b5afa6;
}

.project-meta a {
  color: var(--purple);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.project-meta a:hover {
  color: var(--purple-dark);
}

.project-description {
  margin-top: 14px;
  max-width: 720px;
  color: var(--muted);
  font-size: 1rem;
}

/* ---------------- About Page ---------------- */

.page-hero {
  padding: 64px 0 48px;
}

.page-hero h1 {
  font-size: clamp(2.4rem, 4.2vw, 3.6rem);
  line-height: 1.02;
  margin-bottom: 20px;
}

.about-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.prose {
  display: grid;
  gap: 16px;
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 680px;
}

.prose strong {
  color: var(--ink);
  font-weight: 700;
}

.photo-card {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-tint);
  border: 1px solid var(--line);
}

.photo-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.photo-strip {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.photo-caption {
  padding: 12px 16px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  border-top: 1px solid var(--line);
}

.experience-list {
  display: grid;
  gap: 28px;
}

.experience-item {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 44px);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.experience-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.experience-org {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.3rem;
  line-height: 1.2;
}

.experience-period {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.experience-role {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.sub-roles {
  display: grid;
  gap: 16px;
}

.experience-desc {
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 720px;
}

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.info-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.skill-list {
  list-style: none;
  padding: 12px 0 0;
  margin: 0;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.skill-list li {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--muted);
}

.beyond-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.favorites-box {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: grid;
  gap: 12px;
}

.favorite-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.favorite-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.favorite-row dd {
  margin: 0;
}

.favorite-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.favorite-value {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink);
}

/* ---------------- Contact Page ---------------- */

.contact-section {
  min-height: calc(100vh - 100px);
  padding: 72px 0 84px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 780px;
}

.contact-section h1 {
  font-size: clamp(2.6rem, 4.5vw, 3.8rem);
  line-height: 1.02;
  margin-bottom: 20px;
}

.contact-grid {
  margin-top: 36px;
  display: grid;
  gap: 16px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.contact-label {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}

.contact-value {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0;
}

.contact-value a {
  color: var(--purple);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  transition: color 150ms ease;
}

.contact-value a:hover {
  color: var(--purple-dark);
}

.contact-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------------- Project Case Study ---------------- */

.case-hero {
  padding: 56px 0 44px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 150ms ease;
}

.back-link:hover {
  color: var(--purple);
}

.case-hero h1 {
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  line-height: 1.04;
  max-width: 860px;
}

.case-subtitle {
  margin-top: 14px;
  max-width: 780px;
  font-size: clamp(1.08rem, 1.8vw, 1.28rem);
  font-weight: 500;
  line-height: 1.55;
  color: var(--muted);
}

.case-meta-grid {
  margin-top: 28px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.meta-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.45;
}

.case-banner {
  margin: 28px 0 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-tint);
}

.case-banner img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.case-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: start;
}

.case-grid h2 {
  font-size: clamp(1.45rem, 2.4vw, 1.95rem);
  line-height: 1.15;
}

.case-body {
  display: grid;
  gap: 16px;
  max-width: 700px;
  color: var(--muted);
  font-size: 1.02rem;
}

.case-body strong {
  color: var(--ink);
  font-weight: 700;
}

.callout-box {
  margin: 8px 0;
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--line);
}

.callout-box blockquote {
  margin: 0;
}

.callout-box p {
  color: var(--ink);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.72;
}

.case-gallery {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.case-gallery.single {
  grid-template-columns: 1fr;
}

.case-gallery.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.embed-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.embed-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.embed-title {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
}

.embed-header a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.embed-frame {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 0;
  background: var(--surface-tint);
  display: block;
}

.project-nav-footer {
  padding: 36px 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.project-nav-footer .back-link {
  margin-bottom: 0;
}

.project-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-nav-link.next {
  text-align: right;
  margin-left: auto;
}

.project-nav-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.project-nav-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  color: var(--ink);
  transition: color 150ms ease;
}

.project-nav-link:hover .project-nav-title {
  color: var(--purple);
}

/* ---------------- Audio Track Selector ---------------- */

.audio-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: grid;
  gap: 16px;
}

.audio-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.audio-player {
  width: 100%;
  height: 40px;
}

.track-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.track-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    border-color 150ms ease;
}

.track-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.track-btn.is-active {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

/* ---------------- Footer ---------------- */

footer {
  padding: 30px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 1000px) {
  :root {
    --sidebar: 224px;
  }

  .sidebar {
    padding-inline: 20px;
  }

  .container {
    width: min(calc(100% - 52px), var(--max-width));
  }

  .hero-grid,
  .about-intro-grid,
  .beyond-grid,
  .experience-item,
  .card-grid-3,
  .case-grid,
  .case-gallery.three-col,
  .embed-grid {
    grid-template-columns: 1fr;
  }

  .experience-item {
    gap: 12px;
  }

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

  .hero-collage {
    max-width: 520px;
  }
}

@media (max-width: 760px) {
  :root {
    --sidebar: 0px;
  }

  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    padding: 14px 20px;
    border-bottom: 1px solid #2b2927;
  }

  .sidebar-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .brand {
    font-size: 1.25rem;
    margin-bottom: 0;
  }

  .profile-photo {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-menu {
    display: none;
    padding-top: 18px;
    padding-bottom: 8px;
  }

  .sidebar.is-open .sidebar-menu {
    display: flex;
  }

  .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
  }

  .recent-projects {
    margin-top: 20px;
  }

  .recent-projects ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding-left: 0;
    list-style: none;
  }

  .recent-projects li {
    padding-left: 0;
  }

  .sidebar-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #2b2927;
  }

  .main {
    margin-left: 0;
  }

  .container {
    width: min(calc(100% - 38px), var(--max-width));
  }

  .hero,
  .page-hero,
  .case-hero {
    padding: 40px 0 36px;
  }

  .section {
    padding: 44px 0;
  }

  .project,
  .photo-strip,
  .case-meta-grid,
  .case-gallery {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .contact-section {
    min-height: auto;
    padding: 48px 0 64px;
  }

  .contact-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 22px;
  }
}