﻿/* Python Skills Showcase — skim-first, hub navy + Python accent */

:root {
  --ink: #1D2D3E;
  --ink-soft: #2a3140;
  --muted: #556B82;
  --line: rgba(18, 21, 28, 0.1);
  --line-strong: rgba(18, 21, 28, 0.16);
  --surface: #ffffff;
  --bg: #F5F6F7;
  --navy: #1a2b3c;
  --navy-hover: #0f1e2a;
  --accent: #0062D6;
  --accent-hover: #004BB0;
  --accent-deep: #004BB0;
  --py: #0062D6;
  --py-yellow: #FFD43B;
  --py-soft: rgba(0, 98, 214, 0.1);
  --py-pale: #e8f2fa;
  --ok: #256F3A;
  --warn: #8A5A00;
  --nb-input-bg: #f4f7fb;
  --nb-border: #0062D6;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(18, 21, 28, 0.04), 0 12px 40px rgba(26, 43, 60, 0.06);
  --font: "Figtree", "Segoe UI", sans-serif;
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body.py-page {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.py-page a {
  color: var(--py);
  text-decoration: none;
}

body.py-page a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.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: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 0.75rem;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--navy);
  font-weight: 650;
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; }

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.mesh {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
}

.mesh-a {
  width: min(70vw, 720px);
  height: min(70vw, 720px);
  top: -18%;
  left: -12%;
  background: radial-gradient(circle, rgba(55, 118, 171, 0.2) 0%, transparent 70%);
}

.mesh-b {
  width: min(50vw, 520px);
  height: min(50vw, 520px);
  top: 12%;
  right: -8%;
  background: radial-gradient(circle, rgba(26, 43, 60, 0.12) 0%, transparent 70%);
}

.geo-plane {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(165deg, rgba(238, 241, 245, 0.2) 0%, transparent 42%),
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 48px,
      rgba(26, 43, 60, 0.014) 48px,
      rgba(26, 43, 60, 0.014) 49px
    );
  mask-image: linear-gradient(180deg, #000 0%, #000 50%, transparent 100%);
}

/* Header — hub navy */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  background: rgba(245, 246, 247, 0.94);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.py-page .brand { color: var(--navy); }
.py-page .brand-name { color: var(--navy); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 550;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--navy);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--navy);
}

/* Hero */
.py-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.25rem) 1.5rem 1.5rem;
}

.breadcrumb {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.breadcrumb a { color: var(--muted); font-weight: 500; }

.hero-brand-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.py-logo {
  flex-shrink: 0;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(55, 118, 171, 0.28);
}

.hero-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.py-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.py-brand {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--navy);
}

.py-hero h1 {
  margin: 0 0 0.55rem;
  font-family: var(--font);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 550;
  color: var(--ink-soft);
  letter-spacing: -0.015em;
  max-width: 42ch;
  line-height: 1.4;
}

.py-hero .lead {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 52ch;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.26rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 550;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.75);
}

.pill.accent {
  background: var(--py-soft);
  border-color: rgba(55, 118, 171, 0.28);
  color: var(--accent-deep);
}

.disclaimer {
  margin: 0;
  padding: 0.7rem 0.95rem;
  border-left: 3px solid var(--navy);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.86rem;
  color: var(--muted);
  max-width: 58ch;
  line-height: 1.5;
}

/* Sections */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem 2.75rem;
}

.skim-top { padding-top: 0.25rem; }

.section-head {
  margin-bottom: 1.15rem;
  max-width: 40rem;
}

.section-kicker {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section h2 {
  font-family: var(--display);
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 0.45rem;
  color: var(--navy);
}

.section .sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Charts first */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.15rem 0.9rem;
  animation: riseIn 0.55s var(--ease) both;
}

.chart-card:nth-child(2) { animation-delay: 0.08s; }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.chart-card h3 {
  margin: 0 0 0.3rem;
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 550;
  color: var(--navy);
}

.chart-card p {
  margin: 0 0 0.65rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.chart-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.45rem;
  min-height: 200px;
  margin-bottom: 0.5rem;
}

/* Filter */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.filter-btn {
  font-family: var(--font);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.filter-btn:hover,
.filter-btn.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #f7f8fa;
}

/* Skills table — closed skim rows */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.skills-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.skills-table thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(238, 241, 245, 0.9);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.skills-table tbody tr.problem-row {
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid var(--line);
}

.skills-table tbody tr.problem-row:hover,
.skills-table tbody tr.problem-row.is-open {
  background: var(--py-soft);
}

.skills-table tbody tr.problem-row[hidden] { display: none; }

.skills-table td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  color: var(--ink-soft);
}

.skills-table td.col-skill {
  width: 18%;
  font-weight: 650;
  color: var(--py);
  font-size: 0.88rem;
}

.skills-table td.col-result {
  width: 44%;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.9rem;
}

.skills-table td.col-metric {
  width: 22%;
  font-weight: 600;
  color: var(--ok);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.skills-table td.col-action {
  width: 16%;
  text-align: right;
  white-space: nowrap;
}

.tech-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(238, 241, 245, 0.95);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--mono);
}

.expand-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 650;
  color: var(--navy);
  letter-spacing: 0.02em;
}

.expand-hint::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--navy);
  transition: transform 0.25s var(--ease);
}

.problem-row.is-open .expand-hint::after {
  transform: rotate(180deg);
}

/* Detail panel — essay first, snippet behind details */
.detail-row[hidden] { display: none; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.detail-row td {
  padding: 0 !important;
  background: var(--py-pale);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.detail-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem 1.2rem 1.2rem;
  animation: fadeIn 0.28s var(--ease);
}

.detail-essay p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.concept-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
}

.use-cases {
  margin: 0 0 0.85rem;
  padding-left: 1.1rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.use-cases li { margin-bottom: 0.3rem; }

.result-callout {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(55, 118, 171, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.9rem;
  margin-bottom: 0.25rem;
}

.result-callout strong {
  display: block;
  font-size: 0.92rem;
  color: var(--navy);
  margin-bottom: 0.3rem;
}

.result-callout p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.snippet-details {
  background: var(--nb-input-bg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--nb-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.snippet-details summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--py);
  padding: 0.65rem 0.9rem;
  list-style: none;
  user-select: none;
}

.snippet-details summary::-webkit-details-marker { display: none; }

.snippet-details summary::before {
  content: "▸ ";
  color: var(--navy);
}

.snippet-details[open] summary::before { content: "▾ "; }

.snippet-details[open] summary {
  border-bottom: 1px solid var(--line);
}

.code-block {
  margin: 0;
  padding: 0.7rem 0.9rem 0.9rem;
  background: transparent;
  color: #1e2a38;
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
  border: none;
}

.code-block .cm { color: #556B82; font-style: italic; }
.code-block .kw { color: #0062D6; font-weight: 600; }
.code-block .fn { color: #0062D6; }
.code-block .st { color: #8A5A00; }

.capstone-note {
  margin: 1.35rem 0 0;
  padding: 0.95rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 62ch;
  line-height: 1.55;
}

.capstone-note strong { color: var(--navy); }

/* Mobile cards */
.mobile-cards { display: none; }

.m-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.m-card[hidden] { display: none; }

.m-card-head {
  padding: 0.95rem 1.05rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.m-card-head h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  font-family: var(--display);
  font-weight: 550;
  color: var(--navy);
}

.m-topic {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--py);
  margin: 0 0 0.2rem;
}

.m-result {
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin: 0.25rem 0 0;
  line-height: 1.4;
}

.m-metric {
  font-size: 0.82rem;
  color: var(--ok);
  font-weight: 600;
  margin: 0.35rem 0 0;
}

.m-card-body {
  display: none;
  padding: 0 1.05rem 1.1rem;
  border-top: 1px solid var(--line);
  background: var(--py-pale);
}

.m-card.is-open .m-card-body { display: block; padding-top: 0.95rem; }

.m-card-body .detail-panel { padding: 0; }

.course-toggle {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--navy);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem 1.5rem 2.5rem;
  margin-top: 0.5rem;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.footer-brand strong { color: var(--navy); }
.footer-brand span { font-size: 0.85rem; color: var(--muted); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 960px) {
  .charts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-drawer {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    background: rgba(238, 241, 245, 0.97);
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.5rem 1.25rem;
  }
  .nav-drawer.is-open { display: block; }
  .nav-links { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .table-desktop { display: none; }
  .mobile-cards { display: block; }
}
