/* ============================================================
   PAD-Hand — Research Website Styles
   ============================================================ */

:root {
  --accent:       #2563eb;
  --accent-dark:  #1d4ed8;
  --accent-light: #eff6ff;
  --text:         #000000;
  --text-muted:   #000000;
  --border:       #e2e8f0;
  --white:        #ffffff;
  --light-bg:     #f8fafc;
  --card-bg:      #ffffff;
  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg:    0 4px 6px rgba(0,0,0,.05), 0 10px 40px rgba(0,0,0,.1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', 'Noto Sans', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-align: justify;
}

/* ---- Hero ---- */
.pad-hero {
  padding: 5rem 1.5rem 4rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #1d4ed8 100%);
  color: #fff;
  text-align: center;
}

.venue-badge {
  display: inline-block;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  border: none;
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .35em 1.1em;
  border-radius: 100px;
  margin-bottom: 1.4rem;
  box-shadow: 0 2px 14px rgba(56,189,248,.6);
}

.pad-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 1.5rem;
  letter-spacing: -.02em;
}

.method-name {
  color: #93c5fd;
}

.pad-authors {
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: .5rem;
}

.pad-authors .author-block {
  display: inline-block;
  margin: 0 .5em;
}

.pad-authors a {
  color: #93c5fd;
  text-decoration: none;
}

.pad-authors a:hover {
  text-decoration: underline;
}

.pad-affil {
  font-size: .9rem;
  color: rgba(255,255,255,.6);
  margin-bottom: 1.5rem;
}

.pad-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.5rem;
}

.pad-btn {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  padding: .55em 1.3em;
  border-radius: 100px;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  transition: all .18s ease;
}

.pad-btn .icon {
  font-size: 1em;
}

.pad-btn-primary {
  background: var(--accent);
  color: #fff;
  border: 2px solid transparent;
}

.pad-btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
}

.pad-btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.5);
}

.pad-btn-secondary:hover {
  background: rgba(255,255,255,.1);
  border-color: #fff;
  color: #fff;
  transform: translateY(-1px);
}

/* ---- Sections ---- */
.pad-section {
  padding: 5rem 1.5rem;
}

.pad-section-white  { background: var(--white); }
.pad-section-light  { background: var(--light-bg); }

.pad-section-title {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
  margin-bottom: 1rem;
  text-align: center !important;
}

.pad-section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: .6rem auto 0;
}

.pad-subsection-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.01em;
  margin-bottom: 1.25rem;
  margin-top: 1rem;
}

.pad-section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: .97rem;
  max-width: 680px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}

/* ---- Abstract ---- */
.pad-abstract {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1.75rem 2rem;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  max-width: 820px;
  margin: 0 auto 3rem;
  text-align: justify;
}

/* ---- Contribution cards ---- */
.pad-contributions {
  max-width: 900px;
  margin: 0 auto;
}

.pad-contributions-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  text-align: center !important;
  margin-bottom: 1.5rem;
}

.pad-contrib-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  height: 100%;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}

.pad-contrib-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.pad-contrib-icon {
  font-size: 1.8rem;
  margin-bottom: .75rem;
}

.pad-contrib-card h4 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .6rem;
  text-align: left;
}

.pad-contrib-card p {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ---- Figures ---- */
.pad-figure {
  margin: 2rem 0;
}

.pad-figure img {
  width: auto;
  max-width: 100%;
  max-height: 700px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.pad-figure figcaption {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 1rem;
  padding: 0 .25rem;
  text-align: justify;
}

.pad-figure figcaption strong {
  color: var(--text);
}

/* ---- Method divider ---- */
.pad-method-divider {
  height: 1px;
  background: var(--border);
  margin: 3rem 0;
}

/* ---- Tables ---- */
.pad-table-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.pad-table-title {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  padding: .65rem 1.1rem;
  letter-spacing: .02em;
}

.pad-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .83rem;
}

.pad-table thead tr {
  background: #f1f5f9;
}

.pad-table th {
  padding: .6rem .8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.pad-table th:first-child,
.pad-table td:first-child {
  text-align: left;
  padding-left: 1rem;
}

.pad-table td {
  padding: .55rem .8rem;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text);
}

.pad-table tr:last-child td {
  border-bottom: none;
}

.group-header td {
  background: #f8fafc;
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .4rem 1rem;
}

.ours-row td {
  background: #eff6ff;
  color: var(--accent-dark);
}

/* ---- Variance text block ---- */
.pad-variance-text {
  padding: 1rem 1.5rem;
}

.pad-variance-text h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

.pad-variance-text p {
  font-size: .93rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* ---- BibTeX ---- */
.pad-bibtex {
  max-width: 720px;
  margin: 0 auto;
  background: #0f172a !important;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.pad-bibtex pre {
  margin: 0 !important;
  padding: 1.75rem 2rem !important;
  background: #0f172a !important;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.pad-bibtex code {
  font-family: 'Fira Mono', 'Cascadia Code', 'Consolas', monospace !important;
  font-size: .82rem !important;
  color: #e2e8f0 !important;
  line-height: 1.7;
  background: transparent !important;
  padding: 0 !important;
}

/* ---- Footer ---- */
.pad-footer {
  background: #0f172a;
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: .83rem;
}

.pad-footer a {
  color: rgba(255,255,255,.7);
  text-decoration: underline;
}

.pad-footer a:hover {
  color: #fff;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .pad-hero { padding: 3.5rem 1.25rem 3rem; }
  .pad-section { padding: 3.5rem 1.25rem; }
  .pad-abstract { padding: 1.25rem 1.25rem; }
  .pad-table { font-size: .78rem; }
  .pad-variance-text { padding: 1rem 0; }
  .pad-figure figcaption { text-align: justify; }
}
