/* =============================================
   ANJANA RAJAGOPAL
   lilac brutalist. big type. raw grid.
   no fluff. some chaos.
   ============================================= */

:root {
  --lilac:      #9b7fc7;
  --lilac-dim:  #c4aee8;
  --lilac-bg:   #ede8f7;
  --lilac-dark: #6b4fa0;

  --bg:         #f5f4f0;
  --bg-1:       #edeae4;
  --bg-ink:     #1a1820;

  --text:       #1a1820;
  --text-2:     #5a5468;
  --text-inv:   #f5f4f0;

  --border:     #1a1820;

  --green:      #2d6a4f;
  --red:        #c1121f;
  --amber:      #e09d00;

  --font:       'Space Grotesk', sans-serif;
  --mono:       'DM Mono', monospace;

  --nav-h:      56px;
  --gap:        96px;
}

[data-theme="dark"] {
  --bg:         #100f14;
  --bg-1:       #18161e;
  --bg-ink:     #ede8f7;

  --text:       #ede8f7;
  --text-2:     #9b8fb8;
  --text-inv:   #100f14;

  --border:     #ede8f7;

  --lilac-bg:   #1e1830;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .25s, color .25s;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---- NAV ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 900; height: var(--nav-h);
  border-bottom: 2px solid transparent;
  transition: border-color .2s, background .2s;
}
.nav.scrolled {
  background: var(--bg);
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; gap: 8px;
}
.nav-logo {
  font-family: var(--mono); font-size: 15px; font-weight: 500;
  letter-spacing: .1em; color: var(--text); flex-shrink: 0;
  border: 2px solid var(--border); padding: 4px 10px;
}
.nav-links {
  display: flex; gap: 0; margin-left: auto;
}
.nav-links a {
  font-size: 13px; font-weight: 500; color: var(--text-2);
  padding: 6px 14px; border-left: 1px solid transparent;
  transition: color .15s, background .15s;
  font-family: var(--mono); letter-spacing: .02em;
}
.nav-links a:hover { color: var(--text); }
.theme-toggle {
  width: 36px; height: 36px; border: 2px solid var(--border);
  background: transparent; color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  margin-left: 16px; transition: background .15s;
}
.theme-toggle:hover { background: var(--lilac-bg); }
.theme-toggle svg { width: 15px; height: 15px; }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun  { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
.nav-menu-btn {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px; margin-left: 8px;
}
.nav-menu-btn span { display: block; width: 20px; height: 2px; background: var(--text); }
.nav-mobile {
  display: none; flex-direction: column;
  background: var(--bg); border-bottom: 2px solid var(--border);
  padding: 8px 24px 20px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-family: var(--mono); font-size: 14px; color: var(--text-2);
  padding: 10px 0; border-bottom: 1px solid var(--bg-1);
}

/* ---- HERO ---- */
#hero {
  min-height: 100vh; padding-top: var(--nav-h);
  display: grid; align-items: center;
  border-bottom: 2px solid var(--border);
  position: relative; overflow: hidden;
}

/* big geometric shapes in background */
#hero::before {
  content: '';
  position: absolute; top: -80px; right: -80px;
  width: 360px; height: 360px;
  background: var(--lilac-bg);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  opacity: .6;
  z-index: 0;
}
#hero::after {
  content: '';
  position: absolute; bottom: 60px; left: -40px;
  width: 180px; height: 180px;
  border: 3px solid var(--lilac-dim);
  z-index: 0;
}
[data-theme="dark"] #hero::before { opacity: .25; }

.hero-inner {
  position: relative; z-index: 1;
  max-width: 1100px; margin: 0 auto; padding: 60px 24px 80px;
  display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start;
}

.hero-tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--lilac);
  margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
}
.hero-tag::before {
  content: ''; display: block; width: 32px; height: 2px; background: var(--lilac);
}

.hero-name {
  font-size: clamp(56px, 9vw, 120px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: .92;
  margin-bottom: 32px;
  color: var(--text);
}
.hero-name span {
  display: block;
  color: var(--lilac);
}

.hero-bio {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-2);
  max-width: 520px;
  line-height: 1.65;
  margin-bottom: 40px;
  font-weight: 300;
}
.hero-bio strong { color: var(--text); font-weight: 600; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; font-family: var(--font); font-size: 14px;
  font-weight: 600; cursor: pointer; border: 2px solid var(--border);
  transition: all .15s; white-space: nowrap; letter-spacing: .01em;
}
.btn-solid { background: var(--text); color: var(--text-inv); }
.btn-solid:hover { background: var(--lilac); border-color: var(--lilac); color: #fff; }
.btn-outline { background: transparent; color: var(--text); }
.btn-outline:hover { background: var(--lilac-bg); }

/* right col — stats panel */
.hero-stats {
  border: 2px solid var(--border);
  background: var(--bg-1);
}
.hero-stat {
  padding: 18px 22px;
  border-bottom: 2px solid var(--border);
  display: flex; flex-direction: column; gap: 4px;
}
.hero-stat:last-child { border-bottom: none; }
.stat-k {
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-2);
}
.stat-v {
  font-size: 15px; font-weight: 600; color: var(--text);
}
.stat-v.lilac { color: var(--lilac); }

/* ---- SECTION BASE ---- */
.section-wrap {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
}
section { padding: var(--gap) 0; border-bottom: 2px solid var(--border); }
section:last-of-type { border-bottom: none; }

.sec-header {
  display: flex; align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid var(--border);
  padding-bottom: 16px; margin-bottom: 48px;
  flex-wrap: wrap; gap: 12px;
}
.sec-title {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700; letter-spacing: -.03em; line-height: 1;
}
.sec-num {
  font-family: var(--mono); font-size: 12px;
  color: var(--lilac); letter-spacing: .10em;
}

/* ---- AREAS ---- */
.areas-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  border: 2px solid var(--border);
}
.area-card {
  padding: 32px 28px;
  border-right: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
  transition: background .15s;
}
.area-card:nth-child(even) { border-right: none; }
.area-card:nth-child(3),
.area-card:nth-child(4) { border-bottom: none; }
.area-card:hover { background: var(--lilac-bg); }
.area-icon { font-size: 28px; margin-bottom: 16px; display: block; }
.area-card h3 {
  font-size: 18px; font-weight: 700; letter-spacing: -.02em;
  margin-bottom: 10px;
}
.area-card p { font-size: 14px; color: var(--text-2); line-height: 1.65; }
.area-num {
  font-family: var(--mono); font-size: 10px; letter-spacing: .10em;
  color: var(--lilac); margin-bottom: 14px;
}

/* ---- PROJECTS ---- */
.projects-list { display: flex; flex-direction: column; }
.proj-card {
  border: 2px solid var(--border); border-top: none;
  padding: 32px 28px;
  display: grid; grid-template-columns: 1fr auto;
  gap: 24px; align-items: start;
  transition: background .15s;
}
.proj-card:first-child { border-top: 2px solid var(--border); }
.proj-card:hover { background: var(--lilac-bg); }
.proj-cat {
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--lilac); margin-bottom: 10px;
}
.proj-card h3 {
  font-size: clamp(20px, 2.5vw, 28px); font-weight: 700;
  letter-spacing: -.025em; margin-bottom: 6px;
}
.proj-tagline {
  font-family: var(--mono); font-size: 12px; color: var(--text-2);
  margin-bottom: 14px;
}
.proj-desc { font-size: 14px; color: var(--text-2); line-height: 1.7; margin-bottom: 16px; max-width: 580px; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--mono); font-size: 11px;
  padding: 3px 10px; border: 1.5px solid var(--border);
  color: var(--text-2); letter-spacing: .02em;
}
.proj-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; flex-shrink: 0; }
.status {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; padding: 4px 10px; font-weight: 500;
}
.status-research   { background: var(--lilac-bg); color: var(--lilac-dark); }
.status-production { background: #d8f3dc; color: var(--green); }
.status-published  { background: #e8f4fd; color: #1a6fa8; }
[data-theme="dark"] .status-research   { background: #1e1830; color: var(--lilac-dim); }
[data-theme="dark"] .status-production { background: #0d2616; color: #52c47a; }
[data-theme="dark"] .status-published  { background: #0d1f33; color: #60a5fa; }
.proj-link {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: var(--text); border: 2px solid var(--border);
  padding: 7px 14px; transition: all .15s;
}
.proj-link:hover { background: var(--text); color: var(--text-inv); }

/* ---- RESEARCH ---- */
.pub-list { display: flex; flex-direction: column; }
.pub-card {
  border: 2px solid var(--border); border-top: none;
  padding: 28px; display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px; align-items: start;
  transition: background .15s;
}
.pub-card:first-child { border-top: 2px solid var(--border); }
.pub-card:hover { background: var(--lilac-bg); }
.pub-year-col {
  display: flex; flex-direction: column; gap: 8px; padding-top: 4px;
}
.pub-year {
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  color: var(--lilac);
}
.pub-venue-short {
  font-family: var(--mono); font-size: 10px; letter-spacing: .06em;
  color: var(--text-2); text-transform: uppercase; line-height: 1.4;
}
.pub-card h3 {
  font-size: 17px; font-weight: 600; letter-spacing: -.01em;
  margin-bottom: 8px;
}
.pub-venue { font-size: 13px; color: var(--text-2); margin-bottom: 10px; font-style: italic; }
.pub-desc { font-size: 13px; color: var(--text-2); line-height: 1.65; margin-bottom: 14px; }
.pub-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pub-link {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  color: var(--lilac); transition: color .15s;
}
.pub-link:hover { color: var(--text); }

/* ---- SKILLS ---- */
.skills-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 2px solid var(--border);
}
.skill-group {
  padding: 24px 22px;
  border-right: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
}
.skill-group:nth-child(3n) { border-right: none; }
.skill-group:nth-child(4),
.skill-group:nth-child(5),
.skill-group:nth-child(6) { border-bottom: none; }
.skill-group-name {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--lilac);
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.skill-items { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-item {
  font-size: 12px; font-weight: 500; color: var(--text);
  padding: 4px 10px; border: 1.5px solid var(--border);
  transition: all .15s; cursor: default;
}
.skill-item:hover { background: var(--lilac); border-color: var(--lilac); color: #fff; }

/* ---- LAB ---- */
#lab .lab-top {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px; margin-bottom: 32px; flex-wrap: wrap;
}
.lab-blurb { font-size: 15px; color: var(--text-2); max-width: 420px; }

.ascii-card {
  border: 2px solid var(--border);
}
.ascii-header {
  background: var(--lilac); padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 2px solid var(--border);
}
.ascii-header h3 { font-size: 16px; font-weight: 700; color: #fff; }
.ascii-header .mono-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: .10em;
  color: rgba(255,255,255,.65); text-transform: uppercase;
}
.ascii-body {
  padding: 28px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.ascii-desc { font-size: 15px; color: var(--text-2); max-width: 480px; line-height: 1.7; }
.ascii-btn {
  flex-shrink: 0; background: var(--text); color: var(--text-inv);
  border: 2px solid var(--border); padding: 12px 24px;
  font-family: var(--font); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .15s; display: inline-block;
}
.ascii-btn:hover { background: var(--lilac); border-color: var(--lilac); }

/* ---- CONTACT ---- */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  border: 2px solid var(--border);
}
.contact-left {
  padding: 48px 40px;
  border-right: 2px solid var(--border);
}
.contact-left h2 {
  font-size: clamp(28px, 4vw, 48px); font-weight: 700;
  letter-spacing: -.03em; margin-bottom: 16px; line-height: 1.05;
}
.contact-left p { font-size: 15px; color: var(--text-2); line-height: 1.7; margin-bottom: 32px; }
.contact-links { display: flex; flex-direction: column; gap: 10px; }
.contact-link {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border: 2px solid var(--border);
  font-size: 14px; font-weight: 500; color: var(--text);
  transition: all .15s;
}
.contact-link:hover { background: var(--lilac); border-color: var(--lilac); color: #fff; }
.contact-link svg { width: 15px; height: 15px; flex-shrink: 0; }

/* right side — a raw "about me outside work" panel */
.contact-right {
  padding: 48px 40px;
  background: var(--lilac-bg);
  display: flex; flex-direction: column; gap: 24px;
}
.about-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--lilac); margin-bottom: -12px;
}
.about-item {
  display: flex; flex-direction: column; gap: 4px;
  padding-bottom: 20px; border-bottom: 1px solid var(--border);
}
.about-item:last-child { border-bottom: none; padding-bottom: 0; }
.about-item strong { font-size: 15px; font-weight: 600; color: var(--text); }
.about-item span { font-size: 13px; color: var(--text-2); }

/* ---- FOOTER ---- */
footer {
  border-top: 2px solid var(--border);
  background: var(--bg);
}
.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 24px 24px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.footer-left { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.footer-right { font-family: var(--mono); font-size: 11px; color: var(--text-2); }

/* ---- REVEAL ---- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s, transform .5s; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .07s; }
.reveal-delay-2 { transition-delay: .14s; }
.reveal-delay-3 { transition-delay: .21s; }
.reveal-delay-4 { transition-delay: .28s; }

/* ---- RESPONSIVE ---- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); }
  .hero-stat { border-bottom: none; border-right: 2px solid var(--border); }
  .hero-stat:last-child { border-right: none; }
  .areas-grid { grid-template-columns: 1fr; }
  .area-card { border-right: none; }
  .area-card:nth-child(3) { border-bottom: 2px solid var(--border); }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .skill-group:nth-child(3n) { border-right: 2px solid var(--border); }
  .skill-group:nth-child(2n) { border-right: none; }
  .skill-group:nth-child(4),
  .skill-group:nth-child(5) { border-bottom: 2px solid var(--border); }
  .skill-group:nth-child(6) { border-bottom: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-left { border-right: none; border-bottom: 2px solid var(--border); }
  .proj-card { grid-template-columns: 1fr; }
  .proj-side { flex-direction: row; align-items: center; }
  .pub-card { grid-template-columns: 1fr; gap: 12px; }
  .ascii-body { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  :root { --gap: 64px; }
  .nav-links { display: none; }
  .nav-menu-btn { display: flex; }
  .skills-grid { grid-template-columns: 1fr; }
  .skill-group { border-right: none !important; border-bottom: 2px solid var(--border) !important; }
  .skill-group:last-child { border-bottom: none !important; }
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stat { border-right: none !important; border-bottom: 2px solid var(--border) !important; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}