/* ============================================================
   damionlock.com — cinematic personal brand
   Brand DNA inherited from ONE9 3NINE: dark base, matrix-green
   accent, "Technology from Inception." Pushed darker + premium.
   ============================================================ */

:root {
  /* base */
  --bg:        #060908;
  --bg-2:      #0a0f0d;
  --bg-elev:   #0d1411;
  --line:      rgba(150, 200, 175, 0.12);
  --line-2:    rgba(150, 200, 175, 0.22);

  /* accent — refined matrix green */
  --accent:    #34e0a1;
  --accent-2:  #1aa873;
  --accent-dim:rgba(52, 224, 161, 0.14);
  --accent-glow: rgba(52, 224, 161, 0.45);

  /* text */
  --ink:       #eef4f0;
  --ink-soft:  #aebab3;
  --ink-mute:  #6f7c75;

  /* type */
  --display: "Space Grotesk", "Segoe UI", sans-serif;
  --body:    "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, monospace;

  --maxw: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- light mode overrides ---- */
html[data-theme="light"] {
  --bg:        #f4f2ef;
  --bg-2:      #eae7e2;
  --bg-elev:   #ffffff;
  --line:      rgba(30, 60, 45, 0.12);
  --line-2:    rgba(30, 60, 45, 0.22);
  --accent:    #1aa873;
  --accent-2:  #148a5e;
  --accent-dim:rgba(26, 168, 115, 0.12);
  --accent-glow: rgba(26, 168, 115, 0.35);
  --ink:       #1a1f1c;
  --ink-soft:  #4a5550;
  --ink-mute:  #7a8580;
}
html[data-theme="light"] ::selection { background: var(--accent); color: #fff; }
html[data-theme="light"] .nav.scrolled { background: rgba(244, 242, 239, 0.82); }
html[data-theme="light"] .hero::after {
  background:
    radial-gradient(120% 90% at 15% 30%, transparent 30%, rgba(244,242,239,0.55) 100%),
    linear-gradient(180deg, rgba(244,242,239,0.55) 0%, rgba(244,242,239,0.15) 35%, rgba(244,242,239,0.78) 100%);
}
html[data-theme="light"] .hero-card { background: linear-gradient(170deg, rgba(255,255,255,0.8), rgba(244,242,239,0.6)); }
html[data-theme="light"] .about-portrait img { filter: grayscale(0.05) contrast(1.02); }
html[data-theme="light"] .btn-primary { color: #fff; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #04130d; }

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

/* ---------- shared layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.04; letter-spacing: -0.02em; }

.section { position: relative; padding: clamp(90px, 12vw, 160px) 0; }
.section-head { max-width: 720px; margin-bottom: clamp(48px, 7vw, 84px); }
.section-head h2 {
  font-size: clamp(34px, 5vw, 58px);
  margin: 22px 0 0;
  text-wrap: balance;
}
.section-head p { color: var(--ink-soft); font-size: clamp(17px, 2vw, 20px); margin-top: 22px; max-width: 60ch; text-wrap: pretty; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 56px);
  transition: background .4s var(--ease), backdrop-filter .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(6, 9, 8, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; font-size: 18px; white-space: nowrap; flex: none; }
.brand .mark {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  position: relative;
  background: linear-gradient(150deg, var(--accent-dim), transparent);
}
.brand .mark::after {
  content: "DL";
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  color: var(--accent); letter-spacing: 0.02em;
}
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { font-size: 14.5px; color: var(--ink-soft); transition: color .2s; position: relative; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em;
  padding: 10px 18px; border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--ink) !important; transition: all .25s var(--ease);
}
.nav-cta:hover { border-color: var(--accent); color: var(--accent) !important; box-shadow: 0 0 24px -8px var(--accent-glow); }
.nav-burger { display: none; }

/* theme toggle */
.theme-toggle {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: transparent; color: var(--ink-soft);
  cursor: pointer; transition: all .25s var(--ease);
  padding: 0; margin-left: 6px;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon, .theme-toggle .icon-sun { display: none; }
html:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ============================================================
   HERO — cinematic cycling canvas
   ============================================================ */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; padding: 96px 0 64px; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 15% 30%, transparent 30%, rgba(6,9,8,0.55) 100%),
    linear-gradient(180deg, rgba(6,9,8,0.55) 0%, rgba(6,9,8,0.15) 35%, rgba(6,9,8,0.78) 100%);
}
.hero-inner { position: relative; z-index: 2; width: 100%; }
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: end; }

.theme-ticker { display: flex; align-items: center; gap: 16px; margin-bottom: 30px; height: 22px; }
.theme-dots { display: flex; gap: 7px; }
.theme-dots i {
  width: 22px; height: 3px; border-radius: 2px; background: var(--line-2); display: block;
  transition: background .5s var(--ease);
}
.theme-dots i.on { background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.theme-label {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
  position: relative; overflow: hidden; height: 18px;
}
.theme-label span {
  display: block;
  animation: labelIn .6s var(--ease);
}
@keyframes labelIn { from { transform: translateY(110%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.hero h1 {
  font-size: clamp(44px, 7.4vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--accent); }
.hero .lede {
  margin-top: 28px; max-width: 52ch;
  font-size: clamp(18px, 2.1vw, 23px);
  color: var(--ink-soft);
  text-wrap: pretty;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }

.btn {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--mono); font-size: 14px; letter-spacing: 0.03em;
  padding: 15px 26px; border-radius: 999px;
  transition: all .28s var(--ease); cursor: pointer; border: 1px solid transparent;
}
.btn .arr { transition: transform .28s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn-primary { background: var(--accent); color: #04130d; box-shadow: 0 0 40px -10px var(--accent-glow); }
.btn-primary:hover { box-shadow: 0 0 50px -6px var(--accent-glow); transform: translateY(-2px); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* hero side card — portrait + status */
.hero-card {
  border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(170deg, rgba(13,20,17,0.7), rgba(6,9,8,0.5));
  backdrop-filter: blur(10px);
  padding: 22px; max-width: 320px; margin-left: auto;
}
.hero-card .pic { display: flex; align-items: center; gap: 14px; }
.hero-card .pic img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-2); }
.hero-card .pic .nm { font-family: var(--display); font-weight: 600; font-size: 17px; }
.hero-card .pic .rl { font-size: 13px; color: var(--ink-mute); margin-top: 2px; }
.hero-card .status { display: flex; align-items: center; gap: 9px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); }
.hero-card .status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 4px var(--accent-dim); } 50% { box-shadow: 0 0 0 8px transparent; } }

.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-mute);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scroll-hint .ln { width: 1px; height: 38px; background: linear-gradient(var(--accent), transparent); animation: scrolly 2s infinite; transform-origin: top; }
@keyframes scrolly { 0% { transform: scaleY(0); } 40% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ============================================================
   PILLARS
   ============================================================ */
.pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pillar {
  position: relative; border: 1px solid var(--line); border-radius: 16px;
  padding: 36px 30px 40px; background: var(--bg-elev); overflow: hidden;
  transition: border-color .35s var(--ease), transform .35s var(--ease);
}
.pillar:hover { border-color: var(--line-2); transform: translateY(-4px); }
.pillar::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .4s;
  background: radial-gradient(80% 60% at 50% 0%, var(--accent-dim), transparent 70%);
}
.pillar:hover::before { opacity: 1; }
.pillar .ix { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: 0.1em; }
.pillar .ic { width: 46px; height: 46px; margin: 24px 0 22px; color: var(--accent); }
.pillar h3 { font-size: 23px; margin-bottom: 12px; }
.pillar p { color: var(--ink-soft); font-size: 15.5px; }
.pillar .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.pillar .tags span { font-family: var(--mono); font-size: 11.5px; color: var(--ink-mute); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; }

/* ============================================================
   ABOUT
   ============================================================ */
.about { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 7vw, 90px); align-items: center; }
.about-portrait { position: relative; }
.about-portrait img { width: 100%; border-radius: 18px; border: 1px solid var(--line-2); filter: grayscale(0.15) contrast(1.05); }
.about-portrait .frame { position: absolute; inset: -14px -14px auto auto; width: 70px; height: 70px; border-top: 1px solid var(--accent); border-right: 1px solid var(--accent); opacity: 0.6; border-radius: 0 14px 0 0; }
.about-portrait .frame.bl { inset: auto auto -14px -14px; border: none; border-bottom: 1px solid var(--accent); border-left: 1px solid var(--accent); border-radius: 0 0 0 14px; }
.about-body h2 { font-size: clamp(30px, 4vw, 46px); margin: 20px 0 24px; text-wrap: balance; }
.about-body p { color: var(--ink-soft); margin-bottom: 18px; font-size: 17.5px; text-wrap: pretty; }
.about-body p strong { color: var(--ink); font-weight: 600; }
.about-stats { display: flex; gap: 40px; margin-top: 34px; flex-wrap: wrap; }
.about-stats .st .n { font-family: var(--display); font-size: 38px; font-weight: 600; color: var(--accent); letter-spacing: -0.02em; }
.about-stats .st .l { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute); margin-top: 4px; }

/* ============================================================
   BLOG TEASER + LIST
   ============================================================ */
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card {
  display: flex; flex-direction: column; height: 100%;
  border: 1px solid var(--line); border-radius: 16px; background: var(--bg-elev);
  padding: 30px 28px 32px; transition: all .35s var(--ease); cursor: pointer;
}
.post-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.post-card .topic { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.post-card h3 { font-size: 22px; margin: 16px 0 12px; line-height: 1.15; }
.post-card .ex { color: var(--ink-soft); font-size: 15px; flex: 1; }
.post-card .meta { display: flex; align-items: center; gap: 12px; margin-top: 24px; font-family: var(--mono); font-size: 12px; color: var(--ink-mute); }
.post-card .read { margin-top: 22px; font-family: var(--mono); font-size: 13px; color: var(--accent); display: inline-flex; align-items: center; gap: 8px; }
.post-card .read .arr { transition: transform .28s var(--ease); }
.post-card:hover .read .arr { transform: translateX(4px); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(70% 90% at 80% 20%, var(--accent-dim), transparent 60%);
  pointer-events: none;
}
.contact-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 90px); align-items: start; }
.contact-lead h2 { font-size: clamp(34px, 5vw, 56px); margin: 20px 0 22px; text-wrap: balance; }
.contact-lead p { color: var(--ink-soft); font-size: 18px; max-width: 44ch; margin-bottom: 32px; text-wrap: pretty; }
.contact-channels { display: flex; flex-direction: column; gap: 4px; }
.channel { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); transition: padding .25s var(--ease); }
.channel:hover { padding-left: 8px; }
.channel:last-child { border-bottom: 1px solid var(--line); }
.channel .ic { width: 20px; height: 20px; color: var(--accent); flex: none; }
.channel .k { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute); }
.channel .v { font-size: 16px; color: var(--ink); }
.channel .v:hover { color: var(--accent); }

form.lead-form { border: 1px solid var(--line); border-radius: 18px; background: var(--bg-elev); padding: clamp(28px, 4vw, 40px); }
.field { margin-bottom: 20px; }
.field label { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 9px; }
.field input, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; color: var(--ink); font-family: var(--body); font-size: 15.5px; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.field textarea { resize: vertical; min-height: 110px; }
form.lead-form .btn-primary { width: 100%; justify-content: center; border: none; }
.form-note { font-family: var(--mono); font-size: 11.5px; color: var(--ink-mute); margin-top: 16px; text-align: center; }
.form-status { font-family: var(--mono); font-size: 13px; margin-top: 14px; text-align: center; display: none; }
.form-status.ok { display: block; color: var(--accent); }
.form-status.err { display: block; color: #ff7a6b; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line); padding: 56px 0 40px; }
.footer-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.footer .brand { margin-bottom: 16px; }
.footer .tag { font-family: var(--mono); font-size: 13px; color: var(--ink-mute); max-width: 30ch; }
.footer-soc { display: flex; gap: 14px; }
.footer-soc a { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; display: grid; place-items: center; color: var(--ink-soft); transition: all .25s var(--ease); }
.footer-soc a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }
.footer-soc svg { width: 18px; height: 18px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--ink-mute); flex-wrap: wrap; gap: 12px; }

/* ============================================================
   REVEAL ANIM
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   BLOG PAGES
   ============================================================ */
.blog-hero { padding: 150px 0 60px; border-bottom: 1px solid var(--line); position: relative; }
.blog-hero h1 { font-size: clamp(40px, 6vw, 76px); margin: 22px 0 0; }
.blog-hero p { color: var(--ink-soft); font-size: 19px; margin-top: 20px; max-width: 56ch; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 40px; }
.filters button {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.05em;
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line-2);
  background: transparent; color: var(--ink-soft); cursor: pointer; transition: all .22s var(--ease);
}
.filters button:hover { color: var(--ink); border-color: var(--accent); }
.filters button.active { background: var(--accent); color: #04130d; border-color: var(--accent); }

.blog-list { padding: 70px 0 120px; }

/* article reader */
.article { padding: 140px 0 120px; }
.article-wrap { max-width: 760px; margin: 0 auto; }
.article .back { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); display: inline-flex; gap: 8px; align-items: center; margin-bottom: 40px; transition: color .2s; }
.article .back:hover { color: var(--accent); }
.article .topic { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.article h1 { font-size: clamp(34px, 5vw, 56px); margin: 18px 0 20px; line-height: 1.05; text-wrap: balance; }
.article .a-meta { font-family: var(--mono); font-size: 13px; color: var(--ink-mute); display: flex; gap: 14px; padding-bottom: 32px; border-bottom: 1px solid var(--line); margin-bottom: 44px; }
.prose { font-size: 18.5px; line-height: 1.8; color: var(--ink-soft); }
.prose h2 { font-size: 30px; color: var(--ink); margin: 50px 0 18px; }
.prose h3 { font-size: 23px; color: var(--ink); margin: 38px 0 14px; }
.prose p { margin-bottom: 24px; text-wrap: pretty; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { margin: 0 0 24px 22px; }
.prose li { margin-bottom: 10px; }
.prose blockquote { border-left: 2px solid var(--accent); padding: 4px 0 4px 24px; margin: 30px 0; color: var(--ink); font-style: italic; }
.prose code { font-family: var(--mono); font-size: 0.88em; background: var(--bg-elev); border: 1px solid var(--line); padding: 2px 7px; border-radius: 5px; color: var(--accent); }
.prose pre { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px; padding: 22px; overflow-x: auto; margin-bottom: 24px; }
.prose pre code { border: none; background: none; padding: 0; color: var(--ink-soft); }
.prose strong { color: var(--ink); }
.prose img { border-radius: 12px; border: 1px solid var(--line); margin: 30px 0; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 44px 0; }

.empty-state { text-align: center; padding: 80px 0; color: var(--ink-mute); font-family: var(--mono); font-size: 14px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-card { margin-left: 0; max-width: 100%; }
  .pillars-grid { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-portrait { max-width: 360px; }
  .contact-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
