/* qubt.dev — Vercel/Modal-inspired: white bg, near-black text, Geist,
   1px #eaeaea borders, one accent color, lots of whitespace.
   v2: section rhythm, dividers, scroll animations, depth. */

:root {
  --bg: #ffffff;
  --bg-alt: #f7f7f7;
  --fg: #171717;
  --muted: #666666;
  --border: #eaeaea;
  --accent: #0070f3;
  /* Vercel blue */
  --green: #0cce6b;
  --red: #ee0000;
  --radius: 8px;
  --font: "Geist", -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", monospace;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Subtle noise grain — adds that Modal.com premium texture */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

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

a:hover {
  color: var(--accent);
}

/* ---------- Scroll-reveal animations ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

@keyframes slide-up-fade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered children — cards, timeline items, skill groups */
[data-reveal-stagger]:not(.revealed)>* {
  opacity: 0;
  transform: translateY(20px);
}

[data-reveal-stagger].revealed>* {
  animation: slide-up-fade 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

/* Each child gets a progressive delay */
[data-reveal-stagger].revealed>*:nth-child(1) {
  animation-delay: 0.05s;
}

[data-reveal-stagger].revealed>*:nth-child(2) {
  animation-delay: 0.12s;
}

[data-reveal-stagger].revealed>*:nth-child(3) {
  animation-delay: 0.19s;
}

[data-reveal-stagger].revealed>*:nth-child(4) {
  animation-delay: 0.26s;
}

[data-reveal-stagger].revealed>*:nth-child(5) {
  animation-delay: 0.33s;
}

[data-reveal-stagger].revealed>*:nth-child(6) {
  animation-delay: 0.40s;
}

[data-reveal-stagger].revealed>*:nth-child(7) {
  animation-delay: 0.47s;
}

[data-reveal-stagger].revealed>*:nth-child(8) {
  animation-delay: 0.54s;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 600;
  font-family: var(--mono);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--muted);
}

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

.cmdk-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 13px var(--font);
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px 10px;
  cursor: pointer;
}

.cmdk-hint:hover {
  border-color: var(--muted);
}

kbd {
  font: 11px var(--mono);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  background: #fafafa;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 24px 48px;
  text-align: center;
}

/* Dot-grid lives on a pseudo-element so the fade mask never touches the
   hero's actual content (buttons, stats stay fully opaque) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(circle, #d4d4d4 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 95%);
  mask-image: linear-gradient(to bottom, black 60%, transparent 95%);
}

.hero-title {
  cursor: pointer;
  /* clicking replays the decrypt animation */
  font-family: "Google Sans", "Product Sans", var(--font);
  font-size: clamp(44px, 8vw, 76px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--fg);
}

/* scramble characters during the decrypt animation render in mono so the
   name doesn't jitter in width while decoding */
.hero-title .scramble {
  font-family: var(--mono);
  color: #999;
}

.hero-tagline {
  margin-top: 12px;
  font-size: 20px;
  color: var(--muted);
}

.hero-bio {
  margin-top: 8px;
  font-size: 16px;
  color: var(--muted);
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  font-family: var(--font);
  transition: border-color .15s, background .15s, color .15s;
}

.btn:hover {
  border-color: var(--fg);
  color: var(--fg);
}

.btn-primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.btn-primary:hover {
  background: var(--bg);
  color: var(--fg);
}

.btn .arrow {
  display: inline-block;
  transition: transform .2s ease;
  margin-left: 2px;
}

.btn:hover .arrow {
  transform: translateX(4px);
}

.gh-stats {
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
  font-family: var(--mono);
}

/* ---------- Terminal ---------- */
.terminal {
  margin: 40px auto 0;
  max-width: 560px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, .06);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: #fafafa;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot.red {
  background: #ff5f57;
}

.dot.yellow {
  background: #febc2e;
}

.dot.green {
  background: #28c840;
}

.terminal-title {
  margin-left: 8px;
  font: 12px var(--mono);
  color: var(--muted);
}

.terminal-body {
  padding: 18px;
  min-height: 130px;
  font: 13px/1.8 var(--mono);
  white-space: pre-wrap;
}

.terminal-body .prompt {
  color: var(--accent);
}

.terminal-body .out {
  color: var(--muted);
}

.cursor {
  display: inline-block;
  width: 8px;
  background: var(--fg);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ---------- Section dividers ---------- */
/* Full-width border line between sections */
.section-divider {
  border: none;
  height: 1px;
  margin: 0;
  background: var(--border);
}

/* ---------- Sections & cards ---------- */
.section {
  max-width: 960px;
  margin: 0 auto;
  padding: 64px 24px;
}

.section-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section-sub {
  color: var(--muted);
  margin: 6px 0 28px;
}

/* Alternating section backgrounds — wraps the section + divider */
.section-wrap {
  background: var(--bg);
}

.section-wrap-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.grid>* {
  flex: 1 1 300px;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--bg);
  transition: box-shadow .2s, border-color .2s;
  /* Subtle inner depth */
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .02);
}

.card:hover {
  border-color: #ccc;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .07);
}

/* Mouse-tracking spotlight: --mx/--my are set by JS as the cursor moves */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(0, 112, 243, .08), transparent 65%);
  opacity: 0;
  transition: opacity .25s;
}

.card:hover::before {
  opacity: 1;
}

.card>* {
  position: relative;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  flex: 1;
}

.card-desc {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

.card-stack {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  font: 500 13px var(--mono);
  color: #555;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 3px 12px;
  transition: border-color .15s, color .15s;
}

.card:hover .chip {
  border-color: #d0d0d0;
  color: var(--fg);
}

/* Project cards: lift on hover */
.project-card {
  transition: box-shadow .2s, border-color .2s, transform .2s;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .09);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  font-size: 15px;
  color: var(--kind-color, var(--fg));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fafafa;
  transition: transform .2s, border-color .2s;
}

.project-card:hover .card-icon {
  transform: scale(1.08) rotate(-4deg);
  border-color: var(--kind-color);
}

/* Visit / Read docs buttons: arrow slides right on hover */
.card-links {
  margin-top: 18px;
  display: flex;
  gap: 10px;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg);
  background: var(--bg);
  transition: border-color .15s, background .15s, color .15s;
}

.link-btn .arrow {
  transition: transform .2s ease;
}

.link-btn:hover {
  border-color: var(--kind-color);
  color: var(--kind-color);
}

.link-btn:hover .arrow {
  transform: translateX(3px);
}

.link-btn:active {
  transform: scale(.97);
}

.link-btn-primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.link-btn-primary:hover {
  background: var(--kind-color);
  border-color: var(--kind-color);
  color: #fff;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 11px var(--mono);
  color: var(--muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ccc;
}

.status.live .status-dot {
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.status.down .status-dot {
  background: var(--red);
}

/* ---------- Skills ---------- */
.skills-grid {
  column-width: 210px;
  column-gap: 16px;
}

.skill-group {
  break-inside: avoid;
  margin-bottom: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(145deg, #ffffff, var(--bg-alt));
  transition: box-shadow .2s, border-color .2s, transform .2s, background .2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .02), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.skill-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
  background: #ffffff;
  border-color: #d0d0d0;
}

.skill-group h3 {
  font: 600 11px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-group h3::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.skill-group:nth-child(2) h3::before {
  background: #7928ca;
}

.skill-group:nth-child(3) h3::before {
  background: #f5a623;
}

.skill-group:nth-child(4) h3::before {
  background: var(--green);
}

/* Google colored illumination for chips on hover */
.skill-group .chip {
  transition: border-color .2s, color .2s, box-shadow .2s, background-color .2s;
}

.skill-group:hover .chip {
  background-color: #ffffff;
  border-color: transparent;
  color: var(--fg);
}

/* Assign different glowing shadows to chips based on their order */
.skill-group:hover .chip:nth-child(4n + 1) {
  box-shadow: 0 0 14px rgba(66, 133, 244, 0.20);
}

.skill-group:hover .chip:nth-child(4n + 2) {
  box-shadow: 0 0 14px rgba(234, 67, 53, 0.20);
}

.skill-group:hover .chip:nth-child(4n + 3) {
  box-shadow: 0 0 14px rgba(251, 188, 5, 0.25);
}

.skill-group:hover .chip:nth-child(4n + 4) {
  box-shadow: 0 0 14px rgba(52, 168, 83, 0.20);
}

/* ---------- Certifications ---------- */
.certs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cert-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.10s ease-out, box-shadow 0.10s ease-out, border-color 0.10s ease-out;
}

.cert-row:hover {
  transform: translateX(4px);
  border-color: #ccc;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .05);
}

.cert-badge {
  color: #4285f4;
  font-size: 18px;
  flex: none;
}

.cert-row:nth-child(2n) .cert-badge {
  color: #34a853;
}

.cert-row:nth-child(3n) .cert-badge {
  color: #fbbc05;
}

.cert-row:nth-child(4n) .cert-badge {
  color: #ea4335;
}

.cert-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cert-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--fg);
}

.cert-arrow {
  display: inline-block;
  transition: transform 0.15s ease-out;
}

.cert-row:hover .cert-arrow {
  transform: translate(2px, -2px);
}

.cert-desc {
  font-size: 13px;
  color: var(--muted);
}

.cert-issuer {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: #888;
  background: #f5f5f5;
  padding: 4px 10px;
  border-radius: 999px;
  flex: none;
}

@media (max-width: 600px) {
  .cert-row {
    flex-wrap: wrap;
  }

  .cert-issuer {
    margin-top: 8px;
    margin-left: 34px;
  }
}

/* ---------- CTA (dark variant) ---------- */
.section-wrap-dark {
  background: var(--fg);
  color: var(--bg);
}

.section-wrap-dark .section-title,
.section-wrap-dark .cta-title {
  color: var(--bg);
}

.section-wrap-dark .section-sub {
  color: #888;
}

.cta {
  text-align: center;
  padding-bottom: 40px;
  padding-top: 40px;
}

.cta-title {
  font-family: "Google Sans", "Product Sans", var(--font);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cta .hero-actions {
  margin-top: 20px;
}

/* Invert button colors in dark section */
.section-wrap-dark .btn {
  background: var(--bg);
  color: var(--fg);
  border-color: var(--bg);
}

.section-wrap-dark .btn:hover {
  background: transparent;
  color: var(--bg);
  border-color: #555;
}

.section-wrap-dark .btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.section-wrap-dark .btn-primary:hover {
  background: #0060d0;
  border-color: #0060d0;
  color: #fff;
}

/* ---------- Contact Page ---------- */
.contact-page {
  max-width: 600px;
  margin: 80px auto;
  padding: 0 24px;
}

.contact-head h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.contact-form {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form label {
  font-size: 14px;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--fg);
}

#form-status {
  font-size: 14px;
  margin-top: 12px;
}

#form-status.ok {
  color: #10b981;
}

/* ---------- Report Page (Markdown) ---------- */
.report-page {
  margin: 60px auto 100px;
  padding: 0 24px;
  max-width: 800px;
}

/* Metadata Bar */
.report-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
  font-family: var(--font);
  font-size: 14px;
}

.meta-back {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  padding-right: 12px;
}

.meta-back svg {
  transition: transform 0.2s ease;
}

.meta-back:hover {
  color: var(--fg);
}

.meta-back:hover svg {
  transform: translateX(-4px);
}

.meta-tag {
  background: rgba(0, 0, 0, 0.08);
  color: var(--fg);
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.dark-theme .meta-tag {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.meta-info {
  color: var(--muted);
}

.report-content {
  font-size: 16px;
  line-height: 1.7;
  color: #202124;
}

.dark-theme .report-content {
  color: #e8eaed;
}

.report-content h1:first-child {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  line-height: 1.1;
  font-family: "Google Sans", "Product Sans", var(--font);
  color: #202124;
  /* Google's official text black */
}

.dark-theme .report-content h1:first-child {
  color: #e8eaed;
}

.report-content h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 48px 0 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  font-family: "Google Sans", "Product Sans", var(--font);
  color: #202124;
}

.dark-theme .report-content h2 {
  color: #e8eaed;
}

.report-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 32px 0 12px;
  font-family: "Google Sans", "Product Sans", var(--font);
  color: #202124;
}

.dark-theme .report-content h3 {
  color: #e8eaed;
}

.report-content p {
  margin-bottom: 20px;
}

.report-content a {
  color: #202124;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 4px;
  font-weight: 500;
}

.dark-theme .report-content a {
  color: #e8eaed;
}

.report-content a:hover {
  text-decoration-color: #202124;
}

.dark-theme .report-content a:hover {
  text-decoration-color: #e8eaed;
}

.report-content ul,
.report-content ol {
  margin: 0 0 24px 24px;
  padding: 0;
}

.report-content li {
  margin-bottom: 10px;
}

.report-content code {
  font-family: var(--mono);
  font-size: 13.5px;
  background: rgba(0, 0, 0, .04);
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, .05);
}

.dark-theme .report-content code {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .05);
  color: #e5e7eb;
}

/* Premium macOS style code blocks */
.report-content .highlight {
  position: relative;
  background: #18181b;
  /* Sleek extremely dark background */
  border-radius: 12px;
  margin: 32px 0;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .15);
  overflow: hidden;
}

.dark-theme .report-content .highlight {
  border: 1px solid rgba(255, 255, 255, .05);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
}

.report-content .highlight::before {
  content: "";
  display: block;
  height: 42px;
  background: #27272a;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.report-content .highlight::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 16px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f56;
  box-shadow: 20px 0 0 #ffbd2e, 40px 0 0 #27c93f;
}

.report-content .highlight pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 14px;
  background: transparent;
  color: #f4f4f5;
}

.report-content .highlight pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  border: none;
}

.report-content blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  border: 1px solid rgba(0, 112, 243, 0.2);
  /* Soft blue border */
  background: rgba(0, 112, 243, 0.04);
  /* Extremely subtle blue tint */
  border-radius: 8px;
  color: var(--fg);
  font-weight: 500;
  line-height: 1.6;
}

.dark-theme .report-content blockquote {
  border-color: rgba(50, 145, 255, 0.25);
  background: rgba(50, 145, 255, 0.08);
}

.report-content blockquote p {
  margin: 0;
}

.report-content blockquote p strong {
  color: var(--fg);
}

.report-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 14px;
  text-align: left;
}

.report-content th,
.report-content td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.report-content th {
  font-weight: 600;
  background: rgba(0, 0, 0, .02);
}

.dark-theme .report-content th {
  background: rgba(255, 255, 255, .03);
}

.contact-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.contact-link:hover {
  transform: translateY(-2px);
  border-color: var(--link-color);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .06);
  color: inherit;
}

.contact-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  font: 600 13px var(--mono);
  color: var(--link-color);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fafafa;
  transition: transform .2s, border-color .2s;
}

.contact-link:hover .contact-link-icon {
  transform: scale(1.08) rotate(-4deg);
  border-color: var(--link-color);
}

.contact-link-body {
  min-width: 0;
}

.contact-link h3 {
  font: 600 11px var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}

.contact-link .handle {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--link-color);
  word-break: break-all;
  margin-top: 2px;
}

.contact-link p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}

.contact-link-arrow {
  margin-left: auto;
  align-self: center;
  color: var(--muted);
  transition: transform .2s, color .2s;
}

.contact-link:hover .contact-link-arrow {
  transform: translateX(3px);
  color: var(--link-color);
}

.copy-btn {
  margin-left: auto;
  align-self: center;
  flex: none;
  font: 14px var(--mono);
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.copy-btn:hover {
  border-color: var(--link-color);
  color: var(--link-color);
}

.nav-links a.active {
  color: var(--fg);
  font-weight: 500;
}

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

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.section-wrap-dark+.footer {
  border-top-color: #333;
  background: var(--fg);
  color: #888;
}

.section-wrap-dark+.footer a {
  color: var(--accent);
}

/* ---------- Command palette ---------- */
.cmdk-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, .25);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 15vh;
}

/* the hidden attribute must beat display:flex above, else the palette is stuck open */
.cmdk-overlay[hidden] {
  display: none;
}

.cmdk-panel {
  width: min(560px, 92vw);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 60px rgba(0, 0, 0, .15);
  overflow: hidden;
}

.cmdk-panel input {
  width: 100%;
  padding: 16px 18px;
  font: 15px var(--font);
  border: none;
  border-bottom: 1px solid var(--border);
  outline: none;
}

#cmdk-list {
  list-style: none;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
}

#cmdk-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
}

#cmdk-list li a:hover,
#cmdk-list li.active a {
  background: #f5f5f5;
  color: var(--fg);
}

#cmdk-list .hint {
  font: 11px var(--mono);
  color: var(--muted);
}

/* ---------- Mobile Nav Toggle ---------- */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--fg);
  cursor: pointer;
  padding: 4px;
}

.hamburger-icon .line {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-icon .top {
  transform-origin: 12px 8px;
}

.hamburger-icon .bottom {
  transform-origin: 12px 16px;
}

.mobile-toggle[aria-expanded="true"] .hamburger-icon .top {
  transform: translateY(4px) rotate(45deg);
}

.mobile-toggle[aria-expanded="true"] .hamburger-icon .bottom {
  transform: translateY(-4px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 32px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .04);
  flex-direction: column;
  gap: 0;
}

.mobile-menu.open {
  display: flex;
}

.mobile-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  font-size: 18px;
  color: var(--fg);
  text-decoration: none;
  transition: color .2s;
}

button.mobile-link {
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}

.mobile-link:last-child {
  border-bottom: none;
}

.mobile-link:hover {
  color: var(--muted);
}

@media (max-width: 600px) {
  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .hero {
    padding-top: 64px;
  }

  .demo .btn-primary {
    margin-inline: auto;
  }

  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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