/* Reset and Base */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root{
  --primary-color: #3b82f6;
  --secondary-color: #8b5cf6;

  --text-dark: #111827;
  --text-light: #6b7280;

  --bg-white: #ffffff;
  --bg-light: #f9fafb;

  --border-color: #e5e7eb;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 6px 18px rgba(0,0,0,0.08);
  --shadow-lg: 0 14px 30px rgba(0,0,0,0.12);

  --radius: 14px;
}

html{ scroll-behavior: smooth; }
body{
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-white);
}

.container{ max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Accessibility */
.skip-link{
  position: absolute;
  left: -999px;
  top: 10px;
  padding: 10px 14px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  z-index: 9999;
}
.skip-link:focus{ left: 10px; }

/* Buttons */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 650;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  border: 1px solid transparent;
}
.btn-sm{ padding: 0.6rem 0.9rem; border-radius: 10px; font-weight: 600; }
.btn-primary{ background: var(--primary-color); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover{ transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary{
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.9);
}
.btn-secondary:hover{
  background: rgba(255,255,255,0.95);
  color: var(--primary-color);
}
.btn-ghost{
  background: transparent;
  color: var(--text-dark);
  border-color: var(--border-color);
}
.btn-ghost:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(59,130,246,0.35);
}

/* Navigation */
.navbar{
  position: fixed;
  inset: 0 0 auto 0;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(229,231,235,0.7);
  z-index: 1000;
}
.nav-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1.2rem;
}
.brand{
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text-dark);
}
.brand-mark{
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}
.brand-logo{
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}
.brand-text{ display: flex; flex-direction: column; line-height: 1.1; }
.brand-name{ font-weight: 780; color: var(--text-dark); }
.brand-tagline{ font-size: 0.85rem; color: var(--text-light); margin-top: 3px; }

.nav-links{
  list-style: none;
  display: flex;
  gap: 1.2rem;
  align-items: center;
}
.nav-links a{
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background .18s ease, color .18s ease;
}
.nav-links a:hover{ color: var(--primary-color); background: rgba(59,130,246,0.08); }
.active-link{ color: var(--primary-color) !important; background: rgba(59,130,246,0.08); }

.nav-controls{
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.theme-toggle{
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, color .18s ease;
}
.theme-toggle:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(59,130,246,0.35);
  color: var(--primary-color);
}

.hamburger{ display: none; flex-direction: column; gap: 4px; cursor: pointer; }
.hamburger span{
  width: 25px; height: 3px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all .2s ease;
}

/* Sections */
.section{ padding: 90px 0; }
.section-head{ text-align: center; max-width: 860px; margin: 0 auto 42px; }
.section-title{ font-size: 2.4rem; letter-spacing: -0.02em; font-weight: 820; margin-bottom: 10px; }
.section-lede{ color: var(--text-light); font-size: 1.08rem; }

.muted{ color: var(--text-light); }
.center{ text-align: center; margin-top: 26px; }

/* Hero */
.hero{
  padding: 130px 0 70px;
  margin-top: 64px;
  background:
    radial-gradient(1000px 600px at 10% -10%, rgba(59,130,246,0.35), transparent 60%),
    radial-gradient(900px 540px at 100% 0%, rgba(139,92,246,0.28), transparent 55%),
    linear-gradient(135deg, #111827 0%, #0b1220 45%, #0b1220 100%);
  color: #fff;
}
.hero-grid{
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 2rem;
  align-items: center;
}
.hero-eyebrow{
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  margin-bottom: 14px;
}
.hero-title{
  font-size: 3rem;
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.hero-subtitle{
  font-size: 1.15rem;
  color: rgba(255,255,255,0.86);
  max-width: 660px;
}
.highlight{ color: #fbbf24; }
.hero-cta{ display: flex; gap: 1rem; margin-top: 22px; flex-wrap: wrap; }
.hero-social{
  display: flex;
  gap: 1.1rem;
  margin-top: 26px;
  flex-wrap: wrap;
}
.hero-social a{
  color: rgba(255,255,255,0.92);
  font-size: 1.5rem;
  transition: transform .18s ease, color .18s ease;
}
.hero-social a:hover{ transform: translateY(-2px); color: #fbbf24; }

/* Hero Panel */
.hero-panel .panel-card{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.22);
}
.panel-kicker{
  font-size: 0.9rem;
  color: rgba(255,255,255,0.82);
  margin-bottom: 10px;
}
.panel-title{
  font-size: 1.4rem;
  line-height: 1.25;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.panel-text{
  color: rgba(255,255,255,0.82);
  margin-bottom: 14px;
}
.panel-metrics{ display: grid; gap: 10px; margin-top: 14px; }
.metric{
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
}
.metric-icon{
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.06);
}
.metric-title{ font-weight: 800; }
.metric-sub{ color: rgba(255,255,255,0.8); font-size: 0.92rem; }
.panel-actions{ display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.panel-actions .btn-ghost{ color: #fff; border-color: rgba(255,255,255,0.16); }
.panel-actions .btn-ghost:hover{ border-color: rgba(255,255,255,0.28); }

/* About grid and cards */
.about{ background: var(--bg-light); }
.about-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 28px; }

.card{
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}
.card-title{
  font-size: 1.15rem;
  font-weight: 820;
  margin-bottom: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.card-title i{ color: var(--primary-color); }
.clean-list{
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 10px 0 6px;
}
.clean-list li{
  padding-left: 18px;
  position: relative;
}
.clean-list li::before{
  content: '';
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--primary-color);
  position: absolute;
  left: 0;
  top: 0.55rem;
}
.pill-row{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pill{
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.18);
  color: var(--text-dark);
  font-weight: 650;
  font-size: 0.9rem;
}
.cta-row{ display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

/* Focus cards */
.focus-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 26px;
}
.focus-card{
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: var(--bg-white);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.focus-card:hover{ transform: translateY(-3px); box-shadow: var(--shadow-md); }
.focus-icon{
  width: 56px; height: 56px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  margin-bottom: 14px;
  font-size: 1.4rem;
}
.mini-list{ margin-top: 10px; padding-left: 18px; color: var(--text-light); }
.mini-list li{ margin: 6px 0; }

/* Callout */
.callout{ margin-top: 22px; }
.callout-inner{
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(139,92,246,0.06));
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
}
.callout-title{ font-weight: 850; display: inline-flex; gap: 10px; align-items: center; }
.callout-title i{ color: var(--primary-color); }

/* Publications */
.publications{ background: var(--bg-light); }
.pubs{ display: grid; gap: 14px; margin-top: 26px; }
.pub{
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: var(--bg-white);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.pub:hover{ transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pub-title{ font-weight: 860; margin-bottom: 4px; }
.pub-meta{ color: var(--text-light); font-size: 0.95rem; }
.pub-tags{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* Service */
.service-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 26px;
}
.note{
  margin-top: 22px;
  border-radius: var(--radius);
  padding: 18px 20px;
  border: 1px solid var(--border-color);
  background: rgba(59,130,246,0.06);
}
.note-title{ font-weight: 850; display: inline-flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.note-title i{ color: var(--primary-color); }

/* Projects */
.projects{ background: var(--bg-light); }
.projects-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 26px;
}
.project-card{
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.project-card:hover{ transform: translateY(-3px); box-shadow: var(--shadow-md); }
.project-icon{
  width: 58px; height: 58px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 12px;
}
.project-tech{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tech-tag{
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.16);
  color: var(--primary-color);
  font-weight: 700;
  font-size: 0.88rem;
}
.project-links{ margin-top: 14px; }
.project-link{
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 700;
}
.project-link:hover{ color: var(--secondary-color); }

/* Writing */
.writing-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 26px;
}
.post-card .post-meta{ color: var(--text-light); font-size: 0.92rem; margin: 6px 0 10px; }
.post-card a{ text-decoration: none; font-weight: 800; color: var(--primary-color); }
.post-card a:hover{ color: var(--secondary-color); }

/* Podcasts */
.podcasts{ background: var(--bg-light); }
.podcasts-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 26px;
}
.podcast-card{
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.podcast-card:hover{ transform: translateY(-3px); box-shadow: var(--shadow-md); }
.podcast-thumbnail{
  height: 180px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(240,147,251,0.95), rgba(245,87,108,0.95));
}
.podcast-thumbnail i{ font-size: 4rem; color: rgba(255,255,255,0.92); }
.podcast-content{ padding: 18px 20px; }
.podcast-date{ color: var(--text-light); margin: 6px 0 10px; }
.podcast-link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 850;
  color: var(--primary-color);
}
.podcast-link:hover{ color: var(--secondary-color); }
.podcast-cta{ text-align: center; margin-top: 22px; }

/* Contact */
.contact-content{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 26px;
}
.contact-item{ display: grid; grid-template-columns: 34px 1fr; gap: 12px; margin-bottom: 16px; }
.contact-item i{ color: var(--primary-color); font-size: 1.3rem; margin-top: 3px; }
.contact-item a{ color: var(--text-dark); text-decoration: none; }
.contact-item a:hover{ color: var(--primary-color); }
.contact-form{ display: grid; gap: 12px; }
.form-group input, .form-group textarea{
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-white);
  color: var(--text-dark);
  font-size: 1rem;
}
.form-group input:focus, .form-group textarea:focus{
  outline: none;
  border-color: rgba(59,130,246,0.55);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.14);
}
.form-note{ margin-top: 4px; font-size: 0.95rem; }

/* Footer */
.footer{
  background: #0b1220;
  color: #fff;
  padding: 44px 0 18px;
}
.footer-content{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 18px;
}
.footer-section h3{ color: #93c5fd; margin-bottom: 8px; }
.footer-section h4{ margin-bottom: 8px; }
.footer-section p, .footer-section a{ color: rgba(255,255,255,0.72); }
.footer-section a{ text-decoration: none; }
.footer-section a:hover{ color: #fff; }
.footer-section ul{ list-style: none; display: grid; gap: 8px; }
.footer-social{ display: flex; gap: 14px; margin-top: 10px; }
.footer-social a{ font-size: 1.5rem; }
.footer-bottom{
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 14px;
  text-align: center;
  color: rgba(255,255,255,0.7);
}

/* Scroll to top */
.scroll-to-top{
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(229,231,235,0.25);
  background: rgba(17,24,39,0.92);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  z-index: 999;
}
.scroll-to-top.visible{ opacity: 1; visibility: visible; }
.scroll-to-top:hover{ transform: translateY(-2px); }

/* Notification */
.notification{
  position: fixed;
  top: 90px;
  right: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #111827;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 36px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateX(260px);
  transition: all .18s ease;
  z-index: 1002;
}
.notification.show{ opacity: 1; transform: translateX(0); }

/* Dark Mode via variables */
body.dark-mode{
  --text-dark: #e5e7eb;
  --text-light: #9ca3af;

  --bg-white: #0b1220;
  --bg-light: #0f172a;

  --border-color: #1f2a44;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.35);
  --shadow-md: 0 6px 18px rgba(0,0,0,0.45);
  --shadow-lg: 0 14px 30px rgba(0,0,0,0.6);
}
body.dark-mode .navbar{
  background: rgba(11,18,32,0.72);
  border-bottom-color: rgba(31,42,68,0.7);
}
body.dark-mode .brand-mark{
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}
body.dark-mode .brand-logo{
  filter: brightness(0) invert(1);
}
body.dark-mode .btn-ghost{ color: var(--text-dark); }
body.dark-mode .pill{ background: rgba(59,130,246,0.12); border-color: rgba(59,130,246,0.22); }
body.dark-mode .tech-tag{ background: rgba(59,130,246,0.12); border-color: rgba(59,130,246,0.22); }

/* Responsive */
@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
  .about-grid{ grid-template-columns: 1fr; }
  .focus-grid{ grid-template-columns: 1fr; }
  .service-grid{ grid-template-columns: 1fr; }
  .writing-grid{ grid-template-columns: 1fr; }
  .contact-content{ grid-template-columns: 1fr; }
  .callout-inner{ grid-template-columns: 1fr; }
}
@media (max-width: 860px){
  .nav-links{
    position: fixed;
    left: -100%;
    top: 72px;
    width: 100%;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    gap: 0.4rem;
    padding: 1rem 0.75rem;
    transition: left .2s ease;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.active{ left: 0; }
  .hamburger{ display: flex; }
  .hero-title{ font-size: 2.35rem; }
}
@media (max-width: 480px){
  .hero{ padding: 120px 0 60px; }
  .hero-title{ font-size: 2rem; }
}
