:root {
  --bg: #19436f;
  --bg-soft: #627e8c;
  --panel: rgba(10, 24, 41, 0.86);
  --panel-strong: #10233b;
  --text: #f5fbff;
  --muted: #9eb2c7;
  --blue: #185BA2;
  --teal: #6a9889;
  --green: #608B76;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 25px 70px rgba(9, 16, 46, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(91, 167, 255, 0.14), transparent 24%),
    radial-gradient(circle at 90% 10%, rgba(79, 209, 197, 0.12), transparent 20%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: drift 16s ease-in-out infinite alternate;
}

body::before {
  width: 28rem;
  height: 28rem;
  left: -8rem;
  top: 6rem;
  background: rgba(91, 167, 255, 0.25);
}

body::after {
  width: 22rem;
  height: 22rem;
  right: -7rem;
  top: 20rem;
  background: rgba(79, 209, 197, 0.2);
  animation-duration: 20s;
}

main,
nav,
footer,
section {
  position: relative;
  z-index: 1;
}

nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 5%;
  background: rgba(7, 19, 31, 0.82);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

nav > * {
  min-width: 0;
}

nav ul {
  display: flex;
  gap: 1.4rem;
  list-style: none;
  justify-self: center;
  align-items: center;
  margin: 0;
  padding: 0;
}

.site-search {
  justify-self: end;
}

nav .btn.btn-primary {
  justify-self: end;
}

nav ul li {
  margin: 0;
}

nav ul a {
  white-space: nowrap;
}

.site-search {
  position: relative;
  margin: 0 0.8rem 0 0.6rem;
  flex: 0 1 300px;
  min-width: 220px;
}

nav .btn.btn-primary {
  flex-shrink: 0;
  white-space: nowrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--teal);
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

nav ul {
  display: flex;
  gap: 1.6rem;
  list-style: none;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.25s ease;
}

nav a:hover {
  color: var(--text);
}

.site-search {
  position: relative;
  margin: 0 0.8rem 0 0.6rem;
  flex-shrink: 0;
}

.site-search input[type="search"] {
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #d0d7de;
  background: #ffffff;
  color: #0b0b0b;
  min-width: 280px;
  box-shadow: 0 6px 18px rgba(2,10,20,0.06);
}

.search-results {
  position: absolute;
  top: 110%;
  left: 0;
  width: 360px;
  max-height: 260px;
  overflow: auto;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(2,10,20,0.08);
  display: none;
  z-index: 1500;
  color: #0b0b0b;
}

.search-results .result {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  cursor: pointer;
  color: #0b0b0b;
}

.search-results .result:hover { background: rgba(0,0,0,0.03); }

.paper-search input[type="search"] {
  margin-top: 0.9rem;
  padding: 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  color: var(--text);
  width: 100%;
  max-width: 520px;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), #2f7be0);
  color: var(--text);
  box-shadow: 0 12px 24px rgba(91, 167, 255, 0.2);
}

.btn-secondary {
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.hero {
  padding: 7rem 5% 4.5rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.tech-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.art-line,
.art-node {
  position: absolute;
  display: block;
}

.art-line {
  background: rgba(158, 178, 199, 0.18);
  border-radius: 999px;
}

.art-node {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(158, 178, 199, 0.28);
  background: rgba(158, 178, 199, 0.08);
  animation: pulse 4s ease-in-out infinite;
}

.art-node::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgba(91, 167, 255, 0.26);
}

.art-line.line-1 {
  width: 240px;
  height: 4px;
  top: 22%;
  left: 8%;
}

.art-line.line-2 {
  width: 180px;
  height: 4px;
  top: 44%;
  right: 14%;
}

.art-line.line-3 {
  width: 175px;
  height: 4px;
  top: 70%;
  left: 24%;
}

.art-node.node-1 {
  top: 14%;
  left: 11%;
  animation-delay: 0s;
}

.art-node.node-2 {
  top: 47%;
  right: 10%;
  animation-delay: 0.9s;
}

.art-node.node-3 {
  top: 72%;
  left: 27%;
  animation-delay: 1.6s;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.2); opacity: 0.55; }
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 4.6vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero-copy h1 span {
  color: var(--teal);
}

.hero-copy p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin-bottom: 1.6rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.6rem;
}

.tech-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.art-line,
.art-node {
  position: absolute;
  display: block;
  pointer-events: none;
}

.art-line {
  background: rgba(158, 178, 199, 0.18);
  border-radius: 999px;
}

.art-node {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(158, 178, 199, 0.25);
  background: rgba(158, 178, 199, 0.06);
  animation: pulse 4s ease-in-out infinite;
}

.art-node::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgba(91, 167, 255, 0.24);
}

.art-line.line-1 {
  width: 260px;
  height: 4px;
  top: 24%;
  left: 10%;
}

.art-line.line-2 {
  width: 180px;
  height: 4px;
  top: 50%;
  right: 14%;
}

.art-line.line-3 {
  width: 160px;
  height: 4px;
  top: 70%;
  left: 22%;
}

.art-node.node-1 {
  top: 16%;
  left: 12%;
  animation-delay: 0s;
}

.art-node.node-2 {
  top: 46%;
  right: 12%;
  animation-delay: 0.9s;
}

.art-node.node-3 {
  top: 71%;
  left: 26%;
  animation-delay: 1.6s;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.92; }
  50% { transform: scale(1.25); opacity: 0.6; }
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.stat-pill {
  padding: 0.75rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.92rem;
}

.terminal-panel {
  background: linear-gradient(145deg, rgba(9, 20, 35, 0.96), rgba(16, 35, 59, 0.92));
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.terminal-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  transform: translateX(-100%);
  animation: sweep 5s linear infinite;
  pointer-events: none;
}

.terminal-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.03) 0px,
    rgba(255,255,255,0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.16;
  pointer-events: none;
}

.terminal-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.terminal-top span {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  display: inline-block;
}

.terminal-top span:nth-child(1) { background: #608B76; }
.terminal-top span:nth-child(2) { background: #185BA2; }
.terminal-top span:nth-child(3) { background: #fdfdfd; }

.terminal-body {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  color: #bfe4ff;
}

.terminal-line {
  margin-bottom: 0.45rem;
}

.typewriter {
  color: var(--teal);
  font-weight: 600;
}

.cursor {
  display: inline-block;
  width: 0.6rem;
  height: 1rem;
  background: var(--teal);
  margin-left: 0.2rem;
  animation: blink 1s step-end infinite;
  vertical-align: middle;
}

section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 3.5rem 5% 0;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.section-title h2 {
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.section-title p {
  color: var(--muted);
  max-width: 620px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.2rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
 }
 
.team-card {
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  border-color: rgba(79, 209, 197, 0.35);
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.section-panel {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(7, 19, 31, 0.9), rgba(9, 20, 35, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.section-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('bg1.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.85;
  mix-blend-mode: screen;
}

.focus-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  mix-blend-mode: screen;
  pointer-events: none;
}

.focus-healthcare::before { background-image: url('healthcare.png'); }
.focus-cs::before { background-image: url('cs.png'); }
.focus-law::before { background-image: url('law.png'); }
.focus-stem::before { background-image: url('stem1.png'); }

.contact-card {
  position: relative;
  padding-top: 1.7rem;
}

.contact-card::before {
  content: '';
  position: absolute;
  top: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 52px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.contact-email::before { background-image: url('mail.png'); }
.contact-instagram::before { background-image: url('insta.png'); }
.contact-x::before { background-image: url('X.png'); }

.rank-senior {
  background: linear-gradient(135deg, rgba(96, 139, 118, 0.95), rgba(85, 161, 130, 0.95));
  border: 2px solid rgba(47, 103, 81, 0.9);
}

.rank-director {
  background: linear-gradient(135deg, rgba(24, 91, 162, 0.95), rgba(56, 121, 207, 0.95));
  border: 2px solid rgba(16, 69, 147, 0.9);
}

.rank-senior h3,
.rank-director h3,
.rank-senior p,
.rank-director p {
  color: #ffffff;
}

.team-card:hover {
  transform: translateY(-4px);
  border-color: rgba(79, 209, 197, 0.35);
}

.tag {
  display: inline-block;
  margin-top: 0.7rem;
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(91, 167, 255, 0.12);
  color: #bfdbff;
}

.publications-header {
  padding: 4.8rem 5% 2rem;
  max-width: 1240px;
  margin: 0 auto;
}

.publications-header h1 {
  font-size: clamp(2.1rem, 4vw, 3rem);
  margin-bottom: 0.75rem;
}

.publications-header p {
  color: var(--muted);
  max-width: 720px;
}

.publication-guidelines {
  margin-top: 1.8rem;
  display: grid;
  grid-template-columns: minmax(280px, 520px);
}

.section-panel {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(7, 19, 31, 0.9), rgba(9, 20, 35, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.section-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('bg1.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.85;
  mix-blend-mode: screen;
}

.section-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 19, 31, 0.75), rgba(7, 19, 31, 0.9));
}

.section-panel > * {
  position: relative;
  z-index: 1;
}

/* Ensure headings and content appear above decorative art */
.hero-copy,
.section-title,
.publications-header,
.publication-card,
.card,
.section-panel > * {
  position: relative;
  z-index: 2;
}

/* Decorative art variants for sections */
.section-decor {
  position: absolute;
  inset: auto 0 0 0;
  height: 180px;
  pointer-events: none;
  opacity: 0.15;
  background-image: url('bg2.jpg');
  background-size: cover;
  background-position: center right;
  z-index: 0;
}

/* Use user-provided techgraphic as a subtle overlay in hero */
.tech-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('techgraphic.png');
  background-repeat: no-repeat;
  background-position: center right;
  background-size: contain;
  opacity: 0.20;
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 0;
}

/* subtle hero background using provided images */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('bg2.jpg');
  background-size: cover;
  background-position: center left;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}

.publication-card .abstract {
  color: var(--muted);
  margin-bottom: 0.65rem;
}

/* Publication guidelines layout: side-by-side on wider screens */
.publication-guidelines {
  margin-top: 1.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  padding: 0 5% 4rem;
  max-width: 1240px;
  margin: 0 auto;
}

.card p.meta,
.card .meta {
  color: var(--text);
  font-size: 0.92rem;
  margin-top: 0.9rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.footer-links {
  display: grid;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1rem;
  text-align: left;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--blue);
}

.people-list {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.people-list li::before {
  content: '•';
  color: var(--teal);
  display: inline-block;
  width: 1rem;
}

@media (max-width: 860px) {
  .cta-grid {
    grid-template-columns: 1fr;
  }
}

.publications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  padding: 0 5% 4rem;
  max-width: 1240px;
  margin: 0 auto;
}

.publication-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.publication-card h3 {
  margin-bottom: 0.45rem;
}

.publication-card p {
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.publication-card .meta {
  color: #83c8ff;
  font-size: 0.86rem;
  margin-bottom: 0.7rem;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.link-btn {
  display: inline-block;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(79, 209, 197, 0.22);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}

.link-btn:hover {
  background: rgba(79, 209, 197, 0.08);
}

.obfuscated-email {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.24);
  text-underline-offset: 2px;
  word-break: break-all;
}

footer {
  text-align: left;
  color: var(--muted);
  padding: 2rem 5% 2.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 2rem;
}

.publications-header,
.publications-header + .section-panel,
.section-title + .section-panel {
  margin-bottom: 2rem;
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes sweep {
  100% { transform: translateX(100%); }
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(2rem, 1rem, 0); }
}

@media (max-width: 1080px) {
  .site-search {
    max-width: 240px;
  }

  .tech-art::before {
    background-size: 55%;
    background-position: right 45%;
    opacity: 0.18;
  }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .tech-art::before {
    background-size: 42%;
    background-position: right 55%;
    opacity: 0.16;
  }
}

@media (max-width: 760px) {
  nav {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 4%;
  }

  nav ul {
    grid-column: 1 / -1;
    justify-self: center;
    width: auto;
    flex-wrap: wrap;
  }

  .site-search {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
  }

  .site-search input[type="search"] {
    min-width: 0;
    width: 100%;
  }

  .search-results {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 680px) {
  nav {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.8rem;
  }

  nav ul {
    justify-self: stretch;
  }

  .hero {
    padding-top: 5rem;
  }

  .section-title {
    flex-direction: column;
    align-items: start;
  }

  .tech-art,
  .tech-art::before {
    display: none;
  }
}
