/* ─── Variables ─────────────────────────────────── */
:root {
  --accent: #6366f1;
  --accent-dark: #4f46e5;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-body: #334155;
  --border: #e2e8f0;
  --bg: #f8fafc;
  --bg-card: #f1f5f9;
  --max-width: 640px;
  --section-gap: 3rem;
}

/* ─── Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ol, ul { list-style: none; }

/* ─── Hero ───────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: white;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.35);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.hero-title {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 0.25rem;
}

.hero-location {
  font-size: 0.85rem;
  opacity: 0.65;
  letter-spacing: 0.03em;
  margin-bottom: 1.25rem;
}

.hero-tagline {
  font-size: 1.1rem;
  opacity: 0.92;
  max-width: 460px;
  margin: 0 auto 2rem;
  line-height: 1.5;
  text-wrap: balance;
}

.btn-primary {
  display: inline-block;
  background: white;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.7rem 1.6rem;
  border-radius: 6px;
  transition: opacity 0.15s;
}

.btn-primary:hover {
  opacity: 0.9;
  text-decoration: none;
}

/* ─── Sections ───────────────────────────────────── */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-gap) 0;
  border-bottom: 1px solid var(--border);
}

.section:last-child {
  border-bottom: none;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ─── Stack Matrix ───────────────────────────────── */
.section--matrix { }

.matrix {
  max-width: 420px;
  margin: 0 auto;
}

.matrix-top {
  display: flex;
  margin-bottom: 4px;
}

.matrix-corner {
  width: 42px;
  flex-shrink: 0;
}

.matrix-col-labels {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.matrix-col-labels span {
  font-size: 0.6rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.matrix-main {
  display: flex;
  gap: 4px;
}

.matrix-row-labels {
  width: 42px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.matrix-row-labels span {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  height: 34px;
}

.matrix-cells {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(4, 34px);
  gap: 4px;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

.mc { border-radius: 3px; background: #c7d2fe; }
.mc.c2 { background: #a5b4fc; }
.mc.c3 { background: #818cf8; }

@keyframes matrix-scan {
  0%   { left: -4%;  opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { left: 104%; opacity: 0; }
}

.matrix-scan {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, transparent, white 30%, white 70%, transparent);
  opacity: 0.7;
  filter: blur(2px);
  animation: matrix-scan 3s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
}

/* ─── About ──────────────────────────────────────── */
#about p {
  color: var(--text-body);
  line-height: 1.75;
  font-size: 1rem;
}

#about p + p {
  margin-top: 0.75rem;
}

/* ─── What I Do ──────────────────────────────────── */
.do-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.do-list li {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: var(--text-body);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* ─── Experience ─────────────────────────────────── */
.timeline {
  border-left: 2px solid var(--accent);
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-company {
  font-weight: 600;
  color: var(--text);
  font-size: 1rem;
}

.timeline-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.15rem 0 0.35rem;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-body);
}

/* ─── Timeline tags ──────────────────────────────── */
.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.tag {
  font-size: 0.7rem;
  color: var(--accent);
  background: #e0e7ff;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 500;
}

.tag--more {
  background: none;
  color: var(--text-muted);
  padding-left: 2px;
  padding-right: 0;
  letter-spacing: 0.1em;
}

/* ─── Contact ────────────────────────────────────── */
.section--contact {
  text-align: center;
  padding-bottom: 4rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.contact-links a {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 500;
}

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 500px) {
  .hero {
    padding: 3.5rem 1.25rem 3rem;
  }

  .do-list {
    grid-template-columns: 1fr;
  }

  .contact-links {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
}
