/* ─── IMPORTS ─── */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── TOKENS ─── */
:root {
  --coal:      #0d0f12;
  --coal2:     #12151a;
  --stone:     #1a1e26;
  --stone2:    #21262f;
  --sand:      #c8a96e;
  --sand2:     #e2c98a;
  --bronze:    #8a6534;
  --bronze2:   #b5893f;
  --teal:      #2a6e72;
  --teal2:     #3a9498;
  --teal-glow: rgba(58,148,152,0.15);
  --text:      #d4cfc6;
  --text-2:    #8a8680;
  --text-3:    #5a5650;
  --border:    rgba(200,169,110,0.12);
  --border2:   rgba(200,169,110,0.22);

  /* compat aliases */
  --black:      var(--coal);
  --black-alt:  var(--coal2);
  --surface:    var(--stone);
  --gold:       var(--sand);
  --gold-light: var(--sand2);
  --gold-dim:   var(--bronze);
  --cyan:       var(--teal2);
  --cyan-dim:   var(--teal);
  --cyan-glow:  var(--teal-glow);
  --text-muted: var(--text-2);
  --text-dim:   var(--text-3);
  --border-glow: var(--border2);

  --ff-display: 'Cinzel', serif;
  --ff-mono:    'JetBrains Mono', monospace;
  --ff-body:    'DM Sans', sans-serif;

  /* compat */
  --font-display: var(--ff-display);
  --font-mono:    var(--ff-mono);
  --font-body:    var(--ff-body);

  --radius:     2px;
  --gutter:     clamp(1.25rem, 5vw, 2.5rem);
  --max-width:  860px;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  background: var(--coal);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── GRID TEXTURE ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(200,169,110,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,169,110,.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* ─── LAYOUT ─── */
.site-wrapper { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100vh; }

.container {
  width: 100%;
  max-width: calc(var(--max-width) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

main { flex: 1; }

/* ─── HEADER ─── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: 64px;
  display: flex; align-items: center;
  background: rgba(13,15,18,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bronze2), transparent);
}

.header-inner {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem;
  padding: 0 2.5rem;
}

.site-logo {
  display: flex; flex-direction: row; align-items: center;
  gap: 0.6rem; text-decoration: none; flex-shrink: 0;
}

.logo-text { display: flex; flex-direction: column; gap: 0.1rem; }

.logo-main {
  font-family: var(--ff-display);
  font-size: 0.9rem; font-weight: 700;
  color: var(--sand2); letter-spacing: 0.12em; text-transform: uppercase; line-height: 1;
}

.logo-sub {
  font-family: var(--ff-body);
  font-size: 0.6rem; color: var(--teal2); letter-spacing: 0.18em; text-transform: uppercase;
}

.about-avatar {
  width:16rem;
  height:16rem;
  border-radius: 100%;
}

.header-avatar {
  width: 70px; height: 70px;
  border-radius: 50%; object-fit: cover;
  border: 1px solid var(--bronze); flex-shrink: 0;
}

.header-right { display: flex; align-items: center; gap: 0.5rem; }

.site-nav { display: flex; align-items: center; gap: 0.15rem; }

.site-nav a {
  font-family: var(--ff-body);
  font-size: 0.8rem; font-weight: 500;
  color: var(--text-2); text-decoration: none;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border: 1px solid transparent; border-radius: var(--radius);
  transition: color .2s, border-color .2s, background .2s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--sand);
  border-color: var(--border2);
  background: rgba(200,169,110,0.06);
}

/* ─── LANG SWITCH ─── */
.lang-switch {
  display: flex; align-items: center; gap: 0.3rem;
  margin-left: 0.5rem; padding-left: 0.75rem;
  border-left: 1px solid var(--border);
}

.lang-switch a {
  font-family: var(--ff-mono);
  font-size: 0.62rem; font-weight: 500; letter-spacing: 0.1em;
  color: var(--text-3); text-decoration: none;
  padding: 0.2rem 0.4rem;
  border: 1px solid transparent; border-radius: var(--radius);
  transition: color .2s, border-color .2s, background .2s;
}

.lang-switch a:hover { color: var(--text-2); }

.lang-switch a.lang-active {
  color: var(--sand);
  border-color: var(--border2);
  background: rgba(200,169,110,0.06);
}

.lang-sep { font-size: 0.55rem; color: var(--border2); user-select: none; }

/* ─── FOOTER ─── */
.site-footer {
  margin-top: 5rem;
  background: var(--coal);
  border-top: 1px solid var(--border);
}

.site-footer::before {
  content: '';
  display: block; height: 1px;
  background: linear-gradient(90deg, transparent, var(--bronze2), transparent);
}

.footer-inner {
  padding: 2rem 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}

.footer-brand {
  font-family: var(--ff-display);
  font-size: 0.72rem; color: var(--bronze2);
  letter-spacing: 0.15em; text-transform: uppercase;
}

.footer-meta {
  font-family: var(--ff-mono);
  font-size: 0.62rem; color: var(--text-3); letter-spacing: 0.1em;
}

/* ─── ORNAMENT ─── */
.ornament {
  display: flex; align-items: center; gap: 1rem;
  margin: 2.5rem 0;
}

.ornament::before,
.ornament::after {
  content: '';
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border2));
}

.ornament::after { background: linear-gradient(90deg, var(--border2), transparent); }

.ornament-symbol { font-size: 0.85rem; color: var(--bronze2); letter-spacing: 0.2em; }

/* ─── HERO ─── */
.hero {
  padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 4rem);
  position: relative; overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 80% 40%, rgba(42,110,114,.1) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 10% 90%, rgba(138,101,52,.07) 0%, transparent 60%);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--ff-mono); font-size: 0.7rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--teal2);
  border: 1px solid rgba(58,148,152,.3);
  padding: 0.3rem 0.85rem;
  margin-bottom: 1.6rem;
}

.hero-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--teal2); border-radius: 50%;
}

.hero-title {
  font-family: var(--ff-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 700; color: #fff;
  letter-spacing: 0.02em; line-height: 1.1;
  margin-bottom: 1.25rem;
  padding-left: 2rem;
}

.hero-title em {
  font-style: normal; color: var(--sand2); position: relative;
}

.hero-title em::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: linear-gradient(90deg, var(--sand), transparent);
}

.hero-desc {
  font-size: 1.05rem; color: var(--text-2);
  max-width: 520px; line-height: 1.75;
  font-weight: 300; margin-bottom: 2.5rem;
  padding-left: 4rem;
}

.hero-tags { 
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-left: 2rem;
}

/* ─── INTRO BOX ─── */
.intro-box {
  padding: 1.75rem 2rem;
  background: var(--stone);
  border: 1px solid var(--border2);
  border-left: 3px solid var(--bronze2);
  border-radius: var(--radius);
}

.intro-box p {
  font-size: 0.97rem; color: var(--text-2); line-height: 1.85; font-weight: 300;
}

/* ─── TAGS / BADGES ─── */
.tag {
  font-family: var(--ff-mono); font-size: 0.65rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  border: 1px solid var(--border2); border-radius: var(--radius);
  color: var(--text-2); background: var(--stone2);
}

.badge {
  font-family: var(--ff-mono); font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border: 1px solid rgba(58,148,152,.3); border-radius: var(--radius);
  color: var(--teal2); background: var(--teal-glow);
}

/* ─── SECTION HEADING ─── */
.section-heading {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-heading h2 {
  font-family: var(--ff-display);
  font-size: 1rem; font-weight: 600;
  color: var(--sand2); letter-spacing: 0.1em;
  text-transform: uppercase; white-space: nowrap;
}

.section-heading-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border2), transparent);
}

/* ─── BLOG HEADER ─── */
.blog-header {
  padding: clamp(2rem, 5vw, 3.5rem) 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.blog-header h1 {
  font-family: var(--ff-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600; color: #fff;
  letter-spacing: 0.03em; line-height: 1.2;
  margin-bottom: 0.4rem;
}

.blog-header p {
  font-family: var(--ff-mono);
  font-size: 0.72rem; color: var(--text-3); letter-spacing: 0.1em;
}

/* ─── POSTS GRID ─── */
.posts-grid {
  display: flex; flex-direction: column; gap: 1px;
}

/* ─── POST CARD ─── */
.post-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.3rem 1rem;
  align-items: start;
  padding: 1.4rem 1.6rem;
  background: var(--coal2);
  border: 1px solid var(--border);
  border-left: 2px solid transparent;
  text-decoration: none; color: inherit;
  transition: background .2s, border-color .2s, transform .2s;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

.post-card:hover {
  background: var(--stone);
  border-color: var(--border2);
  border-left-color: var(--sand);
  transform: translateX(4px);
}

.post-card-meta {
  display: flex; align-items: center; gap: 0.75rem;
  grid-column: 1; grid-row: 1;
}

.post-card-date {
  font-family: var(--ff-mono); font-size: 0.62rem;
  color: var(--text-3); letter-spacing: 0.08em;
}

.post-card-category {
  font-family: var(--ff-mono); font-size: 0.6rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--teal2);
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(58,148,152,.3);
  border-radius: var(--radius);
}

.post-card-title {
  font-family: var(--ff-display);
  font-size: 0.92rem; font-weight: 600;
  color: var(--sand2); letter-spacing: 0.04em;
  grid-column: 1; grid-row: 2;
}

.post-card-excerpt {
  font-size: 0.83rem; color: var(--text-2);
  font-weight: 300; line-height: 1.55;
  grid-column: 1 / -1; grid-row: 3;
  margin-top: 0.2rem;
}

.post-card-arrow {
  grid-column: 2; grid-row: 1 / 3;
  align-self: center;
  color: var(--bronze2); font-size: 1rem;
  transition: transform .2s;
}

.post-card:hover .post-card-arrow { transform: translateX(5px); }

/* ─── ABOUT HERO ─── */
.about-hero {
  display: flex; align-items: center; gap: 2.5rem;
  padding: 2.5rem 3rem;
  background: var(--stone);
  border: 1px solid var(--border2);
  border-left: 3px solid var(--bronze2);
  border-radius: var(--radius);
  position: relative; overflow: hidden;
}

.about-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 85% 50%, rgba(200,169,110,.05) 0%, transparent 65%);
  pointer-events: none;
}



/* ─── ABOUT INTRO ─── */
.about-intro { display: flex; flex-direction: column; gap: 0.75rem; }

.about-name {
  font-family: var(--ff-display);
  font-size: 1.5rem; font-weight: 700;
  color: var(--sand2); letter-spacing: 0.05em; line-height: 1.2;
}

.about-tagline {
  font-size: 0.95rem; color: var(--text-2); line-height: 1.7; font-weight: 300;
}

.about-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.25rem; }

/* ─── ABOUT TEXT ─── */
.about-text p {
  font-size: 0.97rem; color: var(--text-2); line-height: 1.85; margin-bottom: 1.1rem;
}
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--text); font-weight: 500; }
.about-text em { color: var(--teal2); font-style: normal; }

.about-text-single {
  font-size: 0.97rem; color: var(--text-2); line-height: 1.8; margin-bottom: 1.75rem;
}

/* ─── ABOUT GRID ─── */
.about-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}

.about-card {
  background: var(--coal2);
  padding: 1.75rem 2rem;
  display: flex; flex-direction: column; gap: 0.6rem;
  transition: background .2s; position: relative;
}

.about-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: transparent; transition: background .2s;
}

.about-card:hover { background: var(--stone); }
.about-card:hover::before { background: linear-gradient(90deg, var(--bronze2), transparent); }

.about-card-icon { font-size: 1.5rem; line-height: 1; margin-bottom: 0.2rem; }

.about-card h3 {
  font-family: var(--ff-display);
  font-size: 0.88rem; font-weight: 600;
  color: var(--sand); letter-spacing: 0.06em;
}

.about-card p { font-size: 0.92rem; color: var(--text-2); line-height: 1.7; }

/* ─── ABOUT QUOTE ─── */
.about-quote-block { display: flex; flex-direction: column; gap: 1.75rem; }

.about-quote {
  font-family: var(--ff-display);
  font-size: 1.1rem; font-weight: 400;
  color: var(--sand2); letter-spacing: 0.03em; line-height: 1.5;
  padding: 1.75rem 2rem;
  border: 1px solid var(--border2);
  border-left: 3px solid var(--sand);
  border-radius: var(--radius);
  background: rgba(200,169,110,.04);
  position: relative;
}

.about-quote::before {
  content: '\201C';
  position: absolute; top: -.5rem; left: 1.5rem;
  font-size: 3rem; color: var(--bronze2); line-height: 1; opacity: .5;
}

.about-quote cite {
  display: block; margin-top: 0.75rem;
  font-family: var(--ff-mono); font-size: 0.72rem;
  font-style: normal; letter-spacing: 0.14em;
  color: var(--text-3); text-transform: uppercase;
}

/* ─── CONTACT ─── */
.about-contact { display: flex; flex-direction: column; }

.contact-links {
  display: flex; flex-direction: column; gap: 1px;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--border);
}

.contact-link {
  display: flex; align-items: center; gap: 1.25rem;
  padding: 1rem 1.5rem;
  background: var(--coal2);
  text-decoration: none; color: inherit;
  transition: background .2s; position: relative;
}

.contact-link::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: transparent; transition: background .2s;
}

.contact-link:hover { background: var(--stone); }
.contact-link:hover::before { background: var(--teal2); }

.contact-link-icon {
  color: var(--bronze2); width: 1.25rem; text-align: center; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}

.contact-link-icon svg { display: block; color: var(--bronze2); transition: color .2s; }
.contact-link:hover .contact-link-icon svg { color: var(--teal2); }

.contact-link-label {
  font-family: var(--ff-mono); font-size: 0.78rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-2); width: 6.5rem; flex-shrink: 0;
}

.contact-link-handle {
  font-family: var(--ff-mono); font-size: 0.78rem;
  color: var(--teal2); transition: color .2s;
}

.contact-link:hover .contact-link-handle { color: var(--sand); text-decoration: underline; text-decoration-color: var(--border2); }

/* ─── POST HEADER ─── */
.post-header {
  padding: clamp(2rem, 5vw, 3.5rem) 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.post-header h1 {
  font-family: var(--ff-display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700; color: #fff;
  letter-spacing: 0.02em; line-height: 1.2;
  margin: 1rem 0 0.6rem;
}

.post-header-meta {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.post-header-desc {
  font-size: 1rem; color: var(--text-2);
  line-height: 1.7; font-weight: 300; max-width: 600px;
}

.back-link {
  display: inline-block; margin-bottom: 1.5rem;
  font-family: var(--ff-mono); font-size: 0.7rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3); text-decoration: none;
  transition: color .2s;
}

.back-link:hover { color: var(--teal2); }

/* ─── POST CONTENT (PROSE) ─── */
.post-content {
  font-size: 1rem; color: var(--text); line-height: 1.85;
  font-weight: 300; max-width: 720px;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: var(--ff-display);
  color: var(--sand2); letter-spacing: 0.03em; line-height: 1.3;
  margin: 2.25rem 0 0.75rem;
}

.post-content h1 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); font-weight: 700; }
.post-content h2 { font-size: clamp(1.2rem, 2.8vw, 1.65rem); font-weight: 600; border-bottom: 1px solid var(--border); padding-bottom: 0.4rem; }
.post-content h3 { font-size: 1.15rem; font-weight: 600; color: var(--sand); }
.post-content h4 { font-size: 1rem; font-weight: 600; color: var(--text); }

.post-content p { margin-bottom: 1.35rem; }

.post-content strong { color: var(--text); font-weight: 500; }

.post-content em { color: var(--teal2); font-style: italic; }

.post-content a {
  color: var(--teal2); text-decoration: underline;
  text-decoration-color: rgba(58,148,152,.35);
  transition: color .2s, text-decoration-color .2s;
}
.post-content a:hover { color: var(--sand); text-decoration-color: var(--sand); }

.post-content code {
  font-family: var(--ff-mono); font-size: 0.85em;
  color: var(--sand2); background: var(--stone2);
  border: 1px solid var(--border);
  padding: 0.15em 0.4em; border-radius: var(--radius);
}

.post-content pre {
  background: var(--stone);
  border: 1px solid var(--border2);
  border-left: 3px solid var(--bronze2);
  border-radius: var(--radius);
  padding: 1.5rem; overflow-x: auto; margin: 1.75rem 0;
  font-family: var(--ff-mono); font-size: 0.85rem;
  line-height: 1.65; color: var(--text);
}

.post-content pre code {
  background: none; border: none; padding: 0;
  color: inherit; font-size: inherit;
}

.post-content blockquote {
  margin: 1.75rem 0; padding: 1.25rem 1.5rem;
  background: rgba(200,169,110,.04);
  border: 1px solid var(--border2);
  border-left: 3px solid var(--sand);
  border-radius: var(--radius);
  font-family: var(--ff-display); font-size: 1.05rem;
  color: var(--sand2); font-style: italic;
}
.post-content blockquote p { margin-bottom: 0; }

.post-content ul,
.post-content ol {
  margin: 0 0 1.35rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.35rem;
}

.post-content li { color: var(--text-2); }
.post-content li strong { color: var(--text); }
.post-content li em { color: var(--teal2); }
.post-content li code { font-size: 0.83em; }

.post-content ul li { list-style: none; position: relative; padding-left: 1.25rem; }
.post-content ul li::before {
  content: '▸';
  position: absolute; left: 0;
  color: var(--bronze2); font-size: 0.75em; top: 0.2em;
}

.post-content ol { list-style: decimal; }
.post-content ol li::marker { color: var(--bronze2); font-family: var(--ff-mono); font-size: 0.85em; }

.post-content hr {
  border: none; border-top: 1px solid var(--border2); margin: 2.5rem 0;
}

.post-content img {
  max-width: 100%; border-radius: var(--radius);
  border: 1px solid var(--border); display: block; margin: 1.75rem auto;
}

.post-content table {
  width: 100%; border-collapse: collapse;
  margin: 1.75rem 0; font-size: 0.9rem; font-family: var(--ff-mono);
}
.post-content th {
  background: var(--stone2); color: var(--sand2);
  font-weight: 500; letter-spacing: 0.06em;
  padding: 0.65rem 1rem; text-align: left; border: 1px solid var(--border2);
}
.post-content td {
  padding: 0.55rem 1rem; color: var(--text-2); border: 1px solid var(--border);
}
.post-content tr:nth-child(even) td { background: rgba(200,169,110,.025); }

/* ─── UTILITIES ─── */
.mb-4 { margin-bottom: 3rem; }

.text-mono { font-family: var(--ff-mono); font-size: 0.78rem; }
.text-dim  { color: var(--text-3); }
.text-gold { color: var(--sand); }
.text-cyan { color: var(--teal2); }

/* ─── RESPONSIVE ─── */
@media (max-width: 640px) {
  .header-inner { padding: 0 1.25rem; }
  .site-nav { display: none; }

  .about-hero {
    flex-direction: column; align-items: flex-start;
    gap: 1.25rem; padding: 1.5rem;
  }


  .about-grid { grid-template-columns: 1fr; }

  .post-card { clip-path: none; }
  .contact-link { padding: 0.85rem 1rem; }
  .contact-link-label { width: 5rem; }

  .footer-inner { flex-direction: column; text-align: center; }
}
