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

:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --border: #e8e4de;
  --text: #1a1917;
  --muted: #6b6760;
  --tag-bg: #f0ede8;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 300;
}

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 4rem;
  background: rgba(250, 249, 247, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 4rem 4rem;
}
.hero-inner { max-width: 680px; }
.hero-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--muted);
}
h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1.1;
  font-weight: 400;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
h1 em { font-style: italic; color: var(--muted); }
.hero-desc {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-primary { background: var(--text); color: var(--bg); border: 1px solid var(--text); }
.btn-primary:hover { background: #333; border-color: #333; }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--text); }

/* SECTIONS */
section {
  padding: 5rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
}
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 3rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.section-count { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.06em; }
.section-link { font-size: 0.85rem; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.section-link:hover { color: var(--text); }

/* PROJECTS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5px;
  background: var(--border);
  border: 1.5px solid var(--border);
}
.project-card {
  background: var(--surface);
  padding: 2rem;
  transition: background 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.project-card:hover { background: #f5f3ef; }
.project-number { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.08em; margin-bottom: 1rem; }
.project-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}
.project-desc { font-size: 0.9rem; color: var(--muted); line-height: 1.7; margin-bottom: 1.25rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  background: var(--tag-bg);
  color: var(--muted);
  border-radius: 2px;
}

/* ARTICLES */
.articles-list { display: flex; flex-direction: column; }
.article-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: baseline;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}
.article-item:hover { opacity: 0.65; }
.article-date { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.04em; }
.article-title { font-family: 'DM Serif Display', serif; font-size: 1.1rem; font-weight: 400; }
.article-arrow { font-size: 1rem; color: var(--muted); }

/* ABOUT */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.about-text p { color: var(--muted); margin-bottom: 1rem; font-size: 0.95rem; }
.about-details { display: flex; flex-direction: column; gap: 1rem; }
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.detail-label { color: var(--muted); }

/* CONTACT */
.contact-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}
.contact-heading {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  max-width: 500px;
}
.contact-heading em { font-style: italic; color: var(--muted); }
.contact-links { display: flex; flex-direction: column; gap: 0.75rem; }
.contact-link {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.contact-link:hover { color: var(--text); }

/* PAGE HEADER (for inner pages) */
.page-header {
  padding: 8rem 4rem 3rem;
  max-width: 1100px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}
.page-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.page-header p { color: var(--muted); font-size: 1rem; max-width: 500px; }

/* ARTICLE PAGE */
.article-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 4rem 4rem;
}
.article-body h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem;
  font-weight: 400;
  margin: 2.5rem 0 1rem;
}
.article-body p { color: var(--muted); margin-bottom: 1.25rem; font-size: 0.95rem; }
.article-body code {
  font-family: monospace;
  font-size: 0.85rem;
  background: var(--tag-bg);
  padding: 0.15rem 0.4rem;
  border-radius: 2px;
}
.article-body pre {
  background: #1a1917;
  color: #faf9f7;
  padding: 1.5rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.85rem;
  line-height: 1.6;
}
.article-body pre code { background: none; padding: 0; color: inherit; }
.article-meta {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 1.5rem;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.2s;
}
.back-link:hover { color: var(--text); }

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  font-size: 0.8rem;
  color: var(--muted);
}
.full-divider { border: none; border-top: 1px solid var(--border); margin: 0 4rem; }

/* RESPONSIVE */
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { gap: 1.5rem; }
  .hero, section, .article-body { padding-left: 1.5rem; padding-right: 1.5rem; }
  .page-header { padding: 7rem 1.5rem 2rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .article-item { grid-template-columns: 1fr; gap: 0.25rem; }
  .article-arrow { display: none; }
  footer { padding: 1.5rem; flex-direction: column; gap: 0.5rem; text-align: center; }
  .full-divider { margin: 0 1.5rem; }
}
