/*
 * Global Styles for Ashish Bansal Portfolio
 *
 * This stylesheet defines a modern dark interface inspired by high‑end
 * developer portfolios. It uses CSS custom properties for easy theming
 * and responsive layouts for multiple screen sizes.
 */

:root {
  --bg: #050505;
  --surface: #0f0f0f;
  --card: #161616;
  --primary: #00ffb3;
  --secondary: #ff6aff;
  --text: #e9e9e9;
  --text-muted: #8a8a8a;
  --radius: 12px;
  --transition: 0.3s ease;
}

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

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', 'Poppins', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* Utilities */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section {
  padding: 4rem 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 700px;
}

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--primary);
  text-decoration: none;
}

.brand .initials {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-text .name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.brand-text .title {
  font-size: 0.75rem;
  color: var(--primary);
  letter-spacing: 0.05em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color var(--transition);
}

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

/* Active nav link */
.nav-links a.active {
  color: var(--primary);
  position: relative;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

/* Hero Section */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90vh;
  padding: 6rem 0 4rem;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1 1 350px;
  margin-right: 2rem;
}

.hero-text h1 {
  font-size: 3.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.hero-text h1 .highlight {
  color: var(--primary);
}

.hero-text .tagline {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.hero-text .subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 550px;
}

.hero-buttons {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--primary);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.primary-btn {
  background: var(--primary);
  color: var(--bg);
}

.secondary-btn {
  background: transparent;
  color: var(--primary);
}

.btn:hover {
  transform: translateY(-2px);
}

.primary-btn:hover {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--bg);
}

.secondary-btn:hover {
  background: var(--primary);
  color: var(--bg);
}

.hero-image {
  flex: 0 0 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}

.hero-image img {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary);
  box-shadow: 0 0 20px rgba(0, 255, 179, 0.4);
}

/* Metrics */
.metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
}

.metric {
  background: var(--card);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  flex: 1 1 200px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  transition: transform var(--transition), box-shadow var(--transition);
}

.metric:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.metric-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Timeline */
.timeline {
  position: relative;
  margin-top: 2rem;
  padding-left: 1rem;
  border-left: 2px solid var(--primary);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-marker {
  position: absolute;
  left: -11px;
  top: 0.5rem;
  width: 22px;
  height: 22px;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-content {
  background: var(--card);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  margin-left: 1rem;
}

.timeline-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.timeline-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
}

.project-icon {
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.project-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  flex-grow: 1;
}

.project-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.project-list li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: var(--text);
}

.project-list li:last-child {
  margin-bottom: 0;
}

.project-list li::before {
  content: '\u2022';
  position: absolute;
  left: 0;
  color: var(--secondary);
}

.project-list a {
  color: var(--primary);
  text-decoration: none;
}

.project-list a:hover {
  text-decoration: underline;
}

/* Research */
.research-card {
  background: var(--card);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.research-card h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.research-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.research-card .btn {
  margin-top: 0.5rem;
}

/* Contact */
.contact-section p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.contact-links {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card);
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  color: var(--primary);
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}

.contact-link:hover {
  background: var(--primary);
  color: var(--bg);
  transform: translateY(-2px);
}

/* Footer */
.footer {
  background: var(--surface);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.5rem 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.socials a {
  color: var(--primary);
  margin-left: 1rem;
  font-size: 1.25rem;
  transition: color var(--transition);
}

.socials a:first-child {
  margin-left: 0;
}

.socials a:hover {
  color: var(--secondary);
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Responsive */
@media (max-width: 900px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }
  .hero-text {
    margin-right: 0;
  }
  .hero-image {
    margin-top: 1.5rem;
  }
  .metrics-row {
    gap: 1rem;
  }
}

@media (max-width: 600px) {
  .nav-links {
    display: none;
  }
  .navbar {
    justify-content: center;
  }
  .hero-text h1 {
    font-size: 2.4rem;
  }
  .hero-text .tagline {
    font-size: 1.25rem;
  }
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
  }
}
