/* Design tokens — oklch neutrals with a violet accent, evolved from the shadcn-era palette */
:root {
  --background: oklch(99% .002 290);
  --foreground: oklch(21% .01 290);
  --card: oklch(100% 0 0);
  --card-foreground: oklch(21% .01 290);
  --muted: oklch(95.5% .005 290);
  --muted-foreground: oklch(45% .01 290);
  --accent: oklch(54% .21 292);
  --accent-2: oklch(60% .17 255);
  --accent-foreground: oklch(100% 0 0);
  --border: oklch(90% .008 290);
  --radius: .875rem;
  --header-bg: oklch(99% .002 290 / .8);
  --shadow: 0 1px 2px oklch(0% 0 0 / .05), 0 8px 24px oklch(0% 0 0 / .06);
  --glow-a: oklch(54% .21 292 / .1);
  --glow-b: oklch(60% .17 255 / .08);
}

.dark {
  --background: oklch(13.5% .015 290);
  --foreground: oklch(97% .005 290);
  --card: oklch(17.5% .02 290 / .75);
  --card-foreground: oklch(97% .005 290);
  --muted: oklch(25% .02 290);
  --muted-foreground: oklch(72% .015 290);
  --accent: oklch(70% .19 292);
  --accent-2: oklch(72% .14 255);
  --accent-foreground: oklch(13% .02 290);
  --border: oklch(28% .02 290);
  --header-bg: oklch(13.5% .015 290 / .78);
  --shadow: 0 1px 2px oklch(0% 0 0 / .3), 0 12px 32px oklch(0% 0 0 / .35);
  --glow-a: oklch(60% .21 292 / .16);
  --glow-b: oklch(60% .17 255 / .1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Ambient background glows + faint grid */
.bg-decor {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42rem 30rem at 12% -5%, var(--glow-a), transparent 65%),
    radial-gradient(38rem 28rem at 95% 12%, var(--glow-b), transparent 65%),
    radial-gradient(44rem 32rem at 50% 115%, var(--glow-a), transparent 70%);
}
.bg-decor::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .25;
  -webkit-mask-image: radial-gradient(60rem 40rem at 50% 0%, black, transparent 75%);
          mask-image: radial-gradient(60rem 40rem at 50% 0%, black, transparent 75%);
}

.container { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
.container.narrow { max-width: 52rem; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -.015em; }

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

.text-accent { color: var(--accent); }
.muted { color: var(--muted-foreground); }
.gradient-text {
  background: linear-gradient(92deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 4rem; gap: 1rem; }
.brand { font-weight: 700; font-size: 1rem; display: inline-flex; align-items: center; gap: .55rem; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: .55rem; font-size: .8rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-foreground);
}
.nav-links { display: flex; list-style: none; gap: 1.35rem; }
.nav-links a { font-size: .88rem; color: var(--muted-foreground); transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-actions { display: flex; gap: .5rem; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; border-radius: .6rem;
  border: 1px solid var(--border); background: transparent; color: var(--foreground);
  cursor: pointer; transition: background .15s, border-color .15s;
}
.icon-btn:hover { background: var(--muted); border-color: var(--accent); }
.nav-toggle { display: none; }
.icon-moon { display: none; }
.dark .icon-moon { display: block; }
.dark .icon-sun { display: none; }

/* Buttons and badges */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .65rem 1.3rem; border-radius: .7rem;
  font-size: .9rem; font-weight: 600; transition: transform .15s, opacity .15s, background .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: var(--accent-foreground);
  box-shadow: 0 4px 18px color-mix(in oklch, var(--accent) 35%, transparent);
}
.btn-primary:hover { opacity: .92; }
.btn-outline { border: 1px solid var(--border); }
.btn-outline:hover { background: var(--muted); border-color: var(--accent); }

.badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .22rem .75rem; border-radius: 999px;
  font-size: .75rem; font-weight: 600;
  background: color-mix(in oklch, var(--card) 70%, var(--background));
  color: var(--foreground);
  border: 1px solid var(--border);
}
.badge-accent {
  background: color-mix(in oklch, var(--accent) 14%, transparent);
  color: var(--accent);
  border-color: color-mix(in oklch, var(--accent) 35%, transparent);
}
.badge .dot { width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }

/* Cards */
.card {
  background: var(--card); color: var(--card-foreground);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}
.card:hover { border-color: color-mix(in oklch, var(--accent) 45%, var(--border)); }

/* Sections & headings */
.section { padding: 5rem 0; }
.section-alt { background: color-mix(in oklch, var(--card) 45%, var(--background)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.eyebrow {
  text-align: center; letter-spacing: .16em; text-transform: uppercase;
  font-size: .75rem; font-weight: 700; color: var(--accent); margin-bottom: .5rem;
}
.section-title { font-size: clamp(1.7rem, 3.2vw, 2.4rem); text-align: center; }
.section-sub { text-align: center; color: var(--muted-foreground); max-width: 42rem; margin: .85rem auto 2.75rem; }
.section-title + .grid, .section-title + .card, .section-title + .timeline { margin-top: 2.5rem; }
.subsection-title { text-align: center; margin: 3rem 0 1.5rem; font-size: 1.3rem; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Hero */
.hero { padding: 5.5rem 0 4.5rem; }
.badge-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.hero-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 1.1rem 0; }
.lead { font-size: 1.08rem; color: var(--muted-foreground); max-width: 40rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.6rem 0; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 1.5rem; list-style: none; color: var(--muted-foreground); font-size: .9rem; }
.hero-meta li { display: flex; align-items: center; gap: .4rem; }

.hero-card { text-align: center; padding: 2.5rem 2rem; }
.avatar-wrap { position: relative; width: 9.5rem; margin: 0 auto 1.35rem; }
.avatar-wrap::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; z-index: -1;
  background: conic-gradient(from 180deg, var(--accent), var(--accent-2), var(--accent));
  filter: blur(10px); opacity: .55;
}
.avatar {
  display: block; width: 9.5rem; height: 9.5rem; border-radius: 50%;
  object-fit: cover;
  border: 3px solid color-mix(in oklch, var(--accent) 70%, var(--card));
}
.hero-card-name { font-size: 1.35rem; }
.hero-card-role { font-weight: 600; margin: .3rem 0 .15rem; font-size: .95rem; }
.hero-card-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; margin-top: 1.1rem; }

/* About */
.about-card { padding: 2rem 2.25rem; }
.about-card p { margin-bottom: 1rem; color: color-mix(in oklch, var(--foreground) 82%, var(--muted-foreground)); }
.about-card p:last-child { margin-bottom: 0; }

/* Skills */
.skill-card h3 { margin-bottom: .6rem; font-size: 1.05rem; }
.skill-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: .7rem; margin-bottom: .9rem;
  background: color-mix(in oklch, var(--accent) 14%, transparent);
  color: var(--accent);
}
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.tag {
  font-size: .75rem; padding: .2rem .6rem; border-radius: 999px;
  background: var(--muted); color: var(--muted-foreground);
  border: 1px solid var(--border);
}

/* Experience timeline */
.timeline { position: relative; max-width: 56rem; margin: 2.5rem auto 0; padding-left: 1.75rem; display: grid; gap: 1.5rem; }
.timeline::before {
  content: ""; position: absolute; left: .5rem; top: .4rem; bottom: .4rem; width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border));
}
.tl-item { position: relative; }
.tl-dot {
  position: absolute; left: -1.75rem; top: 1.65rem;
  width: 1.05rem; height: 1.05rem; border-radius: 50%;
  transform: translateX(calc(.5rem + 1px - 50%));
  background: var(--background);
  border: 3px solid var(--accent);
}
.tl-dot.current { box-shadow: 0 0 0 5px color-mix(in oklch, var(--accent) 22%, transparent); }
.job-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.job-head h3 { font-size: 1.15rem; }
.job-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; font-size: .85rem; }
.job-points { list-style: none; display: grid; gap: .45rem; margin-bottom: .75rem; }
.job-points li { padding-left: 1.25rem; position: relative; color: var(--muted-foreground); }
.job-points li::before { content: "▸"; position: absolute; left: 0; color: var(--accent); }
.sub-role { border-left: 2px solid var(--border); padding: .15rem 0 .15rem 1rem; margin-top: 1.1rem; }
.sub-role h4 { font-size: .98rem; }
.sub-role-note { color: var(--muted-foreground); font-size: .85rem; margin-top: .15rem; }

/* Education */
.edu-item { margin-top: 1.25rem; }
.edu-item h4 { margin: .5rem 0 .15rem; }
.list-check { list-style: none; display: grid; gap: .6rem; margin-top: 1rem; }
.list-check li { padding-left: 1.5rem; position: relative; color: var(--muted-foreground); }
.list-check li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.learn-card { text-align: center; }
.learn-card h4 { font-size: 1.05rem; margin-bottom: .35rem; }

/* Certifications */
.certs-head { display: flex; align-items: center; justify-content: center; gap: .75rem; margin: 2.5rem 0 1.25rem; }
.certs-head h3 { font-size: 1.25rem; }
.cert-card { padding: 1.1rem 1.25rem; }
.cert-card h4 { font-size: .95rem; margin-bottom: .25rem; }
.cert-card p { font-size: .8rem; }

/* Honors */
.honor-card { display: flex; gap: 1rem; align-items: flex-start; }
.honor-card h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.honor-icon {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border-radius: .8rem;
  background: color-mix(in oklch, var(--accent) 14%, transparent);
  color: var(--accent);
}

/* Contact */
.contact-card { text-align: center; }
.contact-card h3 { margin-bottom: .5rem; font-size: 1.05rem; }
.availability { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.availability h3 { font-size: 1.05rem; }
.pulse-dot {
  flex-shrink: 0; width: .75rem; height: .75rem; border-radius: 50%;
  background: oklch(70% .17 160); animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 oklch(70% .17 160 / .5); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 1.5rem 0; }
.footer-grid { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; font-size: .85rem; }
.visitor-counter { display: inline-flex; align-items: center; gap: .4rem; }
#visitor-count { font-weight: 700; color: var(--accent); min-width: 1.5ch; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .pulse-dot { animation: none; }
  .card, .btn { transition: none; }
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { max-width: 24rem; margin: 0 auto; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .job-meta { align-items: flex-start; }
  .nav-links { gap: 1rem; }
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: 4rem; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--background);
    border-bottom: 1px solid var(--border); padding: .5rem 1.25rem 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: .6rem 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero { padding: 3rem 0 2.5rem; }
  .about-card { padding: 1.5rem 1.25rem; }
  .footer-grid { justify-content: center; text-align: center; }
}
