:root {
  --bg: #ffffff;
  --text: #102033;
  --muted: #5c6978;
  --soft: #f4f7fb;
  --line: #dbe4ee;
  --blue: #174ea6;
  --blue-dark: #0b326f;
  --ink: #071527;
  --card: #ffffff;
  --shadow: 0 20px 60px rgba(16, 32, 51, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(219, 228, 238, 0.75);
}
.brand { font-weight: 800; letter-spacing: -0.03em; }
.nav { display: flex; gap: 26px; font-size: 0.94rem; color: var(--muted); }
.nav a:hover { color: var(--blue); }
.section { padding: 92px clamp(20px, 6vw, 88px); }
.hero {
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.65fr);
  align-items: center;
  gap: 54px;
  background:
    radial-gradient(circle at top right, rgba(23, 78, 166, 0.11), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
}
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.045em; color: var(--ink); }
h1 { margin: 0; font-size: clamp(2.2rem, 4.5vw, 4rem); max-width: 780px; }
h2 { margin: 0; font-size: clamp(2.2rem, 4.5vw, 4rem); }
h3 { margin: 0 0 12px; font-size: 1.35rem; }
.lede { margin: 28px 0 0; max-width: 780px; font-size: 1.2rem; color: var(--muted); }
.actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.actions.compact { margin-top: 24px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid var(--line);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.button:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.button.primary { background: var(--blue); color: white; border-color: var(--blue); }
.button.secondary { background: white; color: var(--text); }
.hero-card, .card, .feature-copy, .code-card, .publication-list article, .work-list article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.hero-card { padding: 34px; }
.hero-card h2 { font-size: 2rem; margin-top: 24px; }
.hero-card p { color: var(--muted); }
dl { display: grid; gap: 14px; margin: 28px 0 0; }
dl div { display: flex; justify-content: space-between; gap: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
dt { color: var(--muted); } dd { margin: 0; font-weight: 700; text-align: right; }
.signal-visual { height: 160px; border-radius: 22px; background: linear-gradient(135deg, #e8f0fe, #ffffff); display: flex; align-items: end; gap: 18px; padding: 28px; overflow: hidden; }
.signal-visual span { flex: 1; border-radius: 999px 999px 0 0; background: linear-gradient(180deg, var(--blue), var(--blue-dark)); opacity: 0.85; }
.signal-visual span:nth-child(1) { height: 42%; } .signal-visual span:nth-child(2) { height: 72%; } .signal-visual span:nth-child(3) { height: 52%; } .signal-visual span:nth-child(4) { height: 88%; }
.section-heading { max-width: 860px; margin-bottom: 36px; }
.section-heading p:not(.eyebrow) { color: var(--muted); font-size: 1.12rem; }
.section-heading.narrow { max-width: 740px; }
.feature-section { background: var(--soft); }
.feature-grid { display: grid; grid-template-columns: 1fr 0.85fr; gap: 28px; align-items: stretch; }
.feature-copy, .code-card { padding: 34px; }
.feature-copy p { color: var(--muted); font-size: 1.05rem; }
.code-card { background: #071527; color: #eaf2ff; overflow: hidden; }
.code-title { color: #9fc1ff; font-weight: 800; margin-bottom: 20px; }
pre { margin: 0; white-space: pre-wrap; font-size: 0.96rem; }
.pill-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.pill-grid span { padding: 10px 14px; border: 1px solid var(--line); background: white; border-radius: 999px; color: var(--muted); font-weight: 700; font-size: 0.9rem; }
.card-grid { display: grid; gap: 22px; }
.card-grid.four { grid-template-columns: repeat(4, 1fr); }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }
.card { padding: 28px; box-shadow: none; }
.card p { color: var(--muted); margin-bottom: 0; }
.link-card { min-height: 220px; }
.selected-work { background: linear-gradient(180deg, white, #f8fbff); }
.work-list { display: grid; gap: 16px; }
.work-list article { display: grid; grid-template-columns: 72px 1fr; gap: 20px; align-items: start; padding: 26px; box-shadow: none; }
.work-list span { color: var(--blue); font-weight: 800; }
.work-list p { color: var(--muted); margin: 0; }
.muted { background: var(--soft); }
.publication-list { display: grid; gap: 18px; }
.publication-list article { padding: 26px; box-shadow: none; }
.publication-list .year { color: var(--blue); font-weight: 800; margin: 0 0 6px; }
.publication-list p:last-child { color: var(--muted); margin-bottom: 0; }
.contact-section { display: flex; align-items: center; justify-content: space-between; gap: 32px; background: var(--ink); color: white; }
.contact-section h2 { color: white; max-width: 760px; }
.contact-section p:not(.eyebrow) { color: #bed0e5; max-width: 680px; }
.footer { padding: 28px clamp(20px, 6vw, 88px); color: var(--muted); border-top: 1px solid var(--line); }
@media (max-width: 980px) {
  .hero, .feature-grid, .card-grid.four, .card-grid.three { grid-template-columns: 1fr; }
  .nav { display: none; }
  .section { padding-top: 72px; padding-bottom: 72px; }
  .contact-section { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  h1 { font-size: 3rem; }
  .work-list article { grid-template-columns: 1fr; }
}

.logo-visual { min-height: 160px; border-radius: 22px; background: linear-gradient(135deg, #e8f0fe, #ffffff); display: flex; align-items: center; justify-content: center; padding: 28px; overflow: hidden; }
.logo-visual img { width: 100%; max-width: 420px; height: auto; display: block; border-radius: 12px; }

/* Revision: portrait-focused hero and NeoRadium logo heading */
.hero {
  min-height: 620px;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.55fr);
}
.hero .lede {
  margin-top: 18px;
  max-width: 720px;
  font-size: clamp(1.18rem, 2vw, 1.45rem);
  color: var(--text);
}
.portrait-card {
  justify-self: center;
  width: min(380px, 100%);
  border-radius: 34px;
  overflow: hidden;
  background: #eef3f9;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.portrait-card img {
  display: block;
  width: 100%;
  height: auto;
}
.neoradium-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.neoradium-title-logo {
  width: min(360px, 100%);
  height: auto;
  display: block;
  margin: 2px 0 12px;
}
@media (max-width: 980px) {
  .portrait-card {
    width: min(340px, 78vw);
    justify-self: start;
  }
}
@media (max-width: 560px) {
  .hero .lede { font-size: 1.12rem; }
  .portrait-card { width: 100%; }
}


/* Requested revisions */
.brand { font-size: 1.14rem; }
.portrait-card { width: min(255px, 100%); }
.hero { min-height: 520px; }
#research .section-heading { margin-bottom: 24px; }
@media (max-width: 980px) {
  .portrait-card { width: min(230px, 62vw); }
}
@media (max-width: 560px) {
  .portrait-card { width: min(230px, 72vw); }
}

/* NeoRadium section logo refinement */
.neoradium-heading { margin-bottom: 18px; }
.feature-logo {
  display: block;
  width: min(320px, 82%);
  height: auto;
  margin: 0 auto 30px;
}


/* NeoRadium simulation GIF */
.neoradium-demo-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  overflow: hidden;
}
.neoradium-demo-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}
.publication-list h3 a:hover { color: var(--blue); }

.example-button { margin-top: 2px; }


/* Contact page */
.contact-section .actions {
  justify-content: flex-end;
}
.contact-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  background:
    radial-gradient(circle at top right, rgba(23, 78, 166, 0.11), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.contact-hero h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
.contact-hero .lede { max-width: 760px; color: var(--text); }
.contact-side-card, .contact-form, .success-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.contact-side-card {
  padding: 28px;
  display: grid;
  gap: 14px;
}
.contact-side-card a {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--blue);
  font-weight: 800;
}
.contact-form-section { background: var(--soft); padding-top: 64px; }
.contact-form {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 44px);
  display: grid;
  gap: 22px;
}
.form-grid {
  display: grid;
  gap: 20px;
}
.form-grid.two { grid-template-columns: repeat(2, 1fr); }
.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
  background: white;
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: 3px solid rgba(23, 78, 166, 0.18);
  border-color: var(--blue);
}
.hidden-field { display: none; }
.success-section {
  min-height: 620px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.success-card { max-width: 680px; padding: clamp(28px, 6vw, 56px); text-align: center; }
.success-card .actions { justify-content: center; }
@media (max-width: 980px) {
  .contact-section .actions { justify-content: flex-start; }
  .contact-hero, .form-grid.two { grid-template-columns: 1fr; }
}

/* Latest contact refinements */
.contact-section { justify-content: flex-start; }
.contact-section .actions { justify-content: flex-start; margin-top: 24px; }
.contact-hero { align-items: start; }

/* v4: hide the hero headshot when the viewport is too narrow for a clean side-by-side layout */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero .portrait-card {
    display: none;
  }
}
