/* ============================================================
   Portfolio – Shashank Raghupatro
   Single shared stylesheet
   ============================================================ */

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  --bg:           #FAFAF8;
  --text:         #1A1A1A;
  --text-muted:   #6B6B6B;
  --accent:       #B85C38;
  --accent-hover: #9A4B2D;
  --divider:      #E8E3DC;
  --nav-bg:       rgba(250, 250, 248, 0.88);
  --card-bg:      #FFFFFF;
  --card-shadow:  0 2px 12px rgba(0, 0, 0, 0.07);
  --card-shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.12);

  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --fw-regular:   400;
  --fw-medium:    500;
  --fw-semibold:  600;

  --nav-height:   64px;
  --content-max:  960px;
  --px:           clamp(1.5rem, 5vw, 4rem);
  --section-gap:  clamp(3rem, 8vw, 6rem);
  --radius:       8px;
  --radius-lg:    12px;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-weight: var(--fw-regular);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

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

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

ul {
  list-style: none;
}

/* ── Layout Helpers ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--px);
}

main {
  flex: 1;
  padding-top: calc(var(--nav-height) + clamp(2rem, 5vw, 3.5rem));
  padding-bottom: var(--section-gap);
}

.section {
  margin-bottom: var(--section-gap);
}

/* ── Typography ───────────────────────────────────────────── */
h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: var(--fw-semibold);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: var(--fw-semibold);
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text);
}

h3 {
  font-size: 1.15rem;
  font-weight: var(--fw-semibold);
  color: var(--text);
  line-height: 1.3;
}

p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.page-title {
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.page-title h1 {
  margin-bottom: 0.5rem;
}

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

/* ── Navigation ───────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--divider);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--px);
}

.site-name {
  font-weight: var(--fw-semibold);
  font-size: 1rem;
  color: var(--text);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.site-name:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s ease;
}

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

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

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

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

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

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  transition: color 0.2s ease;
}

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

/* Mobile nav panel */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--divider);
  padding: 1rem var(--px) 1.5rem;
  z-index: 99;
  flex-direction: column;
  gap: 0;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  font-size: 1rem;
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--divider);
  transition: color 0.2s ease;
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--accent);
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--divider);
  padding: 1.5rem var(--px);
}

.footer-inner {
  max-width: var(--content-max);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.footer-socials {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-socials a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: var(--fw-medium);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-socials a:hover {
  color: var(--accent);
  transform: scale(1.08);
}

.footer-socials .icon {
  font-size: 1rem;
  display: inline-block;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

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

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

/* ── Hero (index.html) ────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: var(--section-gap);
}

.hero-text h1 {
  margin-bottom: 1.25rem;
}

.hero-text p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  max-width: 52ch;
}

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

.hero-photo img {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-lg);
  border: 3px solid var(--divider);
}

/* Placeholder when photo missing */
.photo-placeholder {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  border: 2px dashed var(--divider);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
  background: var(--card-bg);
}

/* Quick nav pills */
.quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.quick-nav a {
  font-size: 0.95rem;
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border: 1px solid var(--divider);
  border-radius: 100px;
  background: var(--card-bg);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.quick-nav a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--bg);
}

/* ── About Page ───────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

.about-photo img {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-lg);
  border: 3px solid var(--divider);
  margin-inline: auto;
}

.about-bio p {
  margin-bottom: 1.25rem;
  font-size: 1.02rem;
}

.about-bio .btn {
  margin-top: 0.5rem;
}

/* ── Projects Page ────────────────────────────────────────── */
.projects-intro {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.project-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent);
  box-shadow: var(--card-shadow);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.project-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.tag {
  font-size: 0.78rem;
  font-weight: var(--fw-medium);
  color: var(--accent);
  background: rgba(184, 92, 56, 0.08);
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  white-space: nowrap;
}

.project-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.project-org {
  font-size: 0.875rem;
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.project-card p {
  font-size: 0.975rem;
  margin-bottom: 0.85rem;
}

.project-note {
  font-size: 0.85rem !important;
  font-style: italic;
  color: var(--text-muted);
  opacity: 0.8;
}

/* ── Contact Page ─────────────────────────────────────────── */
.contact-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: clamp(2rem, 5vw, 3rem);
  max-width: 55ch;
}

.contact-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 380px;
}

.contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-size: 1rem;
  font-weight: var(--fw-medium);
  font-family: var(--font);
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease;
  cursor: pointer;
  text-align: center;
}

.contact-btn:hover {
  background: var(--accent);
  color: #fff;
}

.contact-btn .btn-icon {
  font-size: 1.1rem;
  display: inline-block;
}

/* ── Divider ──────────────────────────────────────────────── */
.hr-divider {
  border: none;
  border-top: 1px solid var(--divider);
  margin: var(--section-gap) 0;
}

/* ── Responsive: Tablet+ (> 480px) ───────────────────────── */
@media (min-width: 480px) {
  .contact-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    max-width: none;
  }

  .contact-btn {
    flex: 0 0 auto;
    min-width: 160px;
  }
}

/* ── Responsive: Desktop (> 768px) ───────────────────────── */
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  /* Hero two-column */
  .hero {
    grid-template-columns: 1fr 340px;
    gap: 3rem;
  }

  .hero-photo {
    order: 2;
    justify-content: flex-end;
  }

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

  /* About two-column */
  .about-grid {
    grid-template-columns: auto 1fr;
    gap: 3.5rem;
  }

  .about-photo img {
    margin-inline: 0;
    max-width: 200px;
  }

  /* Contact horizontal */
  .contact-buttons {
    flex-direction: row;
  }
}

/* ── Mobile only (< 768px) ────────────────────────────────── */
@media (max-width: 767px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ── Wide screens (> 1200px) ──────────────────────────────── */
@media (min-width: 1200px) {
  body {
    /* content already capped at 960px; extra is whitespace */
  }
}
