/* ============================================================
   koushikdeb.com — hub pages (/about /research /publications
   /patents /books). Extends paper.css.
   ============================================================ */

.hub-body { background: var(--bg); }
.hub-wrap { max-width: 1060px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }

/* ---------- site nav ---------- */
.hnav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 44px);
  background: rgba(7, 12, 24, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--card-border);
}
.hnav-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.hnav-logo .mark {
  font-family: var(--font-display); font-weight: 700; font-size: 14px; color: #04231e;
  background: linear-gradient(135deg, var(--teal), #6ee7d8);
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
}
.hnav-logo .word { font-family: var(--font-display); font-weight: 600; color: var(--text); font-size: 14.5px; }
.hnav-logo .dot { color: var(--teal); }
.hnav-links { display: flex; align-items: center; gap: clamp(4px, 1.1vw, 16px); list-style: none; }
.hnav-links a {
  color: var(--muted); font-size: 14px; font-weight: 500; padding: 6px 2px;
  position: relative; transition: color .2s; white-space: nowrap;
}
.hnav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; width: 0;
  background: var(--teal); border-radius: 2px; transition: width .25s; margin: 0 auto;
}
.hnav-links a:hover { color: var(--text); }
.hnav-links a:hover::after, .hnav-links a.on::after { width: 100%; }
.hnav-links a.on { color: var(--text); }
.hnav-cta {
  color: var(--amber) !important; border: 1px solid rgba(251,191,36,.5);
  padding: 7px 15px !important; border-radius: 999px; transition: all .25s;
}
.hnav-cta::after { display: none !important; }
.hnav-cta:hover { background: var(--amber); color: #1c1503 !important; }
.hnav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.hnav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: transform .3s, opacity .3s; }
.hnav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hnav-toggle.open span:nth-child(2) { opacity: 0; }
.hnav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- breadcrumbs ---------- */
.crumbs {
  max-width: 1060px; margin: 0 auto; padding: 16px clamp(20px, 5vw, 40px) 0;
  font-size: 13px; color: var(--muted);
}
.crumbs a { color: var(--muted); transition: color .2s; }
.crumbs a:hover { color: var(--teal); }
.crumbs .sep { margin: 0 8px; opacity: .5; }
.crumbs [aria-current] { color: var(--text); font-weight: 500; }

/* ---------- hero ---------- */
.hub-hero { padding: clamp(26px, 4vw, 44px) 0 6px; }
.hub-hero h1 {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.8px;
  font-size: clamp(30px, 5vw, 46px); line-height: 1.15; margin-top: 12px;
  animation: fadeUp .7s .1s both;
}
.hub-lede { color: var(--muted); font-size: 17px; max-width: 700px; margin-top: 14px; animation: fadeUp .7s .2s both; }
.hub-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; animation: fadeUp .7s .3s both; }

/* ---------- main ---------- */
.hub-main { padding-bottom: 60px; }
.hub-main section { margin-top: clamp(34px, 5vw, 54px); }
.hub-main h2 {
  font-family: var(--font-display); font-size: clamp(21px, 3vw, 27px); font-weight: 700;
  margin-bottom: 16px; display: flex; align-items: center; gap: 12px;
}
.hub-main h2::before {
  content: ""; width: 26px; height: 3px; border-radius: 2px; flex-shrink: 0;
  background: linear-gradient(90deg, var(--teal), var(--amber));
}
.hub-main h2.sr-head::before { display: none; }
.hub-note { color: var(--muted); font-size: 14px; margin-top: 36px; font-style: italic; }

/* ---------- metrics ---------- */
.metric-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.metric {
  flex: 1 1 130px; text-align: center; padding: 16px 12px;
  background: var(--card); border: 1px solid var(--card-border); border-radius: 14px;
}
.metric b {
  display: block; font-family: var(--font-display); font-size: 26px; font-weight: 700;
  background: linear-gradient(120deg, var(--teal), var(--amber));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.metric span { font-size: 12.5px; color: var(--muted); }

/* ---------- research areas ---------- */
.area-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }
.area-card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 22px 24px; transition: border-color .25s, transform .25s;
}
.area-card:hover { border-color: rgba(45,212,191,.4); transform: translateY(-4px); }
.area-card h3 { font-family: var(--font-display); font-size: 17px; margin-bottom: 8px; }
.area-card p { color: var(--muted); font-size: 14.5px; }
.area-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.area-links a {
  font-size: 11.5px; color: var(--teal); background: var(--teal-dim);
  border: 1px solid rgba(45,212,191,.25); padding: 3px 10px; border-radius: 999px;
  text-transform: capitalize;
}

/* ---------- focus box ---------- */
.focus-box {
  background: linear-gradient(120deg, var(--teal-dim), var(--amber-dim));
  border: 1px solid rgba(45,212,191,.3); border-radius: var(--radius); padding: 26px 30px;
}
.focus-box h3 { font-family: var(--font-display); font-size: 20px; margin-bottom: 10px; }
.focus-box p { color: var(--muted); margin-bottom: 12px; }
.lang-chip { display: inline-block; background: rgba(255,255,255,.09); border-radius: 7px; padding: 1px 9px; font-size: 13.5px; color: var(--text); }

/* ---------- research / patent cards ---------- */
.rs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.rs-card {
  display: flex; flex-direction: column; gap: 7px; color: var(--text);
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 20px 22px; transition: transform .25s, border-color .25s, box-shadow .25s;
}
.rs-card:hover { transform: translateY(-5px); border-color: rgba(45,212,191,.45); box-shadow: 0 16px 40px rgba(0,0,0,.4); }
.rs-card.patent:hover { border-color: rgba(251,191,36,.5); }
.rs-year { font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: .8px; color: var(--teal); text-transform: uppercase; }
.rs-card.patent .rs-year { color: var(--amber); }
.rs-card h3 { font-family: var(--font-display); font-size: 16px; line-height: 1.4; font-weight: 600; }
.rs-card p { color: var(--muted); font-size: 13.5px; }
.rs-go { margin-top: auto; padding-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--teal); }

/* ---------- publications ---------- */
.award-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.award-list li {
  background: var(--amber-dim); border: 1px solid rgba(251,191,36,.3); border-radius: 12px;
  padding: 11px 16px; font-size: 14.5px; color: var(--text);
}
.pub-year-group { margin-top: 38px; }
.pub-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.pub-row {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 20px 24px; border-left: 3px solid rgba(45,212,191,.5);
  transition: border-color .25s, transform .25s;
}
.pub-row:hover { transform: translateX(5px); border-left-color: var(--teal); }
.pub-row h3 { font-family: var(--font-display); font-size: 17px; line-height: 1.4; margin-bottom: 7px; }
.pub-auth { color: var(--text); font-size: 14px; margin-bottom: 3px; }
.pub-venue { color: var(--muted); font-size: 13.5px; font-style: italic; }
.pub-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.pub-kind, .pub-cites {
  font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid var(--card-border); color: var(--muted);
}
.pub-cites { color: var(--amber); border-color: rgba(251,191,36,.3); background: var(--amber-dim); }
.pub-links { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13.5px; }

/* ---------- patents ---------- */
.pat-list { display: flex; flex-direction: column; gap: 18px; }
.pat-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 26px 28px; }
.pat-card:hover { border-color: rgba(251,191,36,.4); }
.pat-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.pat-icon { font-size: 34px; line-height: 1; flex-shrink: 0; }
.pat-status {
  display: inline-block; font-size: 11.5px; font-weight: 700; color: #baf7d0;
  background: rgba(34,197,94,.14); border: 1px solid rgba(34,197,94,.35);
  padding: 2px 11px; border-radius: 999px; margin-bottom: 7px;
}
.pat-card h2 { font-family: var(--font-display); font-size: 19px; line-height: 1.35; margin-bottom: 6px; }
.pat-card h2::before { display: none; }
.pat-app { color: var(--muted); font-size: 13px; font-family: monospace; }
.pat-body { margin-bottom: 18px; }
.pat-body dt {
  font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--teal); margin-top: 14px;
}
.pat-body dd { color: var(--muted); font-size: 15px; margin-top: 4px; }

/* ---------- books index ---------- */
.book-index { display: grid; grid-template-columns: 230px 1fr; gap: clamp(24px, 4vw, 44px); align-items: start; }
.bi-cover img { width: 100%; border-radius: 8px; box-shadow: 0 18px 50px rgba(0,0,0,.5); transition: transform .3s; }
.bi-cover:hover img { transform: translateY(-5px) scale(1.02); }
.bi-series { font-size: 11.5px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--amber); }
.bi-body h2 { font-family: var(--font-display); font-size: clamp(22px, 3vw, 29px); margin: 8px 0 6px; }
.bi-body h2::before { display: none; }
.bi-body h2 a { color: var(--text); }
.bi-body h2 a:hover { color: var(--teal); }
.bi-sub { color: var(--text); font-size: 16px; font-style: italic; margin-bottom: 12px; }
.bi-body > p { color: var(--muted); }
.bi-facts { margin: 18px 0; display: flex; flex-direction: column; gap: 8px; }
.bi-facts > div { display: flex; gap: 14px; font-size: 14.5px; border-bottom: 1px dashed rgba(255,255,255,.08); padding-bottom: 8px; }
.bi-facts dt { font-family: var(--font-display); font-weight: 600; color: var(--text); min-width: 105px; flex-shrink: 0; }
.bi-facts dd { color: var(--muted); margin: 0; }
.series-next p { color: var(--muted); }

/* ---------- about ---------- */
.about-top { display: grid; grid-template-columns: 260px 1fr; gap: clamp(24px, 4vw, 44px); align-items: start; margin-top: 30px; }
.about-photo { width: 100%; border-radius: 20px; border: 1px solid var(--card-border); box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.about-top h2 { margin-top: 0; }
.about-top p { color: var(--muted); margin-bottom: 14px; }
.about-where { color: var(--muted); font-size: 14.5px; }
.timeline { display: flex; flex-direction: column; gap: 14px; position: relative; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, var(--teal), rgba(45,212,191,.06)); }
.tl-item { position: relative; }
.tl-dot { position: absolute; left: -30px; top: 22px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--teal); }
.tl-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 22px 24px; transition: transform .25s, border-color .25s; }
.tl-card:hover { transform: translateX(6px); border-color: rgba(45,212,191,.4); }
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px; }
.tl-head h3 { font-family: var(--font-display); font-size: 19px; }
.tl-period { font-size: 13px; color: var(--amber); font-weight: 600; }
.tl-role { color: var(--teal); font-weight: 600; font-size: 14.5px; margin: 4px 0 8px; }
.tl-card > p:not(.tl-role) { color: var(--muted); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.tags span { font-size: 12px; color: var(--teal); background: var(--teal-dim); border: 1px solid rgba(45,212,191,.25); padding: 3px 11px; border-radius: 999px; }
.edu-list { display: flex; flex-direction: column; gap: 12px; }
.edu-row { display: flex; gap: 18px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 20px 24px; }
.edu-when { font-size: 12.5px; font-weight: 700; color: var(--amber); letter-spacing: .6px; text-transform: uppercase; min-width: 120px; flex-shrink: 0; padding-top: 3px; }
.edu-row h3 { font-family: var(--font-display); font-size: 17.5px; margin-bottom: 3px; }
.edu-where { color: var(--teal); font-size: 14px; margin-bottom: 5px; }
.edu-row p:last-child { color: var(--muted); font-size: 14.5px; }
.cert-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; }
.cert-list li { display: flex; align-items: center; gap: 13px; background: var(--card); border: 1px solid var(--card-border); border-radius: 12px; padding: 12px 16px; font-size: 14.5px; }
.cert-badge {
  flex-shrink: 0; font-family: var(--font-display); font-size: 11px; font-weight: 700;
  color: var(--amber); background: var(--amber-dim); border: 1px solid rgba(251,191,36,.3);
  padding: 4px 10px; border-radius: 8px; min-width: 52px; text-align: center;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .about-top, .book-index { grid-template-columns: 1fr; }
  .about-photo { max-width: 200px; }
  .bi-cover img { max-width: 200px; }
  .edu-row { flex-direction: column; gap: 8px; }
  .edu-when { min-width: 0; }
}
@media (max-width: 760px) {
  .hnav-toggle { display: block; }
  .hnav-links {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: rgba(7,12,24,.98); border-bottom: 1px solid var(--card-border);
    max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .hnav-links.open { max-height: 460px; }
  .hnav-links a { display: block; padding: 14px 26px; }
  .hnav-links a::after { display: none; }
  .hnav-cta { margin: 10px 24px 16px; text-align: center; }
  .pat-head { flex-direction: column; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .hub-hero h1, .hub-lede, .hub-cta { animation: none; }
}

@media (max-width: 1180px) and (min-width: 761px) { .hnav-links a { font-size: 13px; } .hnav-links { gap: 10px; } }

/* ---------- about: expertise, journey, structured experience (Oct 2026) ---------- */
.xp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.xp-card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 20px 22px;
}
.xp-card h3 { font-family: var(--font-display); font-size: 17.5px; }
.xp-card p { color: var(--muted); font-size: 14.8px; }
.xp-link { margin-top: auto; padding-top: 4px; color: var(--teal); font-size: 14px; font-weight: 600; }
.journey p { color: var(--muted); max-width: 760px; margin-bottom: 14px; }
.journey a, .profile-list a { color: var(--teal); }
.tl-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 4px 0 10px; font-size: 14.8px; }
.tl-dl dt { color: var(--text); font-weight: 600; }
.tl-dl dd { color: var(--muted); margin: 0; }
.profile-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; color: var(--muted); }
.profile-list a { font-weight: 600; }
@media (max-width: 560px) { .tl-dl { grid-template-columns: 1fr; } .tl-dl dd { margin-bottom: 6px; } }
@media (min-width: 960px) { .xp-card:last-child:nth-child(3n+1) { grid-column: 1 / -1; } }

/* ---------- legal pages (Terms and Conditions) ---------- */
.terms-updated { margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.legal > * { max-width: 780px; }
.legal p, .legal li { color: var(--muted); font-size: 15.5px; line-height: 1.7; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 14px 20px; padding: 0; }
.legal li { margin-bottom: 4px; }
.legal h3 { font-family: var(--font-display); font-size: 17px; margin: 22px 0 8px; color: var(--text); }
.legal a { color: var(--teal); }
.legal .legal-copy { margin-top: 34px; font-size: 13.5px; }
.pfoot a + a, .pfoot a { white-space: nowrap; }

/* ---------- /contact ---------- */
.contact-routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 30px; }
.contact-route { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.hub-main .contact-route h2 { font-size: 18px; margin: 0; }
.hub-main .contact-route h2::before { display: none; }
.contact-route p { color: var(--muted); font-size: 14.8px; margin: 0; }
.contact-route p a { color: var(--teal); }
.contact-route .btn { align-self: flex-start; margin-top: auto; }

/* links inside running text are underlined, so they don't rely on colour alone (WCAG 1.4.1) */
.hub-intro a, .hub-lede a, .hub-main p a:not(.btn), .legal li a, .contact-route p a, .journey a, .profile-list a {
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
