/* ==========================================================================
   Page-specific styles (services, team, research, contact, thanks)
   ========================================================================== */

.page-section {
  padding: 2rem 1rem;
}

@media (min-width: 768px) {
  .page-section {
    padding: 2rem 2rem;
  }
}

/* --- Services --- */
.service-card h3 {
  margin-top: 0.5rem;
  margin-bottom: 0.8rem;
  font-size: 1.4rem;
}

/* --- Team --- */
.team-page .page-section {
  padding: 2rem 1.5rem;
}

@media (min-width: 768px) {
  .team-page .page-section {
    padding: 2rem 3rem;
  }
}

.team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.team-card h2,
.team-card h4 {
  width: 100%;
}

.team-photo {
  width: 180px;
  height: 180px;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .team-card:hover .team-photo {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  }
}

body.light-mode .team-photo {
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

@media (prefers-reduced-motion: no-preference) {
  body.light-mode .team-card:hover .team-photo {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  }
}

.team-card h2 {
  font-size: 1.6rem;
  font-weight: 700;
}

.team-card h4 {
  font-size: 1.1rem;
  font-weight: 500;
  color: #C9D1D9;
  margin-top: -0.4rem;
  margin-bottom: 1rem;
}

body.light-mode .team-card h4 {
  color: #6B7280;
}

.team-card p,
.team-card li {
  text-align: left;
  width: 100%;
}

.linkedin-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: #0A66C2;
  color: white !important;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.25s ease;
  font-size: 0.95rem;
}

.linkedin-btn:hover {
  background: #0D7BE0;
  box-shadow: 0 0 12px rgba(10, 102, 194, 0.6);
  transform: translateY(-2px);
}

/* --- Research (cards, metrics, timeline — layout in research.css) --- */
.research-card {
  background: #161B22;
  border: 1px solid #30363D;
  padding: 1.4rem;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: 0.25s ease;
}

@media (prefers-reduced-motion: no-preference) {
  @media (min-width: 901px) {
    .research-card:hover {
      transform: translateY(-6px);
      box-shadow: 0 8px 24px rgba(88, 166, 255, 0.25);
      border-color: #58A6FF;
    }
  }
}

.research-icon {
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
  color: #58A6FF;
}

.research-card h3 {
  color: #F0F6FC;
  margin-bottom: 0.4rem;
  font-size: 1.2rem;
}

.research-card p {
  color: #C9D1D9;
  line-height: 1.55;
  font-size: 0.95rem;
}

body.light-mode .research-card {
  background: #FFFFFF;
  border-color: #E5E7EB;
}

body.light-mode .research-card h3 {
  color: #1A1F36;
}

body.light-mode .research-card p {
  color: #374151;
}

.research-header {
  text-align: left;
  margin-bottom: 2rem;
}

.research-header h1,
.research-pubs-header h1 {
  font-size: 2.4rem;
  font-weight: 700;
  color: #F0F6FC;
}

.research-header p,
.research-pubs-header p {
  color: #8B949E;
  font-size: 1.1rem;
  max-width: 700px;
}

body.light-mode .research-header h1,
body.light-mode .research-pubs-header h1 {
  color: #1A1F36;
}

body.light-mode .research-header p,
body.light-mode .research-pubs-header p {
  color: #4B5563;
}

.metrics-panel {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem 2rem;
  background: #0F172A;
  border-radius: 14px;
  border: 1px solid #1E293B;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  margin-bottom: 2.5rem;
}

.metric-box {
  text-align: center;
  flex: 1 1 100px;
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
  color: #38BDF8;
}

.metric-label {
  font-size: 0.9rem;
  color: #CBD5E1;
}

body.light-mode .metrics-panel {
  background: #FFFFFF;
  border-color: #E2E8F0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

body.light-mode .metric-value { color: #0284C7; }
body.light-mode .metric-label { color: #475569; }

.filter-bar {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid #334155;
  background: #0F172A;
  color: #E2E8F0;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  transition: 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
  background: #38BDF8;
  color: #0F172A;
  border-color: #38BDF8;
}

body.light-mode .filter-btn {
  background: #FFFFFF;
  border-color: #CBD5E1;
  color: #334155;
}

body.light-mode .filter-btn.active {
  background: #0284C7;
  color: white;
}

.timeline {
  border-left: 2px solid #334155;
  margin-left: 1rem;
  padding-left: 1.5rem;
}

.pub-item {
  margin-bottom: 2rem;
  position: relative;
}

.pub-item::before {
  content: "";
  position: absolute;
  left: -1.1rem;
  top: 0.4rem;
  width: 12px;
  height: 12px;
  background: #38BDF8;
  border-radius: 50%;
  box-shadow: 0 0 10px #38BDF8;
}

.pub-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #F1F5F9;
}

.pub-authors,
.pub-venue {
  color: #CBD5E1;
  margin: 0.2rem 0;
}

.pub-tags {
  margin-top: 0.4rem;
}

.pub-tag {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 999px;
  background: #1E293B;
  color: #E2E8F0;
  margin-right: 0.4rem;
}

body.light-mode .timeline { border-color: #CBD5E1; }
body.light-mode .pub-item::before { background: #0284C7; box-shadow: 0 0 10px #0284C7; }
body.light-mode .pub-title { color: #0F172A; }
body.light-mode .pub-authors,
body.light-mode .pub-venue { color: #475569; }
body.light-mode .pub-tag { background: #E2E8F0; color: #1E293B; }

.bibtex-toggle {
  margin-top: 0.5rem;
  cursor: pointer;
  color: #38BDF8;
  font-size: 0.9rem;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}

.bibtex-box {
  display: none;
  background: #0F172A;
  border: 1px solid #1E293B;
  padding: 1rem;
  margin-top: 0.5rem;
  border-radius: 8px;
  white-space: pre-wrap;
  font-size: 0.85rem;
  color: #E2E8F0;
}

body.light-mode .bibtex-box {
  background: #FFFFFF;
  border-color: #CBD5E1;
  color: #1E293B;
}

/* --- Contact --- */
.contact-page {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2.5rem;
  width: 100%;
  max-width: 1100px;
}

.contact-info-panel {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 2.2rem 2.4rem;
  border: 1px solid #30363D;
  background: radial-gradient(circle at top left, #1F2937 0, #020617 42%, #020617 100%);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
  color: #E5E7EB;
}

body.light-mode .contact-info-panel {
  background: linear-gradient(135deg, #EEF2FF 0%, #F9FAFB 40%, #FFFFFF 100%);
  border-color: #E5E7EB;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.1);
  color: #111827;
}

.contact-info-panel::before,
.contact-info-panel::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  inset: 18% 6%;
  pointer-events: none;
}

.contact-info-panel::after {
  inset: 28% 10%;
  border-color: rgba(148, 163, 184, 0.15);
}

.contact-eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: #9CA3AF;
  margin-bottom: 0.8rem;
}

body.light-mode .contact-eyebrow {
  color: #6B7280;
}

.contact-info-title {
  font-size: clamp(2rem, 2.2vw + 1.4rem, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem 0;
  color: #F9FAFB;
}

body.light-mode .contact-info-title {
  color: #0B1120;
}

.contact-info-subtitle {
  max-width: 520px;
  font-size: 1rem;
  line-height: 1.7;
  color: #CBD5F5;
}

body.light-mode .contact-info-subtitle {
  color: #4B5563;
}

.contact-bullets {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.1rem 1.5rem;
}

@media (max-width: 780px) {
  .contact-bullets {
    grid-template-columns: minmax(0, 1fr);
  }
}

.contact-bullet {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.contact-bullet-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #22C55E, #16A34A);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #ECFDF5;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
}

.contact-bullet-body {
  font-size: 0.92rem;
  color: #D1D5DB;
}

body.light-mode .contact-bullet-body {
  color: #374151;
}

.contact-bullet-body strong {
  font-weight: 600;
  color: #E5E7EB;
}

body.light-mode .contact-bullet-body strong {
  color: #111827;
}

.contact-meta-strip {
  margin-top: 2rem;
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(75, 85, 99, 0.9);
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  font-size: 0.86rem;
  color: #E5E7EB;
}

body.light-mode .contact-meta-strip {
  background: #EEF2FF;
  border-color: #CBD5F5;
  color: #111827;
}

.contact-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  font-size: 0.78rem;
  color: #E5E7EB;
}

body.light-mode .contact-meta-pill {
  background: #FFFFFF;
  color: #111827;
}

.contact-meta-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22C55E;
}

.contact-card {
  background: #0D1117;
  border-radius: 18px;
  border: 1px solid #30363D;
  padding: 2rem 2.2rem;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.55);
}

body.light-mode .contact-card {
  background: #FFFFFF;
  border-color: #E5E7EB;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.contact-card h2 {
  margin: 0 0 0.6rem 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #F9FAFB;
}

body.light-mode .contact-card h2 {
  color: #111827;
}

.contact-card-sub {
  margin: 0 0 1.4rem 0;
  font-size: 0.96rem;
  color: #9CA3AF;
}

body.light-mode .contact-card-sub {
  color: #6B7280;
}

.contact-item {
  padding: 0.7rem 0.2rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.6rem 1rem;
  align-items: flex-start;
  font-size: 0.98rem;
  color: #D1D5DB;
  border-bottom: 1px solid rgba(55, 65, 81, 0.6);
}

.contact-item:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

body.light-mode .contact-item {
  color: #374151;
  border-bottom-color: #E5E7EB;
}

.contact-item-label {
  font-weight: 600;
  color: #9CA3AF;
  white-space: nowrap;
}

body.light-mode .contact-item-label {
  color: #6B7280;
}

.contact-item-value {
  line-height: 1.5;
}

.contact-item-value a {
  color: #58A6FF;
  text-decoration: none;
  border-bottom: 1px dashed rgba(88, 166, 255, 0.6);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.contact-item-value a:hover {
  color: #79B8FF;
  border-color: rgba(121, 184, 255, 0.9);
}

body.light-mode .contact-item-value a {
  color: #2563EB;
  border-color: rgba(37, 99, 235, 0.5);
}

body.light-mode .contact-item-value a:hover {
  color: #1D4ED8;
  border-color: rgba(37, 99, 235, 0.9);
}

.contact-form {
  margin-top: 1.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(55, 65, 81, 0.7);
}

body.light-mode .contact-form {
  border-top-color: #E5E7EB;
}

.contact-form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-form-group {
  flex: 1 1 160px;
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.contact-form-group label {
  font-size: 0.83rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #9CA3AF;
}

body.light-mode .contact-form-group label {
  color: #6B7280;
}

.contact-input,
.contact-textarea {
  background: #050814;
  border-radius: 10px;
  border: 1px solid #30363D;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  color: #E5E7EB;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  font-family: inherit;
}

body.light-mode .contact-input,
body.light-mode .contact-textarea {
  background: #F9FAFB;
  border-color: #E5E7EB;
  color: #111827;
}

.contact-input::placeholder,
.contact-textarea::placeholder {
  color: #6B7280;
}

body.light-mode .contact-input::placeholder,
body.light-mode .contact-textarea::placeholder {
  color: #9CA3AF;
}

.contact-input:focus,
.contact-textarea:focus {
  border-color: #3B82F6;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.6);
  background: #020617;
}

body.light-mode .contact-input:focus,
body.light-mode .contact-textarea:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.3);
  background: #FFFFFF;
}

.contact-textarea {
  min-height: 130px;
  resize: vertical;
}

.contact-form-footer {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.contact-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #3B82F6, #22C55E);
  color: #0B1120 !important;
  font-weight: 700;
  font-size: 0.97rem;
  text-decoration: none;
  border: none;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9), 0 16px 40px rgba(59, 130, 246, 0.55);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  cursor: pointer;
}

.contact-button-icon {
  font-size: 1.05rem;
}

.contact-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9), 0 22px 55px rgba(59, 130, 246, 0.7);
}

.contact-button:active {
  transform: translateY(0);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9), 0 10px 20px rgba(15, 23, 42, 0.6);
}

.contact-response-time {
  font-size: 0.86rem;
  color: #9CA3AF;
}

.contact-response-time strong {
  color: #F9FAFB;
}

body.light-mode .contact-response-time {
  color: #6B7280;
}

body.light-mode .contact-response-time strong {
  color: #111827;
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .contact-page {
    padding: 2rem 1rem;
  }

  .contact-info-panel,
  .contact-card {
    padding: 1.6rem 1.4rem;
  }

  .contact-form-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-response-time {
    max-width: 260px;
  }
}

/* --- Thanks page --- */
.thanks-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
}

.thanks-card {
  max-width: 520px;
  padding: 2.5rem 2rem;
  background: #161B22;
  border: 1px solid #30363D;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.thanks-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #22C55E, #16A34A);
  color: #ECFDF5;
  font-size: 1.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.15);
}

body.light-mode .thanks-card {
  background: #FFFFFF;
  border-color: #E5E7EB;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.thanks-card h1 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.thanks-card p {
  margin-bottom: 1.5rem;
  color: #C9D1D9;
}

body.light-mode .thanks-card p {
  color: #374151;
}
