/* Miramar Labs — warm paper theme, monospace headers, dark dashboard tiles */

:root {
  /* Anthropic-inspired: warm cream / book-cloth / claude coral */
  --bg: #F5F4EE;              /* book cream */
  --bg-elev: #FFFFFF;         /* card white */
  --bg-elev-2: #EBE7D9;       /* inline code / subtle mid-tone */
  --fg: #141413;              /* deep warm near-black */
  --fg-dim: #46433C;          /* body dim, warm gray */
  --fg-faint: #8A857A;        /* captions, tags */
  --accent: #CC785C;          /* claude coral */
  --accent-strong: #A0532E;   /* deeper terracotta on hover */
  --accent-2: #7A5D3F;        /* muted bronze secondary */
  --danger: #A83248;
  --border: #E0DBCB;          /* soft warm border */
  --border-strong: #CFC8B5;   /* stronger border */
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Roboto Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, Charter, "Iowan Old Style", Cambria, Georgia, serif;
  --max-w: 1080px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.15s;
}
a:hover { border-bottom-color: var(--accent); }

h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.4rem;
  margin: 0 0 0.4em;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--fg);
}
h2, h3, h4, .mono {
  font-family: var(--mono);
  letter-spacing: -0.005em;
}
h2 { font-size: 1.4rem; margin: 2.5rem 0 0.6rem; color: var(--fg); border-bottom: 1px solid var(--border); padding-bottom: 0.3em; font-weight: 500; }
h3 { font-size: 1.1rem; margin: 1.8rem 0 0.4rem; color: var(--accent-strong); font-weight: 500; }
h4 { font-size: 1rem; margin: 1.2rem 0 0.3rem; color: var(--fg-dim); font-weight: 500; }
p  { margin: 0.6em 0 1em; }

code, kbd, .kbd {
  font-family: var(--mono);
  background: var(--bg-elev-2);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  font-size: 0.92em;
  color: var(--accent-2);
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* Header / nav */
header.site {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(6px);
}
header.site .wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
header.site .brand {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.02em;
  font-size: 1rem;
  white-space: nowrap;
}
header.site .brand .dot { color: var(--accent); }
header.site nav {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.9rem;
}
header.site nav a {
  color: var(--fg-dim);
  border-bottom: 1px solid transparent;
  padding: 0.2em 0;
}
header.site nav a:hover, header.site nav a.active {
  color: var(--fg);
  border-bottom-color: var(--accent);
}

/* Main */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.75rem 1.2rem 4rem;
}
main > h2:first-child,
main > section:first-child + h2 {
  margin-top: 0.5rem;
}

/* Split hero: text left, image right (openai.com style) */
.hero-split {
  background: linear-gradient(180deg, #F0EDDE 0%, #F5F4EE 100%);
  border-bottom: 1px solid var(--border);
}
/* Side-by-side hero: compact text left, oversized image right (fills most of the row) */
.hero-split .wrap {
  max-width: none;
  margin: 0;
  padding: 3rem 0 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}
.hero-split .hero-text {
  padding-left: 1.5rem;
  min-width: 0;
}
.hero-split .hero-visual {
  min-width: 0;
  overflow: hidden;
  padding-right: 0.5rem;
}
.hero-split .hero-visual img,
.hero-split .hero-visual svg {
  width: 100%;
  height: auto;
  display: block;
  /* No max-height cap — SVG scales freely with column width */
}

@media (max-width: 900px) {
  .hero-split .wrap {
    grid-template-columns: 1fr;
    padding: 2rem 0 1.5rem;
    gap: 1.5rem;
  }
  .hero-split .hero-text {
    padding: 0 1.2rem;
  }
}

/* Inline hero block (used by non-landing pages) */
.hero {
  padding: 3rem 0 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.hero .tag,
.hero-split .tag {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 1.5rem;
}
.hero-split h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.2rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}
.hero-split .sub {
  font-size: 1rem;
  color: var(--fg-dim);
  margin: 0;
  max-width: 560px;
}
@media (max-width: 900px) {
  .hero-split h1 { font-size: 2.2rem; }
  .hero-split .sub { font-size: 1.1rem; }
}
.hero h1 { font-size: 3rem; margin: 0 0 1rem; font-family: var(--serif); font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; }
.hero .sub {
  font-size: 1.15rem;
  color: var(--fg-dim);
  max-width: 680px;
  margin: 0;
}

/* Pillar grid */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.pillar {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.2rem 1.3rem;
  transition: border-color 0.2s, transform 0.2s;
}
.pillar:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.pillar h3 {
  margin: 0 0 0.4em;
  font-size: 1rem;
  color: var(--accent-strong);
  font-family: var(--mono);
  font-weight: 500;
}
.pillar p { margin: 0; color: var(--fg-dim); font-size: 0.95rem; }

/* CTA */
.cta {
  display: inline-block;
  background: var(--fg);
  color: var(--bg);
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  margin-top: 1.5rem;
  border-bottom: none;
  transition: background 0.15s, transform 0.15s;
}
.cta:hover {
  background: var(--accent-strong);
  border-bottom: none;
  transform: translateY(-1px);
}

/* Dashboard grid */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
  margin: 2rem 0;
}
.dash-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.dash-card .thumb {
  aspect-ratio: 16/9;
  background: var(--bg-elev-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dash-card .thumb img, .dash-card .thumb svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dash-card .meta {
  padding: 1rem 1.2rem;
}
.dash-card .port {
  font-family: var(--mono);
  color: var(--accent-strong);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}
.dash-card .name {
  font-family: var(--mono);
  color: var(--fg);
  font-size: 1.05rem;
  margin: 0.2em 0 0.5em;
}
.dash-card .cap {
  color: var(--fg-dim);
  font-size: 0.9rem;
  margin: 0;
}

/* Skill grid (denser) */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.8rem;
  margin: 1.5rem 0;
}
.skill {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.9rem 1.1rem;
}
.skill .name {
  font-family: var(--mono);
  color: var(--accent-strong);
  font-size: 0.95rem;
  margin-bottom: 0.3em;
  font-weight: 500;
}
.skill .desc {
  color: var(--fg-dim);
  font-size: 0.88rem;
  margin: 0;
}

/* Callout */
.callout {
  background: var(--bg-elev);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  border-radius: 0 4px 4px 0;
}
.callout.warn { border-left-color: var(--accent-2); }
.callout.danger { border-left-color: var(--danger); }
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.92rem;
}
th, td {
  text-align: left;
  padding: 0.6em 0.8em;
  border-bottom: 1px solid var(--border);
}
th {
  color: var(--accent-strong);
  font-family: var(--mono);
  font-weight: 500;
  border-bottom-color: var(--border-strong);
}

/* Footer */
footer.site {
  border-top: 1px solid var(--border);
  color: var(--fg-faint);
  font-size: 0.85rem;
  padding: 2rem 1.2rem;
  text-align: center;
  font-family: var(--mono);
}
footer.site a { color: var(--fg-dim); }
footer.site .discl {
  color: var(--fg-faint);
  margin-top: 0.6rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive */
@media (max-width: 640px) {
  .hero h1 { font-size: 2rem; }
  h2 { font-size: 1.25rem; }
  header.site .wrap { flex-direction: column; align-items: flex-start; gap: 0.5rem; padding: 0.8rem 1rem; }
  header.site nav { gap: 0.9rem; font-size: 0.85rem; }
}
