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

/* =========================
   VARIABLES
========================= */
:root {
  --bg:        #ffffff;
  --surface:   #f7f5f2;
  --border:    #e8e4de;
  --border-md: #d0cbc3;
  --text:      #1a1816;
  --muted:     #8c8680;
  --faint:     #c4bfb9;
  --accent:    #1a1816;
  --green:     #0a6e46;
  --green-lt:  #edf7f2;
}

/* =========================
   BASE
========================= */
html, body { height: 100%; background: var(--bg); color: var(--text); }
body {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.65;
}

a { color: inherit; }

/* =========================
   HEADER
========================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 2.5rem; height: 52px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
}
.logo {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem; letter-spacing: 0.06em;
  color: var(--text); text-decoration: none; font-weight: 500;
}
.logo span { color: var(--green); }
.site-nav { display: flex; gap: 2rem; }
.site-nav a {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem; letter-spacing: 0.08em;
  color: var(--muted); text-decoration: none;
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--text); }
.site-nav a.active { color: var(--text); }

/* =========================
   FOOTER
========================= */
.site-footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: 40px; display: flex;
  justify-content: space-between; align-items: center;
  padding: 0 2.5rem;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
}
.site-footer span,
.site-footer a {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem; letter-spacing: 0.08em;
  color: var(--muted); text-decoration: none;
}
.site-footer a:hover { color: var(--text); }
.status-dot {
  display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--green);
  margin-right: 6px; vertical-align: middle;
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* =========================
   BUTTONS
========================= */
.btn-primary {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem; letter-spacing: 0.1em;
  text-decoration: none; color: #fff;
  background: var(--text);
  padding: 0.8rem 1.6rem;
  display: inline-block;
  transition: background 0.2s, transform 0.15s;
  border: none; cursor: pointer;
}
.btn-primary:hover { background: var(--green); transform: translateY(-1px); color: #fff; }

.btn-ghost {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem; letter-spacing: 0.1em;
  text-decoration: none; color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.8rem 1.6rem;
  display: inline-block;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--border-md); color: var(--text); }

/* =========================
   TAG / PILL
========================= */
.tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem; letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.25rem 0.6rem;
  background: var(--surface);
  display: inline-block;
}

/* =========================
   PAGE WRAPPER
========================= */
.page-wrap {
  padding-top: 52px;
  padding-bottom: 40px;
  min-height: 100vh;
}

/* =========================
   INDEX — HERO
========================= */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 52px - 40px - 48px); /* minus header, footer, strip */
}
.hero-left {
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 5rem 4rem 4rem 2.5rem;
  border-right: 1px solid var(--border);
}
.eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.2em;
  color: var(--green); margin-bottom: 2.5rem;
  text-transform: uppercase;
}
.eyebrow::before { content: '— '; opacity: 0.5; }
.headline {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.6rem, 4.5vw, 4rem);
  font-weight: 400; line-height: 1.08;
  color: var(--text); margin-bottom: 2rem;
  letter-spacing: -0.01em;
}
.headline em { font-style: italic; color: var(--muted); }
.descriptor {
  font-size: 0.9rem; line-height: 1.8;
  color: var(--muted); max-width: 380px;
  margin-bottom: 3rem;
}
.cta-row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }

/* Hero right: two service panels */
.hero-right {
  display: grid;
  grid-template-rows: 1fr 1fr;
}
.service-block {
  padding: 3rem 3.5rem;
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: space-between;
  text-decoration: none; color: inherit;
  transition: background 0.25s;
}
.service-block:last-child { border-bottom: none; }
.service-block:hover { background: var(--green-lt); }
.service-num {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem; letter-spacing: 0.15em;
  color: var(--faint); margin-bottom: 1.5rem;
}
.service-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.7rem; font-weight: 400;
  color: var(--text); line-height: 1.2;
  margin-bottom: 1.5rem;
}
.tag-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Work strip */
.work-strip {
  border-top: 1px solid var(--border);
  display: flex; align-items: stretch;
  min-height: 48px;
}
.strip-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem; letter-spacing: 0.2em;
  color: var(--muted); text-transform: uppercase;
  padding: 0 2.5rem;
  border-right: 1px solid var(--border);
  display: flex; align-items: center; white-space: nowrap;
}
.strip-items { display: flex; flex: 1; }
.strip-item {
  flex: 1; padding: 0 2rem;
  border-right: 1px solid var(--border);
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column; justify-content: center;
  transition: background 0.2s;
}
.strip-item:last-child { border-right: none; }
.strip-item:hover { background: var(--surface); }
.strip-item-title {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem; letter-spacing: 0.06em;
  color: var(--text); display: block; margin-bottom: 0.15rem;
}
.strip-item-sub { font-size: 0.7rem; color: var(--muted); }

/* =========================
   WHAT I DO
========================= */
.whatido-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 5rem 2.5rem 4rem;
}
.page-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.2em;
  color: var(--green); text-transform: uppercase;
  margin-bottom: 3rem;
}
.page-label::before { content: '— '; opacity: 0.5; }
.page-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 400; line-height: 1.1;
  margin-bottom: 1.5rem; color: var(--text);
}
.page-intro {
  font-size: 1rem; line-height: 1.8;
  color: var(--muted); max-width: 600px;
  margin-bottom: 4rem;
  border-left: 2px solid var(--border);
  padding-left: 1.5rem;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  margin-bottom: 4rem;
}
.service-card {
  padding: 2.5rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.service-card:nth-child(2n) { border-right: none; }
.service-card:nth-last-child(-n+2) { border-bottom: none; }
.service-card:hover { background: var(--surface); }
.service-card-num {
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem; letter-spacing: 0.15em;
  color: var(--faint); margin-bottom: 1rem;
}
.service-card-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem; font-weight: 400;
  margin-bottom: 0.8rem; color: var(--text);
}
.service-card-desc {
  font-size: 0.82rem; line-height: 1.7;
  color: var(--muted); margin-bottom: 1.2rem;
}
.service-card .tag-row { gap: 0.4rem; }
.service-card .tag { font-size: 0.58rem; }

.whatido-cta {
  display: flex; gap: 1rem; align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* =========================
   PROJECTS
========================= */
.projects-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 5rem 2.5rem 4rem;
}
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border: 1px solid var(--border);
  margin-bottom: 4rem;
}
.project-card {
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--border);
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 220px;
  transition: background 0.2s;
}
.project-card:last-child { border-right: none; }
.project-card:hover { background: var(--green-lt); }
.project-card-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem; letter-spacing: 0.15em;
  color: var(--faint); margin-bottom: 1.2rem;
}
.project-card-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.35rem; font-weight: 400;
  color: var(--text); line-height: 1.2;
  margin-bottom: 0.8rem;
}
.project-card-desc {
  font-size: 0.78rem; line-height: 1.7;
  color: var(--muted); flex: 1; margin-bottom: 1.5rem;
}
.project-card-arrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem; color: var(--muted);
  transition: color 0.2s;
}
.project-card:hover .project-card-arrow { color: var(--green); }

/* =========================
   PORTFOLIO (doc index)
========================= */
.portfolio-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 5rem 2.5rem 4rem;
}
.doc-list {
  list-style: none;
  border: 1px solid var(--border);
  margin-bottom: 3rem;
}
.doc-list li { border-bottom: 1px solid var(--border); }
.doc-list li:last-child { border-bottom: none; }
.doc-list a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem 2rem;
  text-decoration: none; color: inherit;
  transition: background 0.2s;
  gap: 1rem;
}
.doc-list a:hover { background: var(--surface); }
.doc-list-inner { flex: 1; }
.doc-title {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem; letter-spacing: 0.04em;
  color: var(--text); display: block; margin-bottom: 0.3rem;
}
.doc-meta {
  font-size: 0.72rem; color: var(--muted);
}
.doc-status {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem; letter-spacing: 0.1em;
  color: var(--green);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  background: var(--green-lt);
  white-space: nowrap;
}
.doc-arrow { color: var(--faint); font-size: 0.9rem; }

/* =========================
   DOCUMENT PAGE
========================= */
.doc-page-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 5rem 2.5rem 4rem;
  position: relative;
}
.doc-close {
  position: fixed; top: 60px; right: 2rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem; letter-spacing: 0.1em;
  text-decoration: none; color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.4rem 0.8rem;
  background: var(--bg);
  transition: color 0.2s, border-color 0.2s;
  z-index: 50;
}
.doc-close:hover { color: var(--text); border-color: var(--border-md); }
.doc-breadcrumb {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem; letter-spacing: 0.1em;
  color: var(--faint); margin-bottom: 2.5rem;
}
.doc-breadcrumb a { text-decoration: none; color: var(--muted); }
.doc-breadcrumb a:hover { color: var(--text); }
.doc-page-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 400; line-height: 1.15;
  margin-bottom: 0.6rem; color: var(--text);
}
.doc-subtitle {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.12em;
  color: var(--muted); margin-bottom: 3rem;
  padding-bottom: 2rem; border-bottom: 1px solid var(--border);
}
.doc-section { margin-bottom: 2.5rem; }
.doc-section h2 {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 1rem;
}
.doc-section p,
.doc-section li {
  font-size: 0.88rem; line-height: 1.8;
  color: var(--text); opacity: 0.85;
}
.doc-section ul { padding-left: 1.2rem; }
.doc-section li { margin-bottom: 0.4rem; }
.doc-nav {
  display: flex; justify-content: space-between;
  margin-top: 4rem; padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.doc-nav a {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem; letter-spacing: 0.08em;
  text-decoration: none; color: var(--muted);
  transition: color 0.2s;
}
.doc-nav a:hover { color: var(--text); }

/* =========================
   CONTACT
========================= */
.contact-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 5rem 2.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.contact-left {}
.contact-right {}
.contact-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 400; line-height: 1.1;
  margin-bottom: 1.5rem; color: var(--text);
}
.contact-body {
  font-size: 0.88rem; line-height: 1.8;
  color: var(--muted); margin-bottom: 2.5rem;
}
.contact-channels { display: flex; flex-direction: column; gap: 1rem; }
.contact-link {
  display: block; padding: 1.2rem 1.5rem;
  border: 1px solid var(--border);
  text-decoration: none; color: inherit;
  transition: background 0.2s, border-color 0.2s;
}
.contact-link:hover { background: var(--surface); border-color: var(--border-md); }
.contact-link-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem; letter-spacing: 0.1em;
  color: var(--muted); display: block; margin-bottom: 0.3rem;
}
.contact-link-value {
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem; color: var(--text);
}
.contact-muted { opacity: 0.45; border-style: dashed; }
.contact-muted:hover { opacity: 0.65; background: transparent; }
.contact-aside-title {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--faint);
  margin-bottom: 1.5rem;
}
.skill-list { list-style: none; }
.skill-list li {
  font-size: 0.85rem; color: var(--muted);
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.skill-list li:first-child { border-top: 1px solid var(--border); }
.skill-list strong {
  font-weight: 400; color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {
  .site-header { padding: 0 1.5rem; }
  .site-footer { padding: 0 1.5rem; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-left { padding: 3rem 1.5rem; border-right: none; border-bottom: 1px solid var(--border); }
  .hero-right { grid-template-rows: auto auto; }
  .service-block { padding: 2rem 1.5rem; }
  .work-strip { flex-direction: column; }
  .strip-label { padding: 0.8rem 1.5rem; border-right: none; border-bottom: 1px solid var(--border); }
  .strip-items { flex-direction: column; }
  .strip-item { padding: 0.8rem 1.5rem; border-right: none; border-bottom: 1px solid var(--border); }
  .services-grid { grid-template-columns: 1fr; }
  .service-card:nth-child(2n) { border-right: none; }
  .service-card:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .service-card:last-child { border-bottom: none; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card { border-right: none; border-bottom: 1px solid var(--border); }
  .project-card:last-child { border-bottom: none; }
  .contact-wrap { grid-template-columns: 1fr; gap: 3rem; }
  .whatido-wrap, .projects-wrap, .portfolio-wrap { padding: 3rem 1.5rem; }
}
