/* =====================================================
   SHARED STYLES — Preeti Vyas
   ===================================================== */
:root {
  --ink:     #1a1a2e;
  --mid:     #4a4a6a;
  --soft:    #8888aa;
  --rule:    #e8e8f0;
  --bg:      #fafafa;
  --bg-card: #ffffff;
  --accent:  #7c5cbf;
  --accent2: #c2556e;
  --award:   #b8860b;
  --radius:  6px;
  --shadow:  0 2px 16px rgba(60,40,120,0.07);
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'DM Sans', system-ui, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.7; font-weight: 300; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4 { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; line-height: 1.25; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }
section { padding: 3rem 0; border-bottom: 1px solid var(--rule); }
section:last-child { border-bottom: none; }
.section-label { display: none !important; } /* Hidden entirely per request */
.section-title  { font-size: 1.6rem; color: var(--ink); margin-bottom: 2rem; }

nav { position: sticky; top: 0; z-index: 100; background: rgba(250,250,250,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 3.5rem; max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }
.nav-name { font-family: 'DM Serif Display', serif; font-size: 1rem; color: var(--ink); letter-spacing: .01em; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { font-size: .82rem; color: var(--mid); font-weight: 400; letter-spacing: .03em; text-transform: lowercase; transition: color .15s; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }

.news-list { display: flex; flex-direction: column; gap: .6rem; }
.news-item { font-size: .9rem; color: var(--mid); padding: .6rem .9rem; border-left: 2px solid var(--rule); transition: border-color .15s; }
.news-item:hover { border-color: var(--accent); }
.news-item .badge { display: inline-block; font-size: .72rem; font-weight: 500; color: var(--mid); background: var(--rule); padding: .1rem .5rem; border-radius: 2rem; margin-right: .5rem; white-space: nowrap; }
.news-item.award-news { border-left-color: var(--award); }
.news-item.award-news .badge { background: #fdf6e3; color: var(--award); }
.news-more { margin-top: 1rem; font-size: .85rem; }

.pub-list { display: flex; flex-direction: column; gap: 1.2rem; }
.pub-title { font-family: 'DM Serif Display', serif; font-size: 1rem; color: var(--ink); margin-bottom: .4rem; }
.pub-title a { color: inherit; }
.pub-title a:hover { color: var(--accent); }
.pub-meta { font-size: .8rem; color: var(--soft); margin-bottom: .5rem; }
.pub-venue { font-weight: 500; color: var(--mid); }

/* Badge extending issue */
.pub-badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .7rem; padding: .15rem .55rem; border-radius: 2rem; margin-bottom: .5rem; width: fit-content; align-self: flex-start; }
.pub-badge.hm  { background: #fdf6e3; color: var(--award); border: 1px solid #f0d98a; }
.pub-badge.new { background: #f0f5ff; color: #4060c0; border: 1px solid #c0d0f0; }
.pub-badge.review { background: #f2f2f2; color: #555; border: 1px solid #ccc; }

.pub-links { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.pub-link { font-size: .73rem; padding: .2rem .6rem; border: 1px solid var(--rule); border-radius: 2rem; color: var(--mid); transition: all .15s; display: inline-flex; align-items: center; gap: .3rem; }
.pub-link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pub-link-disabled { font-size: .73rem; padding: .2rem .6rem; border: 1px solid var(--rule); border-radius: 2rem; color: var(--mid); display: inline-flex; align-items: center; gap: .3rem; opacity: .4; cursor: default; pointer-events: none; }
.pub-authors { font-size: .8rem; color: var(--soft); margin-bottom: .3rem; }
.pub-authors .me { color: var(--ink); font-weight: 500; }
.hide-btn { display: none !important; }

.proj-tag, .tag { font-size: .65rem; padding: .15rem .5rem; border-radius: 2rem; letter-spacing: .03em; text-transform: uppercase; display: inline-block; background: var(--rule); color: var(--soft); }
.tag-haptics    { background: #f0ebff; color: #7c5cbf; }
.tag-affective  { background: #fff0f3; color: #c2556e; }
.tag-psychology { background: #eefaf4; color: #2e7d5e; }
.tag-robotics   { background: #fff4e6; color: #c27a35; }
.tag-hci        { background: #eef4ff; color: #3563c1; } /* <-- Add this new line */

.project-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 1.2rem; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.7rem; }
.proj-title { font-family: 'DM Serif Display', serif; font-size: 1.05rem; color: var(--ink); margin-bottom: .5rem; }
.proj-title a { color: inherit; }
.proj-title a:hover { color: var(--accent); }
.proj-desc { font-size: .82rem; color: var(--mid); line-height: 1.5; flex-grow: 1; margin-bottom: 1rem; }
.proj-link { font-size: .78rem; color: var(--accent); font-weight: 500; }

/* --- Horizontal Layout for Publications --- */
.pub-card {
  background: var(--bg-card); border: 1px solid var(--rule); border-radius: var(--radius); 
  box-shadow: var(--shadow); transition: all .2s;
  display: flex; flex-direction: row; gap: 1.2rem; align-items: flex-start; padding: 1.2rem;
}
.pub-card:hover { box-shadow: 0 4px 24px rgba(60,40,120,0.12); }
.pub-card .thumb-img {
  width: 120px; height: 120px; object-fit: cover; border-radius: var(--radius); 
  border: 1px solid var(--rule); flex-shrink: 0;
}

/* --- Vertical Layout for Projects --- */
.proj-card {
  background: var(--bg-card); border: 1px solid var(--rule); border-radius: var(--radius); 
  box-shadow: var(--shadow); transition: all .2s;
  display: flex; flex-direction: column; padding: 1.2rem;
}
.proj-card:hover { box-shadow: 0 4px 24px rgba(60,40,120,0.12); }
.proj-card .thumb-img {
  width: 100%; height: 180px; object-fit: cover; border-radius: var(--radius); 
  border: 1px solid var(--rule); margin-bottom: 1.2rem;
}

.card-content { flex-grow: 1; display: flex; flex-direction: column; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.proj-links-wrap { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }

footer { padding: 1.5rem; text-align: center; font-size: .75rem; color: var(--soft); }
.year-heading { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--soft); margin: 2rem 0 .8rem; padding-bottom: .4rem; border-bottom: 1px solid var(--rule); }
.bin-heading { font-family: 'DM Serif Display', serif; font-size: 1.25rem; font-weight: 400; color: var(--ink); margin: 2rem 0 0; }
.bin-divider { border: none; border-top: 1px solid var(--rule); margin: 3rem 0 2rem; }

/* Detail Pages (Papers & Projects) */
.page-wrap { max-width: 800px; margin: 0 auto; padding: 3rem 1.5rem 4rem; }
.back-link { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 2rem; font-size: .88rem; color: var(--mid); transition: color .15s; }
.back-link:hover { color: var(--accent); text-decoration: none; }
.page-tags { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-title  { font-size: 2rem; color: var(--ink); margin-bottom: .8rem; line-height: 1.25; }
.page-authors { font-size: .95rem; color: var(--mid); margin-bottom: .35rem; }
.page-authors .me { color: var(--ink); font-weight: 500; }
.page-venue  { font-size: .85rem; color: var(--soft); margin-bottom: 1.5rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.hero-image { width: 100%; border-radius: var(--radius); margin-bottom: 1.5rem; border: 1px solid var(--rule); }
.section-h2 { font-size: 1.15rem; color: var(--ink); margin: 2rem 0 .8rem; padding-bottom: .4rem; border-bottom: 1px solid var(--rule); }
.abstract-text { font-size: .95rem; color: var(--mid); line-height: 1.8; }

.related-box { padding: 1.1rem 1.4rem; background: var(--bg-card); border: 1px solid var(--rule); border-radius: var(--radius); display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .6rem; }
.related-box h3  { font-size: .95rem; color: var(--ink); margin-bottom: .2rem; }
.related-box p   { font-size: .82rem; color: var(--mid); margin: 0; }
.related-box a   { font-size: .85rem; font-weight: 500; white-space: nowrap; }

/* Paper Mini Block */
.paper-mini { display: flex; gap: .8rem; padding: .8rem 1rem; background: var(--bg-card); border: 1px solid var(--rule); border-radius: var(--radius); margin-bottom: .6rem; transition: box-shadow .15s; align-items: flex-start; text-decoration: none; }
.paper-mini:hover { box-shadow: 0 4px 16px rgba(60,40,120,0.1); text-decoration: none; }
.paper-mini-icon { color: var(--soft); font-size: 1.1rem; flex-shrink: 0; padding-top: .1rem; }
.paper-mini-title { font-family: 'DM Serif Display', serif; font-size: .95rem; color: var(--ink); display: block; line-height: 1.4; margin-bottom: .3rem; transition: color .15s; }
.paper-mini:hover .paper-mini-title { color: var(--accent); }
.paper-mini-meta  { font-size: .8rem; color: var(--soft); display: block; }

.filter-bar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.filter-btn { font-size: .75rem; padding: .3rem .8rem; border: 1px solid var(--rule); border-radius: 2rem; color: var(--mid); cursor: pointer; background: transparent; transition: all .15s; font-family: inherit; }
.filter-btn:hover, .filter-btn.active { border-color: var(--accent); color: var(--accent); background: #f5f0ff; }

/* ---- Bio show more ---- */
.bio-more { display: none; }
.bio-more.open { display: block; }
.bio-expand-btn {
  display: inline-flex; align-items: center; gap: .3rem;
  margin-top: .4rem; font-size: .8rem; color: var(--accent);
  cursor: pointer; background: none; border: none; padding: 0;
  font-family: inherit; transition: opacity .15s;
}
.bio-expand-btn:hover { opacity: .75; }

/* ---- Avatar column (left side of about grid) ---- */
.avatar-col { display: flex; flex-direction: column; align-items: center; }

/* ---- Mindful quote ---- */
.mindful-quote {
  text-align: center; margin: 1.4rem 0 1rem; padding: 0;
}
.mindful-quote p {
  font-family: 'DM Sans', sans-serif; font-size: .78rem; font-weight: 300;
  font-style: italic; color: var(--mid); line-height: 1.65; margin-bottom: .5rem;
}
.mindful-quote cite { font-size: .68rem; color: var(--soft); font-style: normal; letter-spacing: .05em; }

/* ---- Breathing orb ---- */
.breathe-orb {
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  outline: none; margin-top: .4rem;
}

/* Cosine-curve keyframes — 10% steps give a true ease-in-out sine arc */
@keyframes breatheIn {
  0%   { transform: scale(0.42);  }
  10%  { transform: scale(0.430); }
  20%  { transform: scale(0.476); }
  30%  { transform: scale(0.540); }
  40%  { transform: scale(0.620); }
  50%  { transform: scale(0.710); }
  60%  { transform: scale(0.800); }
  70%  { transform: scale(0.880); }
  80%  { transform: scale(0.945); }
  90%  { transform: scale(0.986); }
  100% { transform: scale(1.0);   }
}
@keyframes breatheOut {
  0%   { transform: scale(1.0);   }
  10%  { transform: scale(0.985); }
  20%  { transform: scale(0.944); }
  30%  { transform: scale(0.880); }
  40%  { transform: scale(0.800); }
  50%  { transform: scale(0.710); }
  60%  { transform: scale(0.620); }
  70%  { transform: scale(0.540); }
  80%  { transform: scale(0.475); }
  90%  { transform: scale(0.434); }
  100% { transform: scale(0.42);  }
}

/* Scale wrapper */
.flower-scale {
  width: 140px; height: 140px;
  transform: scale(0.42);
  filter: drop-shadow(0 3px 14px rgba(124,92,191,0.15));
}
.flower-scale svg { width: 140px; height: 140px; display: block; }

/* box breathing phases */
.breathe-orb.inhale   .flower-scale { animation: breatheIn  4s linear forwards; }
.breathe-orb.hold-in  .flower-scale { transform: scale(1.0);  animation: none; }
.breathe-orb.exhale   .flower-scale { animation: breatheOut 4s linear forwards; }
.breathe-orb.hold-out .flower-scale { transform: scale(0.42); animation: none; }


/* instruction text — gentle fade-in on each phase change */
@keyframes textFadeUp {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}
.breathe-instruction {
  margin-top: .9rem; font-size: .75rem; color: var(--soft);
  letter-spacing: .09em; text-transform: lowercase; min-height: 1.2rem;
  transition: color .6s;
}
.breathe-instruction.text-fade { animation: textFadeUp 0.9s ease forwards; }
.breathe-orb.inhale   .breathe-instruction,
.breathe-orb.hold-in  .breathe-instruction,
.breathe-orb.exhale   .breathe-instruction,
.breathe-orb.hold-out .breathe-instruction { color: var(--accent); }
.breathe-hint { margin-top: .35rem; font-size: .68rem; color: var(--rule); }
.breathe-orb.inhale   .breathe-hint,
.breathe-orb.hold-in  .breathe-hint,
.breathe-orb.exhale   .breathe-hint,
.breathe-orb.hold-out .breathe-hint { color: var(--soft); }

/* ---- Project year tag (inline chip in tags row) ---- */
.proj-tag-year { text-transform: lowercase; letter-spacing: .02em; }

/* ---- Teaching section ---- */
.teaching-grid { display: flex; flex-direction: column; gap: 2rem; }
.teaching-block { border-left: 2px solid var(--rule); padding-left: 1.2rem; }
.teaching-role-label {
  font-size: .68rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .25rem; font-weight: 500;
}
.teaching-inst-line { font-size: .92rem; color: var(--ink); margin-bottom: .75rem; }
.teaching-inst-line span { color: var(--soft); font-weight: 300; }
.teaching-course {
  display: flex; align-items: baseline; gap: .6rem;
  font-size: .85rem; color: var(--mid); padding: .35rem 0;
  border-bottom: 1px solid var(--rule);
}
.teaching-course:last-child { border-bottom: none; }
.teaching-code { font-size: .72rem; color: var(--accent); font-weight: 500; white-space: nowrap; min-width: 80px; }
.teaching-name { flex: 1; }
.teaching-term { font-size: .73rem; color: var(--soft); white-space: nowrap; margin-left: auto; padding-left: .5rem; }

/* Mobile hamburger button (hidden on desktop) */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem .5rem;
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1;
}

@media(max-width:640px) {
  /* Hamburger nav */
  .nav-hamburger { display: flex; align-items: center; }
  .nav-links {
    display: none;
    position: absolute;
    top: 3.5rem; left: 0; right: 0;
    background: rgba(250,250,250,.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--rule);
    flex-direction: column;
    padding: .25rem 1.5rem .75rem;
    gap: 0;
    z-index: 99;
    box-shadow: 0 6px 20px rgba(60,40,120,0.08);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    font-size: .9rem !important;
    padding: .65rem 0;
    border-bottom: 1px solid var(--rule);
    letter-spacing: .02em;
  }
  .nav-links a:last-child { border-bottom: none; }

  /* Section spacing */
  section { padding: 2rem 0; }

  /* Publication cards */
  .pub-card { flex-direction: column; align-items: stretch; }
  .pub-card .thumb-img { width: 100%; height: auto; aspect-ratio: 16/9; margin-bottom: 1rem; }

  /* Paper mini (on detail pages) */
  .paper-mini { flex-direction: column; gap: .4rem; }
  .paper-mini-icon { display: none; }

  /* Related box on detail pages */
  .related-box { flex-direction: column; align-items: flex-start; gap: .75rem; }

  /* Teaching */
  .teaching-course { flex-wrap: wrap; }
  .teaching-term { margin-left: 0; white-space: normal; }

  /* Avatar column: centered column on mobile (same as desktop) */
  .avatar-col { flex-direction: column; align-items: center; }
  .mindful-quote { text-align: center; margin: 1.4rem 0 1rem; flex: unset; min-width: unset; }

  /* Gallery grid gap */
  .gallery-grid { gap: .75rem !important; }
}