/* Claude-inspired: warm paper, terracotta accent, serif + humanist sans */

:root {
  --bg: #faf7f2;
  --bg-elevated: #fffefb;
  --bg-muted: #f3ede4;
  --ink: #1c1917;
  --ink-soft: #44403c;
  --ink-muted: #78716c;
  --accent: #c15c3b;
  --accent-hover: #a84a2e;
  --accent-soft: rgba(193, 92, 59, 0.12);
  --border: rgba(28, 25, 23, 0.08);
  --shadow: 0 1px 2px rgba(28, 25, 23, 0.04), 0 8px 24px rgba(28, 25, 23, 0.06);
  --radius: 14px;
  --radius-lg: 22px;
  --font-serif: "Source Serif 4", "Noto Serif SC", Georgia, serif;
  --font-sans: "Source Sans 3", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--bg);
}

/* Warm paper texture + soft wash */
.mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 60% at 15% -10%, rgba(193, 92, 59, 0.09), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 20%, rgba(120, 113, 108, 0.06), transparent 50%),
    linear-gradient(180deg, #faf7f2 0%, #f6f0e8 100%);
}

.mesh::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
}

header.nav-wrap,
main,
footer.footer {
  position: relative;
  z-index: 1;
}

/* Nav */
.nav-wrap {
  padding: 1.25rem 1.5rem 0;
  max-width: 1120px;
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: rgba(255, 254, 251, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.logo {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav-links a {
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.nav-gh {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent) !important;
}

.nav-gh:hover {
  background: rgba(193, 92, 59, 0.2);
}

/* Main sections */
main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.hero {
  padding: 4rem 0 3.5rem;
  max-width: 42rem;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 1.25rem;
}

.gradient-text {
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
}

.hero-lead {
  margin: 0 0 1.75rem;
  font-size: 1.125rem;
  color: var(--ink-soft);
}

.hero-lead strong {
  color: var(--ink);
  font-weight: 600;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.95em;
  color: var(--ink-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.35rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fffefb;
  border: none;
  box-shadow: 0 2px 8px rgba(193, 92, 59, 0.35);
}

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

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

.btn-ghost:hover {
  border-color: rgba(193, 92, 59, 0.35);
  color: var(--accent);
}

/* Sections */
.section {
  padding: 2.5rem 0;
}

.section-inner {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.section-sub {
  margin: 0 0 1.75rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.about-text {
  margin: 0;
  max-width: 52ch;
  color: var(--ink-soft);
}

/* Project grid */
.project-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  height: 100%;
  padding: 1.35rem 1.25rem;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.project-card:hover {
  border-color: rgba(193, 92, 59, 0.22);
  box-shadow: 0 4px 20px rgba(28, 25, 23, 0.06);
  transform: translateY(-2px);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.pill {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
}

.pill-muted {
  background: rgba(120, 113, 108, 0.12);
  color: var(--ink-muted);
}

.project-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.project-desc {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

.project-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.project-link:hover .arrow {
  transform: translate(2px, -2px);
}

.arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

/* Footer */
.footer {
  margin-top: 2rem;
  padding: 2rem 1.5rem 2.5rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(243, 237, 228, 0.85));
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.footer-brand {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--ink);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}

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

.footer-icp {
  margin: 0;
  font-size: 0.8125rem;
}

.footer-icp a {
  color: var(--ink-muted);
  text-decoration: none;
}

.footer-icp a:hover {
  color: var(--accent);
}

/* Motion: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .project-card:hover,
  .btn-primary:hover,
  .btn-ghost:hover {
    transform: none;
  }
}
