/* ============================================
   Raghav Shukla — Portfolio
   ============================================ */

:root {
  --bg: #0e0e0e;
  --bg-alt: #141414;
  --surface: #1a1a1a;
  --surface-hover: #222222;
  --text: #e4e4e4;
  --text-muted: #8a8a8a;
  --accent: #e8552e;
  --accent-soft: #e8552e22;
  --border: #2a2a2a;
  --radius: 10px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

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

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

.accent {
  color: var(--accent);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 24px;
  transition: background 0.3s, box-shadow 0.3s, padding 0.3s;
}

.nav.scrolled {
  background: rgba(14, 14, 14, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
  padding: 10px 24px;
}

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

.nav-logo {
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}

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

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

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

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

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

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-menu.open {
  max-height: 300px;
  padding-top: 16px;
}

.mobile-menu a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1rem;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.mobile-menu a:hover {
  color: var(--text);
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .mobile-menu {
    display: flex;
    max-width: 1100px;
    margin: 0 auto;
  }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  padding: 120px 24px 80px;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-greeting {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 32px;
}

.hero-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--accent);
}

.btn-primary:hover {
  background: #d14a25;
  border-color: #d14a25;
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

/* Terminal */
.hero-terminal {
  flex: 0 0 380px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0d0d0d;
}

.terminal-bar {
  background: #1a1a1a;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.terminal-body {
  padding: 18px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.terminal-body .prompt {
  color: var(--accent);
  font-weight: 500;
  margin-right: 6px;
}

.terminal-body .output {
  color: #7a7a7a;
  padding-left: 18px;
}

.cursor {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
    gap: 40px;
    padding-top: 100px;
  }
  .hero-tagline {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-links {
    justify-content: center;
  }
  .hero-terminal {
    flex: none;
    width: 100%;
    max-width: 400px;
  }
}

/* ---------- Sections ---------- */
.section {
  padding: 100px 0;
}

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

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 48px;
  max-width: 520px;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.75;
}

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

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.highlight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

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

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

.highlight-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
}

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

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.25s, transform 0.25s;
  position: relative;
}

.project-card:hover {
  border-color: #3a3a3a;
  transform: translateY(-3px);
}

.project-card.featured {
  border-left: 3px solid var(--accent);
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.project-icon {
  font-size: 1.5rem;
}

.project-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.project-name {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.project-stack {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.project-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

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

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

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}

.skill-group:hover {
  border-color: #3a3a3a;
}

.skill-group-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

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

.skill-tag {
  font-size: 0.82rem;
  padding: 5px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s;
}

.skill-tag:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.skill-tag.proficient {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

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

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

/* ---------- Education ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: start;
}

.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

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

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

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-alt);
}

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

.timeline-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.timeline-date {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--accent);
  white-space: nowrap;
}

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

.timeline-detail {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.side-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.cert-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}

.cert-card:hover {
  border-color: #3a3a3a;
}

.cert-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.cert-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.cert-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.leadership-detail {
  margin-top: 6px;
  font-style: italic;
}

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

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

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

.footer-name {
  font-weight: 600;
  font-size: 0.95rem;
}

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

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}

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

.footer-note {
  font-size: 0.78rem;
  color: #555;
  font-family: var(--mono);
}

@media (max-width: 480px) {
  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* ---------- 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);
}
