/*
 * Raghavendra Meena - Portfolio
 * Modern Dark Theme
 */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Source+Sans+3:wght@300;400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --bg-primary: #0a0a0b;
  --bg-secondary: #111113;
  --bg-card: #1a1a1d;
  --bg-hover: #222225;
  
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  --accent: #f59e0b;
  --accent-hover: #fbbf24;
  --accent-subtle: rgba(245, 158, 11, 0.12);
  
  --border: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.2);
  
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', Consolas, monospace;
  
  --max-width: 1140px;
  --transition: 0.25s ease;
}

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

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ===== LAYOUT ===== */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  background: transparent;
  transition: background var(--transition);
}

.site-header.scrolled {
  background: rgba(10, 10, 11, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.site-logo {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-logo__name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
}

.site-logo__title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* NAVIGATION - FIXED HORIZONTAL LAYOUT */
.site-nav__list {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__link {
  display: inline-block;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: all var(--transition);
  white-space: nowrap;
}

.site-nav__link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.site-nav__link[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-subtle);
}

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

.hero__orb {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.12) 0%, transparent 70%);
  filter: blur(60px);
  top: 50%;
  right: -100px;
  transform: translateY(-50%);
  pointer-events: none;
}

.hero__content {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px;
  align-items: center;
}

.hero__greeting {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero__greeting::before {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--accent);
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 24px;
}

.hero__name em {
  font-style: italic;
  color: var(--accent);
}

.hero__tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 520px;
  margin-bottom: 32px;
}

.hero__tagline strong {
  color: var(--text-primary);
  font-weight: 500;
}

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

.hero__photo {
  position: relative;
}

.hero__photo-frame {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.hero__photo-frame img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.hero__photo-decor {
  position: absolute;
  inset: 0;
  top: 10px;
  left: 10px;
  border: 1px solid var(--accent);
  border-radius: 16px;
  opacity: 0.25;
  z-index: -1;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

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

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

.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.25);
}

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

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

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

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

.section__header {
  margin-bottom: 48px;
}

.section__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 400;
}

/* ===== ABOUT ===== */
.about__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.about__text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.about__text p { margin-bottom: 20px; }
.about__text strong { color: var(--text-primary); font-weight: 500; }

.research-areas {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.research-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: all var(--transition);
}

.research-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  transform: translateX(6px);
}

.research-card__icon {
  width: 40px;
  height: 40px;
  background: var(--accent-subtle);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--accent);
}

.research-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.research-card__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== CONTACT ===== */
.contact {
  text-align: center;
  padding: 100px 0;
}

.contact__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 16px;
}

.contact__text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
}

.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent);
  padding: 16px 28px;
  background: var(--accent-subtle);
  border-radius: 10px;
  transition: all var(--transition);
}

.contact__email:hover {
  background: var(--accent);
  color: #000;
  transform: translateY(-3px);
}

/* ===== PUBLICATIONS ===== */
.publications-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  counter-reset: pub-counter;
}

.pub-item {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 24px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all var(--transition);
  counter-increment: pub-counter;
}

.pub-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.pub-item__number {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--accent);
  opacity: 0.4;
}

.pub-item__number::before {
  content: counter(pub-counter, decimal-leading-zero);
}

.pub-item__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.pub-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.875rem;
  margin-bottom: 8px;
}

.pub-item__journal {
  color: var(--accent);
  font-style: italic;
}

.pub-item__year { color: var(--text-muted); }

.pub-item__authors {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.pub-item__links {
  display: flex;
  gap: 12px;
}

.pub-item__link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all var(--transition);
}

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

/* ===== CV PAGE ===== */
.cv-header {
  padding: 140px 0 60px;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--border);
}

.cv-header__name {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin-bottom: 16px;
}

.cv-header__summary {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 650px;
  line-height: 1.7;
  margin-bottom: 24px;
}

.cv-header__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cv-header__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all var(--transition);
}

.cv-header__link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.cv-section {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

.cv-section:last-child { border-bottom: none; }

.cv-section__title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.cv-section__title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.cv-entries {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.cv-entry {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
}

.cv-entry__date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 4px;
}

.cv-entry__content h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 4px;
}

.cv-entry__place {
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.cv-entry__list { padding-left: 20px; }

.cv-entry__list li {
  position: relative;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 8px;
  padding-left: 4px;
}

.cv-entry__list li::before {
  content: '→';
  position: absolute;
  left: -20px;
  color: var(--text-muted);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.skill-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.skill-item__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  min-width: 50px;
}

.skill-item__value {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ===== GALLERY ===== */
.gallery-header { padding: 140px 0 40px; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img { transform: scale(1.05); }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__close:hover {
  background: var(--accent);
  color: #000;
}

/* ===== FOOTER ===== */
.site-footer {
  margin-top: auto;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

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

.footer__copyright {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer__socials {
  display: flex;
  gap: 8px;
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.social-link:hover {
  background: var(--bg-hover);
  color: var(--accent);
}

.social-link svg { width: 20px; height: 20px; }

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: #000;
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  font-weight: 500;
  z-index: 9999;
}

.skip-link:focus { top: 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
  .hero__content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  
  .hero__photo-wrapper {
    order: -1;
    max-width: 250px;
    margin: 0 auto;
  }
  
  .hero__greeting { justify-content: center; }
  .hero__tagline { margin-left: auto; margin-right: auto; }
  .hero__cta { justify-content: center; }
  .about__content { grid-template-columns: 1fr; gap: 40px; }
  .cv-entry { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 768px) {
  .site-nav { display: none; }
  .hero { padding: 100px 0 60px; }
  .section { padding: 60px 0; }
  .pub-item { grid-template-columns: 1fr; }
  .pub-item__number { display: none; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { flex-direction: column; text-align: center; }
}

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