/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:          #ffffff;
  --bg-alt:      #f8fafc;
  --surface:     #f1f5f9;
  --border:      #e2e8f0;
  --accent:      #2563eb;
  --accent-dim:  #1d4ed8;
  --text:        #0f172a;
  --text-muted:  #64748b;
  --text-faint:  #94a3b8;

  --font-sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;

  --max-w: 1100px;
  --nav-h: 64px;
  --radius: 10px;
  --transition: 200ms ease;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

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

ul { list-style: none; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 90%;
  max-width: var(--max-w);
  margin-inline: auto;
}

.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-alt);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.65em 1.4em;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition), color var(--transition),
              transform var(--transition), box-shadow var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 90%;
  max-width: var(--max-w);
  margin-inline: auto;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: color var(--transition);
}

.nav-logo:hover { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--text); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--nav-h) 1rem 80px;
  position: relative;
  background:
    linear-gradient(to bottom, rgba(10, 20, 40, 0.55) 0%, rgba(10, 20, 40, 0.7) 100%),
    url('Copilot_20260227_113151.png') center / cover no-repeat;
}

.hero-eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.5rem;
}

.hero-name {
  font-size: clamp(3.5rem, 12vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(135deg, #ffffff 30%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255, 255, 255, 0.7);
  max-width: 480px;
  margin: 0 auto 2.5rem;
}

.hero-cta {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero .btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}

.hero .btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.7);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.2rem;
  animation: bob 2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  align-items: start;
}

.headshot {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 50%;
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.skill-tag {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3em 0.75em;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent);
  border: 1px solid rgba(37, 99, 235, 0.2);
  letter-spacing: 0.02em;
}

/* ============================================================
   EXPERIENCE / TIMELINE
   ============================================================ */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 1.5rem;
  border-left: 1px solid var(--border);
  margin-top: 0.5rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
  padding: 2rem 0 2rem 2rem;
  position: relative;
  transition: background var(--transition);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1.5rem - 5px);
  top: 2.4rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-alt);
  box-shadow: 0 0 0 1px var(--accent);
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--text-faint);
  font-weight: 500;
  padding-top: 0.2rem;
  white-space: nowrap;
}

.timeline-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.timeline-role {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.timeline-company {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
}

.timeline-desc {
  color: var(--text-muted);
  font-size: 0.925rem;
  margin-bottom: 0.75rem;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.74rem;
  font-weight: 500;
  padding: 0.25em 0.6em;
  border-radius: 4px;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ============================================================
   WRITING
   ============================================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.post-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: border-color var(--transition), transform var(--transition),
              box-shadow var(--transition);
}

.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.1);
}

.post-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.76rem;
  color: var(--text-faint);
}

.post-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.post-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  flex: 1;
  line-height: 1.6;
}

.post-link {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--accent);
  transition: letter-spacing var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  margin-top: auto;
}

.post-link:hover {
  letter-spacing: 0.02em;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-container {
  max-width: 640px;
}

.contact-sub {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.65em 0.9em;
  font-size: 0.925rem;
  font-family: inherit;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-faint);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.contact-form .btn {
  align-self: flex-start;
  margin-top: 0.5rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.contact-link:hover { color: var(--accent); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.825rem;
  color: var(--text-faint);
}

.footer-top {
  color: var(--text-faint);
  transition: color var(--transition);
}

.footer-top:hover { color: var(--text); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .section { padding: 72px 0; }

  /* Nav */
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    gap: 1.25rem;
  }

  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1rem; color: var(--text); }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .headshot {
    width: 140px;
    height: 140px;
  }

  /* Timeline */
  .timeline { padding-left: 0; border-left: none; }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding: 1.5rem 0;
    padding-left: 0;
    border-bottom: 1px solid var(--border);
  }

  .timeline-item::before { display: none; }

  /* Form */
  .form-row { grid-template-columns: 1fr; }

  /* Footer */
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero-name { font-size: clamp(3rem, 18vw, 5rem); }
  .posts-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   NAV ACTIVE STATE
   ============================================================ */
.nav-active {
  color: var(--text) !important;
  font-weight: 600;
}

/* ============================================================
   PAGE HEADER (writing page etc.)
   ============================================================ */
.page-header {
  padding: calc(var(--nav-h) + 60px) 0 60px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(37, 99, 235, 0.07) 0%, transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}

.page-header-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin-top: -0.5rem;
}

/* ============================================================
   BLOG POST LIST
   ============================================================ */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.post-row:first-child {
  border-top: 1px solid var(--border);
}

.post-row-meta {
  padding-top: 0.25rem;
}

.post-row-meta .post-date {
  font-size: 0.8rem;
  color: var(--text-faint);
  font-weight: 500;
  white-space: nowrap;
}

.post-row-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.4rem;
  transition: color var(--transition);
}

.post-row-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.post-row-link {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  transition: letter-spacing var(--transition);
}

.post-row-link:hover {
  letter-spacing: 0.02em;
}

a.post-row:hover .post-row-title {
  color: var(--accent);
}

.post-row-coming {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .post-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}

/* ============================================================
   BLOG POST PAGE
   ============================================================ */
.post-page {
  padding-top: var(--nav-h);
  padding-bottom: 80px;
}

.post-container {
  max-width: 680px;
}

.post-back {
  display: inline-block;
  margin: 2.5rem 0 2rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.post-back:hover { color: var(--accent); }

.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.post-page-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1rem;
}

.post-byline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.post-byline-sep {
  color: var(--text-faint);
}

.post-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.post-body p {
  margin-bottom: 1.5rem;
}

.post-body p:last-child {
  margin-bottom: 0;
}

.post-lead {
  font-size: 1.15rem;
  color: var(--text);
  font-style: italic;
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin-bottom: 2rem;
}

.post-body h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 2rem 0 0.75rem;
}

.post-inline-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity var(--transition);
}

.post-inline-link:hover {
  opacity: 0.75;
}

.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
