/* ===================================================================
   Manish Sah — portfolio styles
   =================================================================== */

:root {
  --primary-color: #3f5d58;
  --primary-color-deep: #2f4844;
  --primary-color-mid: #4d6f68;
  --secondary-color: #c98a5e;
  --secondary-color-light: #e0ad85;
  --accent-color: #a8cabd;
  --text-color: #2e3532;
  --light-text-color: #5d6a65;
  --background-color: #f7f5f0;
  --card-background: #fff;
  --border-color: #e6e2d8;
  --font-family: 'Inter', sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -40px;
  background: #fff;
  color: var(--primary-color);
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 2000;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--primary-color);
  box-shadow: 0 2px 12px rgba(47,72,68, 0.16);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.2px;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
}

.site-nav a {
  color: #dbe8e3;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 6px;
}

.site-nav a:hover, .site-nav a:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.btn-header-resume {
  background: #fff;
  color: var(--primary-color);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  margin-left: auto;
  text-decoration: none;
  font-weight: 600;
}
.btn-header-resume:hover { background: var(--accent-color); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  padding: 10px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}
.btn-primary {
  background: linear-gradient(90deg, var(--primary-color), var(--primary-color-mid));
  color: #fff;
}
.btn-primary:hover {
  background: linear-gradient(90deg, var(--primary-color-deep), var(--primary-color-mid));
  box-shadow: 0 4px 16px rgba(47,72,68,0.13);
}
.btn-secondary { background-color: #e0e0e0; color: var(--text-color); }
.btn-secondary:hover { background-color: #d0d0d0; }
.btn-tertiary {
  background: #fff;
  border: 1.5px solid var(--primary-color);
  color: var(--primary-color);
}
.btn-tertiary:hover { background: var(--primary-color); color: #fff; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary-color-deep) 0%, var(--primary-color) 55%, var(--primary-color-mid) 100%);
  color: #fff;
  padding: 56px 0 64px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 48px;
  align-items: center;
}
.hero-photo {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.4rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--secondary-color), var(--secondary-color-light));
  border: 4px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 6px rgba(168, 202, 189, 0.28), 0 12px 28px rgba(0, 0, 0, 0.22);
}
.hero-kicker {
  margin: 0 0 10px;
  font-weight: 600;
  color: var(--accent-color);
  letter-spacing: 0.3px;
}
.hero h1 { margin: 0 0 16px; color: #fff; font-size: 2.15rem; line-height: 1.25; }
.hero-lead { margin: 0 0 16px; font-size: 1.08rem; color: rgba(255, 255, 255, 0.92); max-width: 640px; }
.hero-availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 600;
  font-size: 0.95rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.hero-actions .btn-primary { background: var(--secondary-color); }
.hero-actions .btn-primary:hover { background: #b87a4f; }
.hero-actions .btn-tertiary { background: transparent; border-color: rgba(255,255,255,0.7); color: #fff; }
.hero-actions .btn-tertiary:hover { background: #fff; color: var(--primary-color); }
.hero-social { display: flex; flex-wrap: wrap; gap: 16px; }
.hero-social a { color: #dbe8e3; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.hero-social a:hover { color: #fff; }

/* Sections */
.section-padding { padding: 80px 0; }
h2 {
  color: var(--primary-color);
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 14px;
  position: relative;
  letter-spacing: 0.5px;
}
h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  margin: 12px auto 0;
  border-radius: 2px;
}
.section-intro { text-align: center; max-width: 680px; margin: 0 auto 40px; color: var(--light-text-color); }

/* Experience timeline */
.experience-section .container { max-width: 880px; }
.timeline { position: relative; margin-top: 12px; padding-left: 28px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #d5e0dc;
}
.timeline-item { position: relative; padding: 0 0 32px 12px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
  position: absolute;
  left: -26px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary-color);
  box-shadow: 0 0 0 3px rgba(47,72,68, 0.08);
}
.timeline-body {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px 22px 18px;
}
.timeline-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.timeline-top h3 { margin: 0; color: var(--primary-color); font-size: 1.18rem; }
.timeline-role { margin: 4px 0 6px; color: var(--text-color); font-weight: 600; font-size: 0.98rem; }
.experience-dates {
  color: var(--primary-color);
  background: #e8efec;
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 999px;
}
.experience-meta { margin: 6px 0 4px 0; color: var(--light-text-color); font-weight: 600; font-size: 0.96rem; }
.experience-bullets { margin: 10px 0 0 0; padding-left: 20px; color: var(--text-color); font-size: 0.97rem; line-height: 1.6; }
.experience-bullets li { margin-bottom: 7px; }
.experience-tech { margin-top: 12px; font-size: 0.86rem; color: var(--light-text-color); font-style: italic; }

.education-heading { margin-top: 48px; text-align: left; font-size: 1.35rem; }
.education-heading::after { display: none; }

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.skill-group {
  background: #fff;
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 6px 20px rgba(47,72,68,0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.skill-group:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(47,72,68,0.14); }
.skill-group h3 { margin: 0 0 14px 0; color: var(--primary-color); font-size: 1.05rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 9px; }
.skill-tags span {
  background: #e8efec;
  color: var(--primary-color);
  border-radius: 18px;
  padding: 6px 14px;
  font-size: 0.86rem;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.skill-tags span:hover { background: var(--primary-color); color: #fff; transform: translateY(-2px); }

/* Projects */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 36px; }
.project-card, .work-card {
  background: #fff;
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  padding: 26px 24px;
  box-shadow: 0 6px 20px rgba(47,72,68, 0.07);
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.project-card:hover, .work-card:hover { transform: translateY(-6px); box-shadow: 0 12px 28px rgba(47,72,68,0.14); }
.project-card h3, .work-card h3 { margin: 0 0 10px; color: var(--primary-color); font-size: 1.15rem; }
.project-card p, .work-card p { margin: 0 0 14px; color: var(--light-text-color); }
.work-label {
  margin: 0 0 8px !important;
  color: var(--secondary-color) !important;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.project-card .btn, .work-card .btn { margin-top: auto; align-self: flex-start; }
.work-card p strong { color: var(--text-color); font-weight: 600; }
.work-card p:last-child { margin-bottom: 0; }

/* Selected work */
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.work-footnote { text-align: center; margin: 24px auto 0; color: var(--light-text-color); }
.work-footnote a { color: var(--primary-color); font-weight: 600; }

/* Open source */
.oss-section { padding-top: 0; }
.oss-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.oss-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 6px 20px rgba(47,72,68,0.07);
}
.oss-card h3 { margin: 0 0 8px; color: var(--primary-color); font-size: 1.1rem; }
.oss-card p:not(.work-label) { margin: 0 0 14px; color: var(--light-text-color); font-size: 0.95rem; }
.oss-card code { font-size: 0.88em; background: #e8efec; color: var(--primary-color); padding: 1px 5px; border-radius: 4px; }
.oss-card a { margin-top: auto; color: var(--primary-color); font-weight: 600; text-decoration: none; font-size: 0.95rem; }
.oss-card a i { font-size: 0.75em; margin-left: 4px; }
.oss-card a:hover { color: var(--secondary-color); }

/* Recommendations */
.recs-section { background: #fff; }
.recs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.rec-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 24px;
}
.rec-card blockquote { flex: 1; margin: 0; }
.rec-card blockquote p { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--text-color); }
.rec-card blockquote p::before { content: '\201C'; }
.rec-card blockquote p::after { content: '\201D'; }
.rec-person { display: flex; align-items: center; gap: 12px; }
.rec-initials {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rec-person div { display: flex; flex-direction: column; }
.rec-person strong { color: var(--primary-color); font-size: 0.98rem; }
.rec-person div span { font-size: 0.88rem; color: var(--light-text-color); }

.about-teaser {
  margin: 32px 0 0;
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 24px 26px;
}
.about-teaser h3 { margin: 0 0 8px; color: var(--primary-color); }
.about-teaser p:not(.work-label) { margin: 0 0 16px; color: var(--light-text-color); }

/* About page */
.about-hero {
  background: linear-gradient(135deg, var(--primary-color-deep) 0%, var(--primary-color) 55%, var(--primary-color-mid) 100%);
  color: #fff;
  padding: 64px 0 52px;
}
.about-hero h1 { margin: 0 0 14px; color: #fff; font-size: 2.15rem; line-height: 1.25; }
.about-hero-lead { max-width: 620px; margin: 0 0 18px; color: rgba(255,255,255,0.9); font-size: 1.05rem; }
.about-jump { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 0 0 24px; }
.about-jump a { color: var(--accent-color); font-weight: 600; text-decoration: none; }
.about-jump a:hover { color: #fff; }
.about-hero .btn-primary { background: var(--secondary-color); }
.about-hero .btn-primary:hover { background: #b87a4f; }
.site-nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.12); }
.service-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8efec;
  color: var(--primary-color);
  margin-bottom: 14px;
  font-size: 1.1rem;
}

/* Contact */
.contact-section { background-color: var(--background-color); }
.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px 48px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 24px rgba(47,72,68,0.09);
  padding: 36px 36px 32px;
  border: 1.5px solid var(--border-color);
  align-items: start;
}
.contact-card-details { text-align: left; }
.contact-card-details h2 { font-size: 1.5rem; color: var(--primary-color); margin: 0 0 10px; text-align: left; }
.contact-card-details h2::after { margin-left: 0; }
.contact-lead { max-width: 38ch; margin: 0 0 16px !important; line-height: 1.55; color: var(--light-text-color); }
.contact-list { display: flex; flex-direction: column; gap: 0; margin: 6px 0 0; padding: 0; list-style: none; }
.contact-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  text-decoration: none;
  color: inherit;
  transition: color 0.15s ease;
}
.contact-icon { flex: 0 0 18px; width: 18px; color: var(--primary-color); display: flex; align-items: center; justify-content: center; }
.contact-copy { display: flex; align-items: baseline; gap: 10px; }
.contact-label { flex: 0 0 5.5rem; width: 5.5rem; font-size: 0.95rem; font-weight: 600; color: var(--primary-color); }
.contact-value { font-size: 0.95rem; font-weight: 500; color: var(--primary-color); word-break: break-word; }
.contact-card-details a:hover { color: var(--secondary-color); }
.contact-card-form form { display: flex; flex-direction: column; gap: 12px; }
.contact-card-form input, .contact-card-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 1rem;
  font-family: var(--font-family);
  background: var(--background-color);
  color: var(--text-color);
  box-sizing: border-box;
}
.contact-card-form textarea { resize: vertical; }
.contact-card-form button { width: 100%; margin-top: 6px; }
#contact-status { margin-top: 8px; font-size: 0.98rem; color: var(--secondary-color); text-align: center; }
.honey-field { position: absolute; left: -9999px; height: 0; width: 0; overflow: hidden; }

.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1200;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #5a9c7c;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  box-shadow: 0 6px 18px rgba(90, 156, 124, 0.35);
  text-decoration: none;
}
.whatsapp-float:hover { background: #4a8a6a; }

/* Footer */
.footer {
  background: linear-gradient(90deg, var(--primary-color-deep) 0%, var(--primary-color) 100%);
  color: #fff;
  text-align: center;
  padding: 32px 0 18px 0;
  font-size: 1rem;
}
.footer p { margin: 0; letter-spacing: 0.5px; }

/* Responsive */
@media (max-width: 800px) {
  .header-inner { flex-wrap: wrap; padding: 10px 16px; }
  .nav-toggle { display: block; }
  .btn-header-resume { display: none; }
  .site-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    flex-basis: 100%;
    width: 100%;
    order: 3;
    padding: 8px 0 12px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 10px 4px; }
  .hero { padding: 36px 0 44px; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: 24px; }
  .hero h1 { font-size: 1.7rem; }
  .hero-lead, .hero-actions, .hero-social { justify-content: center; }
  .hero-photo { width: 140px; height: 140px; font-size: 2.4rem; }
  .section-padding { padding: 48px 0; }
  .work-grid, .recs-grid, .oss-grid { grid-template-columns: 1fr; }
  .about-hero h1 { font-size: 1.7rem; }
  .contact-card { grid-template-columns: 1fr; gap: 24px; padding: 24px 16px; }
  .timeline { padding-left: 22px; }
  .timeline-body { padding: 16px 16px 14px; }
}

.rec-card-featured { grid-column: 1 / -1; background: #fff; border-color: var(--accent-color); }
.rec-card-featured blockquote p { font-size: 1.08rem; }
