/* ========================================
   Anubhav Sharma · Portfolio
   Modern, recruiter-focused design
   ======================================== */

:root {
  --bg: #0f172a;
  --bg-elevated: #1e293b;
  --bg-card: #334155;
  --text: #f1f5f9;
  --text-bright: #ffffff;
  --text-muted: #cbd5e1;
  --accent: #06b6d4;
  --accent-hover: #22d3ee;
  --border: rgba(148, 163, 184, 0.25);
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Plus Jakarta Sans", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

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

html {
  scroll-behavior: smooth;
}

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

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

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

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== Nav ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition:
    background 0.3s,
    box-shadow 0.3s;
}

.nav.scrolled {
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: var(--font);
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

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

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}
.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
}

/* ========== Hero ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 24px 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 80% 50% at 50% 0%,
      rgba(6, 182, 212, 0.15),
      transparent
    ),
    url("../img/hero-bg.jpg") center/cover;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, var(--bg) 70%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 600px;
}

.hero-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  margin-bottom: 24px;
  box-shadow: 0 0 60px rgba(6, 182, 212, 0.3);
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.hero-tagline {
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-summary {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

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

.hero-social a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.hero-social a:hover {
  color: var(--accent);
}

/* ========== Sections ========== */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-elevated);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  color: var(--text-bright);
  padding-bottom: 12px;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}

.section-alt .section-title {
  color: var(--text-bright);
}

.section-desc {
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* ========== Timeline (Experience) ========== */
.timeline {
  position: relative;
  padding-left: 24px;
  border-left: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item:last-of-type {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -30px;
  top: 4px;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--bg);
}

.section-alt .timeline-marker {
  box-shadow: 0 0 0 4px var(--bg-elevated);
}

.timeline-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 4px;
}

.timeline-header h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-bright);
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--accent);
  font-family: var(--font-mono);
}

.timeline-company {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.timeline-list {
  list-style: none;
}

.timeline-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.timeline-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

.education {
  margin-top: 40px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.95rem;
}

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

/* ========== Projects ========== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
  transition: all 0.3s ease;
}

.project-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideIn 0.4s ease-out;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-image {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

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

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

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 182, 212, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

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

.project-overlay a {
  color: var(--bg);
  font-weight: 600;
  padding: 10px 24px;
  border: 2px solid var(--bg);
  border-radius: var(--radius-sm);
}

.project-overlay a:hover {
  background: var(--bg);
  color: var(--accent);
}

.project-body {
  padding: 20px;
}

.project-body h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--text-bright);
}

.project-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
  line-height: 1.5;
}

.project-tags {
  font-size: 0.75rem;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* ========== Project Filters ========== */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
  justify-content: center;
}

.filter-btn {
  padding: 10px 18px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font);
  transition: all 0.2s;
}

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

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

/* ========== Project Controls ========== */
.project-controls {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  color: var(--bg) !important;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all 0.2s;
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(6, 182, 212, 0.3);
  color: var(--bg) !important;
}

/* ========== Skills ========== */
.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.skill-group h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 600;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tags span {
  padding: 8px 16px;
  background: var(--bg-card);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border);
}

.skill-tags span:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.skills-note {
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ========== Certifications ========== */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.cert-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.cert-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-bright);
}

.cert-org {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========== Books ========== */
.books-slider {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 24px;
}

.book-card {
  text-align: center;
}

.book-card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.book-card h4 {
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: var(--text-bright);
}

.book-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.book-card p em {
  font-style: italic;
  color: var(--accent);
}

/* ========== Contact ========== */
.section-contact {
  text-align: center;
}

.section-contact .section-desc {
  margin-bottom: 40px;
}

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-bottom: 40px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: all 0.2s;
  border: 1px solid var(--border);
}

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

a.contact-item {
  text-decoration: none;
  color: inherit;
}

.contact-icon {
  font-size: 1.2rem;
}

/* ========== Animations ========== */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== Footer ========== */
.footer {
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}
