/* ==========================================================================
   kirkdiamond.com — styles
   Dark, editorial, engineered. Serif display + Inter body + JetBrains Mono.
   ========================================================================== */

:root {
  --bg: #0a0a0c;
  --bg-2: #0f0f13;
  --bg-3: #15151b;
  --fg: #ececf1;
  --fg-2: #a3a3b2;
  --fg-3: #63636f;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --accent: #7df9ff;          /* electric cyan */
  --accent-2: #b8ff5c;        /* lime, sparingly */
  --accent-dim: rgba(125, 249, 255, 0.14);

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --max: 1240px;
  --gutter: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--bg); }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

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

em { font-style: italic; color: var(--accent); }
h1, h2, h3 { font-weight: 400; letter-spacing: -0.01em; margin: 0; }
h1, h2 { font-family: var(--serif); }

.mono { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.02em; text-transform: uppercase; color: var(--fg-3); }

/* ---- Grain overlay ---------------------------------------------------- */
.grain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---- Custom cursor (pointer devices only) ----------------------------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 60;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width .25s var(--ease), height .25s var(--ease), background .25s;
  mix-blend-mode: difference;
  opacity: 0;
}
.cursor.is-visible { opacity: 1; }
.cursor.is-hover { width: 48px; height: 48px; background: #fff; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---- Nav ---------------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 22px var(--gutter);
  transition: background .4s, backdrop-filter .4s, padding .4s var(--ease);
}
.nav.is-scrolled {
  padding: 14px var(--gutter);
  background: rgba(10, 10, 12, 0.7);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.nav__brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 500; letter-spacing: -0.01em; }
.nav__mark {
  width: 10px; height: 10px; background: var(--accent);
  transform: rotate(45deg);
  box-shadow: 0 0 18px var(--accent);
}
.nav__links { display: flex; gap: 32px; font-size: 0.9rem; color: var(--fg-2); }
.nav__links a { position: relative; transition: color .3s; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav__links a:hover { color: var(--fg); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { color: var(--fg) !important; }
.nav__status { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

@media (max-width: 760px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav__links { display: none; }
  .nav__status { display: none; }
}

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font-size: 0.92rem; font-weight: 500; letter-spacing: 0.005em;
  border: 1px solid var(--line-2);
  transition: transform .4s var(--ease), background .3s, color .3s, border-color .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn--primary:hover { background: var(--accent); border-color: var(--accent); }
.btn--ghost:hover { border-color: var(--fg); }

/* ---- Hero --------------------------------------------------------------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 140px var(--gutter) 120px;
  overflow: hidden;
}
.hero__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0.9;
  mask-image: radial-gradient(ellipse at 70% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 45%, #000 20%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 30%;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 2; max-width: var(--max); width: 100%; margin: 0 auto; }
.eyebrow { margin: 0 0 28px; }
.eyebrow .mono { color: var(--accent); text-transform: none; letter-spacing: 0; }

.hero__title {
  font-size: clamp(2.8rem, 8.2vw, 7.4rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  max-width: 16ch;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero__title .reveal-text {
  display: inline-block; transform: translateY(110%);
  animation: rise 1.2s var(--ease) forwards;
}
.hero__title .line:nth-child(2) .reveal-text { animation-delay: .12s; }
@keyframes rise { to { transform: translateY(0); } }

.hero__lede {
  max-width: 56ch; margin: 36px 0 0;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--fg-2);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 44px; }

.hero__meta {
  position: absolute; z-index: 2; left: var(--gutter); bottom: 40px;
  display: flex; gap: 28px;
}
.hero__meta b { font-weight: 500; color: var(--fg-2); }
@media (max-width: 760px) { .hero__meta { display: none; } }

.hero__scroll {
  position: absolute; z-index: 2; right: var(--gutter); bottom: 40px;
  width: 1px; height: 64px; background: var(--line-2); overflow: hidden;
}
.hero__scroll span {
  position: absolute; left: 0; top: 0; width: 100%; height: 40%;
  background: var(--accent); animation: drop 2s var(--ease) infinite;
}
@keyframes drop { 0% { transform: translateY(-100%); } 100% { transform: translateY(260%); } }

/* ---- Marquee ------------------------------------------------------------ */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; padding: 18px 0; background: var(--bg-2);
}
.marquee__track {
  display: flex; gap: 28px; width: max-content; align-items: center;
  animation: scroll 40s linear infinite;
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-2); white-space: nowrap;
}
.marquee__track i { color: var(--accent); font-style: normal; font-size: 0.6rem; }
@keyframes scroll { to { transform: translateX(-50%); } }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ---- Sections ----------------------------------------------------------- */
.section {
  position: relative;
  max-width: var(--max); margin: 0 auto;
  padding: clamp(96px, 12vw, 180px) var(--gutter);
}
.section + .section { border-top: 1px solid var(--line); }
.section__head { margin-bottom: clamp(48px, 6vw, 88px); }
.section__num { display: block; margin-bottom: 20px; color: var(--accent); }
.section__title {
  font-size: clamp(2.2rem, 5.2vw, 4.4rem);
  line-height: 1.02; letter-spacing: -0.02em;
  max-width: 20ch;
}
.section__sub { margin: 24px 0 0; max-width: 52ch; color: var(--fg-2); font-size: 1.05rem; }

/* ---- About -------------------------------------------------------------- */
.about__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.about__copy p { margin: 0 0 1.4em; font-size: clamp(1.05rem, 1.3vw, 1.2rem); color: var(--fg-2); }
.about__copy p:first-child { color: var(--fg); }
.about__facts { margin: 0; border-top: 1px solid var(--line); }
.about__facts div { display: grid; grid-template-columns: 90px 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.about__facts dt { padding-top: 3px; }
.about__facts dd { margin: 0; font-size: 0.98rem; }
@media (max-width: 860px) { .about__grid { grid-template-columns: 1fr; } }

/* ---- Work --------------------------------------------------------------- */
.work__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.work__item {
  position: relative;
  display: grid; grid-template-columns: 80px 1fr 40px; gap: 32px; align-items: start;
  padding: 44px 0; border-bottom: 1px solid var(--line);
  transition: padding-left .5s var(--ease);
}
.work__item::before {
  content: ""; position: absolute; inset: 0 calc(-1 * var(--gutter) / 2);
  background: linear-gradient(90deg, var(--accent-dim), transparent 60%);
  opacity: 0; transition: opacity .5s;
  pointer-events: none;
}
.work__item:hover { padding-left: 12px; }
.work__item:hover::before { opacity: 1; }
.work__idx { padding-top: 8px; }
.work__body h3 { font-family: var(--serif); font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.1; letter-spacing: -0.015em; margin-bottom: 16px; }
.work__body p { margin: 0 0 20px; max-width: 64ch; color: var(--fg-2); }
.work__arrow { font-size: 1.4rem; color: var(--fg-3); padding-top: 4px; transition: transform .5s var(--ease), color .3s; }
.work__item:hover .work__arrow { transform: translate(6px, -6px); color: var(--accent); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.tags li { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.7rem; }
@media (max-width: 760px) {
  .work__item { grid-template-columns: 1fr; gap: 12px; }
  .work__arrow { display: none; }
}

/* ---- Expertise cards ---------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card {
  position: relative; background: var(--bg); padding: 40px 32px 44px;
  transition: background .4s;
  overflow: hidden;
}
.card::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--accent-dim), transparent 45%);
  opacity: 0; transition: opacity .4s; pointer-events: none;
}
.card:hover { background: var(--bg-2); }
.card:hover::after { opacity: 1; }
.card__glyph { display: block; margin-bottom: 40px; font-size: 1.2rem; color: var(--accent); text-transform: none; }
.card h3 { font-size: 1.2rem; font-weight: 500; margin-bottom: 14px; }
.card p { margin: 0; color: var(--fg-2); font-size: 0.98rem; }

/* Full-width feature card (Applied AI) */
.card--feature {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 80px 1fr auto; gap: 32px; align-items: start;
  background: linear-gradient(135deg, var(--bg-2), var(--bg));
  border-top: 1px solid var(--accent-dim);
}
.card--feature .card__glyph { margin: 0; font-size: 1.6rem; padding-top: 4px; }
.card--feature h3 { font-family: var(--serif); font-size: clamp(1.6rem, 2.4vw, 2.1rem); letter-spacing: -0.015em; }
.card--feature p { max-width: 66ch; font-size: 1.02rem; }
.card--feature .tags { flex-direction: column; align-items: flex-end; padding-top: 6px; }
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card--feature { grid-template-columns: 1fr; gap: 20px; }
  .card--feature .tags { flex-direction: row; align-items: center; }
}
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }

/* ---- Quote -------------------------------------------------------------- */
.quote { text-align: center; }
.quote blockquote { margin: 0; }
.quote p {
  font-family: var(--serif); font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.1; letter-spacing: -0.02em; margin: 0 auto; max-width: 22ch;
}

/* ---- Speaking ----------------------------------------------------------- */
.speaking__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); }
.speaking__col h3 { margin-bottom: 20px; color: var(--accent); }
.speaking__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.speaking__list li {
  display: flex; justify-content: space-between; gap: 24px; align-items: baseline;
  padding: 18px 0; border-bottom: 1px solid var(--line);
  transition: padding-left .4s var(--ease);
}
.speaking__list li:hover { padding-left: 10px; }
.speaking__cta { margin: 56px 0 0; color: var(--fg-2); }
.speaking__cta a { color: var(--fg); border-bottom: 1px solid var(--accent); }
@media (max-width: 760px) { .speaking__grid { grid-template-columns: 1fr; } }

/* ---- Contact ------------------------------------------------------------ */
.contact { text-align: center; }
.contact--full { min-height: 100svh; display: flex; align-items: center; justify-content: center; }
.contact__inner { max-width: 820px; margin: 0 auto; }
.contact__title { font-size: clamp(2.6rem, 7vw, 6rem); line-height: 1; letter-spacing: -0.025em; }
.contact__lede { margin: 32px auto 48px; max-width: 48ch; color: var(--fg-2); font-size: 1.1rem; }
.contact__email {
  display: inline-flex; align-items: center; gap: 16px;
  font-family: var(--serif); font-size: clamp(1.5rem, 3.4vw, 2.8rem);
  letter-spacing: -0.01em; padding-bottom: 8px;
  border-bottom: 1px solid var(--line-2);
  transition: border-color .3s, color .3s;
}
.contact__email span { transition: transform .5s var(--ease); }
.contact__email:hover { border-color: var(--accent); color: var(--accent); }
.contact__email:hover span { transform: translateX(10px); }
.social { list-style: none; display: flex; justify-content: center; gap: 32px; margin: 56px 0 0; padding: 0; }
.social a { transition: color .3s; }
.social a:hover { color: var(--accent); }

/* ---- Footer ------------------------------------------------------------- */
.footer {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) 40px;
  border-top: 1px solid var(--line);
}
.footer a { border-bottom: 1px solid var(--line-2); }
.footer a:hover { color: var(--fg); }

/* ---- Scroll reveal ------------------------------------------------------ */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.hero .reveal { transition-delay: .35s; }
.hero__actions.reveal { transition-delay: .5s; }
.hero__meta.reveal { transition-delay: .8s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero__title .reveal-text { transform: none; }
  html { scroll-behavior: auto; }
}




