/* ============================================================
   PORTFOLIO – styles.css
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0f172a;
  --bg2:       #1e293b;
  --bg3:       #0d1526;
  --card:      #1e293b;
  --card-hover:#253049;
  --border:    #334155;
  --accent:    #38bdf8;
  --accent2:   #818cf8;
  --text:      #f1f5f9;
  --muted:     #94a3b8;
  --tag-bg:    rgba(56,189,248,.12);
  --tag-col:   #38bdf8;
  --timeline:  #334155;
  --shadow:    0 4px 24px rgba(0,0,0,.35);
  --radius:    12px;
  --nav-h:     64px;
  transition: background .3s, color .3s;
}

[data-theme="light"] {
  --bg:        #f8fafc;
  --bg2:       #f1f5f9;
  --bg3:       #e2e8f0;
  --card:      #ffffff;
  --card-hover:#f0f9ff;
  --border:    #cbd5e1;
  --text:      #0f172a;
  --muted:     #64748b;
  --tag-bg:    rgba(14,165,233,.1);
  --tag-col:   #0284c7;
  --timeline:  #cbd5e1;
  --shadow:    0 4px 24px rgba(0,0,0,.08);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .75; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ============================================================
   NAVIGATION
   ============================================================ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  background: rgba(15,23,42,.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}

[data-theme="light"] nav {
  background: rgba(248,250,252,.9);
}

.nav-brand {
  font-size: 1.1rem; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: -.5px;
}

.nav-links {
  display: flex; gap: 1.75rem; list-style: none; align-items: center;
}

.nav-links a {
  color: var(--muted); font-size: .875rem; font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); opacity: 1; }
.nav-links a.active { color: var(--text); }

.nav-right { display: flex; align-items: center; gap: .75rem; }

#theme-toggle {
  background: none; border: 1px solid var(--border);
  color: var(--muted); cursor: pointer;
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: all .2s;
}
#theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

.lang-switch {
  background: none; border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; text-decoration: none;
  height: 36px; padding: 0 .65rem; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 600; transition: all .2s;
}
.lang-switch:hover { border-color: var(--accent); color: var(--accent); }

.hamburger {
  display: none; background: none; border: none;
  color: var(--text); font-size: 1.4rem; cursor: pointer;
}

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

section { padding: 5rem 0; }

.section-title {
  font-size: 1.75rem; font-weight: 700; margin-bottom: 2.5rem;
  display: flex; align-items: center; gap: .75rem;
}
.section-title::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.section-intro {
  color: var(--muted); font-size: .95rem; line-height: 1.75;
  max-width: 620px; margin-top: -1.75rem; margin-bottom: 1.75rem;
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: var(--nav-h);
  background: var(--bg);
  position: relative; overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute; top: -30%; left: 50%; transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(56,189,248,.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: grid; grid-template-columns: 1fr auto;
  gap: 3rem; align-items: center; width: 100%;
}

.hero-text h1 {
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  font-weight: 800; line-height: 1.1; letter-spacing: -.03em;
  margin-bottom: .75rem;
}

.hero-text h1 span {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.hero-title {
  font-size: 1.2rem; color: var(--muted); font-weight: 400;
  margin-bottom: .5rem;
}

.hero-location {
  font-size: .9rem; color: var(--muted); margin-bottom: .4rem;
  display: flex; align-items: center; gap: .4rem;
}

.hero-hometown {
  font-size: .9rem; color: var(--muted); margin-bottom: 2rem;
  display: flex; align-items: center; gap: .4rem;
}

.hero-desc {
  font-size: 1.05rem; color: var(--muted); max-width: 560px;
  margin-bottom: 2rem; line-height: 1.8;
}

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

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .65rem 1.5rem; border-radius: 8px;
  font-size: .9rem; font-weight: 600;
  transition: all .2s; cursor: pointer;
}

.btn-primary {
  background: var(--accent); color: #0f172a;
}
.btn-primary:hover { opacity: .85; transform: translateY(-1px); }

.btn-outline {
  border: 1px solid var(--border); color: var(--text);
  background: transparent;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); opacity: 1; }

.hero-photo {
  width: 220px; height: 220px; border-radius: 50%;
  object-fit: cover; object-position: top;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 6px rgba(56,189,248,.12), var(--shadow);
  flex-shrink: 0;
}

.social-row {
  display: flex; gap: .65rem; flex-wrap: wrap; margin-top: 1.5rem;
}

.social-badge {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .4rem .9rem; border-radius: 8px;
  border: 1px solid var(--border);
  font-size: .8rem; font-weight: 500; color: var(--muted);
  transition: all .2s;
}
.social-badge:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }
.social-badge svg { flex-shrink: 0; }

/* ============================================================
   EXPERIENCE
   ============================================================ */
#experience { background: var(--bg); }

.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--timeline);
}

.timeline-item {
  position: relative; margin-bottom: 2.5rem; padding-left: 1.5rem;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute; left: -2.35rem; top: .35rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg2);
  box-shadow: 0 0 0 3px rgba(56,189,248,.25);
}

.timeline-date {
  font-size: .8rem; color: var(--accent); font-weight: 600;
  letter-spacing: .04em; margin-bottom: .35rem;
}

.timeline-role {
  font-size: 1.05rem; font-weight: 700; margin-bottom: .2rem;
}

.timeline-org {
  font-size: .9rem; color: var(--muted); margin-bottom: .5rem;
}

.timeline-desc { font-size: .875rem; color: var(--muted); }

/* ============================================================
   EDUCATION
   ============================================================ */
#education { background: var(--bg2); }

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

.edu-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  transition: all .2s;
}
.edu-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }

.edu-degree { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.edu-school { font-size: .9rem; color: var(--accent); font-weight: 500; margin-bottom: .25rem; }
.edu-date { font-size: .8rem; color: var(--muted); }
.edu-note { font-size: .85rem; color: var(--muted); margin-top: .65rem; }
.edu-badge {
  display: inline-block;
  background: var(--tag-bg); color: var(--tag-col);
  font-size: .75rem; font-weight: 600;
  padding: .2rem .65rem; border-radius: 100px; margin-bottom: .75rem;
}

/* ============================================================
   SKILLS
   ============================================================ */
#skills { background: var(--bg); }
#research-interests { background: var(--bg2); }

.skills-groups { display: flex; flex-direction: column; gap: 1.5rem; }
.skill-group { }
.skill-group-label { font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .65rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.skill-tag {
  background: var(--tag-bg); color: var(--tag-col);
  border: 1px solid rgba(56,189,248,.2);
  padding: .35rem .85rem; border-radius: 100px;
  font-size: .82rem; font-weight: 500;
  transition: all .2s;
}
.skill-tag:hover { background: rgba(56,189,248,.2); transform: translateY(-1px); }
.skill-tag--interest {
  display: inline-flex; align-items: center; gap: .45rem;
  background: transparent; color: var(--muted);
  border-style: dashed;
}
.skill-tag--interest svg { flex-shrink: 0; }
.skill-tag--interest:hover { background: rgba(56,189,248,.1); color: var(--tag-col); }
.skill-tag--familiar {
  background: transparent; color: var(--muted);
  border-color: rgba(148,163,184,.25); font-weight: 400;
}
.skill-tag--familiar:hover { background: rgba(56,189,248,.08); color: var(--tag-col); }

/* ============================================================
   PROJECTS
   ============================================================ */
#projects { background: var(--bg2); }

.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.projects-subhead {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: .75rem;
  font-size: .8rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em;
  margin: 1.5rem 0 -.25rem;
}
.projects-subhead::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.projects-subhead:first-child { margin-top: 0; }

.project-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  display: flex; flex-direction: column;
  transition: all .22s; cursor: default;
}
.project-card:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.project-thumb {
  width: calc(100% + 3rem); height: 160px;
  margin: -1.5rem -1.5rem .9rem -1.5rem;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  display: block;
}
.post-body img { height: auto; }

.project-top {
  display: flex; justify-content: space-between;
  align-items: flex-start; margin-bottom: .75rem;
}

.project-icon {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--tag-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.project-icon svg { color: var(--accent); }

.project-links { display: flex; gap: .4rem; }
.project-link {
  color: var(--muted); transition: color .2s;
  display: flex; align-items: center; font-size: .9rem;
}
.project-link:hover { color: var(--accent); opacity: 1; }

.project-name { font-size: 1rem; font-weight: 700; margin-bottom: .45rem; }
.project-duration { font-size: .8rem; color: var(--accent); font-weight: 600; margin-bottom: .6rem; }
.project-desc { font-size: .875rem; color: var(--muted); line-height: 1.7; flex: 1; margin-bottom: 1rem; }

.stat-strip { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.stat-chip {
  font-size: .78rem; color: var(--text); background: var(--tag-bg);
  padding: .3rem .65rem; border-radius: 8px;
}
.stat-chip strong { color: var(--accent); font-weight: 700; }

.project-note { font-size: .74rem; color: var(--muted); font-style: italic; margin: -.4rem 0 .75rem; }

.project-readmore {
  display: inline-flex; align-items: center; gap: .35rem;
  color: var(--accent); font-size: .82rem; font-weight: 600;
  text-decoration: none; margin-bottom: 1rem; transition: gap .2s;
}
.project-readmore:hover { gap: .55rem; opacity: 1; }

.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; }
.tag {
  background: var(--tag-bg); color: var(--tag-col);
  font-size: .74rem; font-weight: 500;
  padding: .2rem .6rem; border-radius: 100px;
}

/* ============================================================
   PUBLICATIONS
   ============================================================ */
#publications { background: var(--bg); }

.pub-list { display: flex; flex-direction: column; gap: 1.1rem; }

.pub-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem 1.6rem;
  display: flex; gap: 1.25rem; align-items: flex-start;
  transition: all .2s;
}
.pub-item:hover { border-color: var(--accent); transform: translateX(3px); }

.pub-num {
  font-size: 1.5rem; font-weight: 800;
  color: var(--border); flex-shrink: 0; min-width: 28px;
  line-height: 1;
}

.pub-body { flex: 1; }
.pub-title { font-size: .95rem; font-weight: 700; margin-bottom: .35rem; }
.pub-venue {
  font-size: .82rem; color: var(--accent); font-weight: 500; margin-bottom: .3rem;
}
.pub-date { font-size: .8rem; color: var(--muted); }
.pub-tier {
  display: inline-flex; align-items: center;
  font-size: .68rem; font-weight: 600;
  padding: .12rem .55rem; border-radius: 100px;
  background: var(--tag-bg); color: var(--tag-col);
  margin-left: .6rem; text-transform: uppercase; letter-spacing: .03em;
}
.pub-desc { font-size: .82rem; color: var(--muted); margin-top: .4rem; line-height: 1.5; }

.pub-actions { display: flex; gap: .5rem; align-items: center; flex-shrink: 0; }
.pub-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .75rem; border-radius: 6px;
  border: 1px solid var(--border); font-size: .78rem;
  color: var(--muted); transition: all .2s; font-weight: 500;
}
.pub-btn:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }

/* ============================================================
   BLOG
   ============================================================ */
#blog { background: var(--bg2); }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }

.blog-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  transition: all .22s;
}
.blog-card:hover { border-color: var(--accent2); transform: translateY(-3px); box-shadow: var(--shadow); }

.blog-tag {
  display: inline-block;
  background: rgba(129,140,248,.12); color: var(--accent2);
  font-size: .75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em;
  padding: .2rem .65rem; border-radius: 100px; margin-bottom: .75rem;
}

.blog-title { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; line-height: 1.4; }
.blog-excerpt { font-size: .875rem; color: var(--muted); line-height: 1.7; }

/* ============================================================
   CERTIFICATIONS
   ============================================================ */
#certifications { background: var(--bg); }

.cert-sections { display: flex; flex-direction: column; gap: 2rem; }

.cert-platform {}
.cert-platform-name {
  display: flex; align-items: center; gap: .5rem;
  font-size: .85rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted);
  margin-bottom: 1rem; padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.cert-platform-name img { width: 16px; height: 16px; flex-shrink: 0; }

.cert-list { display: flex; flex-direction: column; gap: .6rem; }

.cert-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem 1rem;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; transition: all .2s;
}
.cert-item:hover { border-color: var(--accent); }

.cert-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}

.cert-name { font-size: .88rem; font-weight: 500; flex: 1; }
.cert-date { font-size: .8rem; color: var(--muted); white-space: nowrap; }

.cert-extra { display: flex; flex-direction: column; gap: .6rem; }
.cert-extra[hidden] { display: none; }

.cert-toggle {
  display: flex; align-items: center; justify-content: center;
  padding: .55rem 1rem; width: 100%;
  background: transparent; color: var(--muted);
  border: 1px dashed var(--border); border-radius: 8px;
  font-size: .82rem; font-weight: 500; cursor: pointer;
  transition: all .2s;
}
.cert-toggle:hover { border-color: var(--accent); color: var(--tag-col); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--bg3);
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--accent), var(--accent2)) 1;
  padding: 3rem 0; text-align: center;
  color: var(--muted); font-size: .85rem; 
}

.footer-copy { font-size: .8rem; opacity: 1; }

footer a { color: var(--accent); }

/* ============================================================
   BLOG / CASE STUDY POST PAGES (blog.html, projects.html)
   ============================================================ */
#blog-hero {
  background: var(--bg);
  padding-top: calc(var(--nav-h) + 3.5rem);
  padding-bottom: 3.5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 500;
  margin-bottom: 2rem;
  transition: color .2s;
  text-decoration: none;
}
.back-link:hover { color: var(--accent); opacity: 1; }

#blog-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: .5rem;
}

.page-subtitle {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

.post-toc {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.toc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: block;
  text-decoration: none;
  transition: all .22s;
}
.toc-card:hover {
  border-color: var(--accent2);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  opacity: 1;
}
.toc-card .blog-tag { margin-bottom: .6rem; }
.toc-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}
.toc-date {
  font-size: .78rem;
  color: var(--muted);
  margin-top: .35rem;
}

.blog-article { padding: 4rem 0; }
.blog-article.alt-bg { background: var(--bg2); }

.post-sep {
  height: 1px;
  background: var(--border);
  margin: 0;
}

.post-header { margin-bottom: 2.5rem; }
.post-header .blog-tag { margin-bottom: .75rem; }
.post-date { font-size: .82rem; color: var(--muted); }

.post-body { max-width: 820px; }

/* Case-study (projects.html) and blog-post (blog.html) articles each nest one
   heading tier below the page's own <h1>, so every page keeps a single <h1>.
   blog-post goes one tier deeper still (h5) since some posts have real 4-level nesting. */
.case-study .post-header h2,
.blog-post .post-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
  margin-bottom: .5rem;
}
.case-study .post-body h3,
.blog-post .post-body h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 2.5rem 0 .8rem;
  color: var(--text);
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.case-study .post-body h4,
.blog-post .post-body h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.75rem 0 .5rem;
  color: var(--accent);
}
.blog-post .post-body h5 {
  font-size: .95rem;
  font-weight: 600;
  margin: 1.5rem 0 .4rem;
  color: var(--text);
}
.post-body p {
  margin-bottom: 1rem;
  color: var(--muted);
  line-height: 1.85;
  font-size: .95rem;
}
.post-body ul, .post-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--muted);
}
.post-body li {
  margin-bottom: .5rem;
  line-height: 1.75;
  font-size: .95rem;
}
.post-body strong { color: var(--text); font-weight: 600; }
.post-body em { font-style: italic; }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-body a:hover { opacity: .75; }

.post-body code {
  background: var(--bg3);
  padding: .15rem .45rem;
  border-radius: 4px;
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  font-size: .82em;
  color: var(--accent2);
  border: 1px solid var(--border);
}
.post-body pre {
  background: var(--bg3);
  padding: 1.25rem 1.5rem;
  border-radius: 10px;
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--border);
}
.post-body pre code {
  background: none;
  padding: 0;
  border: none;
  font-size: .875rem;
  line-height: 1.7;
  color: var(--text);
}
.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}
.post-body img {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 1rem 0;
  display: block;
}
.img-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: .75rem;
  margin: 1rem 0;
}
.img-row img { margin: 0; }
.img-caption {
  font-size: .8rem;
  color: var(--muted);
  text-align: center;
  margin-top: -.5rem;
  margin-bottom: 1rem;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: .82rem;
}
.post-body th, .post-body td {
  border: 1px solid var(--border);
  padding: .55rem .75rem;
  text-align: center;
  color: var(--muted);
}
.post-body th {
  background: var(--bg3);
  color: var(--text);
  font-weight: 700;
}
.post-body tr:first-child td { color: var(--text); font-weight: 600; }

.math-display {
  overflow-x: auto;
  padding: .75rem 0;
  text-align: center;
}

.callout {
  background: var(--bg3);
  border-left: 3px solid var(--accent);
  padding: .75rem 1rem;
  border-radius: 4px;
  margin: 1rem 0;
  font-size: .875rem;
  color: var(--muted);
}

.ref-links { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0; }
.ref-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .6rem 1rem;
  color: var(--text);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  transition: all .2s;
}
.ref-link:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }
.ref-link svg { flex-shrink: 0; color: var(--muted); }

.works-list { display: flex; flex-direction: column; gap: .75rem; margin: 1rem 0; }
.work-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  transition: all .2s;
}
.work-item:hover { border-color: var(--accent); transform: translateX(3px); }
.work-title { font-size: .9rem; font-weight: 700; color: var(--text); margin-bottom: .3rem; }
.work-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.work-link-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .65rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: .77rem;
  color: var(--muted);
  text-decoration: none;
  transition: all .2s;
  font-weight: 500;
}
.work-link-btn:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }

.blog-tag-depth {
  display: inline-block;
  background: rgba(56,189,248,.12);
  color: var(--accent);
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .2rem .65rem;
  border-radius: 100px;
  margin-bottom: .75rem;
}

/* ============================================================
   SCROLL ANIMATION
   ============================================================ */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity .55s ease, transform .55s ease; }
.fade-up.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-up { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--bg2); padding: 1.5rem;
    border-bottom: 1px solid var(--border); gap: 1.25rem;
    z-index: 99;
  }

  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-photo { width: 160px; height: 160px; margin: 0 auto; }
  .hero-desc { max-width: 100%; }
  .hero-cta, .social-row { justify-content: center; }
  .hero-location { justify-content: center; }
  .hero-hometown { justify-content: center; }

  .pub-item { flex-direction: column; gap: .75rem; }
  .pub-actions { flex-direction: row; }
  .pub-num { font-size: 1.1rem; }

  .post-toc { grid-template-columns: 1fr; }
  #blog-hero h1 { font-size: 1.75rem; }
  .post-body pre { padding: 1rem; }
}

@media (max-width: 480px) {
  .projects-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  section { padding: 3.5rem 0; }
}
