/* ===== Design Tokens ===== */
:root {
  --bg: #f5f0ea;
  --surface: #fff;
  --ink: #1a1714;
  --ink-muted: #8a8279;
  --accent: #c0623a;
  --border: #e5ddd4;
  --radius: 16px;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  min-height: 100dvh;
}

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

strong {
  font-weight: 600;
}

/* ===== Layout ===== */
main {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ===== Overline ===== */
.overline {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ===== Hero ===== */
.hero {
  padding: 22vh 0 14vh;
  animation: rise 0.9s var(--ease) both;
}

.hero .overline {
  margin-bottom: 1.75rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: 1.75rem;
  text-wrap: balance;
}

.bio {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--ink-muted);
  max-width: 420px;
}

.bio strong {
  color: var(--ink);
}

/* ===== Projects ===== */
.projects {
  padding-bottom: 5rem;
}

.projects .overline {
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
  animation: rise 0.9s var(--ease) 0.1s both;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* ===== Card ===== */
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition:
    transform 0.5s var(--ease),
    box-shadow 0.5s var(--ease),
    border-color 0.3s;
  animation: rise 0.9s var(--ease) both;
}

.card:nth-child(1) { animation-delay: 0.15s; }
.card:nth-child(2) { animation-delay: 0.25s; }
.card:nth-child(3) { animation-delay: 0.35s; }
.card:nth-child(4) { animation-delay: 0.45s; }
.card:nth-child(5) { animation-delay: 0.55s; }

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(26, 23, 20, 0.08);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.card--wide {
  grid-column: 1 / -1;
}

.card--dark {
  background: var(--ink);
  color: #f5f0ea;
  border-color: transparent;
}

.card--dark:hover {
  border-color: transparent;
  box-shadow: 0 20px 56px rgba(26, 23, 20, 0.25);
}

.card__tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.card__desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-muted);
  flex: 1;
}

.card--dark .card__desc {
  color: rgba(245, 240, 234, 0.55);
}

.card__links {
  display: flex;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.3s var(--ease);
}

.card__link:hover {
  gap: 8px;
}

.card__link--muted {
  color: var(--ink-muted);
}

.card--dark .card__link--muted {
  color: rgba(245, 240, 234, 0.4);
}

/* ===== Connect / Pills ===== */
.connect {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 20vh;
  animation: rise 0.9s var(--ease) 0.55s both;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.35s var(--ease);
}

.pill:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  transform: translateY(-2px);
}

/* ===== Animation ===== */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ===== Mobile ===== */
@media (max-width: 600px) {
  main {
    padding: 0 20px;
  }

  .hero {
    padding: 14vh 0 10vh;
  }

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

  .card--wide {
    grid-column: 1;
  }

  .card {
    padding: 1.5rem;
  }

  .connect {
    padding-bottom: 12vh;
  }
}
