/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --c-accent: #5aa4d6;
  --c-accent-dark: #3f87b8;
  --c-accent-light: #e9f2fa;
  --c-ink: #171b1f;
  --c-ink-soft: #565d64;
  --c-ink-faint: #8b939a;
  --c-bg: #f7f9fb;
  --c-bg-alt: #ffffff;
  --c-bg-dark: #171b1f;
  --c-line: rgba(23, 27, 31, 0.09);
  --c-line-strong: rgba(23, 27, 31, 0.16);

  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --container: 1120px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 16px;
  --radius-sm: 10px;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --shadow-card: 0 20px 50px -20px rgba(23, 27, 31, 0.18);
  --shadow-soft: 0 10px 28px -14px rgba(23, 27, 31, 0.14);
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }
img, picture, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--c-ink);
}

p { line-height: 1.7; color: var(--c-ink-soft); }
code { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; font-size: .9em; }

::selection { background: var(--c-accent); color: #fff; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: clamp(4rem, 8vw, 7rem); scroll-margin-top: 84px; }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--alt { background: var(--c-bg-alt); }
.section--dark { background: var(--c-bg-dark); color: #fff; }
.section--dark p { color: rgba(255,255,255,0.64); }
.section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .76rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-accent-dark);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 3px;
  background: var(--c-accent);
  border-radius: 2px;
}
.section--dark .eyebrow { color: var(--c-accent); }

.section-head { max-width: 620px; margin-bottom: clamp(2.2rem, 5vw, 3.2rem); }
.section-title { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.section-lede { margin-top: .9rem; font-size: 1.02rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .9rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s, color .3s, border-color .3s;
  white-space: nowrap;
}
.btn--primary { background: var(--c-accent-dark); color: #fff; box-shadow: 0 14px 26px -10px rgba(63, 135, 184, 0.55); }
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 18px 32px -12px rgba(63, 135, 184, 0.6); }
.btn--ghost { background: transparent; color: var(--c-ink); border: 1.5px solid var(--c-line-strong); }
.btn--ghost:hover { border-color: var(--c-accent-dark); color: var(--c-accent-dark); transform: translateY(-3px); }
.section--dark .btn--ghost,
.hero .btn--ghost { border-color: rgba(255,255,255,0.25); color: #fff; }
.section--dark .btn--ghost:hover,
.hero .btn--ghost:hover { border-color: var(--c-accent); color: var(--c-accent); }

.js .reveal { opacity: 0; transform: translateY(26px); }
.js .reveal-left { opacity: 0; transform: translateX(-30px); }
.js .reveal-right { opacity: 0; transform: translateX(30px); }

/* ============================================================
   NAV
   ============================================================ */
.site-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding-block: 1.1rem;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), padding .3s var(--ease);
}
.site-nav .container { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.site-nav { background: rgba(247,249,251,0.92); backdrop-filter: blur(10px); box-shadow: var(--shadow-soft); }
.site-nav.is-scrolled { padding-block: .8rem; }

.brand { display: flex; align-items: center; gap: .7rem; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--c-ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: .95rem;
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1rem; display: flex; flex-direction: column; line-height: 1.2; }
.brand-name small { font-weight: 600; font-size: .64rem; letter-spacing: .1em; color: var(--c-accent-dark); }

.nav-links { display: flex; align-items: center; gap: 1.8rem; font-size: .92rem; font-weight: 600; }
.nav-links a { color: var(--c-ink-soft); transition: color .25s; }
.nav-links a:hover { color: var(--c-ink); }

.nav-cta { display: flex; align-items: center; gap: .8rem; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span { width: 20px; height: 2px; background: var(--c-ink); border-radius: 2px; }

@media (max-width: 860px) {
  .nav-links { position: fixed; inset: 64px 0 auto 0; background: var(--c-bg-alt); flex-direction: column; align-items: flex-start; padding: 1.5rem var(--gutter) 2rem; gap: 1.1rem; box-shadow: var(--shadow-card); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
  .nav-links.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-toggle { display: flex; }
  .nav-cta .btn--ghost { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding-top: clamp(7rem, 14vw, 10rem);
  padding-bottom: clamp(4rem, 8vw, 6rem);
  overflow: hidden;
  background: var(--c-bg-dark);
  color: #fff;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.hero .container { position: relative; z-index: 2; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero-kicker { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 700; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--c-accent); margin-bottom: 1.4rem; }
.hero-kicker::before { content: ''; width: 22px; height: 3px; background: var(--c-accent); border-radius: 2px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); color: #fff; }
.hero h1 span { color: var(--c-accent); }
.hero-lede { margin-top: 1.3rem; font-size: 1.08rem; max-width: 46ch; color: rgba(255,255,255,0.68); }
.hero-actions { margin-top: 2.2rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-meta { margin-top: 2.6rem; display: flex; gap: 1.8rem; flex-wrap: wrap; }
.hero-meta div { font-size: .84rem; color: rgba(255,255,255,0.55); }
.hero-meta strong { display: block; font-family: var(--font-display); font-size: 1.5rem; color: #fff; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-canvas { opacity: .5; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3rem; align-items: start; }
.about-card {
  background: var(--c-bg-alt); border-radius: var(--radius); padding: 1.8rem;
  border: 1px solid var(--c-line); box-shadow: var(--shadow-soft);
}
.about-card h3 { font-size: 1rem; margin-bottom: .8rem; }
.stat-row { display: flex; justify-content: space-between; padding-block: .55rem; border-bottom: 1px solid var(--c-line); font-size: .9rem; }
.stat-row:last-child { border-bottom: none; }
.stat-row span:first-child { color: var(--c-ink-soft); }
.stat-row span:last-child { font-weight: 700; }

@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* ============================================================
   EXPERIENCE (timeline)
   ============================================================ */
.timeline { position: relative; padding-left: 2.2rem; border-left: 2px solid var(--c-line-strong); display: flex; flex-direction: column; gap: 2.6rem; }
.timeline-item { position: relative; }
.timeline-item::before {
  content: ''; position: absolute; left: calc(-2.2rem - 6px); top: .3rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--c-accent-dark); border: 3px solid var(--c-bg);
  box-shadow: 0 0 0 2px var(--c-accent-dark);
}
.timeline-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .3rem; }
.timeline-company { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: var(--c-accent-dark); }
.timeline-dates { font-size: .82rem; font-weight: 600; color: var(--c-ink-faint); white-space: nowrap; }
.timeline-role { font-weight: 700; margin-bottom: .9rem; }
.timeline-role .loc { font-weight: 500; color: var(--c-ink-faint); }
.timeline-list { display: flex; flex-direction: column; gap: .55rem; }
.timeline-list li { position: relative; padding-left: 1.1rem; font-size: .95rem; color: var(--c-ink-soft); line-height: 1.6; }
.timeline-list li::before { content: '–'; position: absolute; left: 0; color: var(--c-accent-dark); font-weight: 700; }
.timeline-list li b { color: var(--c-ink); }

/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; }
.skill-card { background: var(--c-bg-alt); border: 1px solid var(--c-line); border-radius: var(--radius-sm); padding: 1.4rem 1.5rem; }
.skill-card h4 { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--c-accent-dark); margin-bottom: .8rem; }
.skill-card ul { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.skill-card li { position: relative; padding-left: 1rem; font-size: .92rem; color: var(--c-ink-soft); font-weight: 600; }
.skill-card li::before { content: '–'; position: absolute; left: 0; color: var(--c-accent-dark); font-weight: 700; }

/* ============================================================
   EDUCATION
   ============================================================ */
.edu-card { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; background: var(--c-bg-alt); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1.6rem 1.9rem; box-shadow: var(--shadow-soft); }
.edu-card h3 { font-size: 1.1rem; }
.edu-card p { margin-top: .3rem; font-size: .92rem; }
.edu-card .date { font-family: var(--font-display); font-weight: 700; color: var(--c-accent-dark); font-size: .9rem; }

/* ============================================================
   BLOG
   ============================================================ */
.post-grid { display: flex; flex-direction: column; gap: 1.1rem; }
.post-card {
  display: flex; align-items: stretch;
  background: var(--c-bg-alt); border: 1px solid var(--c-line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-soft);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.post-card-cover { width: 180px; flex-shrink: 0; }
.post-card-body { flex: 1; padding: 1.4rem 1.7rem; display: flex; flex-direction: column; justify-content: center; }
.post-card-date { font-size: .76rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--c-accent-dark); }
.post-card h3 { margin-top: .4rem; font-size: 1.12rem; }
.post-card p { margin-top: .45rem; font-size: .92rem; }
.post-card-tags { margin-top: .9rem; display: flex; gap: .4rem; flex-wrap: wrap; }
.post-card-tags span { font-size: .72rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; background: var(--c-accent-light); color: var(--c-accent-dark); }

@media (max-width: 640px) {
  .post-card { flex-direction: column; }
  .post-card-cover { width: 100%; height: 90px; }
}

.post-container { max-width: 760px; margin-inline: auto; }
.post-container h2 { margin-top: 2.4rem; margin-bottom: 1rem; font-size: 1.5rem; }
.post-container h3 { margin-top: 1.8rem; margin-bottom: .8rem; font-size: 1.15rem; }
.post-container p { margin-bottom: 1rem; }
.post-container ul, .post-container ol { margin: 0 0 1rem 1.3rem; }
.post-container li { margin-bottom: .4rem; color: var(--c-ink-soft); line-height: 1.65; }
.post-container li > ul, .post-container li > ol { margin-top: .4rem; }
.post-container hr { border: none; border-top: 1px solid var(--c-line); margin: 2rem 0; }
.post-container code { background: var(--c-accent-light); color: var(--c-accent-dark); padding: .12em .4em; border-radius: 4px; }
.post-container pre { background: var(--c-ink); color: #e8ecef; padding: 1rem 1.2rem; border-radius: var(--radius-sm); overflow-x: auto; margin-bottom: 1.2rem; }
.post-container pre code { background: none; color: inherit; padding: 0; }
.post-header { background: var(--c-bg-dark); color: #fff; padding: clamp(6.5rem, 12vw, 8.5rem) 0 3rem; }
.post-header .eyebrow { color: var(--c-accent); }
.post-header h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: #fff; margin-top: .6rem; }
.post-header .post-date { margin-top: .8rem; font-size: .85rem; color: rgba(255,255,255,0.55); }
.post-header .back-link { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600; color: var(--c-accent); margin-bottom: 1.4rem; }

/* ============================================================
   CONTACT / FOOTER
   ============================================================ */
.contact-grid { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.contact-links { display: flex; gap: .9rem; flex-wrap: wrap; }
.site-footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.12); font-size: .82rem; color: rgba(255,255,255,0.5); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; }

@media (max-width: 780px) {
  .section { padding-block: clamp(3rem, 10vw, 4.5rem); }
  .timeline { padding-left: 1.6rem; }
  .timeline-item::before { left: calc(-1.6rem - 6px); }
}
