/* Ayush Rai - shared styles (showcase + skills) */
:root {
  --ink: #1c1a17;
  --ink-soft: #4d4842;
  --ink-faint: #7a736a;
  --paper: #faf8f4;
  --card: #ffffff;
  --line: #e3ddd3;
  --accent: #8a3b12;
  --accent-soft: #f3e7de;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
.container { max-width: 880px; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

header.site-header { padding: 56px 0 28px; border-bottom: 1px solid var(--line); }
.site-header h1 {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 34px; font-weight: 700; letter-spacing: -0.01em;
}
.site-header .role { font-size: 17px; color: var(--ink-soft); margin-top: 6px; }
.site-header .intro { margin-top: 14px; max-width: 640px; color: var(--ink-soft); }
nav.site-nav { margin-top: 18px; }
nav.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; }
nav.site-nav a { font-size: 14px; color: var(--ink-soft); border-bottom: 1px solid transparent; }
nav.site-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); text-decoration: none; }

.read-note {
  margin: 28px 0 8px; padding: 14px 18px;
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  font-size: 14.5px; color: var(--ink-soft);
}

section { padding: 40px 0 8px; }
section > h2 {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 24px; margin-bottom: 4px;
}
section > .section-note { color: var(--ink-faint); font-size: 14.5px; margin-bottom: 22px; }

article.project {
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: 22px 24px; margin-bottom: 18px;
}
.project .top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.project h3 { font-size: 19px; font-weight: 650; }
.status {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 2px 8px; border-radius: 3px; border: 1px solid var(--line); color: var(--ink-faint);
  white-space: nowrap;
}
.status.live { background: #eef4ea; border-color: #cfdec4; color: #3f6032; }
.status.dev { background: var(--accent-soft); border-color: #e4cdbd; color: var(--accent); }
.status.demo { background: #f0eef9; border-color: #d6d0ea; color: #544a86; }
.project .one-liner { margin-top: 6px; color: var(--ink-soft); }
.project .links { margin-top: 10px; font-size: 14.5px; display: flex; flex-wrap: wrap; gap: 16px; }
.stack { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.stack span {
  font-size: 12.5px; color: var(--ink-faint);
  border: 1px solid var(--line); border-radius: 3px; padding: 1px 8px; background: var(--paper);
}
details.breakdown { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
details.breakdown summary {
  cursor: pointer; font-size: 14px; color: var(--accent); list-style: none;
}
details.breakdown summary::before { content: "+ "; }
details.breakdown[open] summary::before { content: "- "; }
details.breakdown summary:hover { text-decoration: underline; }
.breakdown .body { margin-top: 12px; }
.breakdown h4 {
  font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--ink-faint); margin: 16px 0 4px; font-weight: 600;
}
.breakdown h4:first-child { margin-top: 0; }
.breakdown p, .breakdown li { font-size: 15px; color: var(--ink-soft); }
.breakdown ul { padding-left: 20px; }
.breakdown li { margin-bottom: 3px; }

/* skills page */
.skill-group { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 20px 24px; margin-bottom: 16px; }
.skill-group h3 { font-size: 17px; font-weight: 650; margin-bottom: 10px; }
.skill-row { padding: 8px 0; border-top: 1px solid var(--line); }
.skill-row:first-of-type { border-top: none; }
.skill-row .name { font-weight: 600; font-size: 15px; }
.skill-row .proof { font-size: 14px; color: var(--ink-faint); }

footer.site-footer {
  margin-top: 56px; border-top: 1px solid var(--line); padding: 28px 0 44px;
  font-size: 14px; color: var(--ink-faint);
}
footer .contact-line { margin-bottom: 8px; }
footer .contact-line a { margin-right: 16px; }
@media (max-width: 600px) {
  .site-header h1 { font-size: 28px; }
  section > h2 { font-size: 21px; }
}

/* header controls: search + theme */
.controls { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
#site-search {
  flex: 1; min-width: 200px; max-width: 340px;
  padding: 7px 12px; font-size: 14.5px;
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--card); color: var(--ink);
}
#site-search:focus { outline: 2px solid var(--accent); outline-offset: 0; }
#theme-toggle {
  padding: 7px 14px; font-size: 13.5px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--card); color: var(--ink-soft);
}
#theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.search-empty { margin: 24px 0; color: var(--ink-faint); font-size: 14.5px; }

/* expandable groups (profiles page) */
details.more-group { background: var(--card); border: 1px solid var(--line); border-radius: 6px; margin-bottom: 14px; }
details.more-group summary {
  cursor: pointer; padding: 14px 20px; font-weight: 600; font-size: 15.5px; list-style: none;
}
details.more-group summary::before { content: "+ "; color: var(--accent); }
details.more-group[open] summary::before { content: "- "; }
details.more-group summary .count { color: var(--ink-faint); font-weight: 400; font-size: 13.5px; }
details.more-group .inner { padding: 4px 20px 16px; }

/* dark theme */
[data-theme="dark"] {
  --ink: #e8e4dc;
  --ink-soft: #bdb6aa;
  --ink-faint: #8f887c;
  --paper: #171512;
  --card: #201d19;
  --line: #38332c;
  --accent: #d98a5f;
  --accent-soft: #332218;
}
[data-theme="dark"] .status.live { background: #1d2a1a; border-color: #33502b; color: #8fbc74; }
[data-theme="dark"] .status.demo { background: #221e33; border-color: #443d66; color: #a99ede; }

/* skills table */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 6px; }
.skills-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
.skills-table th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-faint); padding: 12px 14px; border-bottom: 2px solid var(--line);
  cursor: pointer; user-select: none; white-space: nowrap;
}
.skills-table th:hover { color: var(--accent); }
.skills-table th.sorted-asc::after { content: " \2191"; }
.skills-table th.sorted-desc::after { content: " \2193"; }
.skills-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-soft); }
.skills-table tr:last-child td { border-bottom: none; }
.skills-table td.skill-name { font-weight: 600; color: var(--ink); }
.level { font-size: 12px; padding: 2px 8px; border-radius: 3px; border: 1px solid var(--line); white-space: nowrap; }
.level-strong { background: #eef4ea; border-color: #cfdec4; color: #3f6032; }
.level-working { background: var(--accent-soft); border-color: #e4cdbd; color: var(--accent); }
.level-learning { background: transparent; color: var(--ink-faint); }
[data-theme="dark"] .level-strong { background: #1d2a1a; border-color: #33502b; color: #8fbc74; }
[data-theme="dark"] .level-working { background: #332218; border-color: #5c3a26; color: #d98a5f; }
