/* ========================================
   Harsha Sanjeeva - Personal Website
   Inspired by brittanychiang.com & merox.dev
   ======================================== */

:root {
  --bg: #0a192f;
  --bg-light: #112240;
  --bg-lightest: #233554;
  --text: #8892b0;
  --text-light: #a8b2d1;
  --text-bright: #ccd6f6;
  --white: #e6f1ff;
  --accent: #64ffda;
  --accent-tint: rgba(100, 255, 218, 0.1);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
  --nav-height: 70px;
  --max-width: 1000px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

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

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(10, 25, 47, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid rgba(100, 255, 218, 0.05);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.nav-logo:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(25px, 10vw, 150px);
  max-width: 1200px;
}

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-name {
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 8px;
}

.hero-headline {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 24px;
}

.hero-desc {
  max-width: 560px;
  font-size: 19px;
  line-height: 1.75;
  margin-bottom: 40px;
}

.hero-social {
  display: flex;
  gap: 24px;
}

.hero-social a {
  color: var(--text);
  transition: color 0.2s, transform 0.2s;
}

.hero-social a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

/* ---- Sections ---- */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 100px clamp(25px, 10vw, 150px);
}

.section-heading {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.section-heading::after {
  content: '';
  display: block;
  width: 300px;
  height: 1px;
  background: var(--bg-lightest);
}

.section-number {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--accent);
  font-weight: 400;
}

.section-intro {
  font-size: 19px;
  margin-bottom: 32px;
  max-width: 620px;
  line-height: 1.75;
}

/* ---- About ---- */
.about-content p {
  font-size: 19px;
  margin-bottom: 18px;
  max-width: 620px;
  line-height: 1.75;
}

.about-content em {
  color: var(--text-bright);
  font-style: normal;
  font-weight: 500;
}

.skills-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 200px));
  gap: 4px 16px;
  list-style: none;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 14px;
}

.skills-list li {
  position: relative;
  padding-left: 20px;
  color: var(--text-light);
}

.skills-list li::before {
  content: '\25B8';
  color: var(--accent);
  position: absolute;
  left: 0;
}

/* ---- Projects ---- */
.project-card {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 24px;
  border: 1px solid rgba(100, 255, 218, 0.05);
  transition: transform 0.2s, border-color 0.2s;
}

.project-card:hover {
  border-color: rgba(100, 255, 218, 0.15);
  transform: translateY(-4px);
}

.project-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 8px;
}

.project-title {
  font-size: 24px;
  color: var(--white);
  margin-bottom: 16px;
}

.project-title a {
  color: var(--white);
  text-decoration: none;
}

.project-title a:hover {
  color: var(--accent);
  text-decoration: none;
}

.project-desc {
  font-size: 18px;
  line-height: 1.75;
  margin-bottom: 20px;
}

.project-desc code {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  background: var(--accent-tint);
  padding: 2px 6px;
  border-radius: 3px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.project-links a {
  color: var(--text-light);
  transition: color 0.2s;
}

.project-links a:hover {
  color: var(--accent);
}

.project-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.stat {
  text-align: center;
  padding: 20px 12px;
  background: var(--bg-light);
  border-radius: 8px;
  border: 1px solid rgba(100, 255, 218, 0.05);
}

.stat-number {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-bottom: 6px;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--text);
  line-height: 1.4;
}

/* ---- Publications ---- */
.pub-group {
  margin-bottom: 40px;
}

.pub-group-title {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--accent);
  margin-bottom: 20px;
  font-weight: 400;
}

.pub-item {
  display: flex;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(136, 146, 176, 0.1);
  transition: background 0.2s;
}

.pub-item:hover {
  background: var(--accent-tint);
  margin: 0 -16px;
  padding: 16px;
  border-radius: 4px;
  border-bottom-color: transparent;
}

.pub-year {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  min-width: 48px;
  padding-top: 4px;
}

.pub-details {
  flex: 1;
}

.pub-title {
  font-size: 18px;
  color: var(--text-bright);
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
}

a.pub-title:hover {
  color: var(--accent);
  text-decoration: none;
}

.pub-venue {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 6px;
}

.pub-status {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 500;
}

.pub-status.submitted {
  color: var(--accent);
  background: var(--accent-tint);
}

.pub-status.pending {
  color: #ffd700;
  background: rgba(255, 215, 0, 0.1);
}

/* ---- Writing ---- */
.writing-list {
  display: flex;
  flex-direction: column;
}

.writing-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 16px;
  border-bottom: 1px solid rgba(136, 146, 176, 0.1);
  text-decoration: none;
  transition: background 0.2s;
  border-radius: 4px;
}

.writing-item:hover {
  background: var(--accent-tint);
  text-decoration: none;
}

.writing-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  min-width: 48px;
}

.writing-title {
  flex: 1;
  font-size: 18px;
  color: var(--text-bright);
  font-weight: 500;
}

.writing-item:hover .writing-title {
  color: var(--accent);
}

.writing-arrow {
  font-size: 18px;
  color: var(--text);
  transition: transform 0.2s, color 0.2s;
}

.writing-item:hover .writing-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ---- Contact ---- */
.section-contact {
  text-align: center;
  max-width: 600px;
}

.section-contact .section-heading {
  justify-content: center;
}

.section-contact .section-heading::after {
  display: none;
}

.section-contact p {
  font-size: 19px;
  line-height: 1.75;
  margin-bottom: 40px;
}

.contact-btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 16px 48px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s;
}

.contact-btn:hover {
  background: var(--accent-tint);
  text-decoration: none;
}

/* ---- Footer ---- */
.footer {
  text-align: center;
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav {
    padding: 0 20px;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 12px;
  }

  .section {
    padding: 60px 20px;
  }

  .hero {
    padding: 0 20px;
  }

  .project-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .skills-list {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .pub-item {
    flex-direction: column;
    gap: 4px;
  }

  .writing-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: 12px;
  }

  .nav-links a {
    font-size: 11px;
  }

  .project-stats {
    grid-template-columns: 1fr 1fr;
  }

  .hero-name {
    font-size: 36px;
  }

  .hero-headline {
    font-size: 24px;
  }
}

/* ---- Blog pages (PaperMod override) ---- */
.post-content {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
}

.post-content h2 {
  color: var(--text-bright);
}

.post-content a {
  color: var(--accent);
}

.post-content code {
  font-family: var(--font-mono);
  background: var(--bg-light);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 14px;
}
