/* ============================================================
   That Data Geek — thatdatageek.com
   Palette: ink #101418 · paper #FFFFFF · mist #F5F7F6
            geek-green #6DCB4E · deep #0B0F12 · gray #6E7680
   Type:    Space Grotesk (display) · IBM Plex Sans (body)
            IBM Plex Mono (data labels)
   ============================================================ */

:root {
  --ink: #101418;
  --paper: #ffffff;
  --mist: #f5f7f6;
  --green: #6dcb4e;
  --green-dark: #4ea834;
  --deep: #0b0f12;
  --gray: #6e7680;
  --line: #e4e8e6;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --nav-h: 64px;
  --radius: 18px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--font-mono); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

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

a { color: inherit; }

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

h2 { font-size: clamp(2rem, 5vw, 3.25rem); margin-bottom: 0.5em; }

.eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--green-dark);
  margin-bottom: 14px;
}
.section-dark .eyebrow { color: var(--green); }

.section-lede { max-width: 620px; color: var(--gray); font-size: 1.05rem; margin-bottom: 48px; }
.section-lede a { color: var(--green-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.section-dark .section-lede { color: #9aa4ad; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); }

.nav-inner {
  max-width: 1180px; margin: 0 auto; height: 100%;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
  text-decoration: none;
}
.nav-diamond { width: 16px; height: 16px; fill: var(--green); transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.nav-brand:hover .nav-diamond { transform: rotate(180deg); }

.nav-links {
  display: flex; align-items: center; gap: 26px; list-style: none;
}
.nav-links a {
  text-decoration: none; font-size: 0.88rem; color: var(--gray);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); font-weight: 600; }

.nav-resume {
  border: 1.5px solid var(--ink); border-radius: 999px;
  padding: 6px 16px; color: var(--ink) !important; font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
.nav-resume:hover { background: var(--ink); color: #fff !important; }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; position: relative;
  padding: calc(var(--nav-h) + 40px) 24px 80px;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(109, 203, 78, 0.10), transparent 65%),
    var(--paper);
}
.hero-logo { width: 96px; height: 96px; margin-bottom: 28px; }
.hero .eyebrow { margin-bottom: 18px; }
.hero h1 {
  font-size: clamp(2.9rem, 9vw, 6rem);
  font-weight: 700;
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero-sub {
  margin-top: 22px; font-size: clamp(1.02rem, 2.2vw, 1.25rem);
  color: var(--gray); max-width: 640px;
  animation: rise 0.9s 0.12s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero-cta { margin-top: 38px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center;
  animation: rise 0.9s 0.24s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

.btn {
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  padding: 13px 28px; border-radius: 999px; text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(16, 20, 24, 0.22); }
.btn-ghost { border: 1.5px solid var(--line); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--green); transform: translateY(-2px); }

.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  width: 38px; height: 38px; color: var(--gray);
  animation: bob 2.2s ease-in-out infinite;
}
.scroll-hint svg { width: 100%; height: 100%; }

@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- Sections ---------- */
.section { padding: 120px 0; }
.section-dark { background: var(--deep); color: #f2f5f3; }
.section-tint { background: var(--mist); }

/* ---------- About ---------- */
.about-grid {
  display: grid; grid-template-columns: 340px 1fr; gap: 56px; align-items: start;
  margin-top: 24px;
}
.about-photo img {
  border-radius: var(--radius); aspect-ratio: 1 / 1; object-fit: cover;
  box-shadow: 24px 24px 0 -8px var(--mist), 24px 24px 0 -6px var(--green);
}
.about-adventure { margin-top: 72px; }
.about-adventure img { border-radius: var(--radius); width: 100%; aspect-ratio: 21 / 9; object-fit: cover; object-position: 50% 62%; }
.about-adventure figcaption { margin-top: 12px; font-size: 0.78rem; color: var(--gray); letter-spacing: 0.05em; }
.about-text p { margin-bottom: 1.2em; font-size: 1.05rem; }
.about-aspire {
  font-family: var(--font-display); font-weight: 600; font-size: 1.2rem !important;
  padding-left: 18px; border-left: 3px solid var(--green);
}

/* ---------- Skills (diamond ratings) ---------- */
.skills-list { list-style: none; max-width: 760px; }
.skill {
  display: grid; grid-template-columns: 1fr auto 2ch; align-items: center; gap: 20px;
  padding: 18px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.skill-name { font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; }
.skill-num { color: var(--green); font-size: 0.95rem; text-align: right; }

.skill-diamonds { display: flex; gap: 9px; }
.skill-diamonds i {
  width: 13px; height: 13px; transform: rotate(45deg) scale(0);
  background: rgba(255, 255, 255, 0.14);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s;
}
.skill-diamonds i.filled { background: var(--green); }
.skill.revealed .skill-diamonds i { transform: rotate(45deg) scale(1); }
.skill.revealed .skill-diamonds i:nth-child(1) { transition-delay: 0.05s; }
.skill.revealed .skill-diamonds i:nth-child(2) { transition-delay: 0.13s; }
.skill.revealed .skill-diamonds i:nth-child(3) { transition-delay: 0.21s; }
.skill.revealed .skill-diamonds i:nth-child(4) { transition-delay: 0.29s; }
.skill.revealed .skill-diamonds i:nth-child(5) { transition-delay: 0.37s; }

/* ---------- Journey timeline ---------- */
.timeline { list-style: none; margin-top: 40px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 44px; top: 12px; bottom: 12px;
  width: 2px; background: var(--line);
}
.tl-item {
  display: grid; grid-template-columns: 88px 1fr; gap: 32px;
  padding: 26px 0; position: relative;
}
.tl-logo {
  width: 88px; height: 88px; border-radius: 22px;
  background: #fff; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
  box-shadow: 0 6px 18px rgba(16, 20, 24, 0.06);
}
.tl-logo img { max-width: 62%; max-height: 62%; object-fit: contain; }
.tl-logo-glyph span { color: var(--green); font-size: 1.7rem; }
.tl-date { color: var(--green-dark); font-size: 0.82rem; letter-spacing: 0.04em; }
.tl-body h3 { font-size: 1.35rem; margin: 6px 0 2px; }
.tl-org { color: var(--gray); font-weight: 500; margin-bottom: 10px; }
.tl-body > p:last-child { max-width: 640px; }

/* ---------- Projects ---------- */
.proj-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
}
.proj-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  text-decoration: none; border: 1px solid var(--line);
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.28s;
  display: flex; flex-direction: column;
}
.proj-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(16, 20, 24, 0.12); }
.proj-card img { aspect-ratio: 4 / 3; object-fit: cover; }
.proj-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.proj-body h3 { font-size: 1.08rem; }
.proj-body p { font-size: 0.93rem; color: var(--gray); flex: 1; }
.proj-tools { font-size: 0.74rem; color: var(--green-dark); letter-spacing: 0.03em; }

/* ---------- Keynote ---------- */
.keynote {
  display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: center;
  margin-top: 16px;
}
.keynote img { border-radius: var(--radius); aspect-ratio: 1; object-fit: cover; }
.keynote-body h3 { font-size: 1.6rem; margin-bottom: 10px; }
.keynote-body p { color: var(--gray); font-size: 1.05rem; }

/* ---------- Testimonials ---------- */
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 16px; }
.quote {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius); padding: 30px 28px;
  display: flex; flex-direction: column; gap: 20px;
}
.quote p { font-size: 0.97rem; color: #d7dde1; }
.quote footer { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.quote footer strong { font-family: var(--font-display); }
.quote footer span { font-size: 0.85rem; color: #8b959e; }
.quote::before { content: "◆"; color: var(--green); font-size: 1.1rem; }

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.blog-card {
  border-radius: var(--radius); overflow: hidden; text-decoration: none;
  border: 1px solid var(--line); background: #fff;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.28s;
  display: flex; flex-direction: column;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(16, 20, 24, 0.12); }
.blog-card img { aspect-ratio: 16 / 9; object-fit: cover; }
.blog-body { padding: 20px 22px 24px; }
.blog-date { font-size: 0.74rem; color: var(--green-dark); letter-spacing: 0.04em; }
.blog-body h3 { font-size: 1.12rem; margin: 8px 0 6px; }
.blog-body p { font-size: 0.93rem; color: var(--gray); }

/* ---------- Contact ---------- */
.section-contact {
  background:
    radial-gradient(900px 420px at 50% 115%, rgba(109, 203, 78, 0.12), transparent 65%),
    var(--paper);
  text-align: center;
}
.contact-inner { display: flex; flex-direction: column; align-items: center; }
.contact-quip { max-width: 560px; color: var(--gray); font-size: 1.08rem; }
.contact-email {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.4rem, 4.6vw, 2.6rem);
  margin: 34px 0 40px; text-decoration: none;
  background-image: linear-gradient(var(--green), var(--green));
  background-repeat: no-repeat; background-position: 0 100%;
  background-size: 100% 4px;
  transition: background-size 0.3s, color 0.3s;
  padding-bottom: 6px;
}
.contact-email:hover { background-size: 100% 100%; }

.social { display: flex; gap: 18px; }
.social a {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.social a:hover { border-color: var(--green); transform: translateY(-3px); background: rgba(109, 203, 78, 0.08); }
.social svg { width: 20px; height: 20px; fill: var(--ink); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; font-size: 0.88rem; color: var(--gray); }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.revealed { opacity: 1; transform: none; }

/* ---------- Blog post pages ---------- */
.post-page { padding: calc(var(--nav-h) + 60px) 0 100px; }
.post-container { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.post-back { font-size: 0.9rem; text-decoration: none; color: var(--gray); }
.post-back:hover { color: var(--ink); }
.post-container h1 { font-size: clamp(2rem, 6vw, 3.2rem); margin: 22px 0 10px; }
.post-meta { color: var(--green-dark); font-size: 0.85rem; margin-bottom: 36px; display: block; }
.post-hero { border-radius: var(--radius); margin-bottom: 40px; }
.post-content p { margin-bottom: 1.3em; font-size: 1.08rem; }
.post-content h2 { font-size: 1.6rem; margin: 1.6em 0 0.6em; }
.post-placeholder {
  border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 34px; color: var(--gray); text-align: center; font-size: 0.95rem;
  margin: 30px 0;
}

.post-updated { font-style: normal; color: var(--gray); }
.post-fig { border-radius: var(--radius); margin: 28px 0; }

.post-table {
  width: 100%; border-collapse: collapse; margin: 28px 0;
  font-size: 0.95rem;
}
.post-table caption { text-align: left; font-size: 0.75rem; color: var(--gray); padding-bottom: 8px; letter-spacing: 0.04em; }
.post-table th, .post-table td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.post-table th { background: var(--mist); font-family: var(--font-display); font-weight: 600; font-size: 0.88rem; }
.post-table tbody tr:nth-child(even) { background: #fafbfa; }

.post-code {
  background: var(--deep); color: #d9e2dc;
  border-radius: 14px; padding: 20px 22px; margin: 26px 0;
  overflow-x: auto; font-size: 0.84rem; line-height: 1.6;
}
.post-code code { font-family: var(--font-mono); }
.post-content code {
  font-family: var(--font-mono); font-size: 0.88em;
  background: var(--mist); border-radius: 6px; padding: 2px 6px;
}
.post-code code { background: none; padding: 0; }

.formula {
  text-align: center; font-size: 1.02rem !important;
  background: var(--mist); border-radius: 12px; padding: 16px 20px;
  margin: 22px 0 !important;
}

.pullquote {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.45rem !important; line-height: 1.35;
  border-left: 4px solid var(--green); padding: 6px 0 6px 22px;
  margin: 34px 0 !important;
}

.post-content h3 { font-size: 1.25rem; margin: 1.5em 0 0.5em; }

.post-tags { color: var(--green-dark); font-size: 0.82rem !important; margin-top: 40px !important; }

/* ---------- Engagement + share bar ---------- */
.engage-bar {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 18px 0; margin-top: 44px;
}
.engage-stat {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--gray);
}
.engage-stat svg { width: 18px; height: 18px; fill: var(--gray); }
.share-label { margin-left: auto; font-size: 0.85rem; color: var(--gray); }
.share-row { display: flex; gap: 10px; }
.share-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.share-btn:hover { border-color: var(--green); transform: translateY(-2px); background: rgba(109, 203, 78, 0.08); }
.share-btn svg { width: 17px; height: 17px; fill: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .section { padding: 88px 0; }
  .proj-grid, .quote-grid, .blog-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-photo { max-width: 320px; }
  .keynote { grid-template-columns: 1fr; }
  .keynote img { max-width: 340px; }
}

@media (max-width: 640px) {
  .proj-grid, .quote-grid, .blog-grid { grid-template-columns: 1fr; }

  .nav-toggle {
    display: flex; flex-direction: column; gap: 6px;
    background: none; border: none; cursor: pointer; padding: 8px;
  }
  .nav-toggle span { width: 24px; height: 2px; background: var(--ink); transition: transform 0.3s, opacity 0.3s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: rgba(255, 255, 255, 0.97);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform 0.25s, opacity 0.25s;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 0; font-size: 1rem; }
  .nav-resume { display: inline-block; margin-top: 10px; }

  .tl-item { grid-template-columns: 64px 1fr; gap: 20px; }
  .tl-logo { width: 64px; height: 64px; border-radius: 16px; }
  .timeline::before { left: 32px; }
  .skill { grid-template-columns: 1fr; gap: 10px; }
  .skill-num { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .skill .skill-diamonds i { transform: rotate(45deg) scale(1); }
}

/* ---------- Comments (Giscus) ---------- */
.comments { margin-top: 56px; }
.comments-title { font-size: 1.5rem; margin-bottom: 18px; }
.comments-note { font-size: 0.78rem; color: var(--gray); margin-top: 14px; }
.keynote-btn { display: inline-block; margin-top: 18px; }
