:root {
  --bg: #0B0B0D;
  --fg: #E8E5DF;
  --dim: #807B76;
  --accent: #F27A3A;
  --accent2: #3AF2C8;
  --card: #141417;
  --border: #252528;
  --mono: 'Space Mono', monospace;
  --serif: 'Newsreader', Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--fg); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }

.noise {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
}

.page { max-width: clamp(740px, 58vw, 920px); margin: 0 auto; padding: 72px 24px 100px; }

@media (min-width: 1280px) {
  body { font-size: 15px; }
}
@media (min-width: 1600px) {
  body { font-size: 16px; }
}

/* ── HERO ── */
.hero { margin-bottom: 48px; }

.hero-label {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; flex-wrap: wrap;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--dim); margin-bottom: 20px;
}
.hero-label a { color: var(--dim); transition: color 0.2s; }
.hero-label a:hover { color: var(--accent); }
.hero-lab-link::after { content: ' →'; }

.hero-name {
  font-family: var(--serif); font-size: clamp(48px, 9vw, 72px);
  font-weight: 400; letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 24px;
}
.hero-name .dot { color: var(--accent); }

.hero-bio {
  font-family: var(--serif); font-size: 18px; font-weight: 400;
  color: var(--dim); max-width: 540px; line-height: 1.7;
  font-style: italic;
}

.hero-links {
  display: flex; gap: 20px; margin-top: 32px; flex-wrap: wrap;
}
.hero-links a {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--dim); padding: 8px 16px;
  border: 1px solid var(--border); transition: all 0.25s;
}
.hero-links a:hover {
  color: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 12px rgba(242,122,58,0.15);
}

/* ── SECTIONS ── */
.section { margin-bottom: 72px; }
.section-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}
.section-num {
  font-size: 11px; color: var(--accent); letter-spacing: 0.06em;
  font-weight: 700;
}
.section-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--dim);
}
.section-line { flex: 1; height: 1px; background: var(--border); }

/* ── EXPERIENCE ── */
.exp-item {
  display: grid; grid-template-columns: 1fr; gap: 4px;
  padding: 20px 0; border-bottom: 1px solid var(--border);
  position: relative;
}
.exp-item:last-child { border-bottom: none; }

.exp-top {
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 8px;
}
.exp-role { font-size: 15px; font-weight: 700; }
.exp-date { font-size: 12px; color: var(--dim); letter-spacing: 0.03em; flex-shrink: 0; }
.exp-company { font-size: 13px; color: var(--accent); margin-bottom: 6px; }

.exp-projects { margin-top: 8px; }
.exp-project-name {
  font-size: 13px; font-weight: 700; color: var(--fg);
  margin-top: 10px; margin-bottom: 2px;
}
.exp-desc {
  font-size: 12px; color: var(--dim); line-height: 1.6;
}

.exp-tags {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px;
}
.exp-tag {
  font-size: 10px; letter-spacing: 0.04em; padding: 3px 8px;
  background: rgba(242,122,58,0.06); color: var(--accent); border: 1px solid rgba(242,122,58,0.12);
}

/* ── GITHUB GRASS ── */
.gh-grass { width: 100%; overflow-x: auto; padding: 4px 0; }
.gh-grass-img { width: 100%; min-width: 640px; display: block; }

/* ── TECH STACK ── */
.stack-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1px;
  background: var(--border);
}
.stack-cell {
  background: var(--bg); padding: 16px 18px;
}
.stack-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--dim); margin-bottom: 6px; }
.stack-items { font-size: 13px; font-weight: 700; line-height: 1.6; }

/* ── PROJECTS ── */
.project-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); }

.project-card {
  background: var(--bg); padding: 20px 24px;
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start;
  transition: background 0.2s;
}
.project-card:hover { background: var(--card); }

.project-name { font-size: 15px; font-weight: 700; }
.project-name .live-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent2); margin-left: 8px; vertical-align: middle;
  box-shadow: 0 0 6px rgba(58,242,200,0.4);
}
.project-desc { font-size: 12px; color: var(--dim); line-height: 1.5; margin-top: 4px; }
.project-meta { text-align: right; flex-shrink: 0; }
.project-lang { font-size: 11px; color: var(--accent); }
.project-stars { font-size: 11px; color: var(--dim); }

/* ── OSS ── */
.oss-item {
  padding: 14px 0; border-bottom: 1px solid var(--border);
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: baseline;
}
.oss-item:last-child { border-bottom: none; }
.oss-name { font-size: 14px; font-weight: 700; }
.oss-desc { font-size: 12px; color: var(--dim); }

/* ── FOOTER ── */
.footer {
  margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--border);
  font-size: 11px; color: var(--dim); letter-spacing: 0.04em;
  display: flex; justify-content: space-between; align-items: center;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero { animation: fadeUp 0.7s ease both; }
.section:nth-of-type(2) { animation: fadeUp 0.7s 0.08s ease both; }
.section:nth-of-type(3) { animation: fadeUp 0.7s 0.14s ease both; }
.section:nth-of-type(4) { animation: fadeUp 0.7s 0.20s ease both; }
.section:nth-of-type(5) { animation: fadeUp 0.7s 0.26s ease both; }
.footer { animation: fadeUp 0.7s 0.38s ease both; }


@media (max-width: 600px) {
  .page { padding: 48px 16px 72px; }
  .exp-top { flex-direction: column; }
  .project-card { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: 1fr 1fr; }
}

@media print {
  @page {
    size: A4;
    margin: 16mm 18mm;
  }

  :root {
    --bg: #ffffff;
    --fg: #111111;
    --dim: #555555;
    --accent: #c45e1a;
    --accent2: #1abf98;
    --card: #f5f5f5;
    --border: #dddddd;
  }

  * { animation: none !important; transition: none !important; }

  body { background: #fff; font-size: 12px; }

  .noise, #tweaks-root, .hero-lab-link { display: none !important; }

  .page { max-width: 100%; padding: 0; }

  .hero { margin-bottom: 28px; }
  .hero-name { font-size: 42px; }
  .hero-bio { font-size: 14px; }

  .hero-links a {
    padding: 4px 10px;
    border-color: var(--border);
    color: var(--dim);
  }
  .hero-links a:hover { box-shadow: none; }

  .section { margin-bottom: 28px; }
  .section-header { margin-bottom: 14px; }

  .stack-grid, .project-list {
    gap: 0;
    background: transparent;
    border: 1px solid var(--border);
  }
  .stack-cell, .project-card {
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
  .stack-cell:last-child { border-bottom: none; }

  .project-card { grid-template-columns: 1fr; }

  .exp-item, .oss-item, .project-card, .stack-cell { break-inside: avoid; }

  /* hide GitHub grass — won't print usefully */
  .section:has(.gh-grass) { display: none; }

  .footer { margin-top: 24px; padding-top: 12px; }

  a { color: inherit; }
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 9px;
    color: var(--dim);
  }
  .hero-links a::after,
  .project-card::after,
  .oss-name::after { content: none; }
}
