/* ============================================================
   portfolio.css — shared styles for embedded.html + ds.html
   Light, modern, premium. Typography-forward.
   ============================================================ */

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f9fafb;
  color: #111827;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ─── CSS Variables ──────────────────────────────────────── */
/* Each track page sets --accent / --accent-light / --accent-dark */
:root {
  --accent:       #2563eb;
  --accent-light: #dbeafe;
  --accent-dark:  #1e40af;

  --white:   #ffffff;
  --gray-50: #f9fafb;
  --gray-100:#f3f4f6;
  --gray-200:#e5e7eb;
  --gray-300:#d1d5db;
  --gray-400:#9ca3af;
  --gray-500:#6b7280;
  --gray-600:#4b5563;
  --gray-700:#374151;
  --gray-900:#111827;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 36px rgba(0,0,0,0.10), 0 3px 10px rgba(0,0,0,0.06);

  --radius:     12px;
  --radius-sm:  8px;
  --radius-pill:9999px;
  --container:  1080px;
}

/* ─── Layout helpers ─────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
}

.section { padding: 5.5rem 0; }
.section-alt { background: var(--white); }

/* ─── Typography shared ──────────────────────────────────── */
.eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.18;
  margin-bottom: 0.6rem;
}

.section-sub {
  font-size: 1rem;
  color: var(--gray-500);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 3rem;
}

/* ─── Navigation ─────────────────────────────────────────── */
.pf-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(249,250,251,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--gray-200);
}

.pf-nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-back {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-400);
  transition: color 0.2s;
  flex-shrink: 0;
}
.nav-back:hover { color: var(--gray-700); }
.nav-back svg { transition: transform 0.2s; }
.nav-back:hover svg { transform: translateX(-2px); }

.nav-brand {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--gray-900);
  flex: 1;
  text-align: center;
}

.nav-track-pill {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  padding: 0.28rem 0.8rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-links-right {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-shrink: 0;
}
.nav-links-right a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gray-500);
  transition: color 0.2s;
}
.nav-links-right a:hover { color: var(--gray-900); }

.nav-resume-btn {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: var(--white) !important;
  background: var(--gray-900);
  padding: 0.38rem 0.9rem;
  border-radius: var(--radius-pill);
  transition: background 0.2s !important;
}
.nav-resume-btn:hover { background: var(--accent) !important; color: var(--white) !important; }

/* Mobile nav toggle */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: all 0.2s;
}

.pf-mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 1rem 2rem;
  gap: 1rem;
}
.pf-mobile-menu.open { display: flex; }
.pf-mobile-menu a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--gray-100);
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  line-height: 1;
}

.btn-dark {
  background: var(--gray-900);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-dark:hover {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: var(--white);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.btn-outline:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ─── Hero ───────────────────────────────────────────────── */
.pf-hero {
  padding: 8rem 0 5rem;
  min-height: 88vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* subtle dot-grid background */
.pf-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--gray-200) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.6;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gray-500);
  background: var(--white);
  border: 1px solid var(--gray-200);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.hero-tag .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(1.3); }
}

.hero-title {
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.13;
  color: var(--gray-900);
  max-width: 720px;
  margin-bottom: 1.25rem;
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--gray-500);
  max-width: 540px;
  line-height: 1.75;
  margin-bottom: 2rem;
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 2.5rem;
}
.hero-chip {
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--accent-light);
  color: var(--accent-dark);
  padding: 0.32rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(37,99,235,0.12);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* ─── Skills ─────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.skill-group {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.skill-group:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.sg-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.sg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.sg-chip {
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--white);
  color: var(--gray-700);
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--gray-200);
  transition: all 0.15s;
}
.sg-chip:hover {
  background: var(--accent-light);
  color: var(--accent-dark);
  border-color: transparent;
}

/* ─── Experience ─────────────────────────────────────────── */
.exp-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.exp-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s, transform 0.25s;
  position: relative;
  overflow: hidden;
}
.exp-card::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.25s;
}
.exp-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.exp-card:hover::after { transform: scaleY(1); }

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.exp-role {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.2rem;
}
.exp-org {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
}
.exp-date {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.exp-tag {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--gray-500);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-pill);
}

.exp-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.exp-bullets li {
  font-size: 0.875rem;
  color: var(--gray-600);
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.6;
}
.exp-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gray-300);
  font-size: 0.75rem;
  top: 0.05em;
}
.exp-bullets li strong,
.exp-bullets li mark {
  background: var(--accent-light);
  color: var(--accent-dark);
  padding: 0 0.2em;
  border-radius: 3px;
  font-weight: 600;
  font-style: normal;
}

/* ─── Projects ───────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 1.5rem;
}

.proj-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s, transform 0.25s;
  display: flex;
  flex-direction: column;
}
.proj-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.proj-card.featured {
  grid-column: span 2;
}

.proj-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent-light);
  color: var(--accent-dark);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
}

.proj-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.9rem;
  line-height: 1.35;
}

.proj-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex: 1;
}
.proj-bullets li {
  font-size: 0.85rem;
  color: var(--gray-600);
  padding-left: 1rem;
  position: relative;
  line-height: 1.6;
}
.proj-bullets li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.5;
}
.proj-bullets li strong,
.proj-bullets li mark {
  background: var(--accent-light);
  color: var(--accent-dark);
  padding: 0 0.2em;
  border-radius: 3px;
  font-weight: 600;
  font-style: normal;
}

.proj-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}
.proj-stack span {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--gray-500);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-pill);
}

.proj-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap 0.2s;
  align-self: flex-start;
}
.proj-link:hover { gap: 0.45rem; }

.video-placeholder {
  background: var(--gray-50);
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 1.75rem;
  text-align: center;
  margin-bottom: 1.25rem;
  color: var(--gray-400);
  font-size: 0.82rem;
  line-height: 1.6;
}
.video-placeholder .vp-icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  display: block;
}

/* ─── Research ───────────────────────────────────────────── */
.research-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.paper-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.paper-card:hover { box-shadow: var(--shadow-md); }

.paper-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}
.paper-venue {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500);
  letter-spacing: 0.04em;
}
.paper-status {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
}
.paper-status.published { background: #dcfce7; color: #15803d; }
.paper-status.accepted  { background: var(--accent-light); color: var(--accent-dark); }
.paper-status.submitted { background: #fef9c3; color: #a16207; }

.paper-title {
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.35rem;
  line-height: 1.45;
}
.paper-authors {
  font-size: 0.82rem;
  color: var(--gray-400);
}

/* ─── Contact ────────────────────────────────────────────── */
.contact-section {
  background: var(--gray-900);
  padding: 5.5rem 0;
  text-align: center;
}
.contact-section .eyebrow { color: #93c5fd; }
.contact-section .section-title { color: var(--white); }
.contact-section .section-sub  { color: rgba(255,255,255,0.55); margin: 0 auto 2.5rem; }

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  justify-content: center;
  margin-bottom: 2.25rem;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-pill);
  transition: all 0.2s;
}
.contact-link:hover {
  background: rgba(255,255,255,0.13);
  color: var(--white);
  transform: translateY(-1px);
}

.contact-resume {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-900);
  background: var(--white);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  transition: all 0.2s;
}
.contact-resume:hover {
  background: var(--accent-light);
  color: var(--accent-dark);
  transform: translateY(-2px);
}

/* ─── Footer ─────────────────────────────────────────────── */
.pf-footer {
  background: var(--gray-900);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 1.5rem 0;
  text-align: center;
}
.pf-footer p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.25);
}

/* ─── Scroll Reveal ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }
.reveal-d5 { transition-delay: 0.40s; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .proj-card.featured { grid-column: span 1; }
}

@media (max-width: 768px) {
  .section { padding: 3.5rem 0; }
  .pf-hero { padding: 6rem 0 3.5rem; min-height: auto; }
  .hero-title { font-size: 2rem; }
  .nav-links-right { display: none; }
  .nav-hamburger { display: flex; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .exp-header { flex-direction: column; }
  .exp-date { align-self: flex-start; }
  .container { padding: 0 1.25rem; }
}

@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .contact-links { flex-direction: column; align-items: center; }
}
