/* ============================================================
   Midnight Builds — redesign
   Steve Jobs / Apple product-page discipline.
   No frameworks. No CDNs. System font only.
   ============================================================ */

:root {
  --bg:        #000000;   /* true midnight black */
  --bg-2:      #0a0a0c;   /* barely-raised section */
  --surface:   #121214;   /* cards */
  --text:      #f5f5f7;   /* Apple off-white */
  --text-2:    #86868b;   /* Apple gray */
  --text-3:    #6e6e73;
  --hair:      rgba(255,255,255,.12);
  --hair-2:    rgba(255,255,255,.20);
  --accent:    #2997ff;   /* the one restrained action color */
  --accent-ink:#ffffff;
  --maxw:      980px;
  --nav-h:     48px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

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

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

::selection { background: rgba(41,151,255,.30); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.section { padding: 96px 0; border-top: 1px solid var(--hair); }
.section--plain { border-top: none; }

/* ---------- shared type ---------- */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-2);
  margin: 0 0 18px;
}
.section-title {
  font-size: clamp(28px, 4.4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0 0 14px;
}
.section-lede {
  font-size: 19px;
  color: var(--text-2);
  max-width: 620px;
  margin: 0;
}
.hair { height: 1px; background: var(--hair); border: 0; margin: 0; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(0,0,0,.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hair);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; height: 100%;
  padding: 0 22px; display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.brand__mark { width: 18px; height: 18px; display: block; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a { font-size: 13px; color: var(--text-2); transition: color .2s ease; }
.nav__links a:hover { color: var(--text); }

/* ---------- hero ---------- */
.hero { padding: calc(var(--nav-h) + 120px) 0 110px; text-align: center; }
.hero__title {
  font-size: clamp(40px, 7.2vw, 72px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin: 0 auto 22px;
  max-width: 14ch;
}
.hero__sub {
  font-size: clamp(18px, 2.4vw, 21px);
  color: var(--text-2);
  max-width: 30ch;
  margin: 0 auto 34px;
  line-height: 1.45;
}
.hero__cta { display: flex; gap: 26px; justify-content: center; align-items: center; flex-wrap: wrap; }

/* ---------- buttons / links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 500;
  padding: 11px 22px; border-radius: 980px;
  background: var(--accent); color: var(--accent-ink);
  transition: opacity .2s ease, transform .2s ease;
}
.btn:hover { opacity: .88; }
.btn:active { transform: scale(.98); }
.link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 15px; color: var(--accent);
  transition: opacity .2s ease;
}
.link:hover { opacity: .75; }
.link .arr { transition: transform .2s ease; }
.link:hover .arr { transform: translateX(3px); }

/* ---------- video grid ---------- */
.grid { display: grid; gap: 28px; }
.grid--videos { grid-template-columns: repeat(2, 1fr); }
.grid--projects { grid-template-columns: repeat(3, 1fr); }

.vcard {
  display: block; background: var(--surface);
  border: 1px solid var(--hair); border-radius: 14px; overflow: hidden;
  transition: border-color .25s ease, transform .25s ease;
}
.vcard:hover { border-color: var(--hair-2); transform: translateY(-2px); }
.vcard__media {
  position: relative; aspect-ratio: 16/9; background: #0c0c0e;
  display: flex; align-items: center; justify-content: center;
}
.vcard__play {
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 1px solid var(--hair-2);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease;
}
.vcard:hover .vcard__play { background: rgba(255,255,255,.16); }
.vcard__play svg { width: 18px; height: 18px; fill: var(--text); margin-left: 2px; }
.vcard__body { padding: 18px 20px 22px; }
.vcard__cat {
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-2); margin: 0 0 8px;
}
.vcard__title { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 6px; }
.vcard__meta { font-size: 13px; color: var(--text-3); margin: 0; }

/* ---------- writing list ---------- */
.posts { border-top: 1px solid var(--hair); }
.post {
  display: grid; grid-template-columns: 132px 1fr auto; gap: 24px; align-items: baseline;
  padding: 26px 0; border-bottom: 1px solid var(--hair);
  transition: opacity .2s ease;
}
.post:hover { opacity: .82; }
.post__date { font-size: 13px; color: var(--text-2); letter-spacing: .02em; }
.post__title { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 6px; }
.post__dek { font-size: 15px; color: var(--text-2); margin: 0; max-width: 56ch; }
.post__go { font-size: 14px; color: var(--accent); white-space: nowrap; }

/* ---------- projects ---------- */
.pcard {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--hair);
  border-radius: 14px; padding: 24px;
  transition: border-color .25s ease, transform .25s ease;
}
.pcard:hover { border-color: var(--hair-2); transform: translateY(-2px); }
.pcard__name { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.pcard__desc { font-size: 14px; color: var(--text-2); margin: 0; line-height: 1.5; flex: 1; }
.pcard__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 11px; color: var(--text-2); letter-spacing: .04em;
  padding: 4px 10px; border: 1px solid var(--hair); border-radius: 980px;
}
.pcard__link { font-size: 14px; color: var(--accent); margin-top: 4px; }

/* ---------- connect ---------- */
.social { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.social a {
  font-size: 14px; color: var(--text); padding: 10px 18px;
  border: 1px solid var(--hair); border-radius: 980px;
  transition: border-color .2s ease, color .2s ease;
}
.social a:hover { border-color: var(--hair-2); color: var(--accent); }

/* ---------- subscribe ---------- */
.subscribe { display: flex; gap: 12px; max-width: 460px; margin-top: 28px; flex-wrap: wrap; }
.subscribe input {
  flex: 1; min-width: 220px; font-size: 15px; font-family: inherit;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--hair); border-radius: 980px; padding: 12px 18px;
  transition: border-color .2s ease;
}
.subscribe input::placeholder { color: var(--text-3); }
.subscribe input:focus { outline: none; border-color: var(--accent); }
.subscribe .note { font-size: 13px; color: var(--text-2); margin: 14px 0 0; }
.subscribe .ok { color: var(--accent); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--hair); padding: 40px 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer__copy { font-size: 13px; color: var(--text-3); }
.footer__nav { display: flex; gap: 22px; }
.footer__nav a { font-size: 13px; color: var(--text-2); transition: color .2s ease; }
.footer__nav a:hover { color: var(--text); }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .grid--videos, .grid--projects { grid-template-columns: 1fr; }
  .post { grid-template-columns: 1fr; gap: 6px; }
  .post__go { margin-top: 4px; }
  .section { padding: 72px 0; }
  .nav__links { gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
