:root {
  --paper: #EFE9DE;
  --paper-2: #E6DECF;
  --ink: #241C1C;
  --maroon: #7A2E2E;
  --serif: "Fraunces", "Georgia", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--maroon); }
a:hover { color: var(--ink); }
::selection { background: var(--maroon); color: var(--paper); }

/* Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 64px;
  background: rgba(246, 242, 233, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--ink);
}

.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
}

.nav-links { display: flex; gap: 32px; font-size: 13px; letter-spacing: 0.04em; }
.nav-links a { color: var(--ink); text-decoration: none; }
.nav-links a:hover { color: var(--maroon); }

/* Hero */
.hero {
  padding: 90px 64px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  max-width: 1280px;
  margin: 0 auto;
  border-bottom: 2px solid var(--ink);
}

.kicker {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--maroon);
  margin: 0 0 22px;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.2vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 30px;
}

.accent-italic { font-style: italic; color: var(--maroon); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 38px; }

.btn {
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}

.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { color: var(--paper); opacity: 0.85; }

.btn-outline { border: 2px solid var(--ink); color: var(--ink); }
.btn-outline:hover { color: var(--maroon); border-color: var(--maroon); }

.hero-side {
  border-left: 2px solid var(--ink);
  padding-left: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
}

.hero-side p { font-size: 16px; line-height: 1.7; margin: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; width: 100%; }
.stat { min-width: 0; }
.stat-num { display: block; white-space: nowrap; font-family: var(--serif); font-size: clamp(18px, 2.4vw, 26px); color: var(--maroon); }
.stat-label { display: block; font-size: 12px; opacity: 0.6; margin-top: 4px; }

/* Sections */
.section {
  padding: 100px 64px;
  max-width: 1280px;
  margin: 0 auto;
}

.section-bordered { border-top: 2px solid var(--ink); }

.section h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 36px;
  margin: 0 0 50px;
}

.section-intro { max-width: 680px; margin: -22px 0 50px; font-size: 16px; line-height: 1.7; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 50px;
}

.section-head h2 { margin: 0; }

.text-link { font-size: 13px; letter-spacing: 0.04em; text-decoration: none; }

/* Writing list */
.post-list { display: flex; flex-direction: column; }

.post-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid rgba(36, 28, 28, 0.2);
  align-items: baseline;
  text-decoration: none;
  color: inherit;
}

.post-row-last { border-bottom: none; }

.post-num { font-family: var(--serif); font-size: 14px; color: var(--maroon); }
.post-title { font-family: var(--serif); font-size: 20px; color: var(--ink); line-height: 1.35; }
.post-date { font-family: var(--sans); font-size: 13px; font-weight: 400; color: rgba(36, 28, 28, 0.6); }
.post-row:hover .post-title { color: var(--maroon); }
.post-dek { font-size: 14px; color: rgba(36, 28, 28, 0.65); line-height: 1.6; }

/* App grid */
.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.app-card { background: var(--paper-2); border: 1px solid rgba(36, 28, 28, 0.15); overflow: hidden; }

.app-image {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #f4efe7;
  border-bottom: 1px solid rgba(36, 28, 28, 0.12);
}

.app-image-link { display: block; color: inherit; }
.app-image-link:hover { color: inherit; }

.app-body { padding: 28px; }
.app-body h3 { font-family: var(--serif); font-weight: 500; font-size: 24px; margin: 0 0 10px; }
.app-desc { font-size: 14px; line-height: 1.65; margin: 0 0 10px; color: rgba(36, 28, 28, 0.8); }
.app-problem { font-size: 13px; line-height: 1.65; margin: 0 0 16px; color: rgba(36, 28, 28, 0.6); }
.app-link { font-size: 13px; font-weight: 600; text-decoration: none; }

/* About */
.about {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 52px;
  max-width: 980px;
  align-items: center;
}

.about-photo {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--ink);
  box-shadow: 0 0 0 1px rgba(36, 28, 28, 0.12);
}

.about-body p { font-size: 17px; line-height: 1.8; margin: 0 0 22px; }
.about-links { display: flex; gap: 26px; font-size: 14px; font-weight: 600; }
.about-links a { text-decoration: none; }

/* Footer */
.site-footer {
  padding: 32px 64px;
  border-top: 2px solid var(--ink);
  font-size: 13px;
  color: rgba(36, 28, 28, 0.6);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-identity { display: block; }
.footer-links a { color: inherit; text-decoration: none; }
.footer-links a:hover { color: var(--maroon); }

@media (max-width: 1100px) {
  .site-footer { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-side { border-left: none; padding-left: 0; border-top: 2px solid var(--ink); padding-top: 30px; }
  .app-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .about { grid-template-columns: 1fr; text-align: left; }
  .about-photo { margin: 0 auto; }
}

@media (max-width: 600px) {
  .site-nav, .hero, .section, .site-footer { padding-left: 24px; padding-right: 24px; }
  .site-nav { align-items: flex-start; gap: 18px; }
  .nav-links { gap: 12px; flex-wrap: wrap; justify-content: flex-end; text-align: right; line-height: 1.35; }
  .hero-actions { align-items: flex-start; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .post-row { grid-template-columns: 1fr; gap: 6px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .footer-links { width: 100%; }
}
