@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --accent: #8c5a56;
  --accent-strong: #b07a74;
  --accent-soft: #9d6964;
  --accent-rgb: 140, 90, 86;
  --heading: #ebe5de;
}

/* ---- Reset ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: #0a0a0a; overscroll-behavior: none; }

/* ---- Base ---- */
body {
  font-family: 'Inter', sans-serif;
  background: #0a0a0a;
  color: #e5e5e5;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 118px;
}

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

/* ---- LAYER 1: Geometric color shapes ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    /* Diagonal warm streak — top-left to center */
    linear-gradient(135deg, rgba(210, 214, 222, 0.08) 0%, transparent 40%),
    /* Conic angular sweep from bottom-right */
    conic-gradient(from 220deg at 80% 70%, rgba(170, 176, 188, 0.05) 0deg, transparent 60deg, transparent 360deg),
    /* Sharp angled warm accent panel */
    linear-gradient(160deg, transparent 45%, rgba(214, 216, 220, 0.025) 45%, rgba(214, 216, 220, 0.025) 55%, transparent 55%),
    /* Secondary diagonal warm streak — bottom edge */
    linear-gradient(315deg, rgba(184, 188, 196, 0.06) 0%, transparent 35%),
    /* Subtle conic from top-right corner */
    conic-gradient(from 340deg at 90% 10%, rgba(188, 192, 200, 0.035) 0deg, transparent 45deg, transparent 360deg);
  pointer-events: none;
  z-index: 0;
}

/* ---- LAYER 2: Checkered grid (warm tint) ---- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ---- LAYER 3: Noise grain ---- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
  mix-blend-mode: overlay;
}
.grain svg { width: 100%; height: 100%; }

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 20px 32px;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(var(--accent-rgb),0.15);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.nav-logo span {
  color: var(--accent);
}

/* Breadcrumb trail */
.nav-breadcrumb {
  font-size: 0.85rem;
  color: #525252;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-breadcrumb a {
  color: #777;
  transition: color 0.2s;
}

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

.nav-breadcrumb .sep {
  color: #333;
}

/* ---- Main content wrapper ---- */
.content {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 32px;
}

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9;
  padding: 0 32px;
  background: #0b0b0b;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 0 14px;
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(420px, 2fr);
  align-items: start;
  gap: 24px;
}

.site-footer-brand {
  padding-top: 2px;
}

.site-footer-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: #cfcfcf;
  letter-spacing: -0.01em;
}

.site-footer-contact {
  margin-top: 3px;
}

.site-footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  justify-self: end;
}

.site-footer-inner p {
  font-size: 0.74rem;
  line-height: 1.45;
  color: #7a7a7a;
}

.site-footer-key {
  display: inline-block;
  margin-right: 0.45rem;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9a9a9a;
}

.site-footer-inner a {
  color: #8c8c8c;
  text-decoration: underline;
  text-decoration-color: rgba(140,140,140,0.35);
  text-underline-offset: 0.16em;
}

.site-footer-inner a:hover {
  color: #c2c2c2;
}

.home-page {
  padding-bottom: 0;
}

.home-page .content {
  min-height: calc(100dvh - 170px);
  padding-top: 24px;
  padding-bottom: 24px;
  display: flex;
  align-items: center;
}

.home-hero {
  min-height: calc(100vh - 180px);
  max-width: 760px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.home-kicker {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.home-hero h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.98;
  color: var(--heading);
}

.home-copy {
  max-width: 560px;
  font-size: 1.05rem;
  color: #9a9a9a;
  line-height: 1.9;
}

.home-copy p {
  margin-bottom: 16px;
}

.home-copy a,
.site-desc a,
.project-desc a,
.article a {
  color: var(--accent-soft);
  text-decoration: underline;
  text-decoration-color: rgba(var(--accent-rgb), 0.35);
  text-underline-offset: 0.16em;
}

.home-copy a:hover,
.site-desc a:hover,
.project-desc a:hover,
.article a:hover {
  color: var(--accent-strong);
}

.home-page .home-hero {
  min-height: 0;
  gap: 14px;
}

/* ---- Page header ---- */
.page-header {
  margin-bottom: 48px;
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--heading);
  margin-bottom: 12px;
}

.page-header .subtitle {
  font-size: 1rem;
  color: #525252;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ---- Site description ---- */
.site-desc {
  max-width: 640px;
  font-size: 1rem;
  color: #888;
  line-height: 1.8;
  margin-bottom: 48px;
}

/* ---- Section heading ---- */
.section-heading {
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #525252;
  margin-bottom: 24px;
}

/* ---- Nav links ---- */
.nav-links {
  margin-left: auto;
  display: flex;
  gap: 24px;
}

.nav-links a {
  font-size: 0.85rem;
  color: #777;
  transition: color 0.2s;
}

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

/* ---- Project cards grid ---- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 32px;
  transition: border-color 0.3s, background 0.3s, transform 0.2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-card:hover {
  border-color: rgba(var(--accent-rgb),0.35);
  background: rgba(var(--accent-rgb),0.04);
  transform: translateY(-2px);
}

.project-card h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}

.project-card .tag {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.project-card p {
  font-size: 0.9rem;
  color: #888;
  line-height: 1.6;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.people-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
}

.people-avatar {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
}

.people-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.people-meta h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}

.people-role {
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.people-bio {
  font-size: 0.95rem;
  color: #999;
  line-height: 1.7;
}

.people-website a {
  font-size: 0.88rem;
  color: var(--accent-soft);
  text-decoration: underline;
  text-decoration-color: rgba(var(--accent-rgb),0.35);
  text-underline-offset: 0.18em;
}

.people-website a:hover {
  color: var(--accent-strong);
}

/* ---- Contact section ---- */
.contact-section {
  margin-top: 100px;
  padding-top: 48px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.contact-page {
  margin-top: 48px;
}

.contact-section h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

.contact-grid {
  display: flex;
  gap: 64px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.contact-item a,
.contact-item p {
  font-size: 0.95rem;
  color: #999;
  line-height: 1.7;
}

.contact-item a:hover {
  color: var(--accent);
}

@media (max-width: 720px) {
  body {
    padding-bottom: 0;
  }

  .nav {
    padding: 18px 20px;
  }

  .nav-inner {
    flex-wrap: wrap;
    row-gap: 14px;
  }

  .nav-links {
    width: 100%;
    margin-left: 0;
    gap: 16px;
    flex-wrap: wrap;
  }

  .content {
    padding: 36px 20px 32px;
  }

  .site-footer {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: 8px;
    padding: 0 20px 24px;
    background: #0b0b0b;
    border-top: 0;
  }

  .site-footer-inner {
    border-top: 1px solid rgba(255,255,255,0.08);
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 0 0;
  }

  .site-footer-meta {
    align-items: flex-start;
    text-align: left;
  }

  .home-page .content {
    min-height: auto;
    padding-top: 18px;
    padding-bottom: 20px;
    align-items: flex-start;
  }

  .home-hero {
    min-height: auto;
    padding-top: 12px;
  }

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

  .contact-grid {
    flex-direction: column;
    gap: 32px;
  }
}

/* ---- Blog post list (project page) ---- */
.project-desc {
  font-size: 1rem;
  color: #999;
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 680px;
}

.home-copy blockquote,
.site-desc blockquote,
.project-desc blockquote,
.article blockquote {
  margin: 24px 0;
  padding: 14px 18px;
  border-left: 2px solid rgba(var(--accent-rgb), 0.65);
  background: rgba(255,255,255,0.03);
  border-radius: 0 8px 8px 0;
}

.home-copy blockquote p,
.site-desc blockquote p,
.project-desc blockquote p,
.article blockquote p {
  margin-bottom: 0;
  color: #b8b1aa;
}

.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.post-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-radius: 8px;
  transition: background 0.2s;
}

.post-list li a:hover {
  background: rgba(var(--accent-rgb),0.06);
}

.post-title {
  font-size: 1rem;
  font-weight: 500;
  color: #ddd;
}

.post-date {
  font-size: 0.8rem;
  color: #555;
  white-space: nowrap;
  margin-left: 24px;
}

/* ---- Blog post article ---- */
.article {
  max-width: 680px;
}

.article-meta {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 32px;
}

.article h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--heading);
  line-height: 1.2;
  margin-bottom: 8px;
}

.article p {
  font-size: 1rem;
  line-height: 2;
  color: #bbb;
  margin-bottom: 20px;
}

.article h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #e5e5e5;
  margin-top: 36px;
  margin-bottom: 12px;
}

.article ul, .article ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.article li {
  font-size: 1rem;
  line-height: 2;
  color: #bbb;
}

.article em {
  color: #ddd;
  font-style: italic;
}

.back-link {
  display: inline-block;
  margin-bottom: 40px;
  font-size: 0.85rem;
  color: #666;
  transition: color 0.2s;
}

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

/* ---- Code blocks ---- */
pre {
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 20px 24px;
  overflow-x: auto;
  margin-bottom: 20px;
  font-size: 0.875rem;
  line-height: 1.7;
}

pre .copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 5px;
  color: #666;
  font-size: 0.75rem;
  padding: 4px 10px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s, background 0.2s;
}

pre:hover .copy-btn {
  opacity: 1;
}

pre .copy-btn:hover {
  color: #aaa;
  background: rgba(255,255,255,0.1);
}

code {
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  font-size: 0.875em;
}

:not(pre) > code {
  background: rgba(var(--accent-rgb),0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: #e1a5a1;
}
