/* ==========================================================================
   amarppatel.com — stylesheet
   Dark by default, warm light theme via [data-theme="light"].
   ========================================================================== */

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #1f262f;
  --border: #2a313c;
  --text: #e6edf3;
  --text-dim: #8b949e;
  --text-faint: #6e7681;
  --accent: #ff9b6b;
  --accent-2: #5eead4;
  --accent-warm: #f0b35b;
  --link: #ffb38a;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-1: 0 1px 2px rgba(0,0,0,0.18), 0 4px 14px rgba(0,0,0,0.22);
  --shadow-2: 0 8px 30px rgba(0,0,0,0.28);

  --max: 1120px;
  --max-narrow: 760px;

  --font-display: "Bricolage Grotesque", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

[data-theme="light"] {
  --bg: #fcfaf6;
  --surface: #ffffff;
  --surface-2: #f5f0e6;
  --border: #e3dccc;
  --text: #1a1a1a;
  --text-dim: #5a5a5a;
  --text-faint: #888;
  --accent: #d97706;
  --accent-2: #0d9488;
  --accent-warm: #b45309;
  --link: #b45309;
  --shadow-1: 0 1px 2px rgba(0,0,0,0.05), 0 4px 14px rgba(0,0,0,0.06);
  --shadow-2: 0 8px 30px rgba(0,0,0,0.08);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-theme="light"]) {
    --bg: #fcfaf6;
    --surface: #ffffff;
    --surface-2: #f5f0e6;
    --border: #e3dccc;
    --text: #1a1a1a;
    --text-dim: #5a5a5a;
    --text-faint: #888;
    --accent: #d97706;
    --accent-2: #0d9488;
    --accent-warm: #b45309;
    --link: #b45309;
    --shadow-1: 0 1px 2px rgba(0,0,0,0.05), 0 4px 14px rgba(0,0,0,0.06);
    --shadow-2: 0 8px 30px rgba(0,0,0,0.08);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  background-image:
    radial-gradient(1100px 600px at 85% -10%, rgba(255,155,107,0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(94,234,212,0.06), transparent 60%);
  background-attachment: fixed;
}

a { color: var(--link); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

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

::selection { background: var(--accent); color: #0d1117; }

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #0d1117;
  padding: 8px 14px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* Container */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding: 0 24px;
}
.narrow { max-width: var(--max-narrow); }
.center { text-align: center; }

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 22px;
  padding: 14px 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); font-weight: 700; letter-spacing: .2px;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  background: var(--accent); color: #0d1117;
  border-radius: 9px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
}
.brand-text { font-family: var(--font-display); font-size: 18px; }

.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; display: flex; gap: 4px; padding: 0; margin: 0; }
.site-nav a {
  display: inline-block;
  padding: 8px 12px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: background .15s ease, color .15s ease;
}
.site-nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--accent); }

.theme-toggle {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.theme-toggle:hover { transform: rotate(15deg); background: var(--surface-2); }
.theme-icon { font-size: 14px; line-height: 1; }
.theme-icon-sun { display: none; }
.theme-icon-moon { display: inline; }
[data-theme="light"] .theme-icon-sun { display: inline; }
[data-theme="light"] .theme-icon-moon { display: none; }

@media (max-width: 640px) {
  .site-nav a { padding: 6px 9px; font-size: 13px; }
  .brand-text { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding: 80px 0 50px; }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  gap: 56px;
  align-items: center;
}
.hero-text { min-width: 0; }
.hero-photo {
  margin: 0;
  position: relative;
  justify-self: end;
  max-width: 380px;
  width: 100%;
}
.hero-photo::before {
  content: "";
  position: absolute;
  inset: -28px -28px auto -16px;
  height: 78%;
  background: radial-gradient(closest-side, rgba(255,155,107,0.35), transparent 70%);
  filter: blur(36px);
  z-index: 0;
  pointer-events: none;
}
.hero-photo img {
  position: relative;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 22px;
  box-shadow: var(--shadow-2);
  border: 1px solid var(--border);
  z-index: 1;
}
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-photo { justify-self: center; max-width: 280px; order: -1; }
  .hero-photo img { aspect-ratio: 4 / 5; object-fit: cover; }
}
.hero-greeting {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  font-weight: 800;
}
.rotator-article {
  display: inline-block;
  min-width: 1.4em;
  text-align: right;
}
.rotator {
  display: inline-block;
  position: relative;
  color: var(--accent);
  min-width: 11ch;
}
.rotator-word {
  display: inline-block;
  animation: rotIn .5s ease forwards;
}
@keyframes rotIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-pitch {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 660px;
  margin: 0 0 28px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  border-radius: 11px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 9px; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #0d1117; }
.btn-primary:hover { background: var(--accent-warm); color: #0d1117; }
.btn-ghost { color: var(--text); border-color: var(--border); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }

/* ==========================================================================
   Stats
   ========================================================================== */
.stats { padding: 30px 0 30px; }
.stats-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute; inset: 0 auto auto 0;
  width: 36px; height: 36px;
  background: radial-gradient(circle at 0 0, rgba(255,155,107,0.18), transparent 70%);
  pointer-events: none;
}
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-label {
  display: block;
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 13px;
}

/* ==========================================================================
   Sections / cards
   ========================================================================== */
.section { padding: 70px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.section-lead {
  color: var(--text-dim);
  max-width: 720px;
  font-size: 18px;
  margin: 0 0 32px;
}
.section-cta { margin-top: 28px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 22px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.card-body { color: var(--text-dim); margin: 0; font-size: 15px; }
.tilt-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-2);
}

/* Project preview cards on home */
.project-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.project-preview {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  color: var(--text);
  position: relative;
  transition: transform .2s ease, border-color .2s ease;
}
.project-preview:hover {
  text-decoration: none;
  border-color: var(--accent);
  transform: translateY(-3px);
}
.project-year {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.project-name {
  font-family: var(--font-display);
  font-size: 20px;
  margin: 4px 0 8px;
  font-weight: 700;
}
.project-tagline {
  color: var(--text-dim);
  font-size: 15px;
  margin: 0;
}
.project-arrow {
  position: absolute;
  right: 16px; bottom: 14px;
  color: var(--accent);
  font-size: 18px;
  opacity: 0; transition: opacity .2s, transform .2s;
}
.project-preview:hover .project-arrow { opacity: 1; transform: translateX(3px); }

/* ==========================================================================
   Page hero (sub-pages)
   ========================================================================== */
.page-hero { padding: 70px 0 30px; }
.about-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr);
  gap: 48px;
  align-items: center;
}
.about-hero-text { min-width: 0; }
.about-photo {
  margin: 0;
  justify-self: end;
  width: 100%;
  max-width: 320px;
}
.about-photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  box-shadow: var(--shadow-2);
  border: 1px solid var(--border);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
@media (max-width: 800px) {
  .about-hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .about-photo { justify-self: start; max-width: 220px; }
}
.eyebrow {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 800;
  max-width: 880px;
}
.page-lead { color: var(--text-dim); font-size: 18px; max-width: 640px; }

/* ==========================================================================
   Prose (about page)
   ========================================================================== */
.prose h2 {
  font-family: var(--font-display);
  font-size: 24px;
  margin: 36px 0 10px;
  letter-spacing: -0.01em;
}
.prose p { margin: 0 0 14px; color: var(--text); }
.prose ul { padding-left: 20px; color: var(--text); }
.prose ul li { margin: 6px 0; }
.prose-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }

/* ==========================================================================
   Projects page
   ========================================================================== */
.project {
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}
.project:last-child { border-bottom: 0; }
.project-meta {
  display: flex; gap: 10px; align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-faint);
  margin: 0 0 6px;
}
.project-role { color: var(--accent); }
.project-divider { color: var(--text-faint); }
.project-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 36px);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.project-lead { color: var(--text-dim); font-size: 17px; max-width: 760px; margin: 0 0 18px; }
.project-stack {
  list-style: none; padding: 0; margin: 0 0 18px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.project-stack li {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 4px 10px;
  border-radius: 999px;
}
.project-highlights { padding-left: 20px; margin: 0 0 16px; color: var(--text); }
.project-highlights li { margin: 6px 0; }
.project-links { display: flex; gap: 8px; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-list { list-style: none; padding: 0; margin: 0; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item details { padding: 18px 0; }
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  list-style: none;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .faq-toggle {
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--accent);
  transition: transform .2s ease;
}
.faq-item details[open] .faq-toggle { transform: rotate(45deg); }
.faq-a { color: var(--text-dim); margin-top: 10px; padding-right: 28px; }
.faq-a p { margin: 0; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 0 0 30px;
}
.contact-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  color: var(--text);
  transition: transform .2s ease, border-color .2s ease;
}
.contact-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  text-decoration: none;
}
.contact-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.contact-handle { display: block; font-weight: 600; word-break: break-word; }
.contact-note { display: block; color: var(--text-dim); font-size: 14px; margin-top: 4px; }
.contact-note-block { color: var(--text-dim); font-size: 16px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 28px 0 36px;
  background: var(--surface);
}
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: space-between; align-items: center;
}
.footer-line { margin: 0; color: var(--text-dim); font-size: 14px; }
.footer-links { list-style: none; display: flex; gap: 14px; padding: 0; margin: 0; flex-wrap: wrap; }
.footer-links a { color: var(--text-dim); font-size: 14px; }
.footer-links a:hover { color: var(--accent); }

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
