/* ============================================================
   Robotics Team @ MLCS — clean styles, top-bar layout
   (clean typography à la youngwoon + restrained motion à la davian)
   ============================================================ */

:root {
  --bg: #ffffff;
  --text: #222428;
  --text-soft: #6b7280;
  --muted: #9aa1ac;
  --navy: #14305f;
  --link: #0b5cad;
  --link-hover: #14305f;
  --red: #c0392b;
  --border: #ececef;
  --border-strong: #dfe2e7;
  --dim: #b6bcc6;
  --maxw: 1040px;
  --bar-maxw: 1180px;
  --shadow-soft: 0 2px 6px rgba(20,30,50,.05);
  --shadow-lift: 0 12px 30px rgba(20,30,50,.13);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.72;
  font-size: 18.5px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--link); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--link-hover); text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
strong, b { font-weight: 600; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.88);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: var(--bar-maxw); margin: 0 auto;
  height: 66px; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand {
  font-size: 1.16rem; font-weight: 700; color: var(--navy);
  letter-spacing: -0.01em; white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand .at { color: var(--text-soft); font-weight: 400; }

.nav { display: flex; gap: 30px; }
.nav a {
  position: relative; color: var(--text-soft);
  font-weight: 500; font-size: .97rem; padding: 4px 0;
}
.nav a:hover { color: var(--navy); text-decoration: none; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px;
  height: 2px; background: var(--navy);
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.nav a.active { color: var(--navy); font-weight: 700; }

.menu-toggle {
  display: none; background: none; border: 1px solid var(--border-strong);
  border-radius: 6px; padding: 6px 11px; font-size: 1.1rem; cursor: pointer;
}

/* ---------- Hero band (home, full-bleed) ---------- */
.hero-band {
  width: 100%;
  background: linear-gradient(180deg, #f6f9fd 0%, #eaf1fb 100%);
  border-bottom: 1px solid var(--border);
  padding: 84px 40px 24px;
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; }
.hero-inner h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  line-height: 1.08; font-weight: 700; color: var(--navy);
  margin: 0 0 22px; letter-spacing: -0.02em;
}
.hero-inner p.lead {
  font-size: 1.24rem; line-height: 1.6; color: var(--text);
  max-width: none; margin: 0; font-weight: 400;
}

/* ---------- Content ---------- */
.content { padding: 0px 40px 24px; }
.content-inner { max-width: var(--maxw); margin: 0 auto; }

.page-title { font-size: 2.1rem; font-weight: 700; margin: 0 0 8px; color: var(--navy); }
.page-sub { color: var(--text-soft); margin: 0 0 46px; font-size: 1.05rem; }

section { margin-bottom: 56px; }

h2.section-h {
  font-size: 1.34rem; font-weight: 600; margin: 0 0 18px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border); color: var(--navy);
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.3,1);
}
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- News ---------- */
.news-intro { font-size: 1.08rem; margin: 0 0 24px; }

.proj-list { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 24px 0; }
.proj {
  display: block; padding: 22px 24px;
  border: 1px solid var(--border); border-radius: 12px; background: #fff;
  transition: opacity .6s ease, transform .55s cubic-bezier(.2,.7,.3,1), box-shadow .3s ease, border-color .25s ease;
}
.proj:hover {
  transform: translateY(-5px); box-shadow: var(--shadow-lift);
  border-color: var(--border-strong); text-decoration: none;
}
.proj .tag-chip {
  display: inline-block;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px;
}
.proj .tag-chip.iitp { background: #cffafe; color: #0e7490; }
.proj .tag-chip.nrf  { background: #fef3c7; color: #b45309; }
.proj h4 { margin: 8px 0 6px; font-size: 1.05rem; color: var(--text); }
.proj p { margin: 0; color: var(--text-soft); font-size: .94rem; }
.proj .seemore { font-size: .85rem; color: var(--link); margin-top: 10px; display: inline-block; }
.proj:hover .seemore { text-decoration: underline; }

.subhead { margin: 28px 0 0; font-weight: 600; font-size: 1.05rem; }
.req-list { margin: 12px 0 0; padding: 0 0 0 20px; }
.req-list li { padding: 4px 0; color: var(--text); font-size: 1.05rem; }
.apply-line { margin: 8px 0 0; color: var(--text); font-size: 1.05rem; }
.apply-btn {
  display: inline-block; font-weight: 600; font-size: .92rem;
  padding: 10px 18px; border-radius: 8px;
  background: var(--navy); color: #fff; margin-top: 14px;
}
.apply-btn:hover { background: #0d234a; color: #fff; text-decoration: none; }

/* ---------- Research ---------- */
.research-item {
  margin-bottom: 18px; padding: 24px 26px;
  border: 1px solid var(--border); border-radius: 12px; background: #fff;
  transition: opacity .6s ease, transform .55s cubic-bezier(.2,.7,.3,1), box-shadow .3s ease, border-color .25s ease;
}
.research-item:hover {
  transform: translateY(-5px); box-shadow: var(--shadow-lift); border-color: var(--border-strong);
}
.research-item:last-child { margin-bottom: 0; }
.research-item h3 { font-size: 1.18rem; margin: 0 0 8px; color: var(--navy); }
.research-item p { margin: 0; color: var(--text); }
.kw {
  display: inline-block; font-size: .78rem; color: var(--text-soft);
  border: 1px solid var(--border-strong); padding: 2px 9px; border-radius: 4px;
  margin: 12px 6px 0 0;
}

/* ---------- Funding ---------- */
.fund-item {
  display: flex; gap: 26px; align-items: center;
  padding: 24px 26px; margin-bottom: 16px;
  border: 1px solid var(--border); border-radius: 12px; background: #fff;
  transition: opacity .6s ease, transform .55s cubic-bezier(.2,.7,.3,1), box-shadow .3s ease, border-color .25s ease;
}
.fund-item:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--border-strong);
}
.fund-item.linked { color: inherit; text-decoration: none; }
.fund-item.linked:hover { text-decoration: none; }
.fund-logo {
  flex: 0 0 110px; width: 110px; height: 72px;
  display: flex; align-items: center; justify-content: center;
}
.fund-logo img { max-height: 100%; max-width: 100%; width: auto; object-fit: contain; }
.fund-item.hiring { border-color: #cfe0ff; }
.fund-item.hiring:hover { border-color: #b6d0ff; }
.fund-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fund-body .agency {
  font-size: .76rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted);
}
.recruit-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: #16794a; background: #e4f6ec; border: 1px solid #bfe8cf;
  padding: 3px 10px; border-radius: 999px;
}
.recruit-badge::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: #18a558; box-shadow: 0 0 0 0 rgba(24,165,88,.5);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(24,165,88,.45); }
  70%  { box-shadow: 0 0 0 7px rgba(24,165,88,0); }
  100% { box-shadow: 0 0 0 0 rgba(24,165,88,0); }
}
.fund-recruit {
  margin: 10px 0 0; font-size: .92rem; color: var(--text);
  padding-top: 10px; border-top: 1px dashed var(--border-strong);
}
.fund-recruit a { font-weight: 600; }
.fund-recruit .inline-link { color: var(--link); font-weight: 600; }
.fund-item.linked:hover .inline-link { text-decoration: underline; }
.fund-body h3 { margin: 4px 0 6px; font-size: 1.08rem; line-height: 1.4; }
.fund-body p { margin: 0; color: var(--text-soft); font-size: .95rem; }

/* ---------- Project detail ---------- */
.project-page { padding-top: 54px; }
.project-eyebrow {
  margin: 0 0 8px; color: var(--muted);
  font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.project-title { max-width: 820px; }
.project-sub { max-width: 860px; margin-bottom: 22px; }
.project-meta { margin: 0 0 42px; }
.project-intro {
  max-width: 860px; margin-bottom: 46px; padding-left: 22px;
  border-left: 3px solid var(--navy);
}
.project-intro p { margin: 0; font-size: 1.08rem; color: var(--text); }
.project-intro .official-title {
  margin-top: 16px; color: var(--text-soft); font-size: .9rem; line-height: 1.55;
}
.project-feature {
  display: grid; grid-template-columns: minmax(260px, .78fr) minmax(0, 1.22fr);
  gap: 34px; align-items: start; margin-bottom: 64px;
}
.feature-copy { position: sticky; top: 92px; }
.feature-index {
  display: inline-block; margin-bottom: 10px;
  color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .08em;
}
.feature-copy h2 { margin: 0 0 12px; color: var(--navy); font-size: 1.32rem; }
.feature-copy p { margin: 0 0 14px; color: var(--text); font-size: .98rem; line-height: 1.68; }
.project-figure { margin: 0; }
.project-figure img {
  width: 100%; border-radius: 10px; border: 1px solid var(--border);
  box-shadow: var(--shadow-soft); background: #f4f5f7;
}
.project-figure figcaption {
  margin-top: 10px; color: var(--text-soft); font-size: .86rem; line-height: 1.55;
}
.project-timeline { margin-bottom: 58px; }
.timeline-item {
  position: relative; display: grid; grid-template-columns: 34px 1fr;
  gap: 18px; padding-bottom: 32px;
}
.timeline-item::before {
  content: ""; position: absolute; left: 11px; top: 22px; bottom: 0;
  width: 1px; background: var(--border-strong);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  width: 23px; height: 23px; border-radius: 50%;
  border: 5px solid #eaf1fb; background: var(--navy); margin-top: 4px; z-index: 1;
}
.timeline-body {
  padding: 22px 24px; border: 1px solid var(--border);
  border-radius: 12px; background: #fff;
}
.timeline-year {
  display: inline-block; margin-bottom: 5px;
  color: var(--link); font-size: .8rem; font-weight: 700; text-transform: uppercase;
}
.timeline-body h3 { margin: 0 0 7px; color: var(--navy); font-size: 1.08rem; }
.timeline-body p { margin: 0; color: var(--text); font-size: .95rem; }
.student-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.student-grid div {
  padding: 15px 17px; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; color: var(--text); font-size: .94rem;
}
.project-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 24px 26px; border: 1px solid #cfe0ff; border-radius: 12px;
  background: #f7faff; margin-bottom: 20px;
}
.project-cta h2 { margin: 0 0 4px; color: var(--navy); font-size: 1.15rem; }
.project-cta p { margin: 0; color: var(--text-soft); font-size: .94rem; }

/* ---------- Publications ---------- */
.year-block { margin-bottom: 44px; }
.year-label {
  font-size: 1.45rem; font-weight: 700; color: var(--navy);
  margin: 0 0 22px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.pub {
  display: flex; gap: 26px; align-items: flex-start;
  padding: 16px 18px; margin: 0 -18px 12px;
  border-radius: 12px;
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.3,1), background .2s ease;
}
.pub:hover { background: #f7f9fc; }
.pub-media {
  flex: 0 0 270px; width: 270px; height: 170px;   /* uniform frame; image fits inside, never cropped */
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; border-radius: 8px; background: #fff;
}
.pub-media img, .pub-media video {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; border-radius: 6px; transition: transform .35s ease;
}
.pub:hover .pub-media img, .pub:hover .pub-media video { transform: scale(1.03); }

/* Author markers + legend */
.authors .mark { color: var(--navy); font-style: normal; font-weight: 700; margin-left: 1px; }
.pub-legend {
  margin: -32px 0 40px; font-size: .9rem; color: var(--text-soft);
  display: flex; gap: 22px; flex-wrap: wrap;
}
.pub-legend .mark { color: var(--navy); font-weight: 700; margin-right: 4px; }
.pub-info { flex: 1; min-width: 0; }
.pub-info .pub-title { font-size: 1.06rem; font-weight: 600; margin: 0 0 5px; line-height: 1.45; }
.pub-info .authors { margin: 0 0 3px; color: #444; font-size: .92rem; font-style: italic; }
.pub-info .authors .dim { color: inherit; }
.pub-info .venue { margin: 0 0 9px; font-size: .92rem; }
.pub-info .venue .venue-name { font-weight: 600; color: var(--text); }
.pub-info .venue .award { color: var(--red); font-weight: 600; margin-left: 6px; }
.pub-links { font-size: .9rem; }
.pub-links a { color: var(--link); }
.pub-links .sep { color: var(--muted); margin: 0 7px; }

/* ---------- Robots ---------- */
.robot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
.robot-card { transition: opacity .6s ease, transform .55s cubic-bezier(.2,.7,.3,1); }
.robot-card:hover { transform: translateY(-6px); }
.robot-card .robot-img {
  aspect-ratio: 4 / 5; overflow: hidden; border-radius: 10px;
  background: #f4f5f7; border: 1px solid var(--border); transition: box-shadow .22s ease;
}
.robot-card:hover .robot-img { box-shadow: var(--shadow-lift); }
.robot-card .robot-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.robot-card:hover .robot-img img { transform: scale(1.04); }
.robot-card h3 { margin: 14px 0 3px; font-size: 1.06rem; }
.robot-card p { margin: 0; color: var(--text-soft); font-size: .9rem; }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--border); margin-top: 40px; padding: 26px 40px; }
.site-foot-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: .85rem;
}
.site-foot-inner .social { display: flex; gap: 16px; }
.site-foot-inner a { color: var(--text-soft); font-weight: 500; }

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  .topbar-inner { padding: 0 22px; }
  .brand { font-size: 1.02rem; }
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 66px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    flex-direction: column; gap: 0; padding: 8px 22px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; }
  .nav a::after { display: none; }
  .hero-band { padding: 60px 22px 56px; }
  .content { padding: 40px 22px 16px; }
  .proj-list { grid-template-columns: 1fr; }
  .project-page { padding-top: 40px; }
  .project-feature { grid-template-columns: 1fr; gap: 18px; margin-bottom: 48px; }
  .feature-copy { position: static; }
  .student-grid { grid-template-columns: 1fr; }
  .project-cta { flex-direction: column; align-items: flex-start; }
  .pub { flex-direction: column; }
  .pub-media, .pub-media img, .pub-media video { width: 260px; }
  .fund-item { flex-direction: column; align-items: flex-start; }
  .site-foot { padding: 22px; }
}
