/* ── Design system ── mirroring aadsah.github.io ── */

:root {
  --bg:           #ffffff;
  --surface:      #f7f8fb;
  --card:         #ffffff;
  --text:         #0f172a;
  --muted:        #475569;
  --border:       #e5e7eb;
  --accent:       #2563eb;
  --accent-weak:  #eff6ff;
  --glass-border: rgba(255,255,255,0.4);
  --glass-hi:     rgba(255,255,255,0.85);
  --font-sans:    Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  --ease:         cubic-bezier(.22,.61,.36,1);
  color-scheme:   light;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background:
    linear-gradient(to bottom, transparent 0, transparent 23px, var(--surface) 24px),
    linear-gradient(to right,  transparent 0, transparent 23px, var(--surface) 24px),
    var(--bg);
  background-size: 24px 24px, 24px 24px, auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

::selection { background: var(--accent); color: #fff; }

.container { max-width: 980px; margin: 0 auto; padding: 0 18px; }

/* ── Skip link ── */
.skip-link {
  position: absolute; left: -999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  left: 16px; top: 16px; width: auto; height: auto;
  padding: 8px 12px; background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; z-index: 999;
}

/* ── Scroll progress bar ── */
#progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  pointer-events: none; z-index: 200;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #93c5fd));
  transform: scaleX(var(--scroll, 0));
  transform-origin: 0 50%;
}

/* ── Navigation ── */
.navbar {
  position: sticky; top: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.6));
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 8px 30px rgba(2,6,23,.05);
  z-index: 100;
}

.nav-container {
  max-width: 980px; margin: 0 auto; padding: 0 18px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; height: 52px;
}

.nav-brand {
  font-weight: 700; letter-spacing: .3px;
  font-family: var(--font-mono); font-size: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text); text-decoration: none;
}
.nav-brand::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
  flex-shrink: 0;
}
.nav-brand:hover { color: var(--text); text-decoration: none; }

.nav-menu { display: flex; list-style: none; align-items: center; }
.nav-menu a {
  color: var(--muted); text-decoration: none; padding: 6px 9px;
  border-radius: 8px; font-family: var(--font-mono); font-size: 12.5px;
  transition: color .15s, background .15s;
}
.nav-menu a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav-menu a.active { color: var(--accent); background: var(--accent-weak); }

.nav-toggle {
  display: none; flex-direction: column;
  background: none; border: none; cursor: pointer; padding: 4px; gap: 5px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); transition: .25s; }

/* ── Hero ── */
.hero {
  display: grid; grid-template-columns: 1.35fr 0.65fr;
  gap: 16px; align-items: center;
  padding: 28px 0 10px;
  position: relative; margin-top: 0;
}
.hero::after {
  content: ""; position: absolute;
  right: clamp(0px, 2vw, 12px); top: 8px;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.9), rgba(255,255,255,.35) 60%, rgba(255,255,255,0) 70%);
  filter: blur(10px); opacity: .45; pointer-events: none; z-index: 0;
}
.hero-content { display: contents; }
.hero-text  { position: relative; z-index: 1; }
.hero-image { display: flex; justify-content: flex-end; position: relative; z-index: 1; }

.hero-text h1 {
  font-size: clamp(24px, 4.2vw, 34px); line-height: 1.15;
  margin: 0 0 6px; letter-spacing: -.02em;
  font-family: var(--font-mono); font-weight: 750; color: var(--text);
}
h1.typing::after {
  content: '▍'; margin-left: 6px; color: var(--accent);
  animation: blink 1.05s steps(2, end) infinite;
}
@keyframes blink { 50% { opacity: .25; } }

.hero-tagline { color: var(--muted); margin: 0 0 4px; font-size: 14px; font-weight: 400; }
.lead         { color: var(--muted); font-size: 13.5px; margin-bottom: 3px; }
.hero-research{ font-size: 13px; color: var(--muted); font-style: italic; }

/* Portrait – circle */
.hero-image img {
  width: min(45vw, 200px);
  aspect-ratio: 1 / 1; height: auto;
  object-fit: cover; object-position: center 48%;
  border-radius: 9999px;
  border: 1px solid var(--border);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px color-mix(in srgb, var(--accent) 20%, transparent), 0 12px 28px rgba(0,0,0,.08);
  display: block;
}

/* ── Pill buttons (CTA row) ── */
.social-links {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px;
  padding: 0; border: 0; background: transparent; box-shadow: none;
}
.btn {
  --btn-accent: var(--accent);
  appearance: none; display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-weight: 600; font-size: 12.5px;
  padding: 6px 12px; border: 1px solid transparent; border-radius: 9999px;
  color: var(--text); text-decoration: none;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    conic-gradient(from 180deg at 50% 50%,
      color-mix(in srgb, var(--btn-accent) 28%, transparent),
      transparent 25%,
      color-mix(in srgb, var(--btn-accent) 12%, transparent)) border-box;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
  transition: transform .06s ease, box-shadow .2s ease;
  white-space: nowrap; cursor: pointer;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,.07), 0 0 0 3px color-mix(in srgb, var(--btn-accent) 12%, transparent);
  text-decoration: none; color: var(--text);
}
.btn:active { transform: translateY(0); }
.btn .icon {
  width: 14px; height: 14px; display: inline-grid; place-items: center; flex-shrink: 0;
  transition: transform .2s var(--ease);
}
.btn:hover .icon { transform: translateY(-1px); }
.btn .icon svg { width: 14px; height: 14px; display: block; shape-rendering: geometricPrecision; }

/* Brand-specific accent colors */
.btn.primary   { --btn-accent: var(--accent); }
.btn.scholar   { --btn-accent: #1a73e8; }
.btn.linkedin  { --btn-accent: #0a66c2; }
.btn.github    { --btn-accent: #171515; }
.btn.leetcode  { --btn-accent: #f89f1b; }

/* ── Sections ── */
.section { padding: 16px 0; }
.bg-light { background: transparent; }
.bg-light::before { display: none; }

.section-title {
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
  font-family: var(--font-mono); font-weight: 600;
}
.section-title::after { display: none; }

/* ── About ── */
.about-content p { font-size: 14px; color: var(--text); margin: 6px 0; line-height: 1.65; }
.about-intro { font-size: 14px !important; }

.interests { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.interests h3 {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .24em; color: var(--muted); font-family: var(--font-mono); margin-bottom: 8px;
}
.interest-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  font-size: 12px; font-family: var(--font-mono);
  color: var(--text); padding: 4px 10px;
  border: 1px solid var(--border); border-radius: 9999px;
  background: var(--card); box-shadow: 0 1px 0 rgba(0,0,0,.02);
  transition: none;
}
.tag.primary-tag {
  background: var(--accent-weak);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  color: var(--accent);
}

/* ── Education ── */
.education-container { display: grid; gap: 0; border-top: 1px solid var(--border); }
.education-card {
  padding: 12px 0; border-bottom: 1px solid var(--border);
  background: none; border-radius: 0; box-shadow: none; overflow: visible;
}
.education-card:hover { transform: none; box-shadow: none; border-color: var(--border); }
.education-header { display: flex; align-items: flex-start; gap: 12px; background: none; border: none; padding: 0; }
.education-icon {
  width: 32px; height: 32px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.education-icon i { font-size: .85rem; color: var(--muted); }
.education-info h3  { font-size: 14px; font-weight: 600; color: var(--text); font-family: var(--font-mono); }
.education-info h4  { font-size: 13px; color: var(--muted); font-weight: 400; }
.institution        { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.year-badge {
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  padding: 2px 7px; border: 1px solid var(--border); border-radius: 9999px; background: none;
}
.education-content { padding: 8px 0 0 44px; }
.thesis-info { margin-bottom: 8px; }
.thesis-info h5, .coursework h5 {
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .18em;
  color: var(--muted); font-family: var(--font-mono); margin-bottom: 4px;
}
.thesis-info p { font-size: 13px; color: var(--muted); line-height: 1.5; }
.course-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.course-tag {
  font-size: 11.5px; color: var(--muted); padding: 3px 8px;
  border: 1px solid var(--border); border-radius: 9999px; background: var(--card); transition: none;
}
.course-tag:hover { transform: none; box-shadow: none; color: var(--muted); border-color: var(--border); background: var(--card); }

/* ── Research ── */
.research-grid { border-top: 1px solid var(--border); }
.research-card {
  padding: 12px 0; border-bottom: 1px solid var(--border);
  background: none; box-shadow: none; border-radius: 0; overflow: visible; position: static;
}
.research-card::before { display: none; }
.research-card:hover { transform: none; box-shadow: none; border-color: var(--border); }
.research-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 3px; flex-wrap: wrap; }
.research-header h3 { font-size: 13.5px; font-weight: 600; color: var(--text); font-family: var(--font-mono); line-height: 1.4; flex: 1; }
.research-date { font-size: 11px; color: var(--muted); font-family: var(--font-mono); white-space: nowrap; }
.research-role { font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.research-highlights { list-style: none; padding: 0; margin: 4px 0; }
.research-highlights li { font-size: 13px; color: var(--muted); padding-left: 14px; position: relative; margin-bottom: 3px; line-height: 1.55; }
.research-highlights li::before { content: '–'; position: absolute; left: 0; color: var(--muted); }
.research-tech { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tech-tag {
  font-size: 11px; color: var(--muted); padding: 2px 8px;
  border: 1px solid var(--border); border-radius: 9999px;
  background: var(--card); font-family: var(--font-mono); transition: none;
}
.tech-tag:hover { transform: none; background: var(--card); color: var(--muted); border-color: var(--border); }

/* ── News timeline (glass) ── */
.updates-list ul {
  list-style: none; padding: 6px 10px;
  max-height: 300px; overflow-y: auto;
  border: 1px solid var(--glass-border); border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,.75), rgba(255,255,255,.5));
  backdrop-filter: blur(8px) saturate(130%);
  -webkit-backdrop-filter: blur(8px) saturate(130%);
  box-shadow: 0 8px 24px rgba(2,6,23,.04), inset 0 1px 0 var(--glass-hi);
  scrollbar-width: thin; scrollbar-color: #e5e7eb transparent;
  position: relative;
}
.updates-list ul::-webkit-scrollbar { width: 8px; }
.updates-list ul::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 9999px; }

.updates-list li {
  display: grid; grid-template-columns: 90px 1fr;
  gap: 10px; align-items: start;
  padding: 5px 0; border-bottom: 1px dashed var(--border);
  font-size: 13.5px; color: var(--text); line-height: 1.5;
}
.updates-list li:last-child { border-bottom: none; }
.updates-list li time,
.updates-list li .news-date {
  font-variant-numeric: tabular-nums; color: var(--muted);
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 400;
}
.updates-list li strong {
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 400;
  color: var(--muted); background: none; padding: 0; border-radius: 0;
}
.updates-list li > div { font-size: 13.5px; }

/* ── Publications ── */
.publications-list { display: grid; gap: 12px; }

.publication {
  position: relative;
  display: grid;
  grid-template-columns: clamp(120px, 20vw, 220px) 1fr;
  gap: 14px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,255,255,.65)) padding-box,
    conic-gradient(from 180deg at 50% 50%,
      color-mix(in srgb, var(--accent) 18%, transparent),
      transparent 25%,
      color-mix(in srgb, var(--accent) 10%, transparent)) border-box;
  border: 1px solid transparent;
  border-radius: 16px; padding: 12px;
  box-shadow: 0 1px 0 rgba(0,0,0,.02), 0 10px 32px rgba(2,6,23,.06);
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  transition: transform .16s var(--ease), box-shadow .22s var(--ease);
  overflow: hidden;
}
.publication:hover, .publication:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(2,6,23,.08), 0 1px 0 rgba(0,0,0,.02);
}
.publication:last-child { margin-bottom: 0; }

/* sheen */
.publication::before {
  content: ""; position: absolute; top: 0; left: -30%; width: 30%; height: 100%;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 14%, transparent), transparent);
  transform: translateX(-140%) skewX(-12deg); opacity: 0;
}
.publication:hover::before { animation: sheen 1.2s var(--ease) 1; opacity: 1; }
@keyframes sheen { to { transform: translateX(240%) skewX(-12deg); } }

/* gradient glow on hover */
.publication::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 60% at 120% -20%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%);
  opacity: 0; transition: opacity .25s var(--ease); pointer-events: none;
}
.publication:hover::after { opacity: 1; }

.pub-number { display: none; }

.pub-thumb-wrap {
  width: 100%; aspect-ratio: 16/10; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface);
  overflow: hidden; transition: transform .25s var(--ease);
}
.publication:hover .pub-thumb-wrap { transform: scale(1.02); }
.pub-thumb-wrap img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  background: #fff; padding: 4px;
}
.pub-thumb-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--accent) 8%, var(--surface)));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-family: var(--font-mono); color: var(--muted);
  text-align: center; padding: 8px; line-height: 1.4;
}

.pub-content { position: relative; z-index: 1; }
.pub-content h3 {
  font-weight: 700; margin: 0 0 3px;
  font-family: var(--font-mono); font-size: 14px;
  color: var(--text); line-height: 1.4;
}
.pub-authors { color: var(--muted); font-size: 12.5px; margin: 0 0 5px; }
.pub-venue   { color: var(--muted); font-size: 12.5px; font-style: italic; margin: 0 0 4px; }
.pub-stats   { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.pub-abstract{ font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-bottom: 8px; }

.pub-links   { display: flex; gap: 6px; flex-wrap: wrap; }
.pub-link {
  font-size: 12px; font-family: var(--font-mono);
  padding: 5px 9px; border: 1px solid var(--border); border-radius: 9999px;
  color: var(--text); background: var(--card); box-shadow: 0 1px 0 rgba(0,0,0,.02);
  transition: background .2s, transform .12s; text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px; margin-top: 0;
}
.pub-link:hover {
  background: var(--surface); transform: translateY(-1px);
  color: var(--text); text-decoration: none; box-shadow: none;
}
.pub-link i { display: none; }

/* ── Teaching ── */
.teaching-card {
  padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: none; box-shadow: none; border-radius: 0;
}
.teaching-card:hover { transform: none; box-shadow: none; }
.teaching-card h3 { font-size: 14px; font-weight: 600; font-family: var(--font-mono); color: var(--text); }
.institution { color: var(--muted); font-size: 13px; margin-bottom: 8px; font-weight: 400; }
.courses { margin: 8px 0; }
.course {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 0; border-bottom: 1px dashed var(--border); background: none; border-radius: 0;
}
.course:last-child { border-bottom: none; }
.course h4 { font-size: 13px; font-weight: 400; color: var(--text); }
.course h4 a { color: var(--accent); }
.course h4 a:hover { text-decoration: underline; }
.semester { font-size: 11px; color: var(--muted); font-family: var(--font-mono); background: none; padding: 0; }
.responsibilities { font-size: 13px; color: var(--muted); line-height: 1.55; }

/* ── Timeline / Experience ── */
.timeline { position: relative; padding-left: 14px; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 0;
  width: 1px; background: var(--border);
}
.timeline-item { position: relative; padding-left: 18px; padding-bottom: 20px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ''; position: absolute; left: -5px; top: 7px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 1.5px solid var(--muted);
}
.timeline-date { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-bottom: 2px; position: static; }
.timeline-content { background: none; padding: 0; margin-top: 0; }
.timeline-content h3 { font-size: 13.5px; font-weight: 600; font-family: var(--font-mono); color: var(--text); }
.timeline-content h4 { font-size: 12.5px; color: var(--muted); font-weight: 400; margin-bottom: 4px; }
.timeline-content ul { list-style: none; padding: 0; }
.timeline-content li {
  font-size: 12.5px; color: var(--muted);
  padding-left: 12px; position: relative; margin-bottom: 2px; line-height: 1.55;
}
.timeline-content li::before { content: '–'; position: absolute; left: 0; color: var(--muted); }

/* ── Achievements ── */
.achievements-grid { border-top: 1px solid var(--border); }
.achievement-card {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  background: none; box-shadow: none; border-radius: 0; text-align: left;
}
.achievement-card:hover { transform: none; box-shadow: none; border-color: var(--border); }
.achievement-icon { width: 28px; height: 28px; background: none; border-radius: 0; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-bottom: 0; }
.achievement-icon i { font-size: .9rem; color: var(--muted); }
.achievement-card h3 { font-size: 13px; font-weight: 600; font-family: var(--font-mono); color: var(--text); margin-bottom: 2px; }
.achievement-card p { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* ── Contact ── */
.contact-info { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.contact-item { background: none; border: none; box-shadow: none; padding: 0; min-width: auto; align-items: flex-start; text-align: left; }
.contact-item:hover { transform: none; box-shadow: none; }
.contact-item i { font-size: .95rem; color: var(--muted); margin-bottom: 4px; }
.contact-item h3 { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .18em; font-family: var(--font-mono); color: var(--muted); margin-bottom: 3px; }
.contact-item p { font-size: 13px; color: var(--text); }

/* ── Footer ── */
.footer {
  padding: 2rem 0; border-top: 1px solid var(--border);
  background: transparent; text-align: center;
  font-size: 12px; font-family: var(--font-mono); color: var(--muted); margin-top: 24px;
}

/* ── Reveal on scroll ── */
.reveal { opacity: 0; transform: translateY(6px) scale(.998); will-change: transform, opacity; }
.reveal.is-visible { opacity: 1; transform: none; transition: opacity .4s var(--ease), transform .5s var(--ease); }

/* ── Glass fallback ── */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .updates-list ul, .publication, .navbar {
    background: var(--card) !important; border-color: var(--border) !important;
  }
  .hero::after { display: none; }
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-image { justify-content: flex-start; }
  .hero-image img { width: min(40vw, 160px); }
  .publication { grid-template-columns: 1fr; }
  .pub-thumb-wrap { aspect-ratio: 16/9; }
}

@media (max-width: 640px) {
  .container, .nav-container { padding: 0 14px; }
  .nav-menu {
    display: none; flex-direction: column;
    position: fixed; top: 52px; left: 0; right: 0;
    background: rgba(255,255,255,.98); border-bottom: 1px solid var(--border);
    padding: 12px 14px; gap: 2px; z-index: 99;
  }
  .nav-menu.active { display: flex; }
  .nav-toggle { display: flex; }
  .section { padding: 10px 0; }
  .contact-info { flex-direction: column; gap: 1.25rem; }
  .updates-list li { grid-template-columns: 75px 1fr; }
  .education-content { padding-left: 0; }
  .research-header { flex-direction: column; gap: 2px; }
  .timeline { padding-left: 10px; }
}

@media (min-width: 641px) { .nav-toggle { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-visible { opacity: 1 !important; transform: none !important; transition: none !important; }
  #progress { display: none; }
  * { transition: none !important; animation: none !important; }
}
