/* =========================================================
   JAY PATEL PORTFOLIO
   Complete stylesheet
   ========================================================= */


/* =========================
   ROOT / VARIABLES
========================= */

:root {
  --bg: #f4f0e6;
  --bg-soft: #ebe7dc;
  --card: #fbfaf6;
  --green: #185b45;
  --green-dark: #0f1b15;
  --text: #162019;
  --muted: #667068;
  --border: #d5d3ca;
  --white: #ffffff;
  --gold: #b88a43;

  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;

  --shell: 1250px;
  --header-height: 86px;
}


/* =========================
   RESET
========================= */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button,
input,
textarea,
select {
  font: inherit;
}

section[id] {
  scroll-margin-top: 110px;
}


/* =========================
   GLOBAL LAYOUT
========================= */

.shell {
  width: min(calc(100% - 48px), var(--shell));
  margin-inline: auto;
}

.section {
  padding: 110px 0;
  border-top: 1px solid rgba(22, 32, 25, 0.07);
}

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

.section-label,
.eyebrow,
.card-kicker {
  margin: 0 0 24px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  max-width: 820px;
  font-family: var(--serif);
  font-size: clamp(3rem, 5vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.section-heading-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 60px;
  align-items: end;
  margin-bottom: 62px;
}

.quiet {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.max-copy {
  max-width: 280px;
}


/* =========================
   HEADER / NAV
========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(244, 240, 230, 0.96);
  border-bottom: 1px solid rgba(22, 32, 25, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-wrap {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: var(--white);
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
}

.brand-text {
  font-size: 1.1rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  font-size: 0.94rem;
  font-weight: 600;
  color: #303a32;
  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}

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

.nav-cta {
  border: 1px solid var(--green);
  border-radius: 999px;
  padding: 11px 20px;
}

.nav-cta:hover {
  background: var(--green);
  color: var(--white) !important;
}

.menu-toggle {
  display: none;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  width: 26px;
  height: 2px;
  display: block;
  margin: 5px 0;
  background: var(--text);
}


/* =========================
   HERO
========================= */

.hero {
  padding: 72px 0 44px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.72fr);
  gap: 74px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero h1 {
  margin: 0;
  max-width: 840px;
  font-family: var(--serif);
  font-size: clamp(4rem, 6vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 700;
}

.hero h1 span {
  color: var(--green);
}

.hero-lead {
  margin: 28px 0 0;
  max-width: 800px;
  color: #5d675f;
  font-size: 1.18rem;
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 0.94rem;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--green);
  color: var(--white);
  border: 1px solid var(--green);
}

.btn.primary:hover {
  background: #124a38;
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid #c6cbc4;
}

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 52px;
  margin-top: 48px;
}

.hero-meta div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-meta strong {
  font-size: 0.93rem;
}

.hero-meta span {
  color: var(--muted);
  font-size: 0.87rem;
}

.hero-card {
  padding: 38px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 14px 38px rgba(26, 32, 27, 0.06);
}

.monogram {
  width: 84px;
  height: 84px;
  margin-bottom: 38px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #0b1510;
  color: var(--white);
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 700;
}

.hero-card h2 {
  margin: 0;
  max-width: 290px;
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 2.65rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.hero-card > p:not(.card-kicker) {
  margin: 20px 0 0;
  color: var(--muted);
  line-height: 1.58;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.mini-stats div {
  min-width: 0;
}

.mini-stats strong {
  display: block;
  white-space: nowrap;
  font-size: 1.45rem;
  line-height: 1.1;
}

.mini-stats span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.35;
}


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

.split {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.25fr);
  gap: 100px;
  align-items: start;
}

.prose {
  max-width: 680px;
}

.prose p {
  margin: 0 0 24px;
  color: #59635b;
  font-size: 1.12rem;
  line-height: 1.6;
}

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


/* =========================
   EXPERIENCE
========================= */

.timeline {
  border-top: 1px solid rgba(22, 32, 25, 0.14);
}

.timeline-item {
  display: grid;
  grid-template-columns: 175px minmax(0, 1fr);
  gap: 44px;
  padding: 34px 0 36px;
  border-bottom: 1px solid rgba(22, 32, 25, 0.14);
}

.timeline-date {
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.5;
}

.timeline-body {
  max-width: 850px;
}

.timeline-body h3 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.2;
}

.company {
  margin: 10px 0 18px !important;
  color: var(--green) !important;
  font-weight: 700;
}

.timeline-body p {
  margin: 0 0 18px;
  color: #5d665f;
  font-size: 1rem;
  line-height: 1.58;
}

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


/* =========================
   PROJECTS
========================= */

.project-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.project-card {
  min-height: 390px;
  padding: 30px;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
}

.featured-project {
  background: #e8f0e9;
  border-color: #c7d7cb;
}

.project-number {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
}

.project-content {
  min-width: 0;
}

.project-tag {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--green);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.muted-tag {
  color: #8b918c;
}

.project-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.project-card p {
  margin: 20px 0 0;
  color: #616a63;
  font-size: 0.94rem;
  line-height: 1.55;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.project-tech span {
  padding: 6px 10px;
  border: 1px solid #cad0ca;
  border-radius: 999px;
  color: #687068;
  font-size: 0.72rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 28px;
}

.project-links a {
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 700;
}

.project-links a:hover {
  text-decoration: underline;
}


/* =========================
   SKILLS
========================= */

.dark-section {
  padding: 110px 0;
  background: #0d1812;
  color: var(--white);
}

.light-label {
  color: #9ab8a6;
}

.light-title {
  color: var(--white);
  margin-bottom: 54px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.skill-group {
  min-height: 270px;
  padding: 28px 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.skill-group h3 {
  margin: 0 0 24px;
  font-size: 1.05rem;
}

.skill-group ul {
  margin: 0;
  padding-left: 18px;
}

.skill-group li {
  margin: 0 0 11px;
  color: #b6c1ba;
  font-size: 0.88rem;
  line-height: 1.45;
}


/* =========================
   EDUCATION
========================= */

.education-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 46px;
}

.credential {
  min-height: 360px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
}

.credential > span {
  display: block;
  margin-bottom: 22px;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 700;
}

.credential h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.85rem;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.credential p {
  margin: 22px 0 0;
  color: #626b64;
  line-height: 1.55;
}

.credential strong {
  display: block;
  margin-top: 22px;
  font-size: 0.9rem;
}


/* =========================
   CONTACT
========================= */

.contact-section {
  padding-top: 110px;
  padding-bottom: 120px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 110px;
  align-items: center;
}

.contact-copy {
  max-width: 620px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 1.07rem;
  line-height: 1.6;
}

.contact-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
}

.contact-row {
  min-height: 68px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.contact-row:last-child {
  border-bottom: 0;
}

.contact-row:hover {
  background: #f0f3ec;
}

.contact-row span {
  color: var(--muted);
  font-size: 0.88rem;
}

.contact-row strong {
  color: var(--green);
  font-size: 0.9rem;
}


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

footer {
  padding: 32px 0;
  background: #0d1812;
  color: var(--white);
}

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

.footer-wrap > div {
  display: flex;
  flex-direction: column;
}

.footer-wrap strong {
  font-size: 1rem;
}

.footer-wrap span,
.footer-wrap p {
  color: #a9b5ad;
  font-size: 0.8rem;
}

.footer-wrap p {
  margin: 0;
}


/* =========================
   TABLET
========================= */

@media (max-width: 1050px) {

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .hero-card {
    max-width: 620px;
  }

  .split {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .section-heading-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .project-grid {
    grid-template-columns: 1fr 1fr;
  }

  .featured-project {
    grid-column: 1 / -1;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .education-grid {
    grid-template-columns: 1fr 1fr;
  }

  .credential:last-child {
    grid-column: 1 / -1;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }
}


/* =========================
   MOBILE NAV
========================= */

@media (max-width: 820px) {

  :root {
    --header-height: 72px;
  }

  .shell {
    width: min(calc(100% - 32px), var(--shell));
  }

  .menu-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;

    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;

    padding: 12px 16px 20px;

    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 15px 8px;
  }

  .nav-cta {
    margin-top: 8px;
    text-align: center;
  }


  /* HERO */

  .hero {
    padding-top: 50px;
  }

  .hero h1 {
    font-size: clamp(3.15rem, 12vw, 4.5rem);
  }

  .hero-lead {
    font-size: 1.05rem;
  }

  .hero-meta {
    gap: 28px;
  }

  .hero-card {
    padding: 30px;
  }


  /* EXPERIENCE */

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }


  /* PROJECTS */

  .project-grid {
    grid-template-columns: 1fr;
  }

  .featured-project {
    grid-column: auto;
  }


  /* SKILLS */

  .skills-grid {
    grid-template-columns: 1fr;
  }


  /* EDUCATION */

  .education-grid {
    grid-template-columns: 1fr;
  }

  .credential:last-child {
    grid-column: auto;
  }


  /* FOOTER */

  .footer-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 560px) {

  .section,
  .dark-section,
  .contact-section {
    padding-top: 82px;
    padding-bottom: 82px;
  }

  .section-title {
    font-size: clamp(2.65rem, 12vw, 3.6rem);
  }

  .hero h1 {
    font-size: clamp(2.95rem, 13vw, 4rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .hero-meta {
    flex-direction: column;
    gap: 18px;
  }

  .mini-stats {
    grid-template-columns: 1fr;
  }

  .mini-stats div {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
  }

  .mini-stats div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .project-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .project-card h3 {
    font-size: 1.8rem;
  }

  .credential {
    min-height: 0;
  }

  .contact-row {
    padding: 18px;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}


/* =========================
   ACCESSIBILITY
========================= */

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(24, 91, 69, 0.35);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
