/* ─── Variables ─── */
:root {
  --bg: #FBFBFA;
  --bg-tint: #F4F3F0;
  --surface: #FFFFFF;
  --border: #EAEAEA;
  --text: #111111;
  --text-secondary: #787774;
  --text-tertiary: #AFAFAD;
  --accent: #111111;

  /* Pastels */
  --pale-red-bg: #FDEBEC;
  --pale-red-text: #9F2F2D;
  --pale-blue-bg: #E1F3FE;
  --pale-blue-text: #1F6C9F;
  --pale-green-bg: #EDF3EC;
  --pale-green-text: #346538;
  --pale-yellow-bg: #FBF3DB;
  --pale-yellow-text: #956400;

  /* Typography */
  --font-serif: 'Instrument Serif', 'Newsreader', Georgia, serif;
  --font-sans: 'DM Sans', 'Helvetica Neue', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', monospace;

  /* Spacing */
  --section-y: 96px;
  --container: 1100px;
  --nav-h: 60px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ─── Ambient Blob ─── */
.ambient-blob {
  position: fixed;
  top: -20vh;
  right: -20vw;
  width: 70vw;
  height: 70vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 243, 219, 0.35) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: blobDrift 28s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes blobDrift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-6vw, 8vh) scale(1.08); }
}

/* ─── Container ─── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

/* ─── Nav ─── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(251, 251, 250, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  gap: 32px;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: -0.01em;
  margin-right: auto;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-size: 13.5px;
  color: var(--text-secondary);
  transition: color 150ms ease;
}

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

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--text);
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: background 180ms ease, transform 120ms ease;
  white-space: nowrap;
}

.btn:hover { background: #333333; }
.btn:active { transform: scale(0.98); }

.btn-sm { padding: 6px 14px; font-size: 13px; }

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

.btn-ghost:hover {
  background: var(--bg-tint);
}

/* ─── Section layout ─── */
.section { padding: var(--section-y) 0; }

.section-tinted { background: var(--bg-tint); }

.section-inner {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0 64px;
  align-items: start;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  padding-top: 6px;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-label-num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

/* ─── Hero ─── */
.hero {
  padding-top: 120px;
  padding-bottom: 120px;
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(72px, 10vw, 130px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: var(--text);
}

.hero-title em {
  font-style: italic;
  color: var(--text-secondary);
}

.hero-role {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.hero-bio {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.65;
  margin-bottom: 40px;
}

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

.br-desktop { display: block; }

/* ─── About ─── */
.about-text {
  font-size: 17px;
  line-height: 1.75;
  color: #2F3437;
  margin-bottom: 24px;
  max-width: 620px;
}

.about-meta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}

.meta-label {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  width: 90px;
  flex-shrink: 0;
}

/* ─── Badges ─── */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 9999px;
}

.badge-green  { background: var(--pale-green-bg);  color: var(--pale-green-text); }
.badge-blue   { background: var(--pale-blue-bg);   color: var(--pale-blue-text); }
.badge-yellow { background: var(--pale-yellow-bg); color: var(--pale-yellow-text); }
.badge-red    { background: var(--pale-red-bg);    color: var(--pale-red-text); }

/* ─── Job ─── */
.job { margin-bottom: 8px; }

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.job-company {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 3px;
}

.job-title {
  font-size: 14px;
  color: var(--text-secondary);
}

.job-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  font-size: 13px;
  color: var(--text-tertiary);
}

.job-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 600px;
  margin-bottom: 28px;
}

/* ─── Project cards ─── */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  animation-delay: calc(var(--index) * 80ms);
  transition: box-shadow 200ms ease, border-color 200ms ease;
  display: block;
  text-decoration: none;
}

.project-card:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border-color: #d0d0d0;
}

.project-card-cta {
  display: block;
  margin-top: 12px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  transition: color 150ms ease;
}

.project-card:hover .project-card-cta {
  color: var(--text);
}

.project-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.project-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

/* ─── Bento Grid ─── */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 28px 26px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  animation-delay: calc(var(--index) * 80ms);
  transition: box-shadow 200ms ease;
}

.bento-card:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.bento-wide { grid-column: span 2; }

.bento-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}

.bento-heading {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 10px;
}

.tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--bg-tint);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* ─── Contact ─── */
.contact-heading {
  font-family: var(--font-serif);
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.contact-heading em {
  font-style: italic;
  color: var(--text-secondary);
}

.contact-sub {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 420px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  transition: color 150ms ease;
}

.contact-link:first-child { border-top: 1px solid var(--border); }

.contact-link:hover { color: var(--text-secondary); }

.contact-link:hover .contact-link-value { text-decoration: underline; }

.contact-link-label {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  width: 72px;
  flex-shrink: 0;
}

.contact-link-value { flex: 1; }

.contact-link svg { color: var(--text-tertiary); flex-shrink: 0; }

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ─── Scroll Reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ─── */
@media (max-width: 860px) {
  :root { --section-y: 64px; }

  .section-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .section-label {
    position: static;
  }

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

  .bento-wide { grid-column: span 2; }

  .nav-links { display: none; }
}

@media (max-width: 600px) {
  :root { --section-y: 52px; }

  .container { padding: 0 20px; }
  .nav { padding: 0 20px; }

  .hero { min-height: auto; padding-top: 72px; padding-bottom: 72px; }

  .hero-title { font-size: clamp(52px, 14vw, 80px); }

  .bento { grid-template-columns: 1fr; }
  .bento-wide { grid-column: span 1; }

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

  .job-header { flex-direction: column; gap: 6px; }
  .job-meta { align-items: flex-start; }

  .br-desktop { display: none; }

  .footer-inner { flex-direction: column; gap: 6px; text-align: center; }
}
