:root{
  --bg:#070711;
  --bg-2:#0d0d1f;
  --surface:rgba(255,255,255,0.04);
  --border:rgba(255,255,255,0.10);
  --text:#e9ecf3;
  --muted:#9aa3b8;
  --grad: linear-gradient(135deg,#7c3aed 0%,#3b82f6 45%,#06b6d4 100%);
  --grad-2: linear-gradient(135deg,#f472b6,#a78bfa,#22d3ee);
}
*{scroll-behavior:smooth}
html,body{background:var(--bg);color:var(--text);font-family:'Inter',sans-serif;overflow-x:hidden}
h1,h2,h3,h4,h5,.display-1,.display-2,.display-3,.display-4{font-family:'Space Grotesk',sans-serif;letter-spacing:-.02em}
.text-muted-2{color:var(--muted)!important}
.gradient-text{background:var(--grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}
.section{padding:120px 0;position:relative}
.section-tag{display:inline-block;padding:.4rem 1rem;border-radius:999px;font-size:.8rem;letter-spacing:.15em;text-transform:uppercase;background:rgba(124,58,237,.12);border:1px solid rgba(124,58,237,.35);color:#c4b5fd}

/* Animated background */
.bg-orbs{position:fixed;inset:0;z-index:-1;overflow:hidden;background:radial-gradient(ellipse at top,#0f0c2a 0%,var(--bg) 60%)}
.orb{position:absolute;border-radius:50%;filter:blur(120px);opacity:.55;animation:float 18s ease-in-out infinite}
.orb-1{width:520px;height:520px;background:#7c3aed;top:-120px;left:-120px}
.orb-2{width:480px;height:480px;background:#06b6d4;bottom:-150px;right:-100px;animation-delay:-6s}
.orb-3{width:380px;height:380px;background:#ec4899;top:40%;left:40%;animation-delay:-12s}
@keyframes float{0%,100%{transform:translate(0,0) scale(1)}50%{transform:translate(60px,-40px) scale(1.1)}}
.grid-overlay{position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.03) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.03) 1px,transparent 1px);background-size:60px 60px;mask-image:radial-gradient(ellipse at center,#000 30%,transparent 80%)}

/* Glass */
.glass{background:var(--surface);backdrop-filter:blur(20px) saturate(140%);-webkit-backdrop-filter:blur(20px) saturate(140%);border:1px solid var(--border);border-radius:20px}
.glass-nav{background:rgba(7,7,17,.55);backdrop-filter:blur(18px);border-bottom:1px solid var(--border)}
.glass-chip{background:rgba(255,255,255,.05);border:1px solid var(--border);color:#cbd5e1;padding:.4rem .9rem;border-radius:999px;font-size:.85rem;display:inline-flex;align-items:center;gap:.5rem}
.glass-chip .dot{width:8px;height:8px;border-radius:50%;background:#22c55e;box-shadow:0 0 12px #22c55e;animation:pulse 2s infinite}
@keyframes pulse{50%{opacity:.4}}

/* Navbar */
.navbar .nav-link{color:#cbd5e1;font-weight:500;position:relative;transition:.3s}
.navbar .nav-link:hover{color:#fff}
.navbar .nav-link::after{content:'';position:absolute;left:0;bottom:-4px;width:0;height:2px;background:var(--grad);transition:.3s}
.navbar .nav-link:hover::after{width:100%}
.navbar-brand{font-family:'Space Grotesk';font-size:1.5rem}

/* Buttons */
.btn-gradient{background:var(--grad);color:#fff;border:none;padding:.75rem 1.6rem;border-radius:14px;font-weight:600;box-shadow:0 10px 30px -10px rgba(124,58,237,.6);transition:.3s}
.btn-gradient:hover{transform:translateY(-3px);color:#fff;box-shadow:0 18px 40px -10px rgba(124,58,237,.8)}
.btn-glass{background:var(--surface);border:1px solid var(--border);color:#fff;padding:.75rem 1.6rem;border-radius:14px;font-weight:600;backdrop-filter:blur(12px);transition:.3s}
.btn-glass:hover{color:#fff;border-color:#7c3aed;transform:translateY(-3px)}

/* Hero */
.hero{min-height:100vh;padding-top:120px}
.hero h1{font-size:clamp(2.5rem,5vw,4.5rem)}
.stat-row h3{font-size:2rem}
.hero-photo-wrap{position:relative;display:flex;justify-content:center}
.hero-photo{width:100%;max-width:420px;border-radius:30px;border:1px solid var(--border);box-shadow:0 40px 80px -30px rgba(124,58,237,.6);position:relative;z-index:2}
.glow-ring{position:absolute;inset:-20px;border-radius:40px;background:var(--grad);filter:blur(60px);opacity:.45;animation:float 8s ease-in-out infinite}
.floating-card{position:absolute;padding:1rem 1.2rem;display:flex;align-items:center;gap:.8rem;z-index:3;animation:floatY 6s ease-in-out infinite}
.card-py{top:15%;left:-10px}
.card-js{bottom:10%;right:-10px;animation-delay:-3s}
@keyframes floatY{0%,100%{transform:translateY(0)}50%{transform:translateY(-15px)}}

/* Skill cards */
.skill-card{padding:1.5rem;border-radius:18px;height:100%;transition:.4s;position:relative;overflow:hidden}
.skill-card::before{content:'';position:absolute;inset:0;background:var(--grad);opacity:0;transition:.4s;z-index:-1}
.skill-card:hover{transform:translateY(-8px);border-color:rgba(124,58,237,.5)}
.skill-card .badge{background:rgba(124,58,237,.15);color:#c4b5fd;font-weight:500;padding:.3rem .7rem;border-radius:999px;font-size:.7rem}
.skill-card .skill-icon{width:48px;height:48px;border-radius:12px;background:var(--grad);display:flex;align-items:center;justify-content:center;color:#fff;font-size:1.4rem;margin-bottom:1rem}

/* Projects */
.project-card{border-radius:24px;overflow:hidden;height:100%;transition:.4s;position:relative}
.project-card:hover{transform:translateY(-10px)}
.project-card .project-img{aspect-ratio:16/10;overflow:hidden}
.project-card .project-img img{width:100%;height:100%;object-fit:cover;transition:.6s}
.project-card:hover .project-img img{transform:scale(1.08)}
.project-card .project-body{padding:1.5rem}
.project-card .project-tags span{font-size:.7rem;padding:.25rem .6rem;border-radius:999px;background:rgba(255,255,255,.06);border:1px solid var(--border);margin-right:.3rem;color:#cbd5e1}
.project-desc {
  font-size: 1rem;
  line-height: 1.5;
}
/* Certifications */
.cert-card{padding:1.5rem;border-radius:18px;height:100%;display:flex;flex-direction:column;justify-content:space-between;transition:.4s;position:relative;overflow:hidden}
.cert-card::after{content:'';position:absolute;top:-2px;left:-2px;right:-2px;bottom:-2px;border-radius:20px;background:var(--grad);z-index:-1;opacity:0;transition:.4s}
.cert-card:hover{transform:translateY(-6px)}
.cert-card:hover::after{opacity:.6}
.cert-card .cert-issuer{font-size:.75rem;text-transform:uppercase;letter-spacing:.1em;color:#a78bfa;font-weight:600}
.cert-card h6{margin:.6rem 0 1rem;font-weight:600;line-height:1.35}
.cert-card .verify-btn{display:inline-flex;align-items:center;gap:.4rem;font-size:.8rem;color:#cbd5e1;text-decoration:none;padding:.45rem .8rem;border-radius:10px;background:rgba(255,255,255,.05);border:1px solid var(--border);transition:.3s;width:fit-content}
.cert-card .verify-btn:hover{background:var(--grad);color:#fff;border-color:transparent}
.cert-icon{width:42px;height:42px;border-radius:12px;background:var(--grad);display:flex;align-items:center;justify-content:center;color:#fff;font-size:1.1rem;margin-bottom:.6rem}

/* Contact */
.contact-card{display:flex;flex-direction:column;align-items:center;text-align:center;padding:2rem 1rem;border-radius:20px;text-decoration:none;color:#fff;transition:.4s;height:100%}
.contact-card:hover{transform:translateY(-8px);color:#fff;border-color:rgba(124,58,237,.5)}

/* About photo */
.about-photo-wrap{position:relative;border-radius:24px}
.about-photo-wrap::before{content:'';position:absolute;inset:-20px;background:var(--grad);filter:blur(60px);opacity:.35;z-index:-1;border-radius:30px}

footer{border-top:1px solid var(--border);margin-top:60px}

@media (max-width:768px){
  .section{padding:80px 0}
  .floating-card{display:none}
  .hero{padding-top:100px}
}

/* ====== Enhanced Glassmorphism ====== */
.glass{position:relative;background:linear-gradient(135deg,rgba(255,255,255,.07),rgba(255,255,255,.02));backdrop-filter:blur(24px) saturate(160%);-webkit-backdrop-filter:blur(24px) saturate(160%);border:1px solid rgba(255,255,255,.12);box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 20px 60px -30px rgba(0,0,0,.6)}
.glass::before{content:"";position:absolute;inset:0;border-radius:inherit;padding:1px;background:linear-gradient(135deg,rgba(255,255,255,.35),rgba(255,255,255,0) 40%,rgba(124,58,237,.25) 80%);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none;opacity:.8}
.glass-chip{background:linear-gradient(135deg,rgba(255,255,255,.08),rgba(255,255,255,.02));backdrop-filter:blur(18px) saturate(150%)}

/* ====== Certifications: tabs + groups ====== */
.cert-tabs{display:flex;flex-wrap:wrap;gap:.5rem;padding:.75rem;border-radius:18px}
.cert-tab{display:inline-flex;align-items:center;gap:.45rem;padding:.5rem .95rem;border-radius:12px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.03);color:#cbd5e1;font-size:.85rem;font-weight:500;cursor:pointer;transition:.25s}
.cert-tab:hover{color:#fff;border-color:rgba(124,58,237,.5);transform:translateY(-2px)}
.cert-tab.active{background:var(--grad);color:#fff;border-color:transparent;box-shadow:0 10px 25px -10px rgba(124,58,237,.7)}
.cert-tab .count{background:rgba(0,0,0,.25);padding:.05rem .5rem;border-radius:999px;font-size:.72rem;font-weight:700}
.cert-tab.active .count{background:rgba(255,255,255,.22)}

.cert-pane{display:none;animation:fadeUp .4s ease}
.cert-pane.active{display:block}
@keyframes fadeUp{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

.cert-group-block{margin-bottom:2.5rem}
.cert-group-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem;padding:.75rem 1.1rem;border-radius:14px;background:linear-gradient(90deg,rgba(124,58,237,.18),rgba(6,182,212,.08) 80%);border:1px solid rgba(255,255,255,.08);backdrop-filter:blur(10px)}
.cert-group-title{font-family:'Space Grotesk';font-weight:700;font-size:1.05rem;display:inline-flex;align-items:center;gap:.5rem;color:#fff}
.cert-group-title i{background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent}
.cert-group-count{font-size:.78rem;color:#cbd5e1;background:rgba(255,255,255,.06);padding:.25rem .7rem;border-radius:999px;border:1px solid rgba(255,255,255,.08)}

/* ====== Cert card with preview image ====== */
.cert-card{display:flex;flex-direction:column;overflow:hidden;border-radius:20px;transition:.35s;height:100%}
.cert-card:hover{transform:translateY(-6px);border-color:rgba(124,58,237,.45);box-shadow:0 30px 60px -25px rgba(124,58,237,.45)}
.cert-preview{position:relative;display:block;width:100%;padding:0;border:0;background:#0a0a18;cursor:zoom-in;overflow:hidden;border-bottom:1px solid rgba(255,255,255,.08)}
.cert-preview img{width:100%;height:170px;object-fit:cover;display:block;transition:transform .5s ease,filter .3s}
.cert-preview:hover img{transform:scale(1.06);filter:brightness(1.05)}
.cert-zoom{position:absolute;inset:auto 0 0 0;padding:.5rem;background:linear-gradient(transparent,rgba(0,0,0,.75));color:#fff;font-size:.78rem;display:flex;align-items:center;justify-content:center;gap:.4rem;opacity:0;transition:.3s}
.cert-preview:hover .cert-zoom{opacity:1}
.cert-body{padding:1rem 1.1rem 1.1rem;display:flex;flex-direction:column;gap:.5rem;flex:1}
.cert-issuer{font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;color:#a78bfa;display:inline-flex;align-items:center;gap:.4rem;font-weight:600}
.cert-card h6{font-size:.95rem;line-height:1.35;color:#fff;margin:0;font-weight:600;flex:1}
.cert-actions{display:flex;gap:.5rem;margin-top:.4rem}
.verify-btn{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:.4rem;padding:.5rem .7rem;border-radius:10px;background:rgba(124,58,237,.15);border:1px solid rgba(124,58,237,.4);color:#c4b5fd;font-size:.78rem;font-weight:600;text-decoration:none;transition:.25s}
.verify-btn:hover{background:var(--grad);color:#fff;border-color:transparent}
.download-btn{display:inline-flex;align-items:center;justify-content:center;width:38px;border-radius:10px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);color:#cbd5e1;text-decoration:none;transition:.25s}
.download-btn:hover{background:rgba(6,182,212,.18);border-color:#06b6d4;color:#06b6d4}

/* ====== Cert preview modal ====== */
.cert-modal{position:fixed;inset:0;z-index:1080;display:none;align-items:center;justify-content:center;padding:1rem}
.cert-modal.open{display:flex;animation:fadeUp .25s ease}
.cert-modal-backdrop{position:absolute;inset:0;background:rgba(3,4,15,.7);backdrop-filter:blur(14px)}
.cert-modal-content{position:relative;max-width:980px;width:100%;max-height:92vh;overflow:auto;border-radius:24px;padding:1.25rem}
.cert-modal-close{position:absolute;top:.85rem;right:.85rem;width:38px;height:38px;border-radius:50%;border:1px solid rgba(255,255,255,.15);background:rgba(0,0,0,.35);color:#fff;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;z-index:2;transition:.2s}
.cert-modal-close:hover{background:#ef4444;border-color:transparent}
.cert-modal-img-wrap{border-radius:16px;overflow:hidden;background:#0a0a18;border:1px solid rgba(255,255,255,.08)}
.cert-modal-img-wrap img{width:100%;height:auto;display:block}
.cert-modal-meta{padding:1.1rem .25rem 0}
.cert-modal-issuer{font-size:.75rem;letter-spacing:.15em;text-transform:uppercase;color:#a78bfa;font-weight:700;display:inline-flex;gap:.4rem;align-items:center}
.cert-modal-title{margin:.4rem 0 1rem;font-family:'Space Grotesk';color:#fff}
.cert-modal-actions{display:flex;gap:.6rem;flex-wrap:wrap}

/* Existing skill/project glass already inherit new .glass */
.skill-card{padding:1.25rem;height:100%;transition:.3s}
.skill-card:hover{transform:translateY(-5px);border-color:rgba(124,58,237,.45)}
.skill-icon{width:46px;height:46px;display:grid;place-items:center;background:var(--grad);color:#fff;border-radius:12px;font-size:1.2rem;box-shadow:0 10px 25px -10px rgba(124,58,237,.7)}
.skill-card .badge{background:rgba(124,58,237,.18);color:#c4b5fd;border:1px solid rgba(124,58,237,.4);font-weight:500}

.project-card{overflow:hidden;height:100%;transition:.35s}
.project-card:hover{transform:translateY(-6px)}
.project-img{aspect-ratio:16/10;overflow:hidden;background:#0a0a18}
.project-img img{width:100%;height:100%;object-fit:cover;transition:transform .6s}
.project-card:hover .project-img img{transform:scale(1.08)}
.project-body{padding:1.1rem 1.2rem 1.3rem}
.project-tags span{display:inline-block;padding:.25rem .65rem;border-radius:999px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);color:#cbd5e1;font-size:.72rem;margin-right:.35rem}

.contact-card{display:block;padding:1.6rem;text-align:center;text-decoration:none;color:#fff;transition:.3s;height:100%}
.contact-card:hover{transform:translateY(-6px);color:#fff;border-color:rgba(124,58,237,.45)}

/* Hero photo */
.hero-photo-wrap{position:relative;aspect-ratio:1/1;max-width:440px;margin:0 auto}
.hero-photo{width:100%;height:100%;object-fit:cover;border-radius:30px;border:1px solid rgba(255,255,255,.12);position:relative;z-index:2}
.glow-ring{position:absolute;inset:-20px;border-radius:40px;background:var(--grad);filter:blur(40px);opacity:.55;animation:float 8s ease-in-out infinite}
.floating-card{position:absolute;padding:.85rem 1.1rem;border-radius:16px;display:flex;align-items:center;gap:.75rem;z-index:3;font-size:.85rem}
.card-py{top:8%;left:-8%}
.card-js{bottom:8%;right:-8%}

.stat-row h3{font-size:1.8rem}

/* Mobile polish */
@media (max-width: 768px){
  .section{padding:80px 0}
  .hero{padding-top:100px}
  .floating-card{display:none}
  .cert-preview img{height:150px}
}

/* ====== 10 Categories Section ====== */
#categories-grid{display:flex;flex-direction:column;gap:2rem}

/* ====== Horizontal scroller dots (replaces arrows/line UX) ====== */
.scroll-dots{display:flex;gap:8px;justify-content:center;align-items:center;margin-top:.85rem;}
.scroll-dot{width:10px;height:10px;border-radius:50%;background:transparent;border:2px solid rgba(255,255,255,.18);cursor:pointer;transition:.2s;display:inline-flex;align-items:center;justify-content:center;transform:translateZ(0);padding:0;margin:0;vertical-align:middle;}
.scroll-dot{position:relative;box-sizing:border-box}
.scroll-dot.active{background:transparent;border-color:transparent;box-shadow:0 0 0 4px rgba(124,58,237,.18)}
.scroll-dot.active::before{content:'';position:absolute;inset:-1px;border-radius:50%;padding:2px;background:var(--grad);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none}
.scroll-dot::before{content:'';position:absolute;inset:0;border-radius:50%;pointer-events:none}
.scroll-dot:not(.active)::before{background:rgba(255,255,255,.14)}
.scroll-dot:focus{outline:none;box-shadow:0 0 0 4px rgba(124,58,237,.18)}

/* Hide arrow controls when dots are enabled */
.scroll-arrow{display:none}

/* Slightly reduce x-axis scrollbar visibility for horizontal scrollers */
.tech-scroller::-webkit-scrollbar{height:7px;}
.tech-scroller::-webkit-scrollbar-thumb{opacity:.55;}
.tech-scroller{scrollbar-width:thin;scrollbar-color:rgba(124,58,237,.35) transparent;}

.cert-scroller{scrollbar-width:none}
.cert-scroller::-webkit-scrollbar-thumb{opacity:.55}
.category-block{padding:1.1rem 1.1rem;border-radius:24px;position:relative;overflow:hidden}
.category-block::after{content:"";position:absolute;top:0;left:0;width:6px;height:100%;background:var(--grad);opacity:.85}
.category-header{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:.5rem;margin-bottom:.5rem}
.category-title{display:flex;align-items:center;gap:1rem}
.category-num{font-family:'Space Grotesk';font-weight:800;font-size:1.7rem;line-height:1;background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent;min-width:44px}
.category-eyebrow{font-size:.7rem;letter-spacing:.18em;text-transform:uppercase;color:#a78bfa;font-weight:700}
.category-title h3{font-family:'Space Grotesk';font-weight:700;color:#fff;font-size:1.1rem;margin:.1rem 0 0;display:flex;align-items:center;gap:.5rem}
.category-title h3 i{background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent;font-size:1.3rem}
.category-count{font-size:.75rem;color:#cbd5e1;background:rgba(255,255,255,.06);padding:.4rem .9rem;border-radius:999px;border:1px solid rgba(255,255,255,.1);font-weight:600}

.tech-chips{display:flex;flex-wrap:wrap;gap:.45rem;margin-bottom:1.2rem;padding:.85rem 1rem;border-radius:14px;background:linear-gradient(90deg,rgba(124,58,237,.10),rgba(6,182,212,.06));border:1px solid rgba(255,255,255,.06)}
.tech-chip{display:inline-flex;align-items:center;gap:.35rem;font-size:.75rem;font-weight:500;padding:.35rem .75rem;border-radius:999px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.1);color:#e9ecf3;backdrop-filter:blur(10px);transition:.25s}
.tech-chip i{font-size:.7rem;color:#a78bfa}
.tech-chip:hover{background:rgba(124,58,237,.18);border-color:rgba(124,58,237,.5);transform:translateY(-2px)}

/* cert-scroller-wrap base — overflow and padding set by JS + new CSS block at bottom */
/* .cert-scroller flex properties are fully controlled by JS buildSmartCarousel */

/* cat-cert-card base look — flex-basis overridden per-breakpoint by JS */
.cat-cert-card{min-width:0;display:flex;flex-direction:column;border-radius:18px;overflow:hidden;transition:.35s;background:linear-gradient(135deg,rgba(255,255,255,.06),rgba(255,255,255,.015))}
.cat-cert-card:hover{transform:translateY(-5px);border-color:rgba(124,58,237,.5);box-shadow:0 25px 50px -20px rgba(124,58,237,.5)}
.cat-cert-card .cert-preview{position:relative;display:block;width:100%;padding:0;border:0;background:#0a0a18;cursor:zoom-in;overflow:hidden;aspect-ratio:16/10}
.cat-cert-card .cert-preview img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .5s}
.cat-cert-card .cert-preview:hover img{transform:scale(1.07)}
.cat-cert-card .cert-body{padding:.9rem 1rem 1rem;display:flex;flex-direction:column;gap:.45rem;flex:1}
.cat-cert-card .cert-issuer{font-size:.68rem;letter-spacing:.12em;text-transform:uppercase;color:#a78bfa;font-weight:700;display:inline-flex;gap:.35rem;align-items:center}
.cat-cert-card h6{font-size:.9rem;line-height:1.35;color:#fff;margin:0;font-weight:600;flex:1}
.cat-cert-card .cert-actions{display:flex;gap:.4rem;margin-top:.4rem}

.scroll-arrow{position:absolute;top:50%;transform:translateY(-50%);width:42px;height:42px;border-radius:50%;border:1px solid rgba(255,255,255,.15);background:rgba(13,13,31,.85);color:#fff;cursor:pointer;z-index:5;display:grid;place-items:center;backdrop-filter:blur(12px);transition:.25s;font-size:1rem}
.scroll-arrow:hover{background:var(--grad);border-color:transparent;transform:translateY(-50%) scale(1.08)}
.scroll-arrow.disabled{opacity:.25;pointer-events:none}
.scroll-prev{left:-8px}
.scroll-next{right:-8px}

@media (max-width: 640px){
  .category-num{font-size:1.4rem;min-width:36px}
  .category-title h3{font-size:.95rem}
  .scroll-arrow{display:none}
}

/* ====== Hero typing effect ====== */
.typed-wrap{display:inline-flex;align-items:baseline;gap:.15rem;min-height:1.1em}
#typed{white-space:nowrap}
.type-caret{display:inline-block;width:3px;background:linear-gradient(180deg,#7c3aed,#06b6d4);margin-left:6px;animation:caretBlink 1s steps(2) infinite;align-self:stretch;border-radius:2px;min-height:.9em}
@keyframes caretBlink{50%{opacity:0}}

/* ====== Tech-card (Technical Stack scroller) ====== */
.tech-scroller .cat-tech-card{
  flex:0 0 calc((100% - 2rem)/3); min-width:0; scroll-snap-align:start;
  display:flex; align-items:center; gap:1rem;
  padding:1.1rem 1.2rem; border-radius:18px;
  background:linear-gradient(135deg,rgba(255,255,255,.07),rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.1); transition:.3s;
}
.tech-scroller .cat-tech-card:hover{
  border-color:rgba(124,58,237,.5);
  box-shadow:0 0 0 1px rgba(124,58,237,.4), 0 20px 50px -10px rgba(124,58,237,.55), 0 0 40px -5px rgba(6,182,212,.2);
}
.tech-scroller .tech-icon{
  width:46px; height:46px; flex:0 0 46px; border-radius:14px;
  display:grid; place-items:center; color:#fff; font-size:1.2rem;
  background:var(--grad); box-shadow:0 10px 25px -10px rgba(124,58,237,.7);
}
.tech-scroller .cat-tech-card h6{
  margin:0; font-size:.95rem; font-weight:600; color:#fff; line-height:1.3;
}
@media (max-width: 992px){
  .tech-scroller .cat-tech-card{flex-basis:calc((100% - 1rem)/2)}
}
@media (max-width: 640px){
  .tech-scroller .cat-tech-card{flex-basis:85%}
}

/* ====== Hero Flip Designations ====== */
.flip-wrap {
  display:inline-block;
  overflow:hidden;
  height:1.15em;
  vertical-align:middle;
}
.flip-track {
  display:inline-flex;
  flex-direction:column;
}
.flip-item {
  display:block;
  background:var(--grad);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  transform:translateY(100%);
  opacity:0;
  transition:transform .45s cubic-bezier(.4,0,.2,1), opacity .35s ease;
  white-space:nowrap;
  line-height:1.15;
}
.flip-item.active {
  transform:translateY(0);
  opacity:1;
}
.flip-item.leaving {
  transform:translateY(-100%);
  opacity:0;
  position:absolute;
}

/* ====== Project card CTA ====== */
.proj-card-cta { display:flex; }
.proj-view-btn {
  display:inline-flex; align-items:center; gap:.4rem;
  font-size:.82rem; font-weight:600; color:#a78bfa;
  padding:.4rem .8rem; border-radius:10px;
  border:1px solid rgba(124,58,237,.35);
  background:rgba(124,58,237,.08);
  transition:.25s;
}
.project-card:hover .proj-view-btn {
  background:var(--grad); color:#fff; border-color:transparent;
}

/* ====== Project Detail Modal ====== */
.proj-modal {
  position:fixed; inset:0; z-index:1090;
  display:none; align-items:center; justify-content:center; padding:1rem;
}
.proj-modal.open { display:flex; animation:fadeUp .28s ease; }
.proj-modal-backdrop {
  position:absolute; inset:0;
  background:rgba(3,4,15,.75); backdrop-filter:blur(16px);
}
.proj-modal-content {
  position:relative; max-width:760px; width:100%;
  max-height:90vh; overflow:auto; border-radius:28px;
  display:flex; flex-direction:column;
}
.proj-modal-close {
  position:absolute; top:.9rem; right:.9rem;
  width:40px; height:40px; border-radius:50%;
  border:1px solid rgba(255,255,255,.15); background:rgba(0,0,0,.4);
  color:#fff; cursor:pointer; display:grid; place-items:center;
  z-index:2; transition:.2s;
}
.proj-modal-close:hover { background:#ef4444; border-color:transparent; }
.proj-modal-img-wrap-legacy {
  position:relative; aspect-ratio:16/9; overflow:hidden;
  border-radius:24px 24px 0 0; background:#0a0a18;
}
.proj-modal-img-wrap-legacy img {
  width:100%; height:100%; object-fit:cover; display:block;
}
.proj-modal-img-overlay {
  position:absolute; inset:0;
  background:linear-gradient(to bottom, transparent 50%, rgba(13,13,31,.95));
}
.proj-modal-body { padding:1.6rem 1.8rem 2rem; }
.proj-modal-tags { display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:1rem; }
.proj-tag {
  font-size:.72rem; font-weight:600; padding:.3rem .7rem;
  border-radius:999px; background:rgba(124,58,237,.15);
  border:1px solid rgba(124,58,237,.4); color:#c4b5fd;
}
.proj-modal-title {
  font-family:'Space Grotesk'; font-size:1.6rem; font-weight:700;
  color:#fff; margin:0 0 .8rem; line-height:1.25;
}
.proj-modal-desc {
  color:var(--muted); font-size:.95rem; line-height:1.7; margin-bottom:1.4rem;
}
.proj-modal-meta {
  display:grid; grid-template-columns:repeat(3,1fr); gap:1px;
  background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.07);
  border-radius:16px; overflow:hidden; margin-bottom:1.5rem;
}
.proj-meta-item { background:var(--bg-2,#0d0d1f); padding:1rem 1.2rem; }
.proj-meta-label {
  font-size:.68rem; text-transform:uppercase; letter-spacing:.1em;
  color:var(--muted); margin-bottom:.35rem;
}
.proj-meta-val { font-size:.9rem; font-weight:600; color:#fff; }
.proj-modal-actions { display:flex; gap:.75rem; flex-wrap:wrap; }

/* ====== Tech card redesigned (icon + name + level) ====== */
.tech-scroller .cat-tech-card {
  flex:0 0 calc((100% - 2rem)/3); min-width:200px; scroll-snap-align:start;
  display:flex; flex-direction:column; gap:.85rem;
  padding:1.3rem 1.25rem; border-radius:20px;
  background:linear-gradient(135deg,rgba(255,255,255,.07),rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.1); transition:.3s;
}
.tech-scroller .cat-tech-card:hover {
  border-color:rgba(124,58,237,.5);
  box-shadow:0 0 0 1px rgba(124,58,237,.4), 0 20px 50px -10px rgba(124,58,237,.55), 0 0 40px -5px rgba(6,182,212,.2);
}
.tech-scroller .tech-icon {
  width:52px; height:52px; flex:0 0 52px; border-radius:16px;
  display:grid; place-items:center; color:#fff; font-size:1.4rem;
  background:var(--grad); box-shadow:0 10px 25px -10px rgba(124,58,237,.7);
}
.tech-card-body { display:flex; flex-direction:column; gap:.4rem; align-items:center; text-align:center; }

.tech-scroller .cat-tech-card h6 {
  margin:0; font-size:.95rem; font-weight:700; color:#fff; line-height:1.3;
}
.tech-desc{
  margin:0;
  font-size:.78rem;
  line-height:1.55;
  color:var(--muted);
  max-width:18rem;
}

.tech-level-badge {
  display:inline-flex; align-items:center; gap:.3rem;
  font-size:.68rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  padding:.28rem .65rem; border-radius:999px;
  color:var(--lc,#7c3aed);
  background:color-mix(in srgb, var(--lc,#7c3aed) 15%, transparent);
  border:1px solid color-mix(in srgb, var(--lc,#7c3aed) 40%, transparent);
}
.tech-level-badge::before {
  content:''; width:5px; height:5px; border-radius:50%;
  background:var(--lc,#7c3aed);
  box-shadow:0 0 6px var(--lc,#7c3aed);
}

/* Category insight quote */
.category-insight {
  display:flex; align-items:flex-start; gap:.7rem;
  font-size:.84rem; color:var(--muted); font-style:italic; line-height:1.6;
  padding:.5rem .8rem; margin-bottom:.7rem;
  border-left:3px solid;
  border-image:var(--grad) 1;
  background:rgba(124,58,237,.05);
  border-radius:0 10px 10px 0;
}
.category-insight i {
  font-size:1.1rem; color:#7c3aed; flex:0 0 auto; margin-top:.05rem;
}

/* Filler card for incomplete rows */
.cat-filler-card {
  flex:0 0 calc((100% - 2rem)/3); min-width:200px; scroll-snap-align:start;
  border-radius:20px; display:flex; align-items:center; justify-content:center;
  padding:1.5rem; border-style:dashed !important; opacity:.65;
}
.filler-inner {
  text-align:center; display:flex; flex-direction:column; align-items:center; gap:.75rem;
}
.filler-inner i {
  font-size:1.8rem;
  background:var(--grad); -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent;
}
.filler-inner p { font-size:.8rem; color:var(--muted); margin:0; line-height:1.5; }

/* ====== More gap between category rows ====== */
#tech-grid, #certs-grid { display:flex; flex-direction:column; gap:3rem; }

/* ====== Experience Section ====== */
.exp-scroll-outer { overflow-x:auto; padding-bottom:1rem; cursor:grab; }
.exp-scroll-outer:active { cursor:grabbing; }
.exp-scroll-outer::-webkit-scrollbar { height:6px; }
.exp-scroll-outer::-webkit-scrollbar-thumb { background:var(--grad); border-radius:6px; }
.exp-scroll-outer::-webkit-scrollbar-track { background:rgba(255,255,255,.04); border-radius:6px; }
#exp-scroller {
  display:flex;
}
.exp-card {
  flex:0 0 340px; border-radius:24px; padding:1.6rem 1.5rem;
  display:flex; flex-direction:column; gap:.9rem; transition:.35s;
  position:relative; overflow:hidden;
}
.exp-card::after {
  content:''; position:absolute; top:0; left:0; width:4px; height:100%;
  background:var(--grad); opacity:.9;
}
.exp-card:hover { transform:translateY(-8px); border-color:rgba(124,58,237,.5); }
.exp-card-top { display:flex; justify-content:space-between; align-items:flex-start; }
.exp-icon {
  width:52px; height:52px; border-radius:16px; border:1.5px solid;
  display:grid; place-items:center; font-size:1.4rem;
}
.exp-type-badge {
  font-size:.68rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase;
  padding:.3rem .75rem; border-radius:999px;
  background:rgba(124,58,237,.12); border:1px solid rgba(124,58,237,.35); color:#c4b5fd;
}
.exp-period { font-size:.78rem; color:var(--muted); font-weight:600; letter-spacing:.05em; }
.exp-role { font-family:'Space Grotesk'; font-size:1.15rem; font-weight:700; color:#fff; margin:0; }
.exp-company {
  font-size:.82rem; color:#a78bfa; font-weight:600;
  display:flex; align-items:center; gap:.3rem;
}
.exp-desc { font-size:.84rem; color:var(--muted); line-height:1.65; margin:0; flex:1; }
.exp-skills { display:flex; flex-wrap:wrap; gap:.4rem; }
.exp-skills span {
  font-size:.7rem; font-weight:600; padding:.25rem .65rem; border-radius:999px;
  background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1); color:#cbd5e1;
}

/* ====== Research / Publications Section ====== */
.paper-card {
  position:relative;
  background:linear-gradient(180deg,rgba(20,24,38,.9),rgba(16,19,31,.95));
  border:1px solid rgba(35,40,59,.8);
  border-radius:22px; padding:1.1rem 1.7rem;
  overflow:hidden;
  box-shadow:0 24px 60px -30px rgba(0,0,0,.7);
  margin-bottom:1.1rem;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0 2rem;
  align-items:start;
}
.paper-card::before {
  content:''; position:absolute; top:-60%; right:-20%;
  width:420px; height:420px; background:var(--grad);
  opacity:.07; filter:blur(60px); pointer-events:none;
}
.paper-top {
  display:flex; justify-content:space-between; align-items:flex-start;
  gap:1rem; flex-wrap:wrap; margin-bottom:1rem;
  grid-column: 1 / -1;
}
.paper-status {
  display:inline-flex; align-items:center; gap:.5rem;
  background:rgba(34,197,94,.1); border:1px solid rgba(34,197,94,.35);
  color:#22c55e; font-size:.78rem; font-weight:700;
  letter-spacing:.05em; padding:.45rem .9rem; border-radius:999px;
}
.paper-status .dot {
  width:7px; height:7px; border-radius:50%;
  background:#22c55e; box-shadow:0 0 0 3px rgba(34,197,94,.2);
}
.article-type {
  font-size:.78rem; font-weight:600; letter-spacing:.05em;
  color:var(--muted); border:1px solid rgba(255,255,255,.1);
  padding:.45rem .9rem; border-radius:999px;
}
.paper-title {
  font-family:'Space Grotesk'; font-size:clamp(1.04rem,2vw,1.3rem);
  font-weight:700; line-height:1.35; margin:0 0 .6rem; color:#fff;
  grid-column: 1 / -1;
}
.paper-subject {
  display:inline-block; font-size:.75rem; color:#06b6d4;
  background:rgba(6,182,212,.08); border:1px solid rgba(6,182,212,.25);
  padding:.28rem .7rem; border-radius:8px; margin-bottom:1rem;
  grid-column: 1 / -1;
}
.paper-abstract {
  font-size:.855rem; line-height:1.65; color:var(--muted); margin:0 0 1rem;
}
.stats-row {
  display:grid; grid-template-columns:repeat(3,1fr); gap:.6rem; margin-bottom:1rem;
}
.stat-box {
  background:rgba(20,24,38,.8); border:1px solid rgba(35,40,59,.8);
  border-radius:12px; padding:.7rem .6rem; text-align:center;
}
.stat-value {
  font-size:1.1rem; font-weight:800; color:#fff;
  background:var(--grad); -webkit-background-clip:text;
  background-clip:text; -webkit-text-fill-color:transparent;
  margin-bottom:.2rem; line-height:1.2;
}
.stat-label { font-size:.72rem; color:var(--muted); }
.keyword-row { display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:.9rem; }
.keyword-chip {
  font-size:.75rem; color:var(--muted);
  background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.1);
  padding:.35rem .75rem; border-radius:8px;
}
.meta-grid {
  display:grid; grid-template-columns:repeat(2,1fr);
  gap:1px; background:rgba(35,40,59,.8);
  border:1px solid rgba(35,40,59,.8); border-radius:12px;
  overflow:hidden; margin-bottom:.9rem;
}
.meta-cell { background:rgba(20,24,38,.9); padding:.65rem 1rem; }
.meta-label {
  font-size:.68rem; text-transform:uppercase; letter-spacing:.1em;
  color:var(--muted); margin-bottom:.4rem;
}
.meta-value { font-size:.9rem; font-weight:600; color:var(--text); word-break:break-word; }
.meta-value a { color:#06b6d4; text-decoration:none; }
.meta-value a:hover { text-decoration:underline; }
timeline {
  /* dates removed in JS; timeline styles retained */
  display:flex; align-items:center; gap:.9rem;
  padding:1.1rem 1.3rem;
  background:rgba(20,24,38,.8); border:1px solid rgba(35,40,59,.8);
  border-radius:14px; margin-bottom:1.8rem;
}
.timeline-point { flex:1; min-width:0; }
.timeline-point .meta-value { font-size:.88rem; font-weight:600; }
.timeline-track {
  flex:0 0 auto; width:64px; height:2px;
  background:var(--grad); border-radius:2px; position:relative;
}
.timeline-track::after {
  content:''; position:absolute; right:-4px; top:-3px;
  width:8px; height:8px; border-radius:50%; background:#06b6d4;
}
.people-grid { display:grid; grid-template-columns:1fr 1fr; gap:.6rem; margin-bottom:.9rem; }
.person-role {
  font-size:.68rem; text-transform:uppercase; letter-spacing:.12em;
  color:var(--muted); margin-bottom:.6rem; font-weight:700;
}
.supervisor {
  display:flex; flex-direction:column; gap:.5rem;
  padding:.7rem .9rem;
  background:rgba(20,24,38,.8); border:1px solid rgba(35,40,59,.8);
  border-radius:12px;
}
.supervisor-body { display:flex; align-items:center; gap:.9rem; }
.supervisor-avatar {
  flex:0 0 auto; width:42px; height:42px; border-radius:50%;
  background:var(--grad); display:grid; place-items:center;
  font-weight:700; font-size:.9rem; color:#0b0e16;
}
.supervisor-info { min-width:0; flex:1; }
.supervisor-name { font-size:.9rem; font-weight:700; color:var(--text); margin-bottom:.1rem; }
.supervisor-qual { font-size:.75rem; color:#06b6d4; letter-spacing:.02em; margin-bottom:.25rem; }
.supervisor-meta {
  font-size:.78rem; color:var(--muted);
  display:flex; flex-wrap:wrap; gap:.5rem; align-items:center;
}
.supervisor-meta a { color:var(--muted); text-decoration:none; }
.supervisor-meta a:hover { color:#06b6d4; }
.supervisor-meta .sep { opacity:.4; }
.paper-actions {
  display:flex; flex-wrap:wrap; gap:.6rem; align-items:center;
  grid-column: 1 / -1; margin-top:.4rem;
}
.btn-primary {
  display:inline-flex; align-items:center; gap:.55rem;
  background:var(--grad); color:#0b0e16; font-weight:700;
  font-size:.88rem; padding:.75rem 1.3rem; border-radius:10px;
  text-decoration:none; transition:.2s;
}
.btn-primary:hover { transform:translateY(-2px); box-shadow:0 12px 24px -10px rgba(124,58,237,.55); }
.btn-ghost {
  display:inline-flex; align-items:center; gap:.55rem;
  color:var(--text); font-weight:600; font-size:.88rem;
  padding:.75rem 1.1rem; border-radius:10px;
  border:1px solid rgba(255,255,255,.1); text-decoration:none; transition:.2s;
}
.btn-ghost:hover { border-color:#06b6d4; color:#06b6d4; }
.id-chip { font-size:.78rem; color:var(--muted); margin-left:auto; }
.id-chip b { color:var(--text); font-weight:600; }

@media (max-width: 640px) {
  .proj-modal-meta { grid-template-columns:1fr; }
  .stats-row { grid-template-columns:1fr; }
  .meta-grid { grid-template-columns:1fr; }
  .people-grid { grid-template-columns:1fr; }
  .timeline-track { display:none; }
  .id-chip { margin-left:0; width:100%; }
  .paper-card { padding:1.25rem 1rem; }
}

/* ── Auto-carousel arrows ─────────────────────────────── */
.carousel-arrow{position:absolute;top:50%;transform:translateY(-50%);width:38px;height:38px;border-radius:50%;border:1px solid rgba(255,255,255,.18);background:rgba(13,13,31,.82);color:#fff;cursor:pointer;z-index:6;display:grid;place-items:center;backdrop-filter:blur(14px);transition:background .22s,transform .22s,opacity .22s;font-size:.92rem;padding:0}
.carousel-arrow:hover{background:linear-gradient(135deg,#7c3aed,#06b6d4);border-color:transparent;transform:translateY(-50%) scale(1.1)}
.carousel-prev{left:-6px}
.carousel-next{right:-6px}

/* Progress bar */
.carousel-progress-wrap{height:3px;border-radius:2px;background:rgba(255,255,255,.08);overflow:hidden;margin-bottom:.6rem}
.carousel-progress{height:100%;width:0%;background:linear-gradient(90deg,#7c3aed,#06b6d4);border-radius:2px;will-change:width}

/* scrollbar hidden — JS-driven carousel, no native scroll */
.cert-scroller-wrap .cert-scroller{scrollbar-width:none}
.cert-scroller-wrap .cert-scroller::-webkit-scrollbar{display:none}

/* Card hover highlight — tech & cert cards */
.cat-tech-card:hover,
.cat-cert-card:hover {
  border-color: rgba(124,58,237,.65) !important;
  box-shadow: 0 0 0 1.5px rgba(124,58,237,.45), 0 0 40px -5px rgba(124,58,237,.5), 0 0 60px -10px rgba(6,182,212,.2) !important;
  z-index: 10;
  position: relative;
  transition: box-shadow .28s, border-color .28s;
}
.cat-tech-card, .cat-cert-card {
  transition: box-shadow .28s, border-color .28s;
}

/* Remove progress bar entirely */
.carousel-progress-wrap { display: none !important; }

/* ── scrollbar hidden on scroller ─────────────────────────── */
.scroll-dots { display: none; }

/* Experience card — ensure enough height for longer text */
.exp-desc { font-size: .88rem; line-height: 1.6; }

/* ── Research card: 2-column compact layout ────────────── */
.paper-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto 1fr auto;
  gap: 0 2rem;
  align-items: start;
}
.paper-col-left  { grid-column: 1; }
.paper-col-right { grid-column: 2; grid-row: 3; align-self: start; }
.paper-top       { grid-column: 1 / -1; }
.paper-title     { grid-column: 1 / -1; }
.paper-subject   { grid-column: 1 / -1; }
.paper-col-left  { grid-column: 1; grid-row: 3; }
.paper-actions   { grid-column: 1 / -1; }

@media (max-width: 768px) {
  .paper-card { grid-template-columns: 1fr; }
  .paper-col-left,
  .paper-col-right { grid-column: 1; grid-row: auto; }
  .paper-col-left { padding-bottom: 0; }
  .paper-col-right { padding-top: 0; }
}

/* Card hover — pop forward and glow */
.cat-tech-card, .cat-cert-card {
  transition: box-shadow .28s, border-color .28s;
  cursor: default;
}
.cat-tech-card:hover, .cat-cert-card:hover {
  border-color: rgba(124,58,237,.7) !important;
  box-shadow: 0 0 0 1.5px rgba(124,58,237,.4), 0 0 40px -5px rgba(124,58,237,.5), 0 0 60px -10px rgba(6,182,212,.2) !important;
  z-index: 30;
  position: relative;
}

/* ================================================================
   NEW: Projects Section — Sub-sections (Flagship + Engineering)
   ================================================================ */
.projects-subsection-header { padding-left: .25rem; }
.projects-sub-tag {
  display: inline-flex; align-items: center;
  padding: .45rem 1.1rem; border-radius: 999px; font-size: .82rem;
  letter-spacing: .12em; text-transform: uppercase; font-weight: 700;
  background: rgba(124,58,237,.12); border: 1px solid rgba(124,58,237,.35); color: #c4b5fd;
}
.engineering-tag {
  background: rgba(6,182,212,.12); border-color: rgba(6,182,212,.35); color: #67e8f9;
}

/* ── Flagship Carousel ─────────────────────────────────────────── */
.flagship-carousel-wrap {
  position: relative;
  padding: 0 52px;
}
.flagship-track {
  position: relative;
  min-height: 504px;
}
.flagship-slide {
  display: none;
  animation: flagshipFadeIn .5s ease;
}
.flagship-slide.active { display: block; }
@keyframes flagshipFadeIn {
  from { opacity:0; transform:translateY(16px); }
  to   { opacity:1; transform:translateY(0); }
}
.flagship-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2rem;
  border-radius: 28px;
  overflow: hidden;
  transition: .35s;
}
.flagship-card:hover { transform: translateY(-6px); border-color: rgba(124,58,237,.55); }
.flagship-img-wrap {
  position: relative; aspect-ratio: 4/3.6; overflow: hidden;
  background: #0a0a18;
}
.flagship-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s ease;
}
.flagship-card:hover .flagship-img-wrap img { transform: scale(1.06); }
.flagship-img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(7,7,17,.2), rgba(124,58,237,.15));
}
.flagship-badge {
  position: absolute; top: 1rem; left: 1rem;
  padding: .35rem .85rem; border-radius: 999px; font-size: .72rem;
  font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  color: #fff;
}
.flagship-body {
  padding: 2rem 2rem 2rem 1.5rem;
  display: flex; flex-direction: column; gap: .85rem;
  justify-content: center;
}
.flagship-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.flagship-tags span {
  font-size: .7rem; padding: .25rem .65rem; border-radius: 999px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: #cbd5e1;
}
.flagship-title {
  font-family: 'Space Grotesk'; font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 800; color: #fff; margin: 0; line-height: 1.2;
}
.flagship-desc { font-size: .9rem; color: var(--muted); line-height: 1.65; margin: 0; }
.flagship-highlights {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: .4rem;
}
.flagship-highlights li {
  font-size: .82rem; color: #cbd5e1; display: flex; align-items: center; gap: .5rem;
}
.flagship-highlights li i { color: #22c55e; font-size: .85rem; flex: 0 0 auto; }
.flagship-meta-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.flagship-meta-chip {
  display: flex; flex-direction: column; gap: .2rem;
  padding: .5rem .9rem; border-radius: 12px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
}
.fmc-label { font-size: .65rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.fmc-val { font-size: .82rem; font-weight: 700; color: #fff; }
.flagship-cta { display: flex; }
.flagship-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18); background: rgba(13,13,31,.9);
  color: #fff; cursor: pointer; z-index: 10;
  display: grid; place-items: center; backdrop-filter: blur(14px);
  transition: background .2s, transform .2s, box-shadow .2s;
  font-size: .9rem; padding: 0;
}
.flagship-arrow:hover {
  background: linear-gradient(135deg,#7c3aed,#06b6d4);
  border-color: transparent;
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 0 16px rgba(124,58,237,.55);
}
.flagship-prev { left: 0; }
.flagship-next { right: 0; }
.flagship-dots {
  display: flex; gap: .6rem; justify-content: center; margin-top: 1.25rem;
}
.flagship-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.18); border: none; cursor: pointer;
  transition: .25s; padding: 0;
}
.flagship-dot.active {
  background: var(--grad); width: 26px; border-radius: 5px;
  box-shadow: 0 0 10px rgba(124,58,237,.5);
}
@media (max-width: 768px) {
  .flagship-card { grid-template-columns: 1fr; }
  .flagship-img-wrap { aspect-ratio: 16/10.8; }
  .flagship-body { padding: 1.4rem; }
  .flagship-carousel-wrap { padding: 0 38px; }
}

/* ── Engineering Carousel (horizontal scroll) ──────────────────── */
.eng-carousel-outer {
  position: relative;
  padding: 0 64px;
}
.eng-carousel-wrap {
  position: relative; overflow: hidden; padding: 0; margin: 0;
}
.eng-scroller {
  display: flex;
  overflow: visible;
  padding: .35rem 0 .5rem;
  transition: transform .45s cubic-bezier(.22,1,.36,1);
  gap: 0;
}
.eng-card {
  flex: 0 0 320px; border-radius: 18px; overflow: hidden;
  transition: .35s; flex-shrink: 0; min-width: 0;
  display: flex; flex-direction: column;
}
.eng-card:hover { transform: translateY(-6px); border-color: rgba(6,182,212,.5); }
.eng-card .project-img { aspect-ratio: 16/8; }
.eng-card .project-body {
  padding: .85rem .95rem .9rem;
  display: flex; flex-direction: column; gap: .45rem;
  flex: 1;
}
.eng-card .project-body h6 { font-size: .92rem; margin: 0; line-height: 1.3; }
.eng-card .project-body .text-muted-2.small {
  font-size: .76rem; line-height: 1.45; margin: 0;
}
.eng-card .project-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; }
.eng-card .project-tags span { font-size: .66rem; padding: .2rem .55rem; margin-right: 0; }
.eng-card .proj-card-cta { margin: auto 0 0; }
.eng-card .proj-view-btn { font-size: .76rem; padding: .32rem .7rem; }
.eng-arrow {
  position: absolute; top: 40%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18); background: rgba(13,13,31,.9);
  color: #fff; cursor: pointer; z-index: 10;
  display: grid; place-items: center; backdrop-filter: blur(14px);
  transition: background .2s, transform .2s;
  font-size: .88rem; padding: 0;
}
.eng-arrow:hover {
  background: linear-gradient(135deg,#06b6d4,#3b82f6);
  border-color: transparent;
  transform: translateY(-50%) scale(1.12);
}
.eng-arrow.disabled { opacity: .3; pointer-events: none; }
.eng-prev { left: -64px; }
.eng-next { right: -64px; }
.eng-dots {
  display: flex; justify-content: center; align-items: center;
  gap: 8px; margin-top: 12px;
}
.eng-dot {
  width: 8px; height: 8px; border-radius: 50%;
  border: none; padding: 0; cursor: pointer;
  background: rgba(255,255,255,.18);
  transition: background .25s, width .3s, border-radius .3s;
  flex-shrink: 0;
}
.eng-dot.active {
  width: 24px; border-radius: 4px;
  background: linear-gradient(90deg,#06b6d4,#3b82f6);
  box-shadow: 0 0 10px rgba(6,182,212,.5);
}
.eng-dot:hover:not(.active) { background: rgba(255,255,255,.4); }
@media (max-width: 768px) {
  .eng-carousel-outer { padding: 0 38px; }
  .eng-prev { left: 0; }
  .eng-next { right: 0; }
  .eng-arrow { width: 32px; height: 32px; font-size: .76rem; }
  .eng-card .project-img { aspect-ratio: 16/9; }
}
@media (min-width: 769px) and (max-width: 991px) {
  .eng-carousel-outer { padding: 0 56px; }
  .eng-prev { left: -56px; }
  .eng-next { right: -56px; }
}
@media (min-width: 992px) {
  .eng-carousel-outer { padding: 0 60px; }
  .eng-card .project-body h6 { font-size: .98rem; }
}

/* ── Project modal highlights list ────────────────────────────── */
.proj-highlights-wrap { grid-column: 1 / -1; }
.proj-highlights {
  list-style: none; padding: 0; margin: .4rem 0 0;
  display: flex; flex-wrap: wrap; gap: .4rem;
}
.proj-highlights li {
  font-size: .8rem; color: #cbd5e1;
  display: flex; align-items: center; gap: .4rem;
  padding: .3rem .75rem; border-radius: 999px;
  background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.25);
}
.proj-highlights li i { color: #22c55e; font-size: .8rem; }

/* ================================================================
   NEW: Research section extra rows
   ================================================================ */
.paper-method-row {
  margin-top: .9rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  background: rgba(124,58,237,.06);
  border: 1px solid rgba(124,58,237,.18);
  border-left: 3px solid #7c3aed;
}
.paper-method-label {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .12em;
  font-weight: 700; color: #a78bfa; margin-bottom: .5rem;
}
.paper-method-text {
  font-size: .8rem; line-height: 1.65; color: var(--muted); margin: 0;
}
.paper-repro-row {
  margin-top: .7rem; font-size: .8rem; line-height: 1.6;
  color: var(--muted); display: flex; align-items: flex-start; gap: .3rem;
  padding: .6rem .9rem; border-radius: 10px;
  background: rgba(6,182,212,.05); border: 1px solid rgba(6,182,212,.15);
  margin-bottom: 0;
}
.paper-repro-row i { color: #06b6d4; margin-top: .1rem; flex: 0 0 auto; }
.paper-contrib-row { margin-bottom: .85rem; }
.paper-contrib-label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); font-weight: 700; margin-bottom: .5rem;
}
.paper-contrib-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.paper-contrib-chips span {
  font-size: .72rem; padding: .28rem .7rem; border-radius: 8px;
  background: rgba(124,58,237,.1); border: 1px solid rgba(124,58,237,.3);
  color: #c4b5fd; font-weight: 600;
}
.paper-cite-box {
  padding: .8rem 1rem; border-radius: 12px;
  background: rgba(20,24,38,.8); border: 1px solid rgba(35,40,59,.8);
  margin-top: .6rem;
}
.paper-cite-label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted); font-weight: 700; margin-bottom: .4rem;
}
.paper-cite-text { font-size: .78rem; color: var(--muted); line-height: 1.6; margin: 0; }
.paper-cite-text em { color: var(--text); }
.paper-cite-text a { color: #06b6d4; text-decoration: none; }
.paper-cite-text a:hover { text-decoration: underline; }

/* ================================================================
   Smart Carousel — slide-track, strict clip, dots below
   ================================================================ */

/* Outer wrap: clips the strip, provides padding for arrow buttons */
.cert-scroller-wrap {
  position: relative;
  overflow: hidden;
  padding: 0 44px;   /* arrow buttons sit inside this padding */
}

/* The slide strip itself */
.cert-scroller {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 0 !important;           /* gap handled via marginRight by JS */
  overflow: visible !important;
  padding: 0.5rem 0 1rem;
  will-change: transform;
  transition: transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Cards: base rules — JS sets flex-basis/minWidth/maxWidth/marginRight */
.cert-scroller .cat-cert-card,
.cert-scroller .cat-tech-card,
.cert-scroller .cat-filler-card {
  display: flex !important;
  flex-shrink: 0 !important;
  box-sizing: border-box;
}

/* Arrow buttons */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(13,13,31,.92);
  color: #fff;
  cursor: pointer;
  z-index: 20;
  display: grid;
  place-items: center;
  backdrop-filter: blur(14px);
  transition: background .2s, box-shadow .2s, transform .2s;
  font-size: .85rem;
  padding: 0;
}
.carousel-arrow:hover {
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  border-color: transparent;
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 0 14px rgba(124,58,237,.55);
}
.carousel-arrow.disabled,
.carousel-arrow:disabled {
  opacity: .3;
  pointer-events: none;
}
.carousel-prev { left: 4px; }
.carousel-next { right: 4px; }

/* Dot row — sits below the wrap */
.sc-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-bottom: 4px;
}
.sc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  background: rgba(255,255,255,.18);
  transition: background .25s, width .3s, border-radius .3s, box-shadow .25s;
  flex-shrink: 0;
}
.sc-dot.active {
  width: 24px;
  border-radius: 4px;
  background: linear-gradient(90deg, #7c3aed, #06b6d4);
  box-shadow: 0 0 10px rgba(124,58,237,.5);
}
.sc-dot:hover:not(.active) {
  background: rgba(255,255,255,.4);
}

/* Remove legacy progress bar & old scroll-dots */
.scroll-dots            { display: none !important; }
.carousel-progress-wrap { display: none !important; }


/* ================================================================
   PROJECT MODAL — IMAGE CAROUSEL
   ================================================================ */
.proj-modal-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 24px 24px 0 0;
  background: #0a0a18;
  min-height: 200px;
}
.proj-modal-img-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .42s ease;
  width: 100%;
  height: 100%;
}
.proj-modal-img-slide.active { opacity: 1; }
.proj-modal-img-slide img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  position: absolute; inset: 0;
}
.proj-img-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(13,13,31,.85); color: #fff;
  cursor: pointer; z-index: 4;
  display: grid; place-items: center;
  backdrop-filter: blur(10px);
  transition: background .2s, opacity .2s;
  font-size: .85rem; padding: 0;
}
.proj-img-arrow:hover { background: linear-gradient(135deg,#7c3aed,#06b6d4); border-color:transparent; }
.proj-img-arrow.hidden { opacity: 0; pointer-events: none; }
.proj-img-prev { left: .65rem; }
.proj-img-next { right: .65rem; }
.proj-img-dots {
  position: absolute; bottom: .65rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 4;
}
.proj-img-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.35); border: none; padding: 0; cursor: pointer;
  transition: background .22s, width .25s, border-radius .25s;
  flex-shrink: 0;
}
.proj-img-dot.active {
  width: 20px; border-radius: 3px;
  background: linear-gradient(90deg,#7c3aed,#06b6d4);
}
.proj-img-counter {
  position: absolute; top: .65rem; left: .65rem;
  font-size: .72rem; font-weight: 700; color: #fff;
  background: rgba(0,0,0,.55); backdrop-filter: blur(8px);
  padding: .2rem .55rem; border-radius: 999px;
  z-index: 4; letter-spacing: .05em;
}

/* ================================================================
   EXPERIENCE SECTION — CAROUSEL WITH DOTS
   ================================================================ */
.exp-carousel-outer { position: relative; }
.exp-carousel-wrap {
  position: relative;
  overflow: hidden;
  padding: 0;
  margin: 0 44px;
}
.exp-carousel-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  transition: transform .52s cubic-bezier(.22,1,.36,1);
  will-change: transform;
  padding: .5rem 0 1rem;
}
.exp-car-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(13,13,31,.9); color: #fff;
  cursor: pointer; z-index: 10;
  display: grid; place-items: center;
  backdrop-filter: blur(14px);
  transition: background .2s, box-shadow .2s;
  font-size: .85rem; padding: 0;
}
.exp-car-arrow:hover { background: linear-gradient(135deg,#7c3aed,#06b6d4); border-color:transparent; }
.exp-car-arrow.disabled { opacity: .3; pointer-events: none; }
.exp-car-prev { left: -44px; }
.exp-car-next { right: -44px; }
.exp-car-dots {
  display: flex; justify-content: center; align-items: center;
  gap: 8px; margin-top: 14px; padding-bottom: 4px;
}
.exp-car-dot {
  width: 8px; height: 8px; border-radius: 50%;
  border: none; padding: 0; cursor: pointer;
  background: rgba(255,255,255,.18);
  transition: background .25s, width .3s, border-radius .3s;
  flex-shrink: 0;
}
.exp-car-dot.active {
  width: 24px; border-radius: 4px;
  background: linear-gradient(90deg,#7c3aed,#06b6d4);
  box-shadow: 0 0 10px rgba(124,58,237,.5);
}
.exp-car-dot:hover:not(.active) { background: rgba(255,255,255,.4); }

/* exp-card base — JS overrides flex/width inline */
.exp-carousel-track .exp-card {
  min-width: 0;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .exp-carousel-outer { padding: 0 30px; }
  .exp-carousel-wrap { margin: 0; }
  .exp-car-prev { left: 0; }
  .exp-car-next { right: 0; }
  .exp-car-arrow { width: 30px; height: 30px; font-size: .78rem; }
}

/* ================================================================
   RESEARCH SECTION — CAROUSEL
   ================================================================ */
.research-carousel-outer { position: relative; }
.research-carousel-wrap {
  position: relative;
  overflow: hidden;
  padding: 0 44px;
}
.research-carousel-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  transition: transform .52s cubic-bezier(.22,1,.36,1);
  will-change: transform;
  padding: .25rem 0 .5rem;
}
.research-carousel-track .paper-card {
  flex: 0 0 100%;
  min-width: 0;
  margin-right: 24px;
  box-sizing: border-box;
}
.res-car-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(13,13,31,.9); color: #fff;
  cursor: pointer; z-index: 10;
  display: grid; place-items: center;
  backdrop-filter: blur(14px);
  transition: background .2s;
  font-size: .9rem; padding: 0;
}
.res-car-arrow:hover { background: linear-gradient(135deg,#7c3aed,#06b6d4); border-color:transparent; }
.res-car-arrow.disabled { opacity: .3; pointer-events: none; }
.res-car-prev { left: 4px; }
.res-car-next { right: 4px; }
.res-car-dots {
  display: flex; justify-content: center; align-items: center;
  gap: 8px; margin-top: 16px;
}
.res-car-dot {
  width: 8px; height: 8px; border-radius: 50%;
  border: none; padding: 0; cursor: pointer;
  background: rgba(255,255,255,.18);
  transition: background .25s, width .3s, border-radius .3s;
  flex-shrink: 0;
}
.res-car-dot.active {
  width: 24px; border-radius: 4px;
  background: linear-gradient(90deg,#7c3aed,#06b6d4);
  box-shadow: 0 0 10px rgba(124,58,237,.5);
}
.res-car-dot:hover:not(.active) { background: rgba(255,255,255,.4); }

@media (max-width: 768px) {
  .research-carousel-wrap { padding: 0 36px; }
  .res-car-arrow, .exp-car-arrow { width: 30px; height: 30px; font-size: .78rem; }
}

/* ================================================================
   RESEARCH CARD — COMPACT REDESIGN (~30% shorter height)
   ================================================================ */
.paper-card {
  padding: .85rem 1.35rem;
  border-radius: 18px;
  gap: 0 1.6rem;
}
.paper-top {
  margin-bottom: .55rem;
  gap: .6rem;
}
.paper-status,
.article-type {
  font-size: .7rem;
  padding: .32rem .7rem;
}
.paper-title {
  font-size: clamp(.96rem, 1.7vw, 1.15rem);
  line-height: 1.25;
  margin: 0 0 .4rem;
}
.paper-subject {
  font-size: .68rem;
  padding: .2rem .55rem;
  margin-bottom: .55rem;
}
.paper-abstract {
  font-size: .79rem;
  line-height: 1.5;
  margin: 0 0 .55rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.stats-row {
  gap: .45rem;
  margin-bottom: .55rem;
}
.stat-box { padding: .45rem .4rem; border-radius: 10px; }
.stat-value { font-size: .92rem; margin-bottom: .1rem; }
.stat-label { font-size: .64rem; }
.keyword-row { gap: .3rem; margin-bottom: .55rem; }
.keyword-chip { font-size: .68rem; padding: .22rem .55rem; border-radius: 6px; }

.paper-method-row {
  margin-top: .5rem;
  padding: .55rem .75rem;
  border-radius: 10px;
}
.paper-method-label { font-size: .65rem; margin-bottom: .3rem; }
.paper-method-text {
  font-size: .74rem; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.paper-repro-row {
  margin-top: .45rem; padding: .45rem .7rem; border-radius: 8px;
  font-size: .74rem; line-height: 1.45;
}
.paper-repro-row span {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.meta-grid { margin-bottom: .55rem; border-radius: 10px; }
.meta-cell { padding: .45rem .65rem; }
.meta-label { font-size: .62rem; margin-bottom: .25rem; }
.meta-value { font-size: .8rem; }

.paper-contrib-row { margin-bottom: .5rem; }
.paper-contrib-label { font-size: .62rem; margin-bottom: .35rem; }
.paper-contrib-chips { gap: .3rem; }
.paper-contrib-chips span { font-size: .66rem; padding: .22rem .55rem; }

.people-grid { gap: .45rem; margin-bottom: .55rem; }
.person-role { font-size: .62rem; margin-bottom: .4rem; }
.supervisor { padding: .5rem .65rem; border-radius: 10px; gap: .35rem; }
.supervisor-body { gap: .6rem; }
.supervisor-avatar { width: 32px; height: 32px; font-size: .76rem; }
.supervisor-name { font-size: .82rem; margin-bottom: .05rem; }
.supervisor-qual { font-size: .67rem; margin-bottom: .15rem; }
.supervisor-meta { font-size: .7rem; gap: .35rem; }

.paper-cite-box { padding: .55rem .75rem; border-radius: 10px; margin-top: .4rem; }
.paper-cite-label { font-size: .62rem; margin-bottom: .3rem; }
.paper-cite-text { font-size: .71rem; line-height: 1.45; }

.paper-actions { margin-top: .25rem; gap: .45rem; }
.paper-actions .btn-primary,
.paper-actions .btn-ghost {
  font-size: .78rem; padding: .55rem 1rem; gap: .4rem;
}
.id-chip { font-size: .7rem; }

@media (max-width: 768px) {
  .paper-abstract { -webkit-line-clamp: 3; }
  .keyword-row,
  .paper-method-row,
  .paper-repro-row,
  .meta-grid,
  .paper-contrib-row,
  .people-grid,
  .paper-cite-box {
    display: none;
  }
}
/* Project Modal — Demo Credentials */
.proj-credentials-wrap {
  grid-column: 1 / -1;
  width: 100%;
  align-self: start !important;  
}
.proj-credentials-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  width: 100%;
  height: auto !important;
}
.proj-cred-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  justify-content: flex-start;
  gap: 10px 14px;
  width: 100%;
  height: auto !important;
  box-sizing: border-box;
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  font-size: 0.85rem;
}
.proj-cred-role {
  flex: 0 0 72px;
  font-weight: 600;
  color: var(--accent, #7c3aed);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: .04em;
}
.proj-cred-email {
  flex: 1 1 200px;
  min-width: 160px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  color: #e2e8f0;
  word-break: break-word;
  overflow-wrap: break-word;
}
.proj-cred-pass {
  flex: 0 0 auto;
  font-family: 'SFMono-Regular', Consolas, monospace;
  color: #94a3b8;
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.proj-demo-note {
  margin-top: 10px;
  font-size: 0.8rem;
  color: #94a3b8;
  font-style: italic;
}

/* Mobile: stack role/email/password vertically, tight and top-aligned */
@media (max-width: 640px) {
  .proj-cred-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    height: auto !important;
    gap: 6px !important;
    padding: 12px 14px;
  }
  .proj-cred-role,
  .proj-cred-email,
  .proj-cred-pass {
    flex: 0 0 auto !important;
    width: auto;
  }
  .proj-cred-email {
    width: 100%;
    font-size: 0.82rem;
  }
}

/*Project Detail Modal — Screenshot & Spacing Adjustments*/

/* Target the banner container inside the modal */
#proj-modal .proj-modal-content > div:first-child,
#proj-modal .proj-modal-img-wrap,
#proj-modal .proj-modal-img-wrap-legacy {
  height: 360px !important;
  min-height: 360px !important;
  max-height: 360px !important;
  width: 100% !important;
  position: relative !important;
  overflow: hidden !important;
  background: #0a0a18 !important;
}

/* Force image to stretch edge-to-edge on desktop */
#proj-modal img {
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 100% !important;
  object-fit: cover !important; /* Edge-to-edge fill on desktop */
  object-position: top center !important; /* Keeps header/UI visible */
  display: block !important;
}

/* Keep clean layout for mobile screens */
@media (max-width: 768px) {
  #proj-modal .proj-modal-content > div:first-child,
  #proj-modal .proj-modal-img-wrap,
  #proj-modal .proj-modal-img-wrap-legacy {
    height: 220px !important;
    min-height: 220px !important;
    max-height: 220px !important;
  }

  #proj-modal img {
    object-fit: contain !important; /* Prevents vertical cropping on mobile */
  }
}
/* Engineering project cards */
.eng-card .project-img {
  height: 300px;
}
.eng-card .project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.eng-card .project-body {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.eng-card .project-desc {
  display: -webkit-box;
  -webkit-line-clamp: 15;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 0;
  margin-bottom: 0.75rem;
}

@media (max-width: 640px) {
  .eng-card .project-img {
    height: 170px;
  }
  .eng-card .project-desc {
    -webkit-line-clamp: 14;
  }
}

/* Mobile: only slightly tighter than desktop, not a hard cut */
@media (max-width: 640px) {
  .eng-card .project-img {
    height: 150px;
  }
  .eng-card .project-desc {
    -webkit-line-clamp: 15;     
  }
}