/* ============================================================
   PORTFOLIO DESIGN SYSTEM — styles.css
   Single source of truth for all pages.
   Palette, typography, spacing, components.
   Add new project pages by reusing the classes defined here.
   ============================================================ */

/* ── 1. DESIGN TOKENS ──────────────────────────────────────── */
:root {
  /* Palette */
  --bg:          #F7F8FA;
  --surface:     #FFFFFF;
  --ink:         #14172A;
  --muted:       #5B6577;
  --border:      #E8EAF1;
  --accent:      #4F5BD5;
  --accent-bg:   #EEF0FF;
  --teal:        #0FB5AE;   /* secondary — metric numbers */

  /* Shadows */
  --shadow-card: 0 2px 12px rgba(20, 23, 42, 0.07);
  --shadow-hover: 0 6px 24px rgba(79, 91, 213, 0.14);

  /* Radii */
  --radius-card: 16px;
  --radius-btn:  10px;
  --radius-chip: 6px;

  /* Spacing scale */
  --sp-xs: 6px;
  --sp-sm: 12px;
  --sp-md: 20px;
  --sp-lg: 40px;
  --sp-xl: 64px;

  /* Typography */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --text-xs:   12px;
  --text-sm:   14px;
  --text-base: 16px;
  --text-lg:   18px;
  --text-xl:   22px;
  --text-2xl:  28px;
  --text-3xl:  34px;
}

/* ── 2. RESET & BASE ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.65;
  background: var(--bg);
  color: var(--ink);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

ul { padding-left: 20px; }
ul li { margin-bottom: 6px; }

/* ── 3. LAYOUT HELPERS ─────────────────────────────────────── */
.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--sp-md);
}

.wrap--wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--sp-md);
}

/* ── 4. NAVIGATION ─────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 248, 250, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--sp-md);
}

.nav__inner {
  max-width: 900px;
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--ink);
}

.nav__links {
  display: flex;
  gap: var(--sp-md);
  list-style: none;
  padding: 0;
}

.nav__links a {
  font-size: var(--text-sm);
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s;
}

.nav__links a:hover { color: var(--accent); text-decoration: none; }

/* ── 5. HERO ────────────────────────────────────────────────── */
.hero {
  padding: var(--sp-xl) 0 var(--sp-lg);
}

.hero__label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: var(--sp-sm);
}

.hero__name {
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: var(--sp-xs);
}

.hero__role {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--sp-md);
}

.hero__lead {
  font-size: var(--text-lg);
  color: var(--muted);
  max-width: 620px;
  line-height: 1.7;
}

/* ── 6. SECTION ─────────────────────────────────────────────── */
.section {
  padding: var(--sp-lg) 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section__label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: var(--sp-sm);
}

.section__title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--sp-md);
}

.section__subtitle {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--sp-sm);
}

/* ── 7. BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--radius-btn);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  text-decoration: none !important;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  border: none;
}

.btn--primary:hover {
  background: #3d49be;
  box-shadow: var(--shadow-hover);
}

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

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  margin-top: var(--sp-md);
}

/* ── 8. CHIPS / TAGS ────────────────────────────────────────── */
.chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-chip);
  font-size: var(--text-xs);
  font-weight: 600;
}

.chip--accent {
  background: var(--accent-bg);
  color: var(--accent);
}

.chip--teal {
  background: rgba(15, 181, 174, 0.12);
  color: #089b95;
}

.chip--muted {
  background: var(--border);
  color: var(--muted);
}

/* ── 9. PROJECT CARDS (index grid) ──────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-md);
  margin-top: var(--sp-md);
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--sp-md);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.25s, transform 0.25s;
  display: flex;
  flex-direction: column;
}

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

.project-card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--ink);
  margin: var(--sp-sm) 0 var(--sp-xs);
}

.project-card__desc {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}

.project-card__footer {
  margin-top: var(--sp-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-xs);
}

.project-card__link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent);
}

.project-card__link:hover { text-decoration: underline; }

/* ── 10. STATS ROW ──────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-sm);
  margin: var(--sp-md) 0;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--sp-md);
}

.stat__number {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--teal);
  display: block;
  line-height: 1.2;
}

.stat__label {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-top: 4px;
}

/* ── 11. SCREENSHOTS GALLERY ────────────────────────────────── */
.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-md);
  margin-top: var(--sp-md);
}

.shot {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.shot img {
  width: 100%;
  display: block;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
}

.shot__caption {
  padding: var(--sp-sm) var(--sp-sm);
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.5;
}

/* Wide screenshot (landscape, e.g. landing/kb page) */
.shots--wide {
  grid-template-columns: repeat(2, 1fr);
}

.shots--wide .shot img {
  aspect-ratio: 16 / 9;
}

/* ── 12. NOTE / CALLOUT ─────────────────────────────────────── */
.note {
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-btn) var(--radius-btn) 0;
  padding: var(--sp-sm) var(--sp-md);
  font-size: var(--text-sm);
  color: var(--muted);
  margin: var(--sp-md) 0;
}

/* ── 13. ABOUT SECTION ──────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-lg);
  margin-top: var(--sp-md);
}

.about-block__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--sp-xs);
}

/* ── 14. BACK LINK ──────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--muted);
  font-weight: 500;
  padding: var(--sp-md) 0;
}

.back-link:hover { color: var(--accent); text-decoration: none; }

/* ── 15. PROJECT HERO ───────────────────────────────────────── */
.project-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-lg) 0;
}

.project-hero__label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: var(--sp-sm);
}

.project-hero__title {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: var(--sp-sm);
}

.project-hero__tagline {
  font-size: var(--text-lg);
  color: var(--muted);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: var(--sp-md);
}

/* ── 16. CONTENT BLOCKS ─────────────────────────────────────── */
.block {
  margin: var(--sp-lg) 0;
}

.block__title {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: var(--sp-sm);
}

.block__body {
  color: var(--ink);
}

/* ── 17. FOOTER ─────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-lg) 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.footer__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--sp-md);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-md);
}

.footer__contacts a {
  color: var(--muted);
  margin-right: var(--sp-md);
}

.footer__contacts a:hover { color: var(--accent); text-decoration: none; }

/* ── 18. RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 700px) {
  .hero__name  { font-size: var(--text-2xl); }
  .hero__role  { font-size: var(--text-lg); }

  .stats       { grid-template-columns: 1fr 1fr; }
  .shots       { grid-template-columns: 1fr 1fr; }
  .shots--wide { grid-template-columns: 1fr; }
  .about-grid  { grid-template-columns: 1fr; }

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

  .project-hero__title { font-size: var(--text-2xl); }
}

@media (max-width: 400px) {
  .stats { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr; }
}
