body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #121212;
    color: #e0e0e0;
  }
  
  header {
    background-color: #1f1f1f;
    color: #e0e0e0;
    padding: 10px 0;
  }
  
  header nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
  }
  
  header nav ul li {
    margin: 0 15px;
  }
  
  header nav ul li a {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s, transform 0.3s;
  }
  
  header nav ul li a:hover {
    color: #ff5722;
    transform: scale(1.1);
  }
  
  main {
    padding: 20px;
    text-align: center;
  }
  
  section {
    margin-bottom: 50px;
    padding: 20px;
    border-radius: 8px;
    background-color: #1e1e1e;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
  }
  
  section:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  }
  
  section h1 {
    color: #ff5722;
  }
  
  #home {
    background-color: #212121;
  }
  
  #about {
    background-color: #333333;
  }
  
  #portfolio {
    background-color: #2c2c2c;
  }
  
  #skills {
    background-color: #3b3b3b;
  }
  
  #resume {
    background-color: #292929;
  }
  
  #contact {
    background-color: #353535;
  }
  
  form {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  form label, form input, form textarea, form button {
    margin: 10px 0;
  }
  
  form input, form textarea {
    width: 100%;
    max-width: 500px;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #121212;
    color: #e0e0e0;
  }
  
  form button {
    padding: 10px 20px;
    background-color: #ff5722;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
  
  form button:hover {
    background-color: #e64a19;
  }
  
  .skills-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
  }
  
  .skill-bar {
    width: 100%;
    background-color: #444;
    border-radius: 5px;
    margin: 10px 0;
    overflow: hidden;
  }
  
  .skill-bar-inner {
    height: 30px;
    background-color: #4caf50;
    text-align: right;
    padding: 5px;
    border-radius: 5px;
    width: 0;
    transition: width 2s ease-in-out;
  }
  
  .skill-bar-inner[data-loaded="true"] {
    width: var(--width);
  }
  
  footer {
    background-color: #1f1f1f;
    padding: 20px;
    text-align: center;
    margin-top: 50px;
  }
  
  footer .social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
  }
  
  footer .social-icons a {
    color: #e0e0e0;
    text-decoration: none;
    transition: transform 0.3s;
  }
  
  footer .social-icons a:hover {
    transform: scale(1.2);
  }
  
  footer .social-icons img {
    width: 40px;
    height: 40px;
  }


/* === Skill Bar Animation (added) === */
.skills-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.skill-bar { background: #222; border-radius: 999px; overflow: hidden; border: 1px solid rgba(255,255,255,0.12); }
.skill-bar-inner {
  --width: 0%;
  width: 0%;
  height: 16px;
  line-height: 16px;
  font-size: 12px;
  padding-left: 10px;
  color: #fff;
  white-space: nowrap;
  transition: width 1.1s ease-in-out;
  background: linear-gradient(90deg, #4da3ff, #9cc7ff);
}
.skill-bar-inner[data-loaded="true"] { width: var(--width); }

/* basic layout polish */
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; margin: 0; color: #e9edf4; background: #0f1220; }
header { background: #151a2e; position: sticky; top: 0; z-index: 10; }
nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 12px 16px; }
nav a { color: #e9edf4; text-decoration: none; padding: 8px 10px; border-radius: 8px; }
nav a:hover { background: rgba(255,255,255,0.08); }
main { max-width: 1000px; margin: 0 auto; padding: 24px 16px 80px; }
h1 { margin: 18px 0; }
.btn { display: inline-block; padding: 10px 14px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); border-radius: 10px; color: #e9edf4; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
footer { border-top: 1px solid rgba(255,255,255,0.12); padding: 20px 16px; display: flex; justify-content: center; }
.social-icons img { height: 22px; margin: 0 6px; opacity: 0.9; }
.note { color: #9aa3b2; font-size: 14px; }
#hero { display: grid; place-items: center; padding: 80px 0 40px; position: relative; text-align: center; }
#particles-js { position: absolute; inset: 0; z-index: 0; }
#hero h1, #hero p, #hero a { position: relative; z-index: 1; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; padding: 0; list-style: none; }
.card { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); border-radius: 12px; padding: 16px; }
.timeline { line-height: 1.7; }


.case-study { margin-top: 28px; }
.case-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.case-grid img { width: 100%; height: auto; border: 1px solid rgba(255,255,255,0.18); border-radius: 10px; }
.code-block { background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.2); border-radius: 12px; padding: 14px; overflow: auto; }
.code-block pre { margin: 0; font-size: 13px; line-height: 1.5; }
.muted { color: #9aa3b2; font-size: 14px; }
/* Tabs via cards */
.tab-card { cursor: pointer; user-select: none; }
.tab-card.is-active { outline: 2px solid rgba(255,255,255,0.2); }
.hidden { display: none !important; }

.code-block { position: relative; }
.copy-btn {
  position: absolute; top: 8px; right: 8px;
  font-size: 12px; padding: 6px 8px; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.25); border-radius: 6px;
  background: rgba(255,255,255,0.08); color: #e9edf4;
}
.copy-btn:hover { filter: brightness(1.1); }
/* Accent color for hover effects */
:root {
  --accent: #ff7a1a;                  /* orange */
  --accent-ghost: rgba(255,122,26,.14);
  --accent-ring: rgba(255,122,26,.28);
}

/* Smooth transitions for the cards */
#projects .card {
  position: relative;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background-color .15s ease;
  cursor: pointer; /* optional */
}

/* Orange highlight on hover/focus */
#projects .card:hover,
#projects .card:focus-within {
  border-color: var(--accent);
  background: linear-gradient(0deg, var(--accent-ghost), var(--accent-ghost));
  box-shadow: 0 0 0 2px var(--accent-ring) inset, 0 10px 24px rgba(255,122,26,.18);
  transform: translateY(-2px);
}

/* Make the title pop a bit too */
#projects .card:hover h3,
#projects .card:focus-within h3 {
  color: var(--accent);
}
/* round avatar in hero */
.hero-avatar{
  width: clamp(96px, 12vw, 160px);
  height: clamp(96px, 12vw, 160px);
  border-radius: 9999px;
  object-fit: cover;
  display: block;
  margin: 0 auto 12px;
  border: 2px solid rgba(255,255,255,0.18);
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
  background:#111;
}
/* Hero spacing + typography */
#hero h1 { margin: 10px 0 6px; }
#hero p  { margin: 6px 0 18px; line-height: 1.6; color: #cfd6e4; }

/* Button variants + group */
.btn-primary { border-color: rgba(255,122,26,.4); background: rgba(255,122,26,.12); }
.btn-primary:hover { box-shadow: 0 0 0 2px rgba(255,122,26,.28) inset; }

.btn-secondary { margin-left: 10px; }
@media (max-width: 520px){
  .btn-secondary { display:block; margin:8px auto 0; width:max-content; }
}

/* Avatar subtle glow */
.hero-avatar{
  box-shadow: 0 0 0 3px rgba(255,255,255,.08), 0 10px 28px rgba(0,0,0,.35);
}
.hero-avatar:hover{
  box-shadow: 0 0 0 3px rgba(255,255,255,.12), 0 12px 34px rgba(0,0,0,.45);
  transform: translateY(-1px);
  transition: box-shadow .2s ease, transform .2s ease;
}

/* Social icons (size + spacing) */
.social-icons img { width: 22px; height: 22px; object-fit: contain; margin: 0 10px; opacity: .95; }
.social-icons img:hover { opacity: 1; }
/* Hero spacing + typography */
#hero h1 { margin: 10px 0 6px; }
#hero p  { margin: 6px 0 18px; line-height: 1.6; color: #cfd6e4; }

/* Button variants + group */
.btn-primary { border-color: rgba(255,122,26,.4); background: rgba(255,122,26,.12); }
.btn-primary:hover { box-shadow: 0 0 0 2px rgba(255,122,26,.28) inset; }

.btn-secondary { margin-left: 10px; }
@media (max-width: 520px){
  .btn-secondary { display:block; margin:8px auto 0; width:max-content; }
}

/* Avatar subtle glow */
.hero-avatar{
  box-shadow: 0 0 0 3px rgba(255,255,255,.08), 0 10px 28px rgba(0,0,0,.35);
}
.hero-avatar:hover{
  box-shadow: 0 0 0 3px rgba(255,255,255,.12), 0 12px 34px rgba(0,0,0,.45);
  transform: translateY(-1px);
  transition: box-shadow .2s ease, transform .2s ease;
}

/* Social icons (size + spacing) */
.social-icons img { width: 22px; height: 22px; object-fit: contain; margin: 0 10px; opacity: .95; }
.social-icons img:hover { opacity: 1; }
/* Hero spacing + typography */
#hero h1 { margin: 10px 0 6px; }
#hero p  { margin: 6px 0 18px; line-height: 1.6; color: #cfd6e4; }

/* Button variants + group */
.btn-primary { border-color: rgba(255,122,26,.4); background: rgba(255,122,26,.12); }
.btn-primary:hover { box-shadow: 0 0 0 2px rgba(255,122,26,.28) inset; }

.btn-secondary { margin-left: 10px; }
@media (max-width: 520px){
  .btn-secondary { display:block; margin:8px auto 0; width:max-content; }
}

/* Avatar subtle glow */
.hero-avatar{
  box-shadow: 0 0 0 3px rgba(255,255,255,.08), 0 10px 28px rgba(0,0,0,.35);
}
.hero-avatar:hover{
  box-shadow: 0 0 0 3px rgba(255,255,255,.12), 0 12px 34px rgba(0,0,0,.45);
  transform: translateY(-1px);
  transition: box-shadow .2s ease, transform .2s ease;
}

/* Social icons (size + spacing) */
.social-icons img { width: 22px; height: 22px; object-fit: contain; margin: 0 10px; opacity: .95; }
.social-icons img:hover { opacity: 1; }
/* Hero spacing + typography */
#hero h1 { margin: 10px 0 6px; }
#hero p  { margin: 6px 0 18px; line-height: 1.6; color: #cfd6e4; }

/* Button variants + group */
.btn-primary { border-color: rgba(255,122,26,.4); background: rgba(255,122,26,.12); }
.btn-primary:hover { box-shadow: 0 0 0 2px rgba(255,122,26,.28) inset; }

.btn-secondary { margin-left: 10px; }
@media (max-width: 520px){
  .btn-secondary { display:block; margin:8px auto 0; width:max-content; }
}

/* Avatar subtle glow */
.hero-avatar{
  box-shadow: 0 0 0 3px rgba(255,255,255,.08), 0 10px 28px rgba(0,0,0,.35);
}
.hero-avatar:hover{
  box-shadow: 0 0 0 3px rgba(255,255,255,.12), 0 12px 34px rgba(0,0,0,.45);
  transform: translateY(-1px);
  transition: box-shadow .2s ease, transform .2s ease;
}

/* Social icons (size + spacing) */
.social-icons img { width: 22px; height: 22px; object-fit: contain; margin: 0 10px; opacity: .95; }
.social-icons img:hover { opacity: 1; }
/* --- Hero spacing + button group --- */
#hero .hero-avatar { margin-bottom: 14px; }
#hero h1 { margin: 10px 0 6px; }
#hero p  { margin: 6px 0 14px; }

.hero-actions{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;                 /* space between buttons */
  flex-wrap: wrap;
  margin-top: 6px;           /* space above buttons */
}
.hero-actions .btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  margin: 0;                 /* reset any old margins */
}

/* stack neatly on small screens */
@media (max-width: 560px){
  .hero-actions{ flex-direction: column; gap: 10px; }
  .hero-actions .btn{ width: 220px; } /* optional fixed width for symmetry */
}

/* remove any earlier left-margin you might have set */
.btn-secondary{ margin-left: 0 !important; }
/* Ensure the particles/background can't intercept clicks */
#hero { position: relative; z-index: 1; }
#particles-js { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

/* Keep footer on top & clickable */
footer { position: relative; z-index: 2; }
/* uniform circular social buttons */
.social-icons{
  display:flex; gap:16px; justify-content:center; align-items:center;
  padding:14px 0;
}
.social-btn{
  width:44px; height:44px; border-radius:9999px;
  display:inline-flex; align-items:center; justify-content:center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background-color .15s ease;
}
.social-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,122,26,.12);            /* orange ghost */
  border-color: #ff7a1a;
  box-shadow: 0 0 0 2px rgba(255,122,26,.28) inset;
}
.social-btn img{
  width:22px; height:22px; object-fit: contain; display:block;
  filter: saturate(.9) contrast(1.05);
}

/* make sure nothing blocks clicks */
#particles-js{ pointer-events:none; }
footer{ position:relative; z-index:2; }


/* --- Sticky footer + tidy bottom spacing --- */
html, body { height: 100%; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;          /* page always at least full viewport height */
}
main {
  flex: 1 0 auto;             /* main grows to push footer down */
  padding-bottom: 32px;       /* reduce any large bottom padding (overrides older 80px) */
}
footer {
  margin-top: auto;           /* pin to bottom when content is short */
}

/* Optional: make the hero fill nicely so the card is centered on tall screens */
/* Make the hero box a bit wider */
#hero{
  /* min, preferred (as % of viewport), max */
  max-width: clamp(720px, 82vw, 980px);
  margin-left: auto;
  margin-right: auto;
  padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 48px);
}

/* Keep the subtitle line length comfy even when wider */
#hero p{ max-width: 70ch; margin-left:auto; margin-right:auto; }


/* Ensure canvas/particles never block footer clicks */
#particles-js { pointer-events: none; }
/* Optional: allow a wider page container */
main { max-width: 1100px; }
/* --- Orange skill bars with left-anchored labels --- */
:root{
  --accent: #ff7a1a;
  --accent-2: #ffb86b;
}

/* the track (unchanged look, just a bit darker) */
.skill-bar{
  background: #1d1f27;
}

/* make the text container full width, left aligned */
.skill-bar-inner{
  position: relative;
  width: 100% !important;          /* label spans full bar width */
  background: none !important;     /* remove old blue fill */
  color: #fff;
  text-align: left;
  padding-left: 12px;
  line-height: 18px;               /* match your bar height */
  white-space: nowrap;
  z-index: 1;                      /* keep text above the fill */
}

/* draw the animated fill behind the text */
.skill-bar-inner::before{
  content: "";
  position: absolute;
  inset: 0 auto 0 0;               /* top/right/bottom/left */
  width: 0;                         /* start empty */
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 9999px;
  transition: width 1.1s ease-in-out;
  z-index: -1;
}

/* when it scrolls into view, grow the fill to --width */
.skill-bar-inner[data-loaded="true"]::before{
  width: var(--width);
}

/* optional: subtle border glow on the track when active */
.skill-bar-inner[data-loaded="true"]{
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
/* keep from earlier step */
:root{ --accent:#ff7a1a; --accent-2:#ffb86b; }

/* track */
.skill-bar{ background:#1d1f27; }

/* label container + orange fill behind it */
.skill-bar-inner{
  position: relative;
  width: 100% !important;
  background: none !important;
  color:#fff;
  text-align:left;
  padding-left:12px;
  line-height:18px;
  white-space:nowrap;
  overflow:hidden;            /* so the slide-in is clipped nicely */
  z-index:1;
}
.skill-bar-inner::before{
  content:"";
  position:absolute; inset:0 auto 0 0;
  width:0; border-radius:9999px;
  background:linear-gradient(90deg,var(--accent),var(--accent-2));
  transition:width 1.1s ease-in-out;
  z-index:-1;
}
.skill-bar-inner[data-loaded="true"]::before{ width:var(--width); }

/* per-letter slide from right -> left */
.skill-label .char{
  display:inline-block;
  transform:translateX(14px); /* start slightly to the right */
  opacity:0;
  transition:transform .45s ease, opacity .45s ease;
  transition-delay: calc(var(--i) * 30ms); /* stagger by index */
}
.skill-bar-inner[data-loaded="true"] .char{
  transform:translateX(0);
  opacity:1;
}
/* === About card layout === */
.about-card{
  max-width: clamp(720px, 82vw, 980px);
  margin: 18px auto;
  padding: clamp(24px, 3.5vw, 40px);
  background: #292b31;          /* matches your card style */
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
}
.about-card h1{ text-align:center; margin-top:0; }
.lead{ color:#cfd6e4; }

/* two-column grid that collapses on mobile */
.about-grid{
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 22px;
}
@media (max-width: 820px){
  .about-grid{ grid-template-columns: 1fr; }
}

/* subhead styling */
.subhead{
  margin: 18px 0 8px;
  color:#e9edf4;
}

/* checklist bullets */
.checklist{
  padding-left: 18px;
  margin: 0 0 14px;
}
.checklist li{ margin: 6px 0; }

/* facts list (key/value rows) */
.facts{ list-style:none; padding:0; margin:0 0 14px; }
.facts li{
  display:flex; justify-content:space-between; gap:12px;
  padding:10px 12px; border:1px solid rgba(255,255,255,0.12);
  border-radius:10px; background: rgba(255,255,255,0.04);
  margin-bottom:8px;
}
.facts li span{ color:#9aa3b2; }
.facts li strong{ color:#e9edf4; font-weight:600; }

/* tool chips */
.chips{ display:flex; flex-wrap:wrap; gap:8px; }
.chip{
  padding:6px 10px; border-radius:9999px;
  background: rgba(255,122,26,.12);
  border:1px solid rgba(255,122,26,.36);
  color:#ffd5b1;
  font-size:13px;
}

/* actions (buttons) */
.about-actions{
  display:flex; gap:12px; flex-wrap:wrap; margin-top:12px;
}
.about-actions .btn{ padding:10px 16px; }
/* ===== Experience page ===== */
.exp-card{
  max-width: clamp(760px, 84vw, 1040px);
  margin: 18px auto;
  padding: clamp(24px, 3.5vw, 42px);
  background: #292b31;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
}
.exp-card h1{ text-align:center; margin-top:0; }
.exp-intro{ text-align:center; color:#cfd6e4; margin: 6px auto 10px; max-width: 70ch; }

.exp-chips{ justify-content:center; margin-bottom: 12px; }
.mini-chips{ display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.mini-chips span{
  font-size:12px; padding:4px 8px; border-radius:9999px;
  background: rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.14);
}

/* vertical timeline */
.timeline{ list-style:none; padding: 6px 0 0 0; margin: 6px 0 0 0; position:relative; }
.timeline::before{
  content:""; position:absolute; left:20px; top:0; bottom:0;
  width:2px; background: rgba(255,255,255,0.14);
}
.tl-item{ position:relative; padding-left:56px; margin: 18px 0; }
.tl-dot{
  position:absolute; left:12px; top:8px; width:16px; height:16px; border-radius:50%;
  background: rgba(255,122,26,.9);
  box-shadow: 0 0 0 3px rgba(255,122,26,.22);
}
.tl-content{
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 12px 14px;
}
.tl-content h3{
  margin: 0 0 6px;
  display:flex; gap:8px; align-items:baseline; justify-content:space-between; flex-wrap:wrap;
}
.tl-meta{ color:#9aa3b2; font-weight: 600; font-size: 14px; }
.bullets{ margin: 0; padding-left: 18px; }
.bullets li{ margin: 6px 0; }

.exp-actions{
  display:flex; justify-content:center; gap:12px; flex-wrap:wrap;
  margin-top: 18px;
}
/* ===== Portfolio ===== */
.portfolio-page{
  max-width: clamp(760px, 84vw, 1100px);
  margin: 18px auto;
}

.filters{ margin-bottom: 12px; }
.filters .chip{
  cursor: pointer;
  user-select: none;
}
.filters .chip.is-active{
  background: rgba(255,122,26,.14);
  border-color: rgba(255,122,26,.5);
  color: #ffd5b1;
}

.portfolio-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.p-card{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background-color .15s ease;
}
.p-card:hover{
  border-color: #ff7a1a;
  background: rgba(255,122,26,.12);
  box-shadow: 0 0 0 2px rgba(255,122,26,.28) inset;
  transform: translateY(-2px);
}

/* thumbnail with fixed ratio */
.p-thumb{ display:block; position:relative; aspect-ratio: 16 / 9; background:#15161f; }
.p-thumb img{
  width:100%; height:100%; object-fit: cover; display:block;
}

.p-body{ padding: 12px; }
.p-body h3{ margin: 6px 0 6px; }
.p-body p{ margin: 0 0 10px; color:#cfd6e4; }

.p-tags{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom: 8px; }
.p-tags .chip{ font-size: 12px; padding: 4px 8px; }

.p-actions{ display:flex; gap:8px; flex-wrap:wrap; }
.p-actions .btn{ padding: 8px 12px; }

/* simple lightbox */
.lightbox-backdrop{
  position: fixed; inset: 0; background: rgba(0,0,0,.8);
  display: none; align-items: center; justify-content: center; z-index: 9999;
}
.lightbox-backdrop.show{ display: flex; }
.lightbox-backdrop img{
  max-width: 92vw; max-height: 88vh; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 12px 40px rgba(0,0,0,.6);
}
/* ===== Command Palette ===== */
:root { --cmdk-bg:#1a1d26; --cmdk-panel:#23252e; --cmdk-border:rgba(255,255,255,.14); --cmdk-text:#e9edf4; --cmdk-muted:#9aa3b2; }
cmdk-backdrop
.cmdk-panel{
  width:min(720px,92vw); background:var(--cmdk-panel); color:var(--cmdk-text);
  border:1px solid var(--cmdk-border); border-radius:14px; box-shadow:0 24px 80px rgba(0,0,0,.55);
}
.cmdk-input-row{
  display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:center;
  padding:10px 12px; border-bottom:1px solid var(--cmdk-border);
}
#cmdk-title{ font-size:14px; color:var(--cmdk-muted); }
#cmdk-input{
  background:var(--cmdk-bg); color:var(--cmdk-text);
  border:1px solid var(--cmdk-border); border-radius:10px; padding:10px 12px; outline:none;
}
#cmdk-input::placeholder{ color:#7e879a; }
#cmdk-close{
  background:transparent; color:var(--cmdk-muted); border:1px solid var(--cmdk-border);
  border-radius:8px; padding:6px 10px; cursor:pointer;
}
.cmdk-list{ list-style:none; margin:0; padding:6px; max-height:min(54vh,520px); overflow:auto; }
.cmdk-item{
  display:flex; align-items:center; gap:10px; padding:10px; border-radius:10px; cursor:pointer;
  border:1px solid transparent;
}
.cmdk-item small{ color:var(--cmdk-muted); }
.cmdk-item kbd{
  margin-left:auto; font-size:11px; color:var(--cmdk-muted);
  border:1px solid var(--cmdk-border); padding:2px 6px; border-radius:6px;
}
.cmdk-item:hover, .cmdk-item[aria-selected="true"]{
  background: rgba(255,122,26,.12); border-color:#ff7a1a;
}
.cmdk-empty{ color:var(--cmdk-muted); padding:14px; text-align:center; }

/* one-time hint bubble */
.cmdk-hint{
  position:fixed; right:16px; bottom:18px; background:rgba(30,33,45,.92); color:#e9edf4;
  border:1px solid var(--cmdk-border); border-radius:10px; padding:8px 10px; z-index:9998;
  box-shadow:0 12px 30px rgba(0,0,0,.45); font-size:13px;
}
.cmdk-hint kbd{
  background:rgba(255,255,255,.08); border:1px solid var(--cmdk-border);
  border-radius:6px; padding:2px 6px; margin:0 2px;
}

/* (optional) reduced motion toggle support */
.reduce-motion *{ transition:none !important; animation:none !important; scroll-behavior:auto !important; }

/* small toast for feedback (copy email, toggles) */
#cmdk-toast{
  position:fixed; left:50%; bottom:24px; transform:translateX(-50%);
  background:rgba(30,33,45,.96); color:#e9edf4; border:1px solid var(--cmdk-border);
  border-radius:10px; padding:8px 12px; z-index:9999; display:none;
}
#cmdk-toast.show{ display:block; }
/* Command Palette: ensure hidden actually hides */
/* Make nav a flex row so we can push the button right */
.main-nav{ display:flex; align-items:center; gap:16px; }
.main-nav .push-right{ margin-left:auto; }

/* Show triggers only when the palette is initialized */
html:not(.cmdk-ready) .cmdk-trigger{ display:none !important; }

/* Search button */
.cmdk-trigger{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px;
  background:transparent; color:#e9edf4;
  border:1px solid rgba(255,255,255,.16);
  border-radius:8px; cursor:pointer;
  transition:background .15s,border-color .15s,transform .15s;
}
.cmdk-trigger:hover{
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.28);
  transform:translateY(-1px);
}
.cmdk-trigger .icon{ width:16px; height:16px; }
.cmdk-trigger .kbd{
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.18);
  border-radius:6px; padding:2px 6px; font-size:11px;
}
@media (max-width: 780px){ .cmdk-trigger .label, .cmdk-trigger .kbd{ display:none; } }

/* Ensure palette visibility follows [hidden] */
.cmdk-backdrop{ display:none; }
.cmdk-backdrop:not([hidden]){ display:flex; }
.cmdk-backdrop[hidden]{ display:none !important; }





/* === Page-turn transitions (PJAX) === */
#viewstack{
  position: relative;
  perspective: 1200px;       /* gives the “page turn” depth */
  isolation: isolate;
}
.view{
  position: relative;
  will-change: transform, opacity;
  transform-origin: 50% 50%;
}

/* entering view (starting pose) */
.view.enter{
  position: absolute; inset: 0;
  opacity: 0;
}

/* current view while exiting */
.view.exit{
  position: absolute; inset: 0;
  opacity: 1;
}

/* Forward (next page) — old slides LEFT, new comes from RIGHT with slight tilt */
.view.exit-left{ transform: translateX(0) rotateY(0deg); }
.view.exit-left.view-animate{ transition: transform .45s cubic-bezier(.2,.7,.2,1), opacity .3s ease; transform: translateX(-35%) rotateY(12deg); opacity: 0; }

.view.enter-right{ transform: translateX(35%) rotateY(-12deg); }
.view.enter-right.view-animate{ transition: transform .45s cubic-bezier(.2,.7,.2,1), opacity .3s ease; transform: translateX(0) rotateY(0deg); opacity: 1; }

/* Backward (previous page) — old slides RIGHT, new comes from LEFT with tilt */
.view.exit-right{ transform: translateX(0) rotateY(0deg); }
.view.exit-right.view-animate{ transition: transform .45s cubic-bezier(.2,.7,.2,1), opacity .3s ease; transform: translateX(35%) rotateY(-12deg); opacity: 0; }

.view.enter-left{ transform: translateX(-35%) rotateY(12deg); }
.view.enter-left.view-animate{ transition: transform .45s cubic-bezier(.2,.7,.2,1), opacity .3s ease; transform: translateX(0) rotateY(0deg); opacity: 1; }

@media (prefers-reduced-motion: reduce){
  .view.view-animate{ transition: none !important; }
}
