/* ============================================================
   Kal Gilroy — personal site
   Clean, light, fast. One accent colour (North-Sea teal).
   ============================================================ */

:root {
  --bg:        #f7f8fa;
  --surface:   #ffffff;
  --ink:       #15212e;   /* near-black slate */
  --ink-soft:  #46586a;
  --ink-faint: #7a8a99;
  --line:      #e3e8ee;
  --accent:    #0c7c73;   /* teal */
  --accent-dk: #095e57;
  --accent-bg: #e6f3f1;
  --shadow:    0 1px 2px rgba(16, 32, 48, .04), 0 8px 24px rgba(16, 32, 48, .06);
  --radius:    14px;
  --maxw:      1040px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dk); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(247, 248, 250, .85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; flex-direction: column; line-height: 1.15; color: var(--ink); }
.brand-name { font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.brand-sub { font-size: .74rem; color: var(--ink-faint); font-weight: 500; }
.header-nav { display: flex; gap: 8px; align-items: center; }

/* contact link pills */
.contact-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px;
  font-size: .85rem; font-weight: 600;
  color: var(--ink-soft); border: 1px solid var(--line); background: var(--surface);
  transition: border-color .15s, color .15s, background .15s;
}
.contact-link:hover { color: var(--accent-dk); border-color: var(--accent); background: var(--accent-bg); }
.contact-link.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.contact-link.primary:hover { background: var(--accent-dk); color: #fff; }

/* email shown as plain text, not a pill */
.contact-email { font-size: .9rem; font-weight: 600; color: var(--ink-soft); }
.contact-email:hover { color: var(--accent-dk); }
.contact-email-label { color: var(--ink-faint); font-weight: 700; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 48px; }
.eyebrow {
  margin: 0 0 18px; font-size: .8rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--accent);
}
.hero-title {
  margin: 0 0 18px; font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  line-height: 1.08; letter-spacing: -.025em; font-weight: 800; max-width: 16ch;
}
.hero-blurb { margin: 0 0 28px; font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--ink-soft); max-width: 60ch; }
.hero-blurb strong { color: var(--ink); }
.hero-cta {
  display: inline-block; font-weight: 600; font-size: .95rem;
  color: var(--accent-dk);
}
.hero-cta:hover { transform: translateX(2px); }

/* ---------- Projects ---------- */
.projects { padding: 16px 0 72px; }
.projects-list { display: flex; flex-direction: column; gap: 28px; }

.project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
.project-media { padding: 22px; background: #f1f4f7; border-right: 1px solid var(--line); }
.project-body { padding: 26px 28px; display: flex; flex-direction: column; }

.project-index {
  font-size: .78rem; font-weight: 700; color: var(--accent);
  letter-spacing: .05em; text-transform: uppercase; margin: 0 0 6px;
}
.project-title { margin: 0 0 6px; font-size: 1.32rem; letter-spacing: -.02em; font-weight: 750; line-height: 1.2; }
.project-tagline { margin: 0 0 16px; color: var(--ink-soft); font-size: .98rem; }

.project-highlights { margin: 0 0 18px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.project-highlights li { position: relative; padding-left: 22px; font-size: .92rem; color: var(--ink-soft); }
.project-highlights li::before {
  content: ""; position: absolute; left: 4px; top: .55em;
  width: 7px; height: 7px; border-radius: 2px; background: var(--accent); transform: rotate(45deg);
}

.project-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; }
.tag {
  font-size: .73rem; font-weight: 600; color: var(--ink-soft);
  background: var(--bg); border: 1px solid var(--line);
  padding: 4px 9px; border-radius: 6px;
}

/* ---------- Video facade ---------- */
.video-label {
  display: flex; align-items: center; gap: 8px;
  font-size: .76rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 10px;
}
.video-label .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--accent); }
/* 30-second overview label stands out in green */
.project-media > .video-label { color: var(--accent-dk); }

.video-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: #0d1620; border-radius: 10px; overflow: hidden;
  cursor: pointer; border: 0; padding: 0; display: block;
}
.video-frame img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-embed { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; border-radius: 10px; background: #0d1620; }

.play-btn {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.play-btn svg { width: 62px; height: 62px; filter: drop-shadow(0 3px 8px rgba(0,0,0,.4)); transition: transform .15s; }
.video-frame:hover .play-btn svg { transform: scale(1.08); }
.play-duration {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(0,0,0,.72); color: #fff; font-size: .72rem; font-weight: 600;
  padding: 3px 8px; border-radius: 5px;
}

/* placeholder (no real video yet) */
.video-frame.is-placeholder { cursor: default; background: linear-gradient(135deg, #1b2a38, #0d1620); }
.video-frame.is-placeholder .placeholder-msg {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  color: #93a6b5; font-size: .85rem; font-weight: 600; text-align: center; padding: 16px;
}
.video-frame.is-placeholder .placeholder-msg svg { width: 30px; height: 30px; opacity: .7; }

/* deep-dive (smaller, always visible) — thumbnail left, label right */
.deepdive { margin-top: 18px; display: flex; align-items: center; gap: 16px; }
.deepdive-thumb { flex: 0 0 55%; }
.deepdive-label { margin: 0; color: var(--ink-faint); font-weight: 650; }
.deepdive-label svg { width: 16px; height: 16px; flex: none; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 34px 0; margin-top: 8px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-name { margin: 0; font-weight: 700; }
.footer-role { margin: 2px 0 0; font-size: .85rem; color: var(--ink-faint); }
.footer-nav { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
  .project-card { grid-template-columns: 1fr; }
  .project-media { border-right: 0; border-bottom: 1px solid var(--line); }
  .brand-sub { display: none; }
  .hero { padding: 52px 0 36px; }
}
@media (max-width: 480px) {
  .header-nav .contact-link span.label { display: none; }
  .header-nav .contact-link { padding: 8px; }
}
