/* ============================================================
   portfolio.css — Prutha Annadate Portfolio
   Shared across all pages. Academic two-column layout.
   ============================================================ */

/* ── Fonts (preconnect handled in HTML <head>) ── */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700&family=Instrument+Sans:wght@400;500;600;700&display=swap');

/* ── CSS Variables ── */
:root {
  --bg:           #ffffff;
  --surface:      #ffffff;
  --text:         #111111;
  --text-muted:   #6e6e6e;
  --text-light:   #9b9b9b;
  --accent:       #2563eb;
  --accent-hover: #1d4ed8;
  --border:       #e9e9e9;
  --border-light: #f1f1f1;
  --tag-bg:       #eef3fe;
  --tag-text:     #1d4ed8;
  --chip:         #d9d9d9;
  --header-bg:    rgba(255,255,255,0.85);
  --switch:       #d4d4d4;

  --radius:       6px;

  --font-serif: 'Sora', system-ui, -apple-system, sans-serif;
  --font-sans:  'Instrument Sans', system-ui, -apple-system, sans-serif;
}

/* Dark theme */
body.dark {
  --bg:           #000000;
  --surface:      #121212;
  --text:         #f2f2f2;
  --text-muted:   #a8a8a8;
  --text-light:   #7a7a7a;
  --accent:       #6ea8fe;
  --accent-hover: #93bffe;
  --border:       #232323;
  --border-light: #1a1a1a;
  --tag-bg:       #0f1a2e;
  --tag-text:     #93bffe;
  --chip:         #3a3a3a;
  --header-bg:    rgba(0,0,0,0.85);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

/* ── SITE HEADER (same as the homepage navbar) ── */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--header-bg);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header a { text-decoration: none; }
.site-header .wrap { max-width: 1440px; margin: 0 auto; padding: 0 28px; }
.site-header .bar { display: flex; align-items: center; gap: 2.2rem; height: 72px; }
.site-header .brand { font-family: var(--font-serif); font-weight: 700; font-size: 18.2px; letter-spacing: -0.01em; white-space: nowrap; color: var(--text); }
.site-header .nav { display: flex; gap: 1.6rem; font-size: 15px; }
.site-header .nav a { color: var(--text); }
.site-header .nav a:hover, .site-header .nav a.active { color: var(--accent); }
.site-header .bar-right { margin-left: auto; display: flex; align-items: center; gap: 0.55rem; }
.site-header .icon-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--chip);
  display: grid; place-items: center;
  color: var(--text);
}
.site-header .icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.site-header .icon-btn svg { width: 15px; height: 15px; }
.site-header .switch {
  margin-left: 0.8rem;
  width: 50px; height: 28px; border-radius: 999px;
  background: var(--switch); border: 0; cursor: pointer; position: relative;
}
.site-header .switch::after {
  content: ""; position: absolute; top: 4px; left: 4px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  transition: transform .2s ease;
}
body.dark .site-header .switch { background: var(--accent); }
body.dark .site-header .switch::after { transform: translateX(22px); }

/* ── PAGE LAYOUT ── */
.page-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2.5rem 28px 4rem;
}

/* ── MAIN CONTENT ── */
.main-col h1 {
  overflow-wrap: anywhere;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.main-col h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  margin: 2.5rem 0 0.7rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}

.main-col h3 {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text);
  margin: 0.9rem 0 0.2rem;
}

.section-rule {
  border: none;
  border-top: 2px solid var(--border);
  margin: 0.5rem 0 1.5rem;
}

.lead-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.7rem;
}

.body-text {
  font-size: 0.97rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.learn-more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0.15rem 0.55rem;
  margin-top: 0.45rem;
  transition: all 0.15s;
  text-decoration: none;
}
.learn-more:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* ── TAG FILTER ── */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.tag-btn {
  font-size: 0.8rem;
  font-family: var(--font-sans);
  font-weight: 600;
  padding: 0.22rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  background: var(--surface);
  color: var(--text-muted);
  transition: all 0.15s;
}
.tag-btn:hover, .tag-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── PROJECTS TABLE ── */
.proj-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}
.proj-table thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  font-weight: 700;
  text-align: left;
  padding: 0.35rem 1rem 0.35rem 0;
  border-bottom: 2px solid var(--border);
}
.proj-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background 0.12s;
}
.proj-table tbody tr:hover { background: var(--border-light); }
.proj-table td {
  padding: 0.9rem 1rem 0.9rem 0;
  vertical-align: top;
}

.proj-thumb {
  width: 88px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.proj-thumb-ph {
  width: 88px;
  height: 60px;
  border-radius: var(--radius);
  background: var(--tag-bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.proj-title-link {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
}
.proj-title-link:hover { color: var(--accent-hover); }

.proj-desc {
  font-size: 0.87rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.6;
}

.proj-tag-row { margin-top: 0.4rem; display: flex; gap: 0.35rem; flex-wrap: wrap; }
.proj-tag {
  font-size: 0.72rem;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 4px;
  padding: 0.1rem 0.5rem;
  font-weight: 600;
}

/* ── PUBLICATION CARDS ── */
.pub-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
}
.pub-item:last-child { border-bottom: none; }

.pub-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.pub-venue {
  font-size: 0.87rem;
  color: var(--text-muted);
  font-style: italic;
}
.pub-venue strong { font-style: normal; color: var(--text); }

.pub-abstract {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: 0.35rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--border);
}

.pub-actions { margin-top: 0.45rem; display: flex; gap: 0.55rem; flex-wrap: wrap; align-items: center; }

.pub-badge {
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text-light);
  background: transparent;
}
.pub-badge.conference { border-color: #c2d8f0; color: #2b5f8a; background: #eaf3fb; }
.pub-badge.journal    { border-color: #c2d8c5; color: #2a6030; background: #e8f5ea; }
.pub-badge.ip         { border-color: #f0d8b0; color: #7a4e10; background: #fef6e4; }

body.dark .pub-badge.conference { background: #1a2d40; color: #89b8de; border-color: #2a4a68; }
body.dark .pub-badge.journal    { background: #1a2e1c; color: #80c885; border-color: #2a4e2e; }
body.dark .pub-badge.ip         { background: #2e2010; color: #d4a060; border-color: #4e3418; }
.pub-badge.review     { border-color: #d6cdea; color: #5a3f99; background: #f3effa; }
body.dark .pub-badge.review     { background: #261f36; color: #b9a3e6; border-color: #3e3258; }

.pub-abstract {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0.35rem 0 0;
  font-style: italic;
}

.pub-link-btn {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0.15rem 0.55rem;
  transition: all 0.15s;
  display: inline-block;
}
.pub-link-btn:hover { background: var(--accent); color: #fff; text-decoration: none; }

/* ── PUB SEARCH BAR ── */
.pub-search-wrap {
  position: relative;
  margin-bottom: 1rem;
}
.pub-search-wrap svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-light);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
#pub-search {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.75rem;
  border: 1.5px solid var(--border);
  border-radius: 40px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
#pub-search::placeholder { color: var(--text-light); }
#pub-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.14);
}

/* Filter + sort pills row */
.pub-filter-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.pub-filter-row .row-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  font-weight: 700;
  white-space: nowrap;
}
.pub-filter-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  flex: 1;
}
.pub-pill {
  font-size: 0.8rem;
  font-family: var(--font-sans);
  font-weight: 600;
  padding: 0.22rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  background: var(--surface);
  color: var(--text-muted);
  transition: all 0.15s;
  white-space: nowrap;
}
.pub-pill:hover { border-color: var(--accent); color: var(--accent); }
.pub-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pub-pill.conference.active { background: #2b5f8a; border-color: #2b5f8a; }
.pub-pill.journal.active   { background: #2a6030; border-color: #2a6030; }
.pub-pill.ip.active        { background: #7a4e10; border-color: #7a4e10; }
.pub-pill.review.active    { background: #5a3f99; border-color: #5a3f99; }

body.dark .pub-pill.conference.active { background: var(--accent); border-color: var(--accent); }
body.dark .pub-pill.journal.active    { background: #3a7a40; border-color: #3a7a40; }
body.dark .pub-pill.ip.active         { background: #9a6520; border-color: #9a6520; }
body.dark .pub-pill.review.active     { background: #7a5cc4; border-color: #7a5cc4; }

/* Sort select — minimal */
#pub-sort {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.22rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text-muted);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 1.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a8a92' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}
#pub-sort:focus, #pub-sort:hover { border-color: var(--accent); color: var(--accent); }

/* Pub stat cards */
.pub-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}
.pub-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  text-align: center;
}
.pub-stat-num {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 0.2rem;
  color: var(--text);
}
.pub-stat-num.total   { color: var(--accent); }
.pub-stat-num.conf    { color: #2b5f8a; }
.pub-stat-num.jour    { color: #2a6030; }
.pub-stat-num.ip-num  { color: #7a4e10; }
.pub-stat-num.review-num { color: #5a3f99; }
body.dark .pub-stat-num.review-num { color: #b9a3e6; }
body.dark .pub-stat-num.conf  { color: #89b8de; }
body.dark .pub-stat-num.jour  { color: #80c885; }
body.dark .pub-stat-num.ip-num{ color: #d4a060; }
.pub-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-light);
  font-weight: 700;
}
@media (max-width: 540px) {
  .pub-stats { grid-template-columns: repeat(3, 1fr); }
}

/* ── ABOUT PAGE ── */
.exp-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
  align-items: start;
}
.exp-item:last-child { border-bottom: none; }

.exp-img {
  width: 100px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.exp-img-ph {
  width: 100px;
  height: 70px;
  background: var(--tag-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-light);
  text-align: center;
  padding: 4px;
}

.exp-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.exp-text {
  font-size: 0.91rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 0.3rem;
}

/* Awards */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-top: 0.25rem;
}
.award-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}
.award-card h3 {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.award-card p { font-size: 0.83rem; color: var(--text-muted); }

/* Certifications */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-top: 0.5rem;
}
.cert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.cert-card img {
  height: 32px;
  width: auto;
  object-fit: contain;
}
.cert-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-serif);
  margin: 0;
}
.cert-card p { font-size: 0.81rem; color: var(--text-muted); flex: 1; }
.cert-card a { font-size: 0.82rem; color: var(--accent); font-weight: 600; }

/* Recognition card — featured achievement with image */
.recognition-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 0.5rem;
}

.recognition-card img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid var(--border);
}

.recognition-body {
  padding: 1.1rem 1.25rem 1.25rem;
}

.recognition-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 0.4rem;
}

.recognition-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.recognition-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── EVENT NOTICE ── */
.notice-bar {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  font-size: 0.9rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  z-index: 300;
  animation: slideUp 0.5s ease;
  max-width: 340px;
}
.notice-bar strong { color: var(--text); }
.notice-close {
  position: absolute;
  top: 0.5rem;
  right: 0.65rem;
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-light);
  line-height: 1;
}
.notice-close:hover { color: var(--text); }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── FOOTER ── */
.site-footer {
  margin-top: 3rem;
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-light);
}
.site-footer a {
  color: var(--text-light);
  margin: 0 0.4rem;
}
.site-footer a:hover { color: var(--accent); text-decoration: none; }

/* ── HIDDEN util ── */
.hidden { display: none !important; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .site-header .nav { display: none; }
}

@media (max-width: 740px) {
  .site-header .wrap { padding: 0 16px; }
  .site-header .bar { height: 68px; }
  .site-header .bar-right .icon-btn { display: none; }

  .page-wrap {
    padding: 1.5rem 16px 3rem;
  }

  .exp-item {
    grid-template-columns: 1fr;
  }

  .exp-img,
  .exp-img-ph {
    width: 100%;
    height: 140px;
  }
}

/* ============================================================
   PROJECT DETAIL PAGES
   ============================================================ */

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1.25rem;
}
.breadcrumb a {
  color: var(--accent);
  font-weight: 600;
}
.breadcrumb a:hover { color: var(--accent-hover); }
.breadcrumb span { margin: 0 0.4rem; }

/* Project header meta row */
.proj-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.6rem 0 1.5rem;
}

/* Two-column project layout */
.proj-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}

/* Media column */
.proj-media { display: flex; flex-direction: column; gap: 1.25rem; }

.proj-media-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

/* Video and images share one frame so every project page reads the same */
.proj-video,
.proj-hero-img {
  width: 100%;
  height: auto;
  max-height: 460px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  object-fit: contain;
  display: block;
}
.proj-video { background: #000; }

.proj-gh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: all 0.18s;
  background: var(--surface);
  text-decoration: none;
}
.proj-gh-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.proj-deploy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background 0.18s;
  text-decoration: none;
}
.proj-deploy-btn:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}

/* Info column */
.proj-info { display: flex; flex-direction: column; gap: 1.25rem; }

.proj-description {
  font-size: 0.96rem;
  color: var(--text);
  line-height: 1.75;
}
.proj-description p { margin-bottom: 0.7rem; }
.proj-description p:last-child { margin-bottom: 0; }
.proj-description code {
  font-size: 0.88em;
  background: var(--border-light);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

/* ── Built With block ── */
.proj-built {
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
}

.proj-built-head {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 0.55rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.tech-tag {
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
  background: var(--tag-bg);
  color: var(--tag-text);
  border: 1px solid color-mix(in srgb, var(--tag-bg) 60%, var(--tag-text) 40%);
  border-radius: 5px;
  padding: 0.22rem 0.62rem;
  line-height: 1.4;
}

/* fallback for browsers that don't support color-mix */
@supports not (color: color-mix(in srgb, red, blue)) {
  .tech-tag { border-color: var(--border); }
}

.proj-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.68;
  margin: 0;
}

/* Result callout */
.proj-result {
  background: var(--border-light);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  color: var(--text);
}
.proj-result strong { color: var(--accent-dark, var(--accent)); }

/* Project nav (prev / next) */
.proj-nav-row {
  display: flex;
  justify-content: space-between;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
}
.proj-nav-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}
.proj-nav-link:hover { color: var(--accent-hover); }
.proj-nav-link.right { text-align: right; }

@media (max-width: 740px) {
  .proj-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   SEARCH BAR — Publications page (v2)
   ============================================================ */

.search-wrap {
  margin-bottom: 1.75rem;
}

/* Search input row */
.search-input-row {
  position: relative;
  margin-bottom: 0.85rem;
}

.search-input-row svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
  flex-shrink: 0;
}

.search-field {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.65rem 0.9rem 0.65rem 2.5rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-field::placeholder { color: var(--text-light); }

.search-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

/* Filter + sort row */
.search-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Pill filter group */
.pub-filter-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.pub-pill {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  background: var(--surface);
  color: var(--text-muted);
  transition: all 0.15s;
  white-space: nowrap;
}

.pub-pill:hover { border-color: var(--accent); color: var(--accent); }

.pub-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Sort select — compact */
.sort-select {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.28rem 0.65rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a8a92' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  padding-right: 1.6rem;
}

.sort-select:focus { border-color: var(--accent); color: var(--text); }

/* Result count badge */
.search-result-count {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  min-height: 1.2em;
}

/* Pub summary — redesigned as stat row */
.pub-stat-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.pub-stat {
  flex: 1;
  min-width: 90px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  text-align: center;
}

.pub-stat-num {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.2rem;
}

.pub-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-light);
  font-weight: 700;
}

/* ── PROJECT PAGE: Built-with block ── */
.proj-built-with { display: flex; flex-direction: column; gap: 0.5rem; }

.proj-built-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Re-use .proj-tag from listing pages — already defined above */

.proj-skills-note {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* Publication abstract line */
.pub-abstract {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.62;
  margin-top: 0.3rem;
  font-style: italic;
}
