/* ─── Variables ─────────────────────────────────────────── */
:root {
  /* Steel palette (TI side — cool, metallic) */
  --steel-deep:   #141D22;
  --steel-mid:    #2A3A45;
  --steel-base:   #3D5462;
  --steel-light:  #6B8A9A;
  --steel-silver: #A8C0CC;

  /* Skin palette (BI side — warm, organic) */
  --skin-dark:    #7A3D1A;
  --skin-mid:     #B87040;   /* copper/bronze — the bridge */
  --skin-warm:    #C8956A;
  --skin-light:   #E8C9A0;
  --skin-paper:   #FAF3EC;   /* warm cream body background */
  --skin-off:     #F2E4D2;

  /* Text */
  --ink:          #1C0A02;   /* very dark warm brown for body text */
  --ink-mid:      #5C2E10;   /* mid brown */
  --mist:         #7A6658;   /* warm muted for secondary text */
  --border:       #DDD0BC;   /* warm border */

  --max-w:    760px;
  --nav-h:    60px;
}

/* ─── Shared image texture helpers ───────────────────────── */
/* Steel image: used as background-image on nav, headers, footer */
/* Skin image:  used on hero (combined with steel in hero-collision) */

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

html { font-size: 18px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
  color: var(--ink);
  background-color: var(--skin-paper);
  /* subtle organic grain on the skin-tone paper */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
  line-height: 1.7;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; border: none; background: none; }

/* ─── Nav ────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  background-color: #0d1518;
  border-bottom: 1px solid rgba(168,192,204,0.15);
}

.nav-inner {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: baseline;
  gap: 0.1em;
  text-decoration: none;
}

/* TI = cool steel silver, × = copper bridge, BI = warm skin */
.nav-logo-ti { color: var(--steel-silver); font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
.nav-logo-x  { color: var(--skin-mid);     font-size: 1.05rem; font-weight: 400; padding: 0 0.06em; }
.nav-logo-bi { color: var(--skin-warm);    font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  list-style: none;
}

.nav-links a {
  color: rgba(168,192,204,0.6);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--steel-silver); }

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 2rem 4rem;
  text-align: center;
  /* steel texture fills the full hero */
  background-color: var(--steel-deep);
  background-image: url('/assets/images/steel-texture.png');
  background-size: cover;
  background-position: center;
}

/* skin texture layered over the left portion via diagonal mask */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/assets/images/skin-texture.png');
  background-size: cover;
  background-position: left center;
  /* pull orange toward mocha brown: slight hue shift + desaturate + darken */
  filter: hue-rotate(-14deg) saturate(0.68) brightness(0.78);
  /* diagonal clip: skin visible left, bleed centered ~50% */
  -webkit-mask-image: linear-gradient(118deg, black 0%, black 40%, transparent 64%);
  mask-image: linear-gradient(118deg, black 0%, black 40%, transparent 64%);
  z-index: 0;
}

/* copper seam glow at the collision line */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    118deg,
    transparent 42%,
    rgba(184,112,58,0.45) 50%,
    transparent 58%
  );
  z-index: 0;
}

/* hero content above both pseudo-elements */
.hero > * { position: relative; z-index: 1; }

/* dark vignette over both sides for text legibility */
.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.65) 100%);
}

.hero-eyebrow {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--skin-warm);
  margin-bottom: 1.5rem;
}

.hero-headline {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  max-width: 700px;
  margin: 0 auto 1.5rem;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.6);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--skin-mid);
  color: #fff;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.7rem 1.6rem;
  border-radius: 2px;
  transition: opacity 0.15s;
}
.hero-cta:hover { opacity: 0.88; }

.hero-divider {
  width: 40px;
  height: 2px;
  background: var(--skin-mid);
  margin: 3rem auto 0;
  opacity: 0.5;
}

/* ─── Section labels ─────────────────────────────────────── */
.section-label {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

/* ─── Post cards ─────────────────────────────────────────── */
.posts-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.5rem;
}

.post-card {
  border-top: 2px solid var(--skin-mid);
  padding-top: 1.4rem;
  display: flex;
  flex-direction: column;
}

.post-card-meta {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.post-card-meta .read-time::before { content: '· '; }

.post-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 0.7rem;
  transition: color 0.15s;
}
.post-card:hover .post-card-title { color: var(--skin-mid); }

.post-card-excerpt {
  font-size: 0.9rem;
  color: var(--mist);
  line-height: 1.6;
  flex: 1;
}

.post-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--skin-mid);
  margin-top: 1rem;
  letter-spacing: 0.02em;
  transition: gap 0.15s;
}
.post-card:hover .post-card-link { gap: 0.5rem; }

/* ─── Blog list ──────────────────────────────────────────── */
.blog-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.blog-list { list-style: none; }

.blog-list-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.blog-list-date {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--mist);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 0.2rem;
}

.blog-list-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 0.5rem;
  transition: color 0.15s;
}
.blog-list-item:hover .blog-list-title { color: var(--skin-mid); }

.blog-list-excerpt {
  font-size: 0.9rem;
  color: var(--mist);
  line-height: 1.6;
}

/* ─── Post layout ────────────────────────────────────────── */
.post-header {
  position: relative;
  overflow: hidden;
  padding: 4rem 2rem 3rem;
  background-color: var(--steel-deep);
  background-image: url('/assets/images/steel-texture.png');
  background-size: cover;
  background-position: center;
  border-bottom: 2px solid var(--skin-mid);
}

.post-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/assets/images/skin-texture.png');
  background-size: cover;
  background-position: left center;
  filter: hue-rotate(-14deg) saturate(0.68) brightness(0.78);
  -webkit-mask-image: linear-gradient(118deg, black 0%, black 40%, transparent 64%);
  mask-image: linear-gradient(118deg, black 0%, black 40%, transparent 64%);
  z-index: 0;
}

.post-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, transparent 42%, rgba(184,112,58,0.45) 50%, transparent 58%);
  z-index: 0;
}

.post-header-vignette {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.55) 100%);
}

.post-header > * { position: relative; z-index: 1; }

.post-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.post-kicker {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--skin-warm);
  margin-bottom: 1.2rem;
}

.post-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}

.post-byline {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.78rem;
  color: var(--steel-light);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.post-byline-sep { opacity: 0.4; }

.post-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.post-body p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

.post-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 3rem 0 1rem;
  color: var(--ink);
}

.post-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 2rem 0 0.8rem;
}

.post-body blockquote {
  border-left: 3px solid var(--skin-mid);
  margin: 2.5rem 0;
  padding: 0.5rem 0 0.5rem 1.5rem;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--ink-mid);
  line-height: 1.65;
  background: var(--skin-off);
}

.post-body a {
  color: var(--skin-mid);
  border-bottom: 1px solid var(--skin-light);
  transition: border-color 0.15s;
}
.post-body a:hover { border-color: var(--skin-mid); }

.post-footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.post-footer-label {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.78rem;
  color: var(--mist);
}

.post-nav-link {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--skin-mid);
}

/* ─── Page header ────────────────────────────────────────── */
.page-header {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 2rem;
  text-align: center;
  background-color: var(--steel-deep);
  background-image: url('/assets/images/steel-texture.png');
  background-size: cover;
  background-position: center;
  border-bottom: 2px solid var(--skin-mid);
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/assets/images/skin-texture.png');
  background-size: cover;
  background-position: left center;
  filter: hue-rotate(-14deg) saturate(0.68) brightness(0.78);
  -webkit-mask-image: linear-gradient(118deg, black 0%, black 40%, transparent 64%);
  mask-image: linear-gradient(118deg, black 0%, black 40%, transparent 64%);
  z-index: 0;
}

.page-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, transparent 42%, rgba(184,112,58,0.45) 50%, transparent 58%);
  z-index: 0;
}

.page-header-vignette {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.55) 100%);
}

.page-header > * { position: relative; z-index: 1; }

.page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
}

.page-header p {
  color: var(--steel-light);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ─── About ──────────────────────────────────────────────── */
.about-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
}

.about-body p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.about-body h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 2.5rem 0 0.8rem;
  letter-spacing: -0.01em;
}

.about-aside {
  background: var(--skin-off);
  border-left: 3px solid var(--skin-mid);
  padding: 1.2rem 1.5rem;
  margin: 2.5rem 0;
  font-size: 0.95rem;
  color: var(--mist);
  font-style: italic;
}

/* ─── Contact ────────────────────────────────────────────── */
.contact-section {
  max-width: 600px;
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
}

.form-field { margin-bottom: 1.5rem; }

.form-field label {
  display: block;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 0.4rem;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--skin-mid);
}

.form-field textarea { min-height: 120px; resize: vertical; }

.form-submit {
  background: var(--steel-mid);
  color: var(--steel-silver);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.8rem 1.8rem;
  border-radius: 2px;
  transition: opacity 0.15s;
}
.form-submit:hover { opacity: 0.82; }

.contact-note {
  font-size: 0.82rem;
  color: var(--mist);
  margin-top: 1.5rem;
  line-height: 1.6;
}

#contact-success {
  background: var(--skin-off);
  border: 1px solid var(--skin-warm);
  border-radius: 2px;
  padding: 1.2rem 1.5rem;
  color: var(--skin-dark);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* ─── Search ─────────────────────────────────────────────── */
.search-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem 0;
}

.search-wrap {
  position: relative;
  max-width: 520px;
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--mist);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.6rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s;
}
.search-input:focus { outline: none; border-color: var(--skin-mid); }

.search-results {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 2rem 5rem;
}

.search-meta {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.8rem;
  color: var(--mist);
  margin-bottom: 2rem;
}

.search-grid { display: grid; gap: 1.5rem; }

.search-card {
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1.4rem;
  transition: border-color 0.15s;
  background: #fff;
}
.search-card:hover { border-color: var(--skin-mid); }

.search-card-date {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.72rem;
  color: var(--mist);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

.search-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  color: var(--ink);
  transition: color 0.15s;
}
.search-card:hover .search-card-title { color: var(--skin-mid); }

.search-card-excerpt {
  font-size: 0.88rem;
  color: var(--mist);
  line-height: 1.6;
}

.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--mist);
}
.no-results h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 2rem;
  background-color: var(--steel-deep);
  background-image: url('/assets/images/steel-texture.png');
  background-size: cover;
  background-position: center bottom;
  border-top: 1px solid rgba(168,192,204,0.1);
}

.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/assets/images/skin-texture.png');
  background-size: cover;
  background-position: left center;
  filter: hue-rotate(-14deg) saturate(0.68) brightness(0.78);
  -webkit-mask-image: linear-gradient(118deg, black 0%, black 40%, transparent 64%);
  mask-image: linear-gradient(118deg, black 0%, black 40%, transparent 64%);
  z-index: 0;
}

.site-footer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    118deg,
    transparent 42%,
    rgba(184,112,58,0.45) 50%,
    transparent 58%
  );
  z-index: 0;
}

.footer-vignette {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at 50% 60%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.55) 100%);
}

.site-footer > * { position: relative; z-index: 1; }

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: baseline;
  gap: 0.1em;
}
.footer-logo-ti { color: var(--steel-silver); font-size: 1rem; font-weight: 700; }
.footer-logo-x  { color: var(--skin-mid);     font-size: 0.9rem; }
.footer-logo-bi { color: var(--skin-warm);    font-size: 1rem; font-weight: 700; }

.footer-copy {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.75rem;
  color: rgba(168,192,204,0.35);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.75rem;
  color: rgba(168,192,204,0.45);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--steel-silver); }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .nav-links { gap: 1.2rem; }
  .blog-list-item { grid-template-columns: 1fr; gap: 0.3rem; }
  .blog-list-date { padding-top: 0; }
  .post-footer { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; text-align: center; }
}
