/* ========================================
   SAHVIR BHASKARUNI PORTFOLIO - CLEANED CSS
   ======================================== */

/* ROOT VARIABLES & RESET */

:root {
  /* Color Palette */
  --bg-primary: #0F172A;
  --bg-secondary: #1E293B;
  --bg-tertiary: rgba(255, 255, 255, 0.02);
  --bg-hover: rgba(255, 255, 255, 0.04);
  --bg-focus: rgba(255, 255, 255, 0.05);

  --text-primary: #e2e8f0;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-bright: #ffffff;

  --accent-primary: #D97706;
  --accent-secondary: #FCD34D;
  --accent-blue: #93C5FD;

  --border-light: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);

  --orange-bg-light: rgba(217, 119, 6, 0.15);
  --orange-bg-medium: rgba(217, 119, 6, 0.18);
  --orange-bg-focus: rgba(217, 119, 6, 0.28);
  --orange-border: rgba(217, 119, 6, 0.18);

  --yellow-bg-light: rgba(251, 191, 36, 0.14);
  --yellow-bg-medium: rgba(251, 191, 36, 0.22);
  --yellow-border: rgba(251, 191, 36, 0.28);
  --yellow-border-hover: rgba(251, 191, 36, 0.45);

  --blue-bg: rgba(59, 130, 246, 0.18);
  --blue-border: rgba(59, 130, 246, 0.28);

  --grey-bg: rgba(148, 163, 184, 0.12);
  --grey-border: rgba(148, 163, 184, 0.22);

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 4rem;

  /* Border Radius */
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 20px;
  --radius-full: 999px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.25s ease;

  /* Shadows */
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 16px 32px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.25);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

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

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

/* ========================================
   NAVBAR
   ======================================== */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(28, 25, 23, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--orange-border);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) 0;
}

.logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  gap: var(--spacing-md);
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.nav-links a {
  transition: color var(--transition-fast);
}

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

.nav-item {
  position: relative;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  padding: var(--spacing-xs) 0;
  background: rgba(28, 25, 23, 0.98);
  border: 1px solid var(--orange-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.dropdown a {
  display: block;
  padding: 0.65rem 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.dropdown a:hover {
  color: var(--text-bright);
  background: var(--bg-hover);
}

.nav-item:hover .dropdown {
  display: block;
}

/* ========================================
   HERO / HOME SECTION
   ======================================== */

.hero-section {
  max-width: 1150px;
  margin: 0 auto;
  padding: var(--spacing-xl) 2rem 4rem;
  color: #e5e7eb;
}

.hero-name {
  text-align: center;
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  color: var(--text-bright);
}

.hero-tags {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
}

.hero-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 4rem;
  align-items: stretch;
}

.hero-photo {
  display: flex;
  justify-content: center;
  height: 100%;
}

.hero-photo img {
  width: 100%;
  max-width: 300px;
  height: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: transform var(--transition-base);
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
}

.hero-text p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #d1d5db;
}

.hero-text h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: -0.5rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.hero-links a {
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1px solid #334155;
  color: var(--text-bright);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
}

.hero-links a:hover {
  background: #334155;
  border-color: #475569;
  transform: translateY(-2px);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  cursor: pointer;
}

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

.btn-primary:hover {
  background: #B45309;
  transform: translateY(-2px);
}

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

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

/* ========================================
   SECTIONS
   ======================================== */

section {
  padding: var(--spacing-xl) 0;
}

#projects,
#contact,
#now,
#interests {
  border-top: 1px solid var(--border-light);
}

#projects,
#contact {
  padding-top: 2rem;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  font-weight: 700;
}

/* ========================================
   PAGE LAYOUT
   ======================================== */

.page-section {
  padding: var(--spacing-xl) 0;
}

.page-content {
  max-width: 900px;
  margin: 0 auto;
}

.page-content h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text-bright);
}

.page-content h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--orange-bg-medium);
  display: inline-block;
  font-size: 1.5rem;
  color: var(--accent-secondary);
}

.page-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--accent-secondary);
}

.page-content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

.page-intro {
  font-size: 1.2rem;
  color: var(--text-primary);
}

.project-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

/* ========================================
   CONTENT BOXES & CARDS
   ======================================== */

.content-box,
.figure-card,
.table-card,
.now-card,
.tool-card,
.flow-step {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
}

.content-box,
.figure-card,
.table-card {
  width: 100%;
  max-width: 850px;
  margin: 1.5rem 0 2.5rem 0;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.content-box p,
.figure-card p {
  font-size: 1.05rem;
  line-height: 1.75;
}

.now-card,
.tool-card,
.flow-step {
  padding: 1.5rem;
}

.now-card h3,
.tool-card h3,
.flow-step h3 {
  margin-bottom: 0.75rem;
  color: var(--accent-secondary);
}

/* ========================================
   TAGS & BADGES
   ======================================== */

.tag,
.interest-tag,
.meta-tag,
.date-tag {
  display: inline-block;
  border-radius: var(--radius-full);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.tag {
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
  background: var(--orange-bg-light);
  color: var(--accent-secondary);
}

.interest-tag {
  font-size: 0.82rem;
  padding: 0.45rem 0.9rem;
  background: var(--yellow-bg-light);
  color: var(--accent-secondary);
  border: 1px solid rgba(251, 191, 36, 0.28);
  letter-spacing: 0.01em;
}

.interest-tag:hover {
  background: var(--yellow-bg-medium);
  border-color: var(--yellow-border-hover);
  transform: translateY(-2px);
}

.meta-tag {
  font-size: 0.9rem;
  padding: 0.55rem 0.9rem;
  background: var(--orange-bg-light);
  color: var(--accent-secondary);
}

.date-tag {
  font-size: 0.9rem;
  padding: 0.55rem 0.9rem;
  background: var(--grey-bg);
  color: var(--text-secondary);
  border: 1px solid var(--grey-border);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.interest-tags,
.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* ========================================
   PROJECT CARDS
   ======================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}

.project-card {
  display: block;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

.project-card h3 {
  margin-bottom: 0.8rem;
  font-size: 1.2rem;
  color: var(--text-bright);
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.project-button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--orange-bg-light);
  color: var(--accent-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background var(--transition-fast);
}

.project-card:hover .project-button {
  background: var(--orange-bg-focus);
}

/* ========================================
   ABOUT SECTION
   ======================================== */

.about-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 2.5rem;
  align-items: center;
}

.about-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-image img {
  width: 100%;
  max-width: 320px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
}

/* ========================================
   FLOWCHART
   ======================================== */

.flowchart {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.flow-step {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem 2rem 1.5rem;
  transition: all var(--transition-fast);
}

.flow-step:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.flow-step h3 {
  margin-bottom: 0.75rem;
  color: var(--accent-secondary);
  font-size: 1.1rem;
}

.flow-step p {
  margin-bottom: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.flow-step img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 300px;
  border-radius: var(--radius-md);
  margin: 1rem 0;
  object-fit: contain;
  overflow: hidden;
}

.flow-number {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--orange-bg-medium);
  color: var(--accent-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.flow-arrow {
  text-align: center;
  font-size: 1.8rem;
  color: var(--text-muted);
  margin: 0.5rem 0;
}

/* ========================================
   TABLES & FIGURES
   ======================================== */

.figure-card {
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.figure-card img {
  display: block;
  width: 100%;
  max-height: 600px;
  object-fit: contain;
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: var(--radius-lg);
  transition: opacity var(--transition-fast);
}

.figure-card img:hover {
  opacity: 0.95;
}

.figure-caption {
  padding: 1.25rem 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  margin-top: -1px;
}

.table-card {
  overflow-x: auto;
}

.sequence-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.sequence-table th {
  background: var(--bg-focus);
  color: var(--accent-secondary);
  text-align: left;
  padding: 1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-light);
}

.sequence-table td {
  padding: 1rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-secondary);
  vertical-align: top;
}

.sequence-cell {
  font-family: monospace;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.7;
}

.highlight-sequence,
.highlight-conserved {
  color: var(--accent-secondary);
  font-weight: 700;
  background: var(--orange-bg-medium);
  padding: 0.08rem 0.2rem;
  border-radius: 4px;
}

.highlight-epitope {
  color: var(--accent-blue);
  font-weight: 700;
  background: var(--blue-bg);
  padding: 0.08rem 0.2rem;
  border-radius: 4px;
}

/* ========================================
   TOOLS & SKILLS
   ======================================== */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.now-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ========================================
   REFERENCES & LISTS
   ======================================== */

.reference-list {
  margin-top: 2rem;
  padding-left: 0;
  list-style: none;
}

.reference-list li {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-secondary);
  line-height: 1.8;
}

.reference-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 4px;
  height: 4px;
  background: var(--accent-secondary);
  border-radius: 50%;
}

.image-cell {
  text-align: center;
  padding: 0.75rem;
  vertical-align: middle;
}

.image-cell img {
  max-width: 100%;
  width: auto;
  height: 200px;  /* Set explicit height for rowspan images */
  object-fit: contain;  /* Keep aspect ratio, don't stretch */
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  transition: transform var(--transition-fast);
}

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

/* ========================================
   UTILITY CLASSES
   ======================================== */

.page-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: var(--spacing-lg);
}

/* ========================================
   FOOTER
   ======================================== */

footer {
  padding: var(--spacing-lg) 0;
  border-top: 1px solid var(--border-medium);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

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

  .about-image {
    order: -1;
    margin-bottom: 2rem;
  }

  .about-image img {
    max-width: 260px;
  }
}

@media (max-width: 850px) {
  .hero-section {
    padding-top: 4rem;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-name {
    font-size: 2.5rem;
  }

  .hero-tags {
    font-size: 1rem;
    margin-bottom: var(--spacing-lg);
  }

  .hero-photo img {
    max-width: 280px;
  }

  .hero-text {
    text-align: center;
  }

  .hero-links {
    justify-content: center;
  }
}

@media (max-width: 700px) {
  .nav-links {
    display: none;
  }

  .hero-buttons,
  .page-buttons {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .content-box,
  .figure-card,
  .table-card {
    max-width: 100%;
    padding: 1.5rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .page-content h1 {
    font-size: 2rem;
  }

  .page-content h2 {
    font-size: 1.3rem;
  }
}

/* Contact Section */

.contact-section {
  padding: var(--spacing-xl) 0;
  border-top: 1px solid var(--border-color);
  margin-top: var(--spacing-xl);
}

.contact-section h2 {
  margin-bottom: var(--spacing-lg);
  font-size: 2rem;
}

.contact-intro {
  font-size: 1.05rem;
  margin-bottom: var(--spacing-xl);
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.6;
}

/* ── Get in Touch – link buttons ── */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin-top: 1.75rem;
}

.contact-links a {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.2rem;
  background: var(--orange-bg-light);
  border: 1.5px solid var(--orange-border);
  border-radius: 6px;
  color: var(--accent-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.contact-links a:hover {
  background: var(--orange-bg-medium);
  border-color: var(--accent-primary);
  color: #fff;
}

/* prevent buttons stretching too wide on large screens */
@media (min-width: 640px) {
  .contact-links a {
    max-width: 220px;
  }
}

.contact-link:hover {
color: var(--orange-accent);
background-color: rgba(var(--orange-rgb), 0.08);
border-color: rgba(var(--orange-rgb), 0.8);

/* subtle hover effect */
transform: translateY(-2px);
}


.contact-link:hover {
  color: var(--orange-accent);
  background-color: rgba(var(--orange-rgb), 0.05);
}

.contact-icon {
  font-size: 1.5rem;
  min-width: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-text {
  font-weight: 500;
  font-size: 1rem;
}

/* Mobile responsiveness */
@media (max-width: 700px) {
  .contact-section {
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-lg);
  }

  .contact-section h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
  }

  .contact-intro {
    font-size: 1rem;
    margin-bottom: var(--spacing-lg);
  }

  .contact-links {
    gap: var(--spacing-md);
  }

  .contact-link {
    padding: var(--spacing-md);
  }

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

  .contact-text {
    font-size: 0.95rem;
  }
}