/* ── TOKENS ── */
:root {
  --bg: #fbf9f6;
  --text: #241f1a;
  --muted: #7c7268;
  --border: #e8e1d8;
  --card: #f3eee6;
  --accent: #b3541e;
  --pill-bg: rgba(251, 249, 246, 0.85);
  --pill-border: rgba(36, 31, 26, 0.1);
}

[data-theme="dark"] {
  --bg: #1c1712;
  --text: #f5efe6;
  --muted: #a89c8d;
  --border: #362d24;
  --card: #241e18;
  --accent: #e5883a;
  --pill-bg: rgba(28, 23, 18, 0.85);
  --pill-border: rgba(245, 239, 230, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  transition: background 0.2s, color 0.2s;
  padding-bottom: 100px;
}

/* ── PAGE WRAPPER ── */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ── SECTIONS ── */
section {
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

.section-label {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--accent);
  margin-bottom: 16px;
}

/* ── HERO ── */
.hero {
  padding-top: 48px;
  padding-bottom: 32px;
}

.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 500px) 200px;
  gap: 60px;
  align-items: center;
}

.hero h1 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 600;
  letter-spacing: -0.3px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero-tagline {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 12px;
  color: var(--accent);
}

.hero-para {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 12px;
  text-align: left;
}

.hero-para:last-child {
  margin-bottom: 0;
}

.hero-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.signal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 6px;
}

.hero-links {
  display: flex;
  gap: 18px;
}

.hero-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

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

.hero-photo {
  width: 200px;
  height: 280px;
  border-radius: 16px;
  object-fit: cover;
  object-position: center center;
  border: 1px solid var(--border);
  flex-shrink: 0;
  align-self: center;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* ── WORK ── */
.work-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

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

.work-row-visual {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.work-row-flip .work-row-visual {
  order: -1;
  align-items: flex-start;
}

.work-row-solo {
  grid-template-columns: 1fr;
}

.work-company {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--text);
  margin-bottom: 4px;
}

.work-eyebrow {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 10px;
}

.work-row h3 {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.2px;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--muted);
}

.work-row-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
  text-align: left;
}

.work-row-desc:last-child {
  margin-bottom: 0;
}

.work-row-visual img,
.work-row-visual video {
  width: auto;
  max-width: 280px;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: block;
  margin-left: auto;
  margin-right: 0;
}

.work-row-visual .visual-placeholder {
  width: 100%;
  max-width: 280px;
  height: 180px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
  margin-left: auto;
  background: var(--card);
}

.work-row-flip .work-row-visual img,
.work-row-flip .work-row-visual video,
.work-row-flip .work-row-visual .visual-placeholder {
  margin-left: 0;
  margin-right: auto;
}

.card-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text) !important;
  text-decoration: none !important;
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 8px;
  transition: opacity 0.15s, border-color 0.15s;
}

.card-btn:hover {
  opacity: 0.65;
  border-color: var(--accent);
}

/* ── PROJECT DETAIL ── */
.detail-eyebrow {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 20px;
}

.detail-para {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.detail-para:last-of-type {
  margin-bottom: 24px;
}

.status-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 8px;
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: block;
}

.gallery-caption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.gallery-full {
  grid-column: 1 / -1;
}

.detail-list {
  list-style: none;
  counter-reset: detail-list;
  margin-bottom: 24px;
}

.detail-list li {
  counter-increment: detail-list;
  position: relative;
  padding: 16px 0 16px 30px;
  border-top: 1px solid var(--border);
}

.detail-list li:first-child {
  border-top: none;
  padding-top: 0;
}

.detail-list li::before {
  content: counter(detail-list);
  position: absolute;
  left: 0;
  top: 16px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}

.detail-list li:first-child::before {
  top: 0;
}

.detail-list b {
  color: var(--text);
}

.detail-list span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-top: 4px;
}

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

/* ── PROJECTS / BLOG LIST ── */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: opacity 0.15s;
}

.project-item:first-child {
  padding-top: 0;
}

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

.project-item:hover {
  opacity: 0.65;
}

.project-thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
  align-self: center;
}

.project-name {
  font-size: 15px;
  font-weight: 500;
  width: 180px;
  flex-shrink: 0;
}

.project-desc {
  font-size: 14px;
  color: var(--muted);
  flex: 1;
}

.project-arrow {
  font-size: 14px;
  color: var(--muted);
  flex-shrink: 0;
}

.see-more-btn {
  background: none;
  border: none;
  padding: 10px 0 4px;
  font-family: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.see-more-btn:hover {
  color: var(--text);
}

.see-more-list {
  display: none;
}

.see-more-list.open {
  display: block;
}

/* ── OFF THE CLOCK ── */
.irl-list {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: space-between;
  gap: 20px;
}

.irl-item {
  font-size: 15px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.irl-emoji {
  font-size: 20px;
  width: 28px;
  text-align: center;
}

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  border-radius: 26px;
  padding: 5px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  max-width: calc(100vw - 24px);
}

.nav-pill {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 50px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.nav-pill:hover {
  color: var(--accent);
  background: var(--border);
}

.nav-pill.active {
  color: var(--text);
  background: var(--border);
  font-weight: 600;
}

.theme-pill {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 50px;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
  flex-shrink: 0;
}

.theme-pill:hover {
  color: var(--text);
  background: var(--border);
}

/* ── FADE UP ── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── TABLET ── */
@media (max-width: 800px) {
  .work-row {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 0;
  }

  .work-row-visual,
  .work-row-flip .work-row-visual {
    align-items: center;
  }

  .work-row-flip .work-row-visual {
    order: 0;
  }

  .work-row-visual img,
  .work-row-visual video,
  .work-row-visual .visual-placeholder,
  .work-row-flip .work-row-visual img,
  .work-row-flip .work-row-visual video,
  .work-row-flip .work-row-visual .visual-placeholder {
    margin: 0 auto;
  }
}

/* ── MOBILE ── */
@media (max-width: 580px) {
  .page {
    padding: 0 20px;
  }

  .hero-body {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-photo {
    width: 140px;
    height: 175px;
    order: -1;
  }

  .hero h1 {
    font-size: 34px;
  }

  .work-row {
    padding: 28px 0;
    gap: 20px;
  }

  .hero-para,
  .work-row-desc {
    text-align: left;
  }

  .irl-list {
    grid-template-columns: 1fr;
  }

  .project-desc {
    display: none;
  }

  .nav-pill {
    padding: 8px 4px;
    font-size: 13px;
    text-align: center;
  }

  .bottom-nav {
    bottom: 12px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    width: calc(100vw - 24px);
    border-radius: 18px;
  }

  .theme-pill {
    grid-column: 1 / -1;
    justify-self: center;
  }

  body {
    padding-bottom: 160px;
  }
}
