/* RRProject — "Panel" theme: a light, cool instrument-panel look for an AIoT researcher. */
:root {
  --bg: #EAF1F4;         /* page: soft cool grey-blue, not white */
  --panel: #FAFCFD;      /* raised panels */
  --ink: #13233A;        /* headings, body, dark chart panel */
  --muted: #56677A;      /* secondary text (5.3:1 on bg) */
  --line: #D5E0E6;
  --teal: #0E7C7B;       /* primary action */
  --teal-deep: #0A6261;
  --teal-soft: #D3EEEC;
  --amber: #B26E0A;      /* text-safe amber */
  --amber-soft: #FBEBD2;
  --violet: #5151C6;
  --violet-soft: #E3E3FA;
  --leaf: #3A7F49;
  --leaf-soft: #DCEFDD;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius-lg: 24px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 30px 60px -32px rgba(19, 35, 58, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; overflow-x: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--font); -webkit-font-smoothing: antialiased; position: relative; overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.25rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 24px; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }

/* ---------- header ---------- */
.site-header { display: flex; justify-content: space-between; align-items: center; height: 76px; }
.logo { display: flex; gap: 10px; align-items: center; font-weight: 800; color: var(--ink); text-decoration: none; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--teal); color: #fff; display: grid; place-items: center; font-size: 13px; }
.logo-name { white-space: nowrap; }
.about-name { font-size: 1.05rem; font-weight: 800; color: var(--teal-deep); margin: -12px 0 16px; }
.site-header { gap: 12px; }
.logo { min-width: 0; }
@media (max-width: 480px) {
  .logo-name { font-size: .88rem; white-space: normal; line-height: 1.25; }
  .header-contact { min-height: 38px; padding: 0 14px; font-size: .88rem; flex: 0 0 auto; }
}
.header-contact { min-height: 40px; padding: 0 18px; font-size: .92rem; }

/* tab bar: a row of buttons under the header, sticky while scrolling */
.tabbar-wrap { position: sticky; top: 0; z-index: 25; background: rgba(234, 241, 244, .92); backdrop-filter: blur(10px); transition: box-shadow .2s; }
.scrolled .tabbar-wrap { box-shadow: 0 10px 24px -18px rgba(19, 35, 58, .45); }
.tabbar { display: flex; gap: 10px; padding: 12px 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabbar::-webkit-scrollbar { display: none; }
.tabbar a { flex: 0 0 auto; padding: 13px 26px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: #3D4E62; text-decoration: none; font-weight: 700; font-size: 1.05rem; transition: background-color .15s, color .15s, border-color .15s; }
.tabbar a:hover { color: var(--ink); border-color: var(--muted); }
.tabbar a.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(28px, 5vw, 56px); align-items: center; padding: 40px 0 72px; }
.badge { display: inline-flex; gap: 8px; align-items: center; background: var(--teal-soft); color: var(--teal-deep); font-weight: 700; font-size: .82rem; padding: 6px 13px; border-radius: 999px; margin: 0; }
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
@media (prefers-reduced-motion: no-preference) { .badge-dot { animation: pulse 2.2s ease-in-out infinite; } }
@keyframes pulse { 50% { opacity: .3; } }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 4.9rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; margin: 18px 0 20px; max-width: 14ch; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: #2C3E55; max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 22px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .92rem; font-weight: 600; }
.hero-links a { color: var(--muted); text-decoration: none; }
.hero-links a:hover { color: var(--teal); text-decoration: underline; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: var(--radius-sm); font-weight: 700; font-size: .98rem; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background-color .15s, border-color .15s; }
.button-primary { background: var(--teal); color: #fff; }
.button-primary:hover { background: var(--teal-deep); }
.button-quiet { background: var(--panel); color: var(--ink); border-color: var(--line); }
.button-quiet:hover { border-color: var(--muted); }
.button:disabled { opacity: .65; cursor: wait; }

.device { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow); }
.device img { width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; object-position: 50% 74%; border-radius: 14px; }
.readings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.reading { border-radius: 14px; padding: 12px; }
.reading b { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.reading span { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; line-height: 1.35; margin-top: 2px; }
.r-teal { background: var(--teal-soft); } .r-amber { background: var(--amber-soft); } .r-violet { background: var(--violet-soft); }

.chart { margin-top: 12px; background: var(--ink); border-radius: 14px; padding: 12px 14px 10px; color: #CFE0EA; }
.chart-head { display: flex; justify-content: space-between; font-size: .78rem; font-weight: 600; }
.chart-head span:last-child { color: #8FA6BD; }
.chart-bars { display: flex; align-items: flex-end; gap: 10px; height: 78px; margin-top: 10px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bar i { display: block; width: 100%; max-width: 44px; border-radius: 6px 6px 2px 2px; background: #5FD3C6; min-height: 3px; }
.bar.zero i { background: #33465F; }
.bar small { font-size: .72rem; color: #8FA6BD; font-weight: 600; }
.bar em { font-style: normal; font-size: .72rem; font-weight: 700; color: #E6F2F5; }
@media (prefers-reduced-motion: no-preference) {
  .bar i { transform-origin: bottom; transform: scaleY(0); animation: grow .7s cubic-bezier(.3, .7, .2, 1) forwards; animation-delay: var(--d); }
}
@keyframes grow { to { transform: scaleY(1); } }

/* ---------- sections ---------- */
.section { padding-block: 0 72px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head h2, .section-head h3 { margin-bottom: 0; }
.section-note { color: var(--muted); margin: 0; max-width: 56ch; }
.text-link { font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.section-footnote { color: var(--muted); font-size: .85rem; margin: 14px 0 0; }

/* what's new */
.latest-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.latest-item { display: flex; flex-direction: column; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px; color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.latest-item:hover { border-color: var(--teal); box-shadow: 0 16px 30px -24px rgba(19, 35, 58, .5); }
.latest-top { display: flex; gap: 8px; align-items: center; }
.latest-kind { font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.k-pub { background: var(--violet-soft); color: var(--violet); }
.k-ip { background: #E6E1F7; color: #4B3B9A; }
.k-award { background: var(--amber-soft); color: var(--amber); }
.k-project { background: var(--teal-soft); color: var(--teal-deep); }
.k-news { background: var(--leaf-soft); color: var(--leaf); }
.latest-new { font-size: .72rem; font-weight: 800; color: #fff; background: #D64545; padding: 2px 8px; border-radius: 999px; }
.latest-item h3 { font-size: 1.02rem; font-weight: 800; line-height: 1.35; margin: 4px 0 0; letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.latest-item p { margin: 0; font-size: .88rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.latest-date { margin-top: auto; padding-top: 6px; font-size: .78rem; color: var(--muted); font-weight: 600; }

/* research tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.tile-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px; }
.tile-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile h3 { font-size: 1.12rem; margin-bottom: 8px; }
.tile p { margin: 0; color: var(--muted); font-size: .93rem; }
.t-teal .tile-icon { background: var(--teal-soft); color: var(--teal); }
.t-violet .tile-icon { background: var(--violet-soft); color: var(--violet); }
.t-amber .tile-icon { background: var(--amber-soft); color: var(--amber); }
.t-leaf .tile-icon { background: var(--leaf-soft); color: var(--leaf); }

/* about */
.about { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); padding: clamp(24px, 4vw, 44px); }
.about-copy { max-width: 64ch; }
.about-lead { font-size: 1.15rem; font-weight: 600; line-height: 1.55; }
.about-copy p { color: #2C3E55; }
.facts { margin: 22px 0 0; display: grid; gap: 10px; }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .93rem; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; font-weight: 600; }
.education h3 { font-size: 1.05rem; margin-bottom: 18px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline-item { position: relative; padding: 0 0 22px 28px; }
.timeline-item::before { content: ""; position: absolute; left: 6px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-item::after { content: ""; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--panel); border: 3px solid var(--teal); }
.timeline-item:first-child::after { background: var(--teal); }
.timeline-year { display: block; font-size: .8rem; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.timeline-item b { display: block; font-weight: 700; margin: 2px 0; }
.timeline-item p { margin: 0; color: var(--muted); font-size: .9rem; }

/* publications */
.publication-list { display: grid; gap: 12px; }
.publication { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 6px 24px; align-items: start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; transition: box-shadow .3s; }
.pub-year { font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pub-year small { display: inline-block; margin-top: 4px; font-size: .7rem; font-weight: 700; color: var(--amber); background: var(--amber-soft); padding: 2px 8px; border-radius: 999px; }
.pub-type { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--violet); background: var(--violet-soft); padding: 2px 9px; border-radius: 999px; margin-bottom: 8px; }
.pub-content h3 { font-size: 1.05rem; font-weight: 700; line-height: 1.4; margin-bottom: 6px; letter-spacing: -0.01em; max-width: 72ch; }
.pub-content p { margin: 0; color: var(--muted); font-size: .9rem; }
.pub-venue { font-size: .9rem; color: #2C3E55; font-weight: 500; }
.pub-doi { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.pub-action a { display: inline-flex; padding: 8px 14px; border-radius: 10px; background: var(--teal-soft); color: var(--teal-deep); font-weight: 700; font-size: .88rem; text-decoration: none; white-space: nowrap; }
.pub-action a:hover { background: #BFE5E2; }
.pub-group { display: flex; align-items: baseline; gap: 10px; font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; margin: 18px 0 2px; }
.pub-group:first-child { margin-top: 0; }
.pub-group span { font-size: .8rem; font-weight: 700; color: var(--teal-deep); background: var(--teal-soft); padding: 2px 9px; border-radius: 999px; }
.pub-co { display: grid; gap: 8px; }
.publication.compact { padding: 14px 20px; }
.publication.compact .pub-year { font-size: 1rem; }
.publication.compact h3 { font-size: .97rem; margin-bottom: 4px; }
.publication.compact p { font-size: .85rem; }
.publication.compact .pub-venue { font-size: .85rem; }
.publication.compact .pub-action a { padding: 6px 12px; font-size: .82rem; }
.pub-content p strong { color: var(--ink, #13233A); font-weight: 700; }
.pub-kind { margin-left: 8px; font-size: .75rem; font-weight: 600; color: var(--muted); }
.pub-kind::before { content: "("; } .pub-kind::after { content: ")"; }
.pub-more { justify-self: start; margin-top: 4px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font: inherit; font-weight: 700; font-size: .9rem; color: var(--teal-deep); cursor: pointer; }
.pub-more:hover { background: var(--teal-soft); }
.pub-more:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.publication.highlight { box-shadow: 0 0 0 3px var(--teal); }

/* awards */
.award-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.award { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.award-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--amber-soft); color: var(--amber); display: grid; place-items: center; }
.award-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.award-image { width: 78px; height: 108px; object-fit: cover; object-position: top; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.award-thumb { display: block; border-radius: 10px; }
.award-thumb:hover .award-image { border-color: var(--teal); }
.award-year { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--amber); background: var(--amber-soft); padding: 2px 9px; border-radius: 999px; }
.award h3 { font-size: 1.1rem; font-weight: 800; margin: 8px 0 4px; }
.award-issuer { color: var(--muted); font-weight: 600; font-size: .9rem; margin-bottom: 8px; }
.award-body p { font-size: .92rem; color: #2C3E55; }
.award-body p:last-child { margin-bottom: 0; }

/* patents */
.patent-list { padding: 6px 22px; }
.patent { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.patent:last-child { border-bottom: 0; }
.patent-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--violet-soft); color: var(--violet); display: grid; place-items: center; }
.patent-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.patent-meta { display: flex; gap: 10px; align-items: center; font-size: .8rem; color: var(--muted); font-weight: 600; }
.patent-kind { color: var(--violet); background: var(--violet-soft); padding: 2px 9px; border-radius: 999px; font-weight: 700; font-size: .75rem; }
.patent h3 { font-size: 1.05rem; font-weight: 800; margin: 8px 0 4px; letter-spacing: -0.01em; }
.patent-body p { margin: 0 0 4px; font-size: .92rem; color: #2C3E55; }
.patent-body .patent-number { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }

/* projects */
.featured-projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.featured-project-card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; overflow: hidden; }
.featured-project-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--teal); }
.featured-project-card:nth-child(3n+2)::before { background: #E9A23B; }
.featured-project-card:nth-child(3n+3)::before { background: var(--violet); }
.project-image { width: calc(100% + 48px); margin: -24px -24px 18px; aspect-ratio: 16 / 9; object-fit: cover; }
.project-meta { font-size: .8rem; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.featured-project-card h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 10px; }
.featured-project-card p { color: #2C3E55; font-size: .94rem; }
.project-pub { color: var(--muted) !important; font-size: .85rem !important; }
.project-link { margin-top: auto; font-weight: 700; text-decoration: none; padding-top: 4px; }
a.project-link:hover { text-decoration: underline; }

.code { margin-top: 16px; padding: clamp(20px, 3vw, 28px); }
.code h3 { font-size: 1.2rem; font-weight: 800; }
.repo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.repo-card { display: block; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); text-decoration: none; transition: border-color .15s; }
.repo-card:hover { border-color: var(--teal); }
.repo-card h4 { margin: 0 0 4px; font-size: .98rem; font-weight: 700; color: var(--teal-deep); word-break: break-word; letter-spacing: 0; }
.repo-card p { margin: 0 0 8px; color: var(--muted); font-size: .86rem; }
.repo-meta { display: flex; gap: 12px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.loading-card { grid-column: 1 / -1; padding: 12px 0; color: var(--muted); }

/* news */
.news-list { display: grid; gap: 12px; }
.news-item { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.news-item:not(:has(.news-image)) { grid-template-columns: 1fr; padding: 20px 22px; }
.news-image { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.news-date { display: inline-block; font-size: .78rem; font-weight: 700; color: var(--teal-deep); background: var(--teal-soft); padding: 2px 9px; border-radius: 999px; }
.news-content { max-width: 70ch; }
.news-content h3 { font-size: 1.15rem; font-weight: 800; margin: 8px 0 8px; }
.news-content p { color: #2C3E55; font-size: .95rem; }

/* video */
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.video-frame { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--line); }
.video-frame iframe { width: 100%; height: 100%; border: 0; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); background: var(--ink); color: #DCE6EE; border-radius: var(--radius-lg); padding: clamp(26px, 5vw, 56px); }
.contact h2 { color: #fff; font-size: clamp(2rem, 4.4vw, 2.9rem); }
.contact-copy p { color: #B9C8D6; max-width: 40ch; font-size: 1.02rem; }
.contact-form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form label { display: grid; gap: 6px; font-size: .86rem; font-weight: 600; color: #B9C8D6; }
.contact-form input, .contact-form textarea { width: 100%; background: #FAFCFD; color: var(--ink); border: 1px solid transparent; border-radius: 12px; padding: 12px 14px; }
.contact-form input::placeholder { color: #8796A6; }
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid #5FD3C6; outline-offset: 1px; }
.contact .button-primary { justify-self: start; background: #5FD3C6; color: var(--ink); }
.contact .button-primary:hover { background: #7FE0D5; }
.contact .button:focus-visible { outline-color: #5FD3C6; }
.form-status { font-size: .86rem; color: #B9C8D6; margin: 0; }
.form-status.success { color: #9BE8C5; }
.form-status.error { color: #FFC2C2; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile-slot:empty { display: none; }
.turnstile-slot { min-height: 65px; }

.site-footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 0 0 36px; font-size: .88rem; color: var(--muted); font-weight: 600; }
.site-footer a { color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .latest-list { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .featured-projects { grid-template-columns: 1fr 1fr; }
  .featured-project-card:first-child { grid-column: 1 / -1; }
  .repo-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 16px; }
  .device { max-width: 520px; }
  .about, .contact { grid-template-columns: 1fr; }
  .tabbar { padding: 8px 20px; margin: 0; width: 100%; }
  .tabbar a { padding: 9px 15px; font-size: .88rem; }
  .site-header { height: 64px; }
}
@media (max-width: 600px) {
  .tiles, .featured-projects, .repo-grid, .form-row, .award-list, .latest-list { grid-template-columns: 1fr; }
  .publication { grid-template-columns: 1fr; gap: 6px; padding: 18px; }
  .pub-action { margin-top: 6px; }
  .news-item { grid-template-columns: 1fr; gap: 14px; }
  .reading { padding: 10px; }
  .reading b { font-size: 1.25rem; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- tabs ---------- */
.tab-panel > .section:first-child { padding-top: 28px; }
.tab-panel { min-height: 40vh; }
.contact-section { padding-top: 8px; }
