:root {
  /* Light mode */
  --bg: #ffffff;
  --panel: #f3f4f6;
  --card-bg: #f3f4f6;
  --card-bg-hover: #eef2f7;
  --muted: #eef1f5;
  --text: #0b0f19;
  --text-strong: #0b0f19;
  --text-secondary: #111827;
  --text-muted: #1f2937;
  --disabled-text: #6b7280;
  --disabled-bg: #e5e7eb;
  --subtle: #111827;
  --accent: #1a73e8;
  --accent-2: #8b5cf6;
  --border: rgba(0, 0, 0, 0.08);
  --card-border: #d1d5db;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --nav-bg: rgba(255, 255, 255, 0.95);
  --nav-border: rgba(0, 0, 0, 0.12);
  --button-bg: #0b0f19;
  --button-text: #ffffff;
  --button-hover: #111827;
  --radius: 16px;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Sora', 'Inter', system-ui, sans-serif;
}

[data-theme="dark"] {
  --bg: #050505;
  --panel: #121216;
  --card-bg: #16171c;
  --card-bg-hover: #1d1f25;
  --muted: #0f172a;
  --text: #f8fafc;
  --text-strong: #f8fafc;
  --text-secondary: #e5e7eb;
  --text-muted: #d1d5db;
  --disabled-text: #6b7280;
  --disabled-bg: #1f2937;
  --subtle: var(--text-secondary);
  --accent: #63a6ff;
  --accent-2: #a78bfa;
  --border: rgba(255, 255, 255, 0.12);
  --card-border: rgba(255, 255, 255, 0.16);
  --nav-bg: rgba(24, 24, 28, 0.95);
  --nav-border: rgba(255, 255, 255, 0.16);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --button-bg: #f8fafc;
  --button-text: #0b0f19;
  --button-hover: #e5e7eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
}

.page-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin-bottom: 24px;
  border: 1px solid var(--nav-border);
  border-radius: 999px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #0ea5e9);

  .btn-primary:disabled {
    background-color: var(--disabled-bg);
    border-color: var(--disabled-bg);
    color: var(--disabled-text);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
  }

  color: #fff;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.5px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {

  .btn-outline:disabled {
    color: var(--disabled-text);
    border-color: var(--disabled-bg);
    background: transparent;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
  }

  font-weight: 700;
  font-family: var(--font-display);
}

.brand-role {
  font-size: 13px;
  color: var(--subtle);
}

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.glass-nav {
  background: var(--nav-bg);
  border: 1px solid var(--nav-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-pill {
  max-width: fit-content;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 10px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav a:hover,
.nav a.active {
  background: var(--muted);
  color: var(--accent);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 18px;
}

.nav-scroll {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.nav-scroll::-webkit-scrollbar {
  display: none;
}

.nav-scroll a {
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav-scroll a.active {
  background: var(--muted);
  color: var(--accent);
  box-shadow: var(--shadow);
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.mask-gradient {
  -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
  mask-image: linear-gradient(to right, black 85%, transparent 100%);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  background: var(--muted);
}

.hero {
  padding: 120px 0 28px;
  margin-top: 0;
}

.hero-title {
  letter-spacing: -0.02em;
}

.hero-subtitle {
  color: var(--subtle);
}

.hero-badge {
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
}

.glass-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.1);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  align-items: center;
  margin-top: 22px;
}

.hero-copy h1 {
  font-size: clamp(36px, 5vw, 52px);
  margin: 8px 0 12px;
  font-family: var(--font-display);
}

.accent {
  color: var(--accent);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--subtle);
  font-weight: 700;
}

.lede {
  font-size: 18px;
  margin: 0 0 10px;
  color: #0b0f19;
  font-weight: 600;
}

.body {
  margin: 0 0 14px;
  color: #1f2937;
  font-weight: 500;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.button.primary {
  background: var(--button-bg);
  color: var(--button-text);
  border-color: var(--button-bg);
  box-shadow: var(--shadow);
}

.button.ghost {
  background: transparent;
  border-color: var(--text);
  color: var(--text);
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary:hover {
  background: var(--button-hover);
  border-color: var(--button-hover);
}

.button.ghost:hover {
  background: var(--panel);
}

.btn-primary {
  background-color: var(--button-bg);
  color: var(--button-text);
  border: 1px solid var(--button-bg);
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background-color: var(--button-hover);
  border-color: var(--button-hover);
  transform: translateY(-1px);
}

.btn-primary {
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-strong);
  border: 2px solid var(--text);
  transition: all 0.2s ease;
}

.btn-outline:hover {
  background-color: var(--card-bg);
  transform: translateY(-1px);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-outline {
  font-weight: 600;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  color: var(--subtle);
}

.meta a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.floating-card {
  width: 100%;
  max-width: 340px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.avatar-block {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.hero-illustration {
  width: 100%;
  max-width: 380px;
  border-radius: 24px;
  padding: 18px;
  border: 1px solid var(--card-border);
  box-shadow: 0 12px 50px rgba(15, 23, 42, 0.08);
  display: block;
  visibility: visible;
  opacity: 1 !important;
  animation: fadeIn 0.8s ease-in forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-illustration-frame {
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: radial-gradient(circle at 20% 20%, rgba(26, 115, 232, 0.08), transparent 50%),
    radial-gradient(circle at 80% 0%, rgba(139, 92, 246, 0.07), transparent 45%),
    var(--card-bg);
  border: 1px solid var(--card-border);
}

.hero-illustration-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-illustration-meta {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.avatar {
  width: 86px;
  height: 86px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0ea5e9, var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-display);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  border-radius: 12px;
  background: var(--muted);
  border: 1px solid var(--border);
}

.stat-label {
  color: var(--subtle);
  font-size: 13px;
  font-weight: 600;
}

.stat-value {
  font-weight: 700;
}

.accent-chip {
  background: rgba(13, 148, 136, 0.08);
  color: var(--accent);
  border: 1px dashed rgba(13, 148, 136, 0.4);
  border-radius: 12px;
  padding: 12px;
  font-weight: 700;
}

.section {
  padding: 42px 0;
}

.section-head h2 {
  margin: 6px 0 8px;
  font-size: 30px;
  font-family: var(--font-display);
}

.cards {
  display: grid;
  gap: 16px;
}

.cards.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.cards.three {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.chip {
  display: inline-flex;
  padding: 6px 12px;
  background: var(--muted);
  color: var(--accent);
  font-weight: 700;
  border-radius: 999px;
  font-size: 13px;
}

.pill-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.pill-list li {
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--muted);
  font-weight: 600;
  color: var(--text);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 10px;
}

.skills-grid h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
}

.pill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-cloud span {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.timeline {
  display: grid;
  gap: 16px;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-dot {
  position: absolute;
  left: -29px;
  top: 6px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 999px;
}

.timeline-item {
  padding: 14px 14px 14px 32px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 18px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border: 2px solid #fff;
  border-radius: 50%;
}

.time {
  color: var(--subtle);
  font-weight: 700;
  margin-bottom: 6px;
}

.muted {
  background: linear-gradient(180deg, rgba(238, 241, 245, 0.65), transparent);
  border-radius: 20px;
  padding: 32px 20px;
  margin: 10px -20px;
}

.contact-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  max-width: 640px;
}

.contact-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 10px;
}

.contact-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.label {
  color: var(--subtle);
  font-weight: 700;
  min-width: 100px;
}

.contact-card a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.footer {
  text-align: center;
  color: var(--subtle);
  font-size: 14px;
  padding-top: 30px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--text);
  font-weight: 600;
}

.badge {
  color: var(--subtle);
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

/* Enhanced Link Styles */
.hero-links a,
footer a {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  padding-bottom: 2px;
}

.hero-links a:hover,
footer a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Better text contrast for muted text */
.text-\[var\(--text-muted\)\] {
  color: var(--text-muted) !important;
  opacity: 1;
}

.text-secondary {
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-muted);
}

.hero-copy {
  color: #0b0f19;
  font-weight: 600;
  opacity: 1 !important;
  line-height: 1.7;
}

.hero-meta {
  color: #111827;
  font-weight: 600;
  opacity: 1 !important;
}

.prose.prose-lg {
  color: var(--text-secondary);
}

.hero-title,
.hero-subtitle {
  color: var(--text-strong);
}

.hero-links a,
.hero-links a:hover,
nav a,
nav a:hover,
footer a,
footer a:hover {
  color: var(--text-strong);
  border-bottom-color: transparent;
}

.hero-links a:hover,
nav a:hover,
footer a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Ensure nav links have sufficient contrast */
nav a {
  color: var(--text);
  font-weight: 500;
}

nav a.active,
nav a:hover {
  color: var(--accent);
}

.animate-fade-in-up {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-img-reveal {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-img-reveal.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Ensure all hero elements are fully visible */
.hero-copy,
.hero-meta,
.hero-cta,
.hero-links {
  opacity: 1 !important;
}

@media (max-width: 780px) {
  .site-header {
    border-radius: 16px;
  }

  .nav-links {
    display: none;
    position: absolute;
    right: 20px;
    top: 70px;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .hero-illustration {
    max-width: 300px;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--subtle);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

::selection {
  background: var(--accent);
  color: #fff;
}