/* edge — personal hub
   Hand-rolled CSS. No framework, just variables and a small grid. */

:root {
  --bg: #0c0f14;
  --bg-soft: #11161e;
  --panel: #141b25;
  --panel-2: #18212e;
  --border: #232e3c;
  --border-soft: #1b2430;
  --text: #e7edf5;
  --text-dim: #9fb0c3;
  --text-faint: #6b7c91;
  --accent: #5e8bff;
  --accent-2: #7df0c8;
  --accent-soft: rgba(94, 139, 255, 0.14);
  --good: #4ade80;
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.8);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 960px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
}

:root[data-theme="light"] {
  --bg: #f7f8fa;
  --bg-soft: #eef1f5;
  --panel: #ffffff;
  --panel-2: #f3f5f9;
  --border: #e1e6ee;
  --border-soft: #eaeef4;
  --text: #131923;
  --text-dim: #4d5a6b;
  --text-faint: #7a8799;
  --accent: #2f6bff;
  --accent-2: #0fa97f;
  --accent-soft: rgba(47, 107, 255, 0.10);
  --shadow: 0 18px 40px -28px rgba(20, 30, 50, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 600px at 78% -8%, var(--accent-soft), transparent 60%),
    radial-gradient(900px 500px at -5% 8%, rgba(125, 240, 200, 0.06), transparent 55%),
    var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: saturate(140%) blur(12px);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border-soft);
}
.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; }
.brand-mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  color: #07111f;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 18px;
}
.brand-name { font-family: var(--mono); letter-spacing: -0.02em; }

.nav-links {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  margin-left: auto;
}
.nav-links a {
  display: block;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--text-dim);
  font-size: 0.94rem;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--panel-2); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--panel);
}
.lang-btn {
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 11px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.lang-btn[aria-pressed="true"] { color: #07111f; background: var(--accent); }

.theme-toggle {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text-dim);
  cursor: pointer;
  display: grid; place-items: center;
  transition: border-color 0.15s, color 0.15s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent); }
.theme-icon {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: inset -5px -3px 0 0 var(--panel);
}
:root[data-theme="light"] .theme-icon {
  box-shadow: none;
  background: radial-gradient(circle, currentColor 42%, transparent 46%),
    conic-gradient(currentColor 0 100%);
  -webkit-mask: none;
}

.nav-toggle { display: none; }

/* ---------- Layout ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.section { padding: 56px 0; border-top: 1px solid var(--border-soft); }
.section:first-of-type { border-top: 0; }
.section-head { margin-bottom: 26px; }
.section-head h2 {
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}
.section-sub { margin: 0; color: var(--text-faint); font-size: 0.95rem; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; }
.hero-inner { max-width: 680px; }
.avatar {
  position: relative;
  width: 72px; height: 72px;
  border-radius: 20px;
  display: grid; place-items: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 34px;
  color: #07111f;
  background: linear-gradient(150deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.status-dot {
  position: absolute;
  right: -4px; bottom: -4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--good);
  border: 3px solid var(--bg);
}
.eyebrow {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--accent);
  margin: 0 0 10px;
}
.hero-title {
  font-size: clamp(2.1rem, 7vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  font-weight: 750;
}
.accent {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--mono);
}
.hero-lede { font-size: 1.12rem; color: var(--text-dim); margin: 0 0 26px; }

.hero-meta {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 0 0 28px;
  padding: 0;
}
.hero-meta li {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.meta-key {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}
.meta-val { font-size: 0.95rem; color: var(--text); }
.hero-meta .is-open .meta-val { color: var(--good); }
.hero-meta .is-open { border-color: color-mix(in oklab, var(--good) 40%, var(--border)); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 11px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.15s, border-color 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #07111f; }
.btn-primary:hover { background: color-mix(in oklab, var(--accent) 85%, #fff); }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in oklab, var(--accent) 45%, var(--border));
  box-shadow: var(--shadow);
}
.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.card-title { font-family: var(--mono); font-size: 1.05rem; margin: 0; }
.card-year { font-family: var(--mono); font-size: 0.78rem; color: var(--text-faint); }
.card-desc { color: var(--text-dim); font-size: 0.92rem; margin: 10px 0 16px; flex: 1; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; }
.tags li {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  background: var(--accent-soft);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 3px 9px;
}
.card-link { color: var(--accent); font-size: 0.88rem; font-weight: 600; }
.card-link:hover { text-decoration: underline; }

/* ---------- Notes ---------- */
.notes-list { list-style: none; margin: 0; padding: 0; }
.note { border-bottom: 1px solid var(--border-soft); }
.note a {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 14px 4px;
  transition: padding 0.15s, color 0.15s;
}
.note a:hover { padding-left: 12px; color: var(--accent); }
.note time {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  min-width: 110px;
  flex-shrink: 0;
}
.note-title { font-size: 1rem; }

/* ---------- Now ---------- */
.now-updated {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin-left: 6px;
}
.now-list { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 10px; }
.now-list li {
  position: relative;
  padding: 12px 16px 12px 38px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
}
.now-list li::before {
  content: "";
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.contact-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.15s, border-color 0.15s;
}
.contact-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.contact-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}
.contact-value { font-family: var(--mono); font-size: 0.95rem; color: var(--text); }

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 22px 60px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-faint);
  font-size: 0.88rem;
}
.site-footer p { margin: 2px 0; }
.footer-note { font-family: var(--mono); font-size: 0.8rem; }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px; height: 38px;
    margin-left: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
    cursor: pointer;
  }
  .nav-toggle-bar {
    width: 18px; height: 2px;
    background: var(--text);
    margin: 0 auto;
    transition: transform 0.2s, opacity 0.2s;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child { transform: translateY(-3.5px) rotate(-45deg); }

  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 10px 16px 16px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-actions { margin-left: 0; }
  .hero { padding: 44px 0 28px; }
}
