/* css/style.css */
:root{
  --bg:#f1f1f1;
  --panel:#f0f0f0;
  --text:#0f172ae1;
  --muted:#475569;
  --border:#6c7ea3;
  --link:#2563eb;

  --accent:#3d1d8d;
  --accentSoft:#dad4e7;

  --radius:16px;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: #ffffff;
  color: var(--text);
  line-height: 1.65;
}

a{ color: var(--link); text-underline-offset: 3px; }
a:hover{ opacity:.9; }

h1, h2, h3{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

h1, h2 {
  color: var(--accent);
  font-size: clamp(1.3rem, 2.8vw, 2.4rem);
}

p, h1, h2, h3 {
  max-width: 860px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
ul {
  margin: auto;
}

/* ===== Split layout ==.sec=== */
.split{
  display:grid;
  grid-template-columns: 420px 1fr;
  min-height: 100vh;
}

/* Left is frozen */
.left{
  position: sticky;
  top: 0;
  min-height: 100vh;
  height: auto;
  align-self: start;
  background: var(--bg);
}

.left-inner{
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 36px 26px;
}

/* Left header */
.kicker{
  margin:0 0 10px;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 12px;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}
.left-title{
  margin: 0 0 10px;
  font-size: 25px;
  line-height: 1.12;
  letter-spacing: -.02em;
}
.left-subtitle{
  margin: 10px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

/* Buttons */
.left-actions{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.btn{
  padding: 10px 12px;
  border: 1px solid #d9d8da;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  font-size: 14px;
  background: #ffffff;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
}
.btn-primary{
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.btn-ghost{
  background: var(--accentSoft);
}

/* Left nav */
.left-nav{
  display:grid;
  gap: 8px;
}
.left-nav-title{
  margin: 0 0 4px;
  color: var(--muted);
  letter-spacing: .10em;
  text-transform: uppercase;
  font-size: 12px;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}
.left-nav a{
  color: var(--muted);
  text-decoration: none;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}
.left-nav a:hover{
  color: var(--text);
  background: #f1f5f9;
  border-color: var(--border);
}

/* Footer pinned to bottom */
.left-footer{
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.tags{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.tag{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  background: #ffffff;
}
.small{ font-size: 13px; }
.muted{ color: var(--muted); }

/* ===== Right scroll column ===== */
.right{
  height: 100vh;
  overflow-y: auto;
  padding: 34px 34px 70px;
  position: relative;

  /* page-by-page scrolling */
  scroll-snap-type: y mandatory;
  scroll-padding-top: 34px;
}

.callout{
  text-align: center;
  background: var(--accentSoft);
  padding: 14px 16px;
  border-radius: 10px;
  max-width: 860px;
  margin: auto auto;
  font-family: ui-sans-serif, system-ui, -apple-system;
}

/* readable width */
.right .section{
  padding: 18px 0;
  border-bottom: 0.5px solid var(--border);
}
.right .section:last-of-type{ border-bottom:none; }

.hero h2{ margin-top:0; }

/* iframe card */
.iframe-wrapper{
  margin-top: 10px;
  border-radius: var(--radius);
}

/* default iframe behavior */
.iframe-wrapper iframe{
  width: 100%;
  border: 0;
  display: block;
}

/* ===== HERO brain plot: FULL SIZE ===== */
.iframe-wrapper.iframe-hero{
  height: calc(100vh - 160px);
}

.iframe-wrapper.iframe-hero iframe{
  height: 100%;
}

/* scatter plot */
.iframe-wrapper.plot-wrapper iframe{
  height: 710px;
  width: 100%;
  max-width: 100%;
  display: block;
}

/* plotly pairwise (if used elsewhere) */
.iframe-wrapper.iframe-plot iframe{
  height: 720px;
}

.iframe-wrapper.iframe-plot{
  background: #ffffff;
}

/* figures */
figure img{
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
figure{ margin: 18px 0; }
figcaption{
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

.page-footer{
  margin-top: 28px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

/* allow full-width section for interactive plots */
.section-full{
  max-width: 100% !important;
}

/* full width section inside the right column */
.right .section.section-full{
  max-width: none !important;
  width: 100%;
}

/* ===== Scroll Progress Bar ===== */
#progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: transparent;
  z-index: 9999;
}

#progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
}


/* ===== Scrollytelling effect for each .section (RIGHT panel) ===== */

/* start faded */
.right .section{
  min-height: calc(100vh - 34px - 70px); 
  scroll-snap-align: start;
  scroll-snap-stop: always;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* active section */
.right .section.is-active{
  opacity: 1;
  transform: translateY(0px);
  filter: blur(0px);
}

.right .section.is-near{
  opacity: 0.45;
  transform: translateY(6px);
}

/* accessibility */
@media (prefers-reduced-motion: reduce){
  .right .section{
    transition: none;
    transform: none;
    filter: none;
  }
}

/* HERO SECTION */
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

/* Centered title overlay */
.hero-overlay {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 5;
  pointer-events: none;
}

.hero-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  color: #0f172a;
}

.hero-subtitle {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: #475569;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 5rem;

  /* center within RIGHT panel */
  left: 50%;
  transform: translateX(-50%);

  text-align: center;
  text-decoration: none;
  color: #475569;
  font-size: 0.9rem;
  z-index: 6;
  animation: fadeUp 2s infinite;
}

.scroll-text {
  display: block;
  margin-bottom: 0.3rem;
}

.scroll-arrow {
  font-size: 1.6rem;
}

/* Subtle animation */
@keyframes fadeUp {
  0% { opacity: 0; transform: translate(-50%, 6px); }
  50% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -6px); }
}

/* Optional: fade arrow once user scrolls */
.hero.scrolled .scroll-indicator {
  opacity: 0;
  pointer-events: none;
}

/* ===== HERO full-screen stage ===== */
/* HERO wrapper */
/* HERO section layout */
.section.hero{
  padding-top: 40px;
}

.project-review-interactive{
  width: 700px;
  height: 310px;
  margin: 8px auto 0;

  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.project-review-interactive iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.mini-guide{
  max-width: 1000px;
  margin: 14px auto 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f0f0f0;
  border: 1px solid rgba(15,23,42,.12);
}

.mini-guide-title{
  margin: 0 0 8px;
  text-align: center;
}

.mini-guide-steps{
  margin: 0 auto 10px;
  max-width: 780px;
  text-align: left;
  padding-left: 1.2rem;
  line-height: 1.6;
}

.mini-guide-tip{
  margin: 0;
  text-align: center;
  color: var(--muted);
}

.story-intro{
  max-width: 860px;
  margin: 12px auto 6px;
  text-align: center;
}

.story-highlight{
  margin-top: 8px;
  font-weight: 500;
  color: var(--muted);
}

.story-next{
  display: block;
  width: fit-content;
  margin: 18px auto 0;
  text-align: center;

  text-decoration: none;
  font-weight: 500;
}

/* methods section */
.methods-block{
  margin-top: 1.5rem;
}

.methods-title{
  text-align: center;
  color: #3b2a82;
  letter-spacing: 0.2px;
  margin-bottom: 1rem;
}

/* Tabs row */
.method-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 0.75rem 0 1.25rem;
}

/* Pills */
.method-chip{
  --ring: --accentSoft;
  border: 1px solid var(--accentSoft);
  background: var(--panel);
  color: #1f2937;
  padding: 0.6rem 1.05rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;

}

/* Hover: subtle lift */
.method-chip:hover{
  transform: translateY(-1px);
  border-color: rgba(99, 102, 241, 0.45);
}

/* Active pill: purple fill that matches your theme */
.method-chip.is-active{
  background: var(--accentSoft);
  border-color: var(--accentSoft);
  color: #2d1b6b;
}

/* Keyboard focus */
.method-chip:focus-visible{
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}

/* Panel container alignment */
.method-panels{
  display: flex;
  justify-content: center;
}

/* The content card */
.method-panel{
  width: min(900px, 92%);
  border: 1px solid rgba(99, 102, 241, 0.18);
  background: var(--panel);
  border-radius: 22px;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.08);
  position: relative;
  overflow: hidden;
  animation: panelIn .25s ease both;
}

/* Title inside panel */
.method-panel h3{
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  color: #2d1b6b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* small "arrow" badge feel */
.method-panel h3::before{
  content: "➤";
  color: #4f46e5;
  font-weight: 700;
}

.method-panel p{
  margin: 0.6rem 0 0;
  line-height: 1.7;
  color: #334155;
}

/* Entry animation */
@keyframes panelIn{
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-image {
  width: 540px;
  height: 180px;
  margin: 3rem 3rem;
}

.section-image-speech-tasks {
  width: 370px;
  height: 450px;
  margin: 3rem 3rem;

}

.section-image-schizophrenia {
  width: 200px;
  height: 250px;
}
.section-image-block-design {
  width: 800px;
  height: 150px;
}


#discussion{
  max-width: 1100px;
  margin: 0 auto;
}

.discussion-top{
  display: grid;
  grid-template-columns: 1.6fr 0.7fr;
  gap: 28px;
  align-items: center;
  margin: 28px auto 10px;
}

.discussion-text p{
  margin: 0;
  text-align: left;
  max-width: none;
}

.discussion-figure{
  text-align: center;
}

.section-image-rightcrus{
  width: 220px;
  height: auto;
  display: block;
  margin: 0 auto 10px;
  border-radius: 12px;
}

.figure-caption{
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  margin: 10px;
  max-width: none;
}

#discussion > p{
  max-width: 900px;
  margin: 28px auto 0;
  text-align: center;
  line-height: 1.7;
}

/* Data source */
.data-row{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  max-width: 1100px;
  margin: 3rem 3rem;
}

.data-text{
  max-width: 620px;
  text-align: left;
}

.data-text p{
  text-align: left;
  margin: 0;
  max-width: none;
}

.data-media{
  flex: 0 0 auto;
}

/* make this image behave like a right-side figure */
.section-image{
  width: 520px;
  height: auto;
  margin: 0;
  border-radius: 14px;
  display: block;
}

.section-image-large{
  width: 70%;
  max-width: 980px;
  height: auto;
  display: block;
  margin: 0 auto 14px;
  border-radius: 14px;
}

.section-image-rightcrus{
  width: 70%;
  max-width: 520px;
  height: auto;
  display: block;
  margin: 0 auto 10px;
  border-radius: 12px;
}



/* listening-tasks */
.listening-row{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  max-width: 1100px;
  margin: 3rem 3rem;
}

.listening-text{
  flex: 1 1 520px;
  max-width: 560px;
  text-align: left;
}

.listening-text p,
.listening-text ul{
  text-align: left;
  margin-left: 0;
  margin-right: 0;
  max-width: none;
}

.listening-media{
  flex: 0 0 auto;
}

.section-image-speech-tasks{
  width: 370px;
  height: auto;
  margin: 0;
  display: block;
  border-radius: 14px;
}

#introduction p{
  text-align: left;
}

/* get in touch */

.contact-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap:30px;
  margin-top:30px;
}

.contact-card{
  background:var(--panel);
  padding:20px;
  border-radius:10px;
  text-align:center;
  transition:transform .2s ease, box-shadow .2s ease;
}

.contact-card:hover{
  transform:translateY(-4px);
}

.contact-card h3{
  margin-bottom:10px;
}

.contact-card a{
  text-decoration:none;
  color:#5b4bff;
}

.contact-card a:hover{
  text-decoration:underline;
}

.profile-pic{
  width:120px;
  height:120px;
  border-radius:50%;
  object-fit:cover;
  display:block;
  margin:0 auto 16px auto;
  box-shadow:0 4px 12px rgba(0,0,0,0.15);
}

/* discussion - part two */
#discussion-two{
  max-width: 1100px;
  margin: 60px auto 0;
}


#discussion-two .discussion-top{
  display:grid;
  grid-template-columns: auto 1fr; /* table takes natural width */
  gap:18px; /* much smaller gap */
  align-items:flex-start;
}

#discussion-two .discussion-text p{
  margin-bottom:20px;
  line-height:1.7;
  text-align:left;
}

.section-image-table{
  width:100%;
  max-width:360px;
  border-radius:12px;
  display:block;
  margin:0 0 10px;
  box-shadow:0 8px 18px rgba(0,0,0,0.08);
}

#discussion-two .discussion-figure{
  text-align:left;
}

#discussion-two .figure-caption{
  font-size:14px;
  color:var(--muted);
  line-height:1.4;
  max-width:380px;
  margin:0 0;
}

/* responsive */
@media (max-width:900px){
  #discussion-two .discussion-top{
    grid-template-columns:1fr;
  }

  #discussion-two .discussion-text p{
    text-align:center;
  }

  .section-image-table{
    max-width:300px;
  }
}

/* =========================
   MOBILE / TABLET IMPROVEMENTS
   ========================= */
.mobile-nav-toggle{
  display: none;
  width: 170px;
  margin: 0 auto 16px;
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  z-index: 1001;
}

/* tablets and below */
@media (max-width: 1100px){
  .split{
    grid-template-columns: 320px 1fr;
  }

  .iframe-wrapper.plot-wrapper iframe{
    width:100%;
    height:680px;
  }

  .project-review-interactive{
    width:min(100%, 700px);
    height:320px;
  }

  .data-row,
  .listening-row{
    margin:2rem auto;
    padding:0 1rem;
  }
}
/* 
@media (max-width: 900px){
  html, body{
    overflow-x:hidden;
  }

  .split{
    display:block;
    min-height:auto;
  }

  .left{
    position:relative;
    top:auto;
    height:auto;
    border-bottom:1px solid var(--border);
    padding-bottom:10px;
  }

  .left-inner{
    height:auto;
    display:block;
    padding:22px 16px;
  }

  .mobile-nav-toggle{
    display:block;
  }

  .left-title{
    font-size:1.9rem;
    line-height:1.15;
  }

  .left-subtitle{
    font-size:0.98rem;
    margin:8px 0;
  }

  .left-actions{
    gap:8px;
    justify-content:center;
    padding-bottom:14px;
  }

  .btn{
    flex:1 1 calc(50% - 8px);
    text-align:center;
    min-width:120px;
  }

  .left-nav{
    display:none;
    gap:6px;
    margin-top:12px;
    padding-top:12px;
    border-top:1px solid var(--border);
  }

  .left-nav.is-open{
    display:grid;
  }

  .left-nav a{
    background:#fff;
  }

  .right{
    height:auto;
    overflow:visible;
    padding:20px 14px 50px;
    scroll-snap-type:none;
  }

  .right .section{
    min-height:auto;
    scroll-snap-align:none;
    scroll-snap-stop:normal;
    justify-content:flex-start;
    padding:28px 0;
    opacity:1 !important;
    transform:none !important;
    filter:none !important;
  }

  #progress-container{
    height:4px;
  }

  h1, h2, h3, p{
    max-width:100%;
  }

  h2{
    font-size:1.8rem;
    line-height:1.2;
  }

  p{
    font-size:1rem;
  }

  .scroll-indicator{
    display:none;
  }

  .project-review-interactive{
    width:100%;
    height:220px;
    margin-top:16px;
    border-radius:12px;
  }

  .iframe-wrapper,
  .iframe-wrapper.plot-wrapper{
    width:100%;
    overflow:hidden;
  }

  .iframe-wrapper iframe,
  .iframe-wrapper.plot-wrapper iframe,
  .iframe-wrapper.iframe-plot iframe{
    width:100% !important;
    max-width:100%;
    height:520px;
    display:block;
  }

  .mini-guide{
    padding:12px 14px;
    margin:12px auto 16px;
  }

  .mini-guide-steps{
    padding-left:1.1rem;
    font-size:0.96rem;
  }

  .method-tags{
    gap:0.55rem;
  }

  .method-chip{
    width:100%;
    text-align:center;
    font-size:0.92rem;
    padding:0.75rem 0.9rem;
  }

  .method-panel{
    width:100%;
    padding:1rem;
    border-radius:16px;
  }

  .data-row,
  .listening-row,
  .discussion-top,
  #discussion-two .discussion-top{
    display:flex;
    flex-direction:column;
    gap:18px;
    margin:1.5rem auto;
    padding:0;
  }

  .data-text,
  .listening-text,
  .discussion-text{
    max-width:100%;
    width:100%;
  }

  .data-text p,
  .listening-text p,
  .listening-text ul,
  .discussion-text p,
  #introduction p,
  #discussion-two .discussion-text p{
    text-align:left;
  }

  .section-image,
  .section-image-speech-tasks,
  .section-image-rightcrus,
  .section-image-table{
    width:100%;
    max-width:100%;
    height:auto;
    margin:0 auto;
  }

  .contact-grid{
    grid-template-columns:1fr;
    gap:18px;
  }

  .contact-card{
    padding:18px 14px;
  }

  .profile-pic{
    width:96px;
    height:96px;
  }

  .story-card,
  .callout,
  .story-intro{
    max-width:100%;
  }

  .page-footer{
    margin-top:18px;
  }

} */

/* very small phones */
@media (max-width: 520px){
  .left-title{
    font-size:1.6rem;
  }

  .btn{
    flex:1 1 100%;
  }

  .project-review-interactive{
    height:190px;
  }

  .iframe-wrapper iframe,
  .iframe-wrapper.plot-wrapper iframe,
  .iframe-wrapper.iframe-plot iframe{
    height:420px;
  }

  h2{
    font-size:1.55rem;
  }

  .mini-guide,
  .method-panel,
  .contact-card{
    border-radius:14px;
  }
}

/* mobile friendly UI */
@media (max-width: 900px){
  html, body{
    overflow-x:hidden;
  }

  .split{
    display:block;
    min-height:auto;
  }

  .left{
    position:relative;
    top:auto;
    height:auto;
    border-bottom:1px solid var(--border);
    padding-bottom:10px;
  }

  .left-inner{
    height:auto;
    display:block;
    padding:22px 16px;
  }

  .mobile-nav-toggle{
    display:block;
  }

  .left-title{
    font-size:1.9rem;
    line-height:1.15;
  }

  .left-subtitle{
    font-size:0.98rem;
    margin:8px 0;
  }

  .left-actions{
    gap:8px;
    justify-content:center;
    padding-bottom:14px;
  }

  .btn{
    flex:1 1 calc(50% - 8px);
    text-align:center;
    min-width:120px;
  }

  .left-nav{
    display:none;
    gap:6px;
    margin-top:12px;
    padding-top:12px;
    border-top:1px solid var(--border);
  }

  .left-nav.is-open{
    display:grid;
  }

  .left-nav a{
    background:#fff;
  }

  .right{
    height:auto;
    overflow:visible;
    padding:20px 14px 50px;
    scroll-snap-type:none;
  }

  .right .section{
    min-height:auto;
    scroll-snap-align:none;
    scroll-snap-stop:normal;
    justify-content:flex-start;
    padding:28px 0;
    opacity:1 !important;
    transform:none !important;
    filter:none !important;
  }

  #progress-container{
    height:4px;
  }

  h1, h2, h3, p{
    max-width:100%;
  }

  h2{
    font-size:1.8rem;
    line-height:1.2;
  }

  p{
    font-size:1rem;
  }

  .scroll-indicator{
    display:none;
  }

  .project-review-interactive{
    width:100%;
    height:220px;
    margin-top:16px;
    border-radius:12px;
  }

  .iframe-wrapper,
  .iframe-wrapper.plot-wrapper{
    width:100%;
    overflow:hidden;
  }

  .iframe-wrapper iframe,
  .iframe-wrapper.plot-wrapper iframe,
  .iframe-wrapper.iframe-plot iframe{
    width:100% !important;
    max-width:100%;
    height:520px;
    display:block;
  }

  .mini-guide{
    padding:12px 14px;
    margin:12px auto 16px;
  }

  .mini-guide-steps{
    padding-left:1.1rem;
    font-size:0.96rem;
  }

  .method-tags{
    gap:0.55rem;
  }

  .method-chip{
    width:100%;
    text-align:center;
    font-size:0.92rem;
    padding:0.75rem 0.9rem;
  }

  .method-panel{
    width:100%;
    padding:1rem;
    border-radius:16px;
  }

  .data-row,
  .listening-row,
  .discussion-top,
  #discussion-two .discussion-top{
    display:flex;
    flex-direction:column;
    gap:18px;
    margin:1.5rem auto;
    padding:0;
  }

  .data-text,
  .listening-text,
  .discussion-text{
    max-width:100%;
    width:100%;
  }

  .data-text p,
  .listening-text p,
  .listening-text ul,
  .discussion-text p,
  #introduction p,
  #discussion-two .discussion-text p{
    text-align:left;
  }

  .data-media,
  .listening-media{
    width:100%;
    display:flex;
    justify-content:center;
  }

  .section-image{
    width:min(230px, 70vw);
    max-width:100%;
    height:auto;
    margin:0 auto;
  }

  .section-image-speech-tasks{
    width:min(230px, 70vw);
    max-width:100%;
    height:auto;
    margin:0 auto;
  }

  .section-image-rightcrus,
  .section-image-table{
    width:100%;
    max-width:100%;
    height:auto;
    margin:0 auto;
  }

  .contact-grid{
    grid-template-columns:1fr;
    gap:18px;
  }

  .contact-card{
    padding:18px 14px;
  }

  .profile-pic{
    width:96px;
    height:96px;
  }

  .story-card,
  .callout,
  .story-intro{
    max-width:100%;
  }

  .page-footer{
    margin-top:18px;
  }

  .section-image-large{
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto 12px;
  }

.section-image-rightcrus{
  width: 100%;
  max-width: 680px;
  height: auto;
  margin: 0 auto;
  }
}

@media (max-width: 520px){
  .left-title{
    font-size:1.6rem;
  }

  .btn{
    flex:1 1 100%;
  }

  .project-review-interactive{
    height:190px;
  }

  .iframe-wrapper iframe,
  .iframe-wrapper.plot-wrapper iframe,
  .iframe-wrapper.iframe-plot iframe{
    height:420px;
  }

  h2{
    font-size:1.55rem;
  }

  .mini-guide,
  .method-panel,
  .contact-card{
    border-radius:14px;
  }

  .section-image{
    width:min(240px, 84vw);
    max-width: 100%;
  }

  .section-image-speech-tasks{
    width:min(190px, 68vw);
    max-width: 100%;


  }
  .section-image-large{
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .section-image-rightcrus{
    width: 100%;
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 1200px){
  .left{
    position: relative;
    min-height: auto;
    height: auto;
  }

  .left-inner{
    min-height: auto;
  }
}

@keyframes hint-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(123,104,238,0); }
  50%       { box-shadow: 0 0 0 4px rgba(123,104,238,0.35); }
}
.iframe-wrapper {
  animation: hint-pulse 1.2s ease 0.5s 2;
}

.iq-highlight {
  position: relative;
  display: inline-block;
  color: #5046e5 !important;
}

.iq-highlight::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: #5046e5;
  border-radius: 2px;
  transform-origin: left center;
  animation: iq-underline 2s ease-in-out infinite;
}

@keyframes iq-underline {
  0%   { transform: scaleX(0); opacity: 0; }
  40%  { transform: scaleX(1); opacity: 1; }
  60%  { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(0); opacity: 0; }
}

/* ===== Welcome title animations ===== */
.welcome-title {
  opacity: 0;
  transform: translateY(12px);
  animation: title-fadein 0.9s ease forwards;
  animation-delay: 0.2s;
}

@keyframes title-fadein {
  to { opacity: 1; transform: translateY(0); }
}

.speech-highlight {
  color: #7c3aed !important;
}

.scz-highlight {
  position: relative;
  display: inline-block;
  color: #9d174d !important;
  animation: scz-breathe 3s ease-in-out 0.5s infinite;
}

@keyframes scz-breathe {
  0%, 100% { letter-spacing: normal; }
  50%       { letter-spacing: 0.04em; }
}

.title-stats {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-top: 10px;
  opacity: 0;
  animation: title-fadein 0.9s ease forwards;
  animation-delay: 1s;
}

.title-stats .stat-counter {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

#welcome {
  justify-content: center;
  padding-top: 0;
}