/* ===========================================
   HARSHAL BHAT - PORTFOLIO
   Font: Geist (Modern, Technical)
   Color: Warm neutral with amber accent
   =========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Warm Dark Palette */
  --bg-primary: #09090b;
  --bg-secondary: #18181b;
  --bg-tertiary: #27272a;
  --bg-elevated: #1f1f23;

  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;

  --accent: #f59e0b;
  --accent-hover: #fbbf24;
  --accent-muted: rgba(245, 158, 11, 0.1);

  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Sizing */
  --header-height: 60px;
  --container-width: 1100px;
  --radius: 8px;
  --radius-lg: 12px;
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #fafafa;
  --bg-tertiary: #f4f4f5;
  --bg-elevated: #ffffff;

  --text-primary: #18181b;
  --text-secondary: #52525b;
  --text-tertiary: #a1a1aa;

  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

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

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

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

/* Container */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===========================================
   HEADER
   =========================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

[data-theme="light"] .header {
  background: rgba(255, 255, 255, 0.8);
}

.header-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 600;
  font-size: 17px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.nav-list {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  border-radius: 6px;
  transition: all 0.2s;
}

.theme-btn:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.theme-btn svg {
  width: 16px;
  height: 16px;
}

.menu-btn {
  display: none;
  width: 32px;
  height: 32px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.menu-btn span {
  width: 16px;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: all 0.2s;
}

@media (max-width: 768px) {
  .nav-list {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
  }

  .nav-list.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .menu-btn {
    display: flex;
  }
}

/* ===========================================
   HERO
   =========================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 60px;
}

.hero-content {
  max-width: 640px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--accent-muted);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero-title {
  font-size: clamp(40px, 8vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero-role {
  font-size: 22px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.hero-role span {
  color: var(--accent);
}

.hero-desc {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 540px;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-hover);
}

.hero-links {
  display: flex;
  gap: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.hero-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-tertiary);
  transition: color 0.2s;
}

.hero-link:hover {
  color: var(--text-primary);
}

.hero-link svg {
  width: 16px;
  height: 16px;
}

/* ===========================================
   SECTIONS
   =========================================== */
.section {
  padding: 60px 0;
}

.section-header {
  margin-bottom: 28px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.section-title {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ===========================================
   ABOUT
   =========================================== */
.about-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: start;
}

.about-image img {
  border-radius: var(--radius-lg);
  filter: grayscale(100%);
  transition: filter 0.4s;
}

.about-image:hover img {
  filter: grayscale(0%);
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.7;
  font-size: 16px;
}

.about-text strong {
  color: var(--text-primary);
}

.about-stats {
  display: flex;
  gap: 40px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.stat-number {
  font-size: 32px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-image {
    max-width: 180px;
  }
}

/* ===========================================
   EDUCATION
   =========================================== */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.edu-card {
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s;
}

.edu-card:hover {
  border-color: var(--border-hover);
}

.edu-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 10px;
}

.edu-degree {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.edu-school {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.edu-gpa {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-tertiary);
}

@media (max-width: 640px) {
  .edu-grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================================
   EXPERIENCE
   =========================================== */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.exp-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
}

.exp-logo {
  width: 44px;
  height: 44px;
  background: #fff;
  border-radius: var(--radius);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exp-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.exp-title {
  font-size: 17px;
  font-weight: 600;
}

.exp-company {
  font-size: 15px;
  color: var(--accent);
  margin-top: 2px;
}

.exp-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.exp-desc {
  margin-top: 10px;
}

.exp-desc li {
  position: relative;
  padding-left: 16px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 5px;
}

.exp-desc li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 4px;
  height: 4px;
  background: var(--text-tertiary);
  border-radius: 50%;
}

/* ===========================================
   PUBLICATIONS
   =========================================== */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pub-item {
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s;
}

.pub-item:hover {
  border-color: var(--border-hover);
}

.pub-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.pub-badge.granted {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.pub-badge.review {
  background: var(--accent-muted);
  color: var(--accent);
}

.pub-badge.conference {
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
}

.pub-title {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 6px;
}

.pub-link {
  font-size: 14px;
  color: var(--text-tertiary);
}

.pub-link a {
  color: var(--accent);
  transition: opacity 0.2s;
}

.pub-link a:hover {
  opacity: 0.8;
}

/* ===========================================
   PROJECTS
   =========================================== */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: all 0.2s;
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.filter-btn.active {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s;
}

.project-card.hidden {
  display: none;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.project-img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-tertiary);
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.project-card:hover .project-img img {
  transform: scale(1.03);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  display: flex;
  align-items: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.2s;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-overlay a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  padding: 6px 12px;
  background: rgba(255,255,255,0.15);
  border-radius: 6px;
  backdrop-filter: blur(8px);
}

.project-overlay a:hover {
  background: rgba(255,255,255,0.25);
}

.project-overlay svg {
  width: 12px;
  height: 12px;
}

.project-info {
  padding: 14px;
}

.project-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.project-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  padding: 4px 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
}

@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================================
   SKILLS
   =========================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.skill-group h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-item {
  font-size: 16px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.skill-item:hover {
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

/* ===========================================
   AWARDS
   =========================================== */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.award-card {
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.award-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 6px;
}

.award-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.award-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (max-width: 640px) {
  .awards-grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================================
   CONTACT
   =========================================== */
.contact-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.contact-inner {
  max-width: 520px;
}

.contact-inner p {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.contact-buttons {
  display: flex;
  gap: 12px;
}

/* ===========================================
   FOOTER
   =========================================== */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-tertiary);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-copy {
  font-size: 14px;
  color: var(--text-tertiary);
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    gap: 16px;
  }
}

/* ===========================================
   UTILITIES
   =========================================== */
.back-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  z-index: 50;
}

.back-top.show {
  opacity: 1;
  visibility: visible;
}

.back-top:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.back-top svg {
  width: 16px;
  height: 16px;
}

.scroll-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 101;
  width: 0%;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
  }
}
