/* ==========================================================================
   ANAGHA MULLOTH — Personal Website
   Dark luxury editorial theme
   ========================================================================== */

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

:root {
  --bg-deep: #0a0a0f;
  --bg-card: #12121a;
  --bg-surface: #1a1a26;
  --bg-hover: #22223a;
  --accent: #c4a0ff;
  --accent2: #8b6cc7;
  --accent-dim: rgba(196, 160, 255, 0.08);
  --accent-glow: rgba(196, 160, 255, 0.04);
  --text-primary: #e8e4ef;
  --text-secondary: #9892a6;
  --text-muted: #5e586e;
  --border: rgba(196, 160, 255, 0.1);
  --border-hover: rgba(196, 160, 255, 0.2);
  --warm: #f0c27a;
  --teal: #6ee7c2;
  --coral: #f09070;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --max-width: 1200px;
  --side-pad: 48px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--side-pad);
  padding-right: var(--side-pad);
}

/* Fade-in on scroll */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 0.5px solid var(--border);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px var(--side-pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--accent);
  letter-spacing: -0.5px;
}
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  transition: color 0.3s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after { width: 100%; }

.nav-cta {
  font-size: 12px;
  padding: 8px 22px;
  border: 0.5px solid var(--accent2);
  border-radius: 24px;
  color: var(--accent);
  cursor: pointer;
  transition: all 0.3s;
  background: transparent;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: var(--font-body);
  text-decoration: none;
  display: inline-block;
}
.nav-cta:hover {
  background: var(--accent);
  color: var(--bg-deep);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--text-secondary);
  transition: all 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 60px; left: 0; right: 0; bottom: 0;
  background: rgba(10, 10, 15, 0.97);
  backdrop-filter: blur(20px);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 20px;
  color: var(--text-secondary);
  letter-spacing: 1px;
  transition: color 0.3s;
}
.mobile-menu a:hover { color: var(--accent); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: 76px;
  line-height: 1.05;
  letter-spacing: -3px;
  margin-bottom: 28px;
}
.hero-text h1 em {
  font-style: italic;
  color: var(--accent);
}
.hero-tagline {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-secondary);
  max-width: 460px;
  margin-bottom: 40px;
  font-weight: 300;
}
.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.btn-primary {
  display: inline-block;
  padding: 14px 34px;
  background: var(--accent);
  color: var(--bg-deep);
  border: none;
  border-radius: 28px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: all 0.3s;
  font-family: var(--font-body);
  text-align: center;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(196, 160, 255, 0.25);
}
.btn-outline {
  display: inline-block;
  padding: 14px 34px;
  background: transparent;
  color: var(--text-primary);
  border: 0.5px solid var(--border-hover);
  border-radius: 28px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font-body);
  text-align: center;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.headshot-frame {
  width: 360px; height: 420px;
  border-radius: 24px;
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  overflow: hidden;
  position: relative;
}
.headshot-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(196, 160, 255, 0.05), transparent 60%);
  pointer-events: none;
}
.headshot-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.float-tag {
  position: absolute;
  padding: 8px 16px;
  border-radius: 16px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  border: 0.5px solid;
  animation: float 4s ease-in-out infinite;
}
.float-tag:nth-child(2) { animation-delay: 0.5s; }
.float-tag:nth-child(3) { animation-delay: 1s; }
.float-tag:nth-child(4) { animation-delay: 1.5s; }
.ft-teal {
  background: rgba(110, 231, 194, 0.08);
  color: var(--teal);
  border-color: rgba(110, 231, 194, 0.15);
  top: 30px; right: -44px;
}
.ft-warm {
  background: rgba(240, 194, 122, 0.08);
  color: var(--warm);
  border-color: rgba(240, 194, 122, 0.15);
  bottom: 70px; left: -54px;
}
.ft-accent {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(196, 160, 255, 0.15);
  bottom: -10px; right: -20px;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ==========================================================================
   STATS BAR
   ========================================================================== */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
}
.stat {
  text-align: center;
  padding: 36px 16px;
}
.stat:not(:last-child) {
  border-right: 0.5px solid var(--border);
}
.stat-num {
  font-family: var(--font-display);
  font-size: 38px;
  color: var(--accent);
  margin-bottom: 6px;
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section {
  padding: 100px 0;
}
.section-label {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 44px;
  letter-spacing: -1px;
  margin-bottom: 52px;
}
.section-title em {
  font-style: italic;
  color: var(--accent);
}
.section-alt {
  background: var(--bg-card);
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
}

/* ==========================================================================
   EXPERIENCE
   ========================================================================== */
.exp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.exp-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}
.exp-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}
.exp-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}
.exp-card:hover::before { opacity: 1; }
.exp-role { font-size: 18px; font-weight: 500; margin-bottom: 6px; }
.exp-company { font-size: 14px; color: var(--accent); margin-bottom: 4px; }
.exp-date { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.exp-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.7; font-weight: 300; }
.edu-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  letter-spacing: 0.5px;
  background: rgba(110, 231, 194, 0.08);
  color: var(--teal);
  border: 0.5px solid rgba(110, 231, 194, 0.12);
  margin-bottom: 12px;
}

/* ==========================================================================
   BLOG CARDS
   ========================================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.blog-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: all 0.4s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}
.blog-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.blog-num {
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 1;
  color: rgba(196, 160, 255, 0.12);
  margin-bottom: 12px;
}
.blog-title { font-size: 15px; font-weight: 400; line-height: 1.65; margin-bottom: 20px; }
.blog-date { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.blog-link {
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.3s;
}
.blog-card:hover .blog-link { gap: 12px; }

.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.5px;
  transition: gap 0.3s;
}
.view-all-link:hover { gap: 14px; }

/* Blog listing page */
.blog-list-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.blog-list-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.4s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
}
.blog-list-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.blog-list-card .blog-title { font-size: 17px; line-height: 1.6; }

/* ==========================================================================
   PROJECTS
   ========================================================================== */
.proj-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.proj-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 24px 20px;
  border-radius: 14px;
  transition: background 0.3s;
  color: inherit;
}
.proj-item:hover { background: var(--bg-card); }
.proj-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--accent-dim);
  border: 0.5px solid var(--border);
}
.proj-name { font-size: 16px; font-weight: 400; margin-bottom: 4px; }
.proj-tech { font-size: 12px; color: var(--text-muted); }
.proj-arrow { font-size: 20px; color: var(--text-muted); transition: all 0.3s; }
.proj-item:hover .proj-arrow { color: var(--accent); transform: translateX(4px); }

/* Project detail */
.proj-detail {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 32px;
}
.proj-detail-title { font-size: 22px; font-weight: 500; margin-bottom: 24px; }
.proj-detail h4 {
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  margin-top: 20px;
}
.proj-detail h4:first-of-type { margin-top: 0; }
.proj-detail p { font-size: 15px; color: var(--text-secondary); line-height: 1.8; font-weight: 300; }
.proj-detail ul { list-style: none; padding: 0; }
.proj-detail ul li {
  font-size: 14px; color: var(--text-secondary);
  line-height: 1.8; padding-left: 16px; position: relative;
}
.proj-detail ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 11px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent2);
}
.proj-github {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 10px 20px;
  border: 0.5px solid var(--border);
  border-radius: 12px;
  font-size: 13px;
  color: var(--accent);
  transition: all 0.3s;
}
.proj-github:hover { border-color: var(--accent); background: var(--accent-dim); }

/* Publication */
.pub-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  margin-top: 40px;
}
.pub-label {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  letter-spacing: 0.5px;
  background: rgba(240, 144, 112, 0.08);
  color: var(--coral);
  border: 0.5px solid rgba(240, 144, 112, 0.12);
  margin-bottom: 16px;
}
.pub-title { font-size: 17px; font-weight: 500; margin-bottom: 12px; line-height: 1.5; }
.pub-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 16px; font-weight: 300; }
.pub-doi { font-size: 13px; color: var(--accent); }

/* ==========================================================================
   CTA / CONTACT
   ========================================================================== */
.cta-section {
  text-align: center;
  padding: 100px 0;
  position: relative;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}
.cta-title {
  font-family: var(--font-display);
  font-size: 50px;
  margin-bottom: 16px;
  letter-spacing: -1px;
}
.cta-title em { font-style: italic; color: var(--accent); }
.cta-sub { color: var(--text-secondary); font-size: 16px; margin-bottom: 36px; font-weight: 300; }

.social-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.soc-pill {
  display: inline-block;
  padding: 10px 22px;
  border: 0.5px solid var(--border);
  border-radius: 24px;
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  transition: all 0.3s;
}
.soc-pill:hover { color: var(--accent); border-color: var(--accent); }

/* ==========================================================================
   NEWSLETTER
   ========================================================================== */
.newsletter-box {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}
.newsletter-box p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 36px;
  font-weight: 300;
}
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.newsletter-form input {
  width: 100%;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-body);
  transition: border-color 0.3s;
  outline: none;
}
.newsletter-form input::placeholder { color: var(--text-muted); }
.newsletter-form input:focus { border-color: var(--accent); }

/* ==========================================================================
   BLOG POST (single article)
   ========================================================================== */
.article-header {
  padding-top: 140px;
  padding-bottom: 60px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.article-header h1 {
  font-family: var(--font-display);
  font-size: 44px;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 20px;
}
.article-meta { font-size: 13px; color: var(--text-muted); letter-spacing: 0.5px; }

.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 80px;
}
.article-body h2 {
  font-family: var(--font-display);
  font-size: 28px;
  margin-top: 48px;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.article-body h3 { font-size: 20px; font-weight: 500; margin-top: 36px; margin-bottom: 12px; }
.article-body p { font-size: 16px; line-height: 1.9; color: var(--text-secondary); margin-bottom: 20px; font-weight: 300; }
.article-body ul, .article-body ol { padding-left: 20px; margin-bottom: 20px; }
.article-body li { font-size: 15px; line-height: 1.8; color: var(--text-secondary); margin-bottom: 8px; }
.article-body code { background: var(--bg-surface); padding: 2px 8px; border-radius: 4px; font-size: 14px; color: var(--accent); }
.article-body pre {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  overflow-x: auto;
  margin-bottom: 24px;
}
.article-body pre code { background: none; padding: 0; font-size: 13px; line-height: 1.7; color: var(--text-primary); }
.article-body img { border-radius: 12px; margin: 32px 0; border: 0.5px solid var(--border); }
.article-body blockquote {
  border-left: 2px solid var(--accent2);
  padding-left: 20px;
  margin: 28px 0;
  font-style: italic;
  color: var(--text-secondary);
}
.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(196, 160, 255, 0.3);
  text-underline-offset: 3px;
}
.article-body a:hover { text-decoration-color: var(--accent); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 40px;
  padding-top: 100px;
  transition: color 0.3s;
}
.back-link:hover { color: var(--accent); }

/* ==========================================================================
   PAGE HEADER (inner pages)
   ========================================================================== */
.page-header {
  padding-top: 140px;
  padding-bottom: 60px;
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: 52px;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}
.page-header h1 em { font-style: italic; color: var(--accent); }
.page-header p { font-size: 16px; color: var(--text-secondary); max-width: 520px; font-weight: 300; line-height: 1.8; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  border-top: 0.5px solid var(--border);
  padding: 32px 0;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--side-pad);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  :root { --side-pad: 24px; }
  .nav-links { display: none; }
  .nav-cta.desktop-only { display: none; }
  .nav-hamburger { display: flex; }
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 120px; gap: 40px; }
  .hero-text h1 { font-size: 48px; letter-spacing: -1.5px; }
  .hero-tagline { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .headshot-frame { width: 280px; height: 340px; }
  .float-tag { display: none; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .exp-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-list-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 34px; }
  .page-header h1 { font-size: 38px; }
  .cta-title { font-size: 36px; }
  .article-header h1 { font-size: 32px; }
}
@media (max-width: 600px) {
  .hero-text h1 { font-size: 38px; }
  .proj-item { grid-template-columns: 1fr; gap: 12px; }
  .proj-icon { display: none; }
  .proj-arrow { display: none; }
  .stats-bar { grid-template-columns: 1fr; }
  .stat { border-right: none !important; border-bottom: 0.5px solid var(--border); }
  .stat:last-child { border-bottom: none; }
  .hero-actions { flex-direction: column; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}
