@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0b0d10;
  --panel: #12151a;
  --panel-2: #171b21;
  --border: #262b33;
  --border-bright: #3a4150;
  --text: #e9e8e4;
  --text-dim: #9aa3ad;
  --text-faint: #5c6570;
  --accent: #cb9860;
  --accent-soft: rgba(203,152,96,0.12);
  --sage: #7fae8f;
  --serif: 'Fraunces', serif;
  --sans: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  background-image: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(203,152,96,0.08), transparent);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: 860px; margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}

/* ---------- Nav ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,13,16,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  transition: color 0.15s ease;
  margin-right: 26px;
}
.nav-links a:last-of-type { margin-right: 0; }
.nav-links a:hover { color: var(--accent); }
.available {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--sage);
  border: 1px solid rgba(127,174,143,0.3);
  background: rgba(127,174,143,0.08);
  padding: 5px 10px;
  border-radius: 20px;
}
.available .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }

.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; }

@media (max-width: 640px) {
  .nav-links { position: fixed; top: 61px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); flex-direction: column; align-items: flex-start; padding: 18px 24px; gap: 16px; display: none; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .available { order: 3; }
}

/* ---------- Hero ---------- */
.hero { padding: 96px 0 80px; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.hero h1 .accent-text { color: var(--accent); font-style: italic; }
.hero .lede {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 52ch;
  margin-bottom: 32px;
}
.hero-links { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  font-family: var(--mono);
  font-size: 13px;
  padding: 11px 20px;
  border-radius: 6px;
  border: 1px solid var(--border-bright);
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
  display: inline-block;
}
.btn:hover { border-color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--bg); border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { opacity: 0.88; background: var(--accent); }

/* ---------- Section shell ---------- */
section { padding: 70px 0; border-top: 1px solid var(--border); }
section > .wrap > h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 36px);
  margin-bottom: 44px;
}

/* ---------- Project cards ---------- */
.project-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  padding: 32px;
  margin-bottom: 24px;
}
.project-card.flagship { border-color: rgba(203,152,96,0.35); background: linear-gradient(180deg, rgba(203,152,96,0.05), var(--panel) 40%); }

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.project-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 24px;
}
.project-num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-faint);
}
.flagship-badge {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  border: 1px solid rgba(203,152,96,0.4);
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.project-card p.desc { color: var(--text-dim); margin-bottom: 18px; max-width: 66ch; }

/* Architecture diagram */
.diagram {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 20px;
  margin-bottom: 22px;
  overflow-x: auto;
}
.diagram svg { display: block; margin: 0 auto; min-width: 560px; }

ul.achieve { list-style: none; margin-bottom: 20px; }
ul.achieve li {
  position: relative;
  padding-left: 20px;
  color: var(--text-dim);
  font-size: 14.5px;
  margin-bottom: 9px;
}
ul.achieve li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tag {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-dim);
  border: 1px solid var(--border-bright);
  padding: 4px 10px;
  border-radius: 5px;
}

.repo-link {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  display: inline-block;
}
.repo-link:hover { text-decoration: underline; }

/* ---------- Skills grid ---------- */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -9px;
}
.skill-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  padding: 22px;
  width: calc(33.333% - 18px);
  margin: 9px;
  flex-grow: 1;
  min-width: 210px;
}
.skill-card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--accent);
}
.skill-card ul { list-style: none; }
.skill-card li {
  font-size: 14px;
  color: var(--text-dim);
  padding: 4px 0;
}

/* ---------- Contact ---------- */
.contact-cards {
  display: flex;
  flex-wrap: wrap;
  margin: 28px -8px 0;
}
.contact-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  padding: 22px;
  transition: border-color 0.15s ease;
  width: calc(33.333% - 16px);
  margin: 8px;
  flex-grow: 1;
  min-width: 200px;
  display: block;
}
.contact-card:hover { border-color: var(--accent); }
.contact-card .k {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  display: block;
}
.contact-icon {
  display: inline-flex;
  width: 26px;
  height: 26px;
  color: var(--accent);
  margin-bottom: 12px;
}
.contact-icon svg { width: 100%; height: 100%; }
.contact-card .v { font-family: var(--serif); font-size: 17px; font-weight: 500; overflow-wrap: break-word; word-break: break-word; }

footer {
  padding: 36px 0 50px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
}
footer a { color: var(--text-dim); }
footer a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .hero { padding: 64px 0 56px; }
  section { padding: 50px 0; }
  .project-card { padding: 22px; }
}
