:root {
  --bg: #06080f;
  --surface: rgba(15, 20, 34, 0.78);
  --surface-hover: rgba(21, 29, 49, 0.92);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #ffb000;
  --accent-soft: rgba(255, 176, 0, 0.14);
  --cyan: #38bdf8;
  --border: rgba(148, 163, 184, 0.16);
  --success: #22c55e;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  color: var(--text);
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  position: relative;
}

code, pre, .font-mono, .log-line, .cmd-line, .section-kicker, .sys-status, nav a {
  font-family: var(--font-mono);
}

/* Subtle background glow & grid */
.ambient-glow {
  position: fixed;
  top: -140px;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 176, 0, 0.16), rgba(56, 189, 248, 0.08) 50%, transparent 75%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  background-size: 36px 36px;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse 85% 65% at 50% 0%, #000 55%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 85% 65% at 50% 0%, #000 55%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

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

.skip-link {
  position: absolute;
  top: -50px;
  left: 16px;
  background: var(--accent);
  color: #06080f;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 200;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

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

code {
  background: rgba(255, 176, 0, 0.1);
  color: #fcd34d;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.88em;
}

.success {
  color: var(--success);
  font-weight: 600;
}

/* Header */
.sys-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(6, 8, 15, 0.82);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sys-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.status-pill {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(255, 176, 0, 0.3);
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

nav a {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

nav a.nav-cta {
  color: #06080f;
  background: var(--accent);
  font-weight: 600;
}

nav a.nav-cta:hover {
  background: #ffc233;
}

/* Main */
main {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 36px 20px 64px;
}

section, footer {
  scroll-margin-top: 96px;
}

/* Hero Card */
.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.8);
}

.boot-box {
  background: rgba(2, 6, 23, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 12px;
  color: var(--muted);
}

.log-line {
  margin-bottom: 3px;
}

.log-line:last-child {
  margin-bottom: 0;
}

.time {
  color: #64748b;
  margin-right: 6px;
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.badge-amber, .badge-muted {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
}

.badge-amber {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(255, 176, 0, 0.35);
}

.badge-muted {
  background: rgba(56, 189, 248, 0.1);
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.main-title {
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 14px;
}

.main-title span {
  background: linear-gradient(90deg, var(--accent), #fde68a, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  color: var(--muted);
  max-width: 720px;
  margin-bottom: 22px;
}

.cmd-line {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #020617;
  border: 1px solid rgba(255, 176, 0, 0.25);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  color: #f8fafc;
  margin-bottom: 22px;
  overflow-x: auto;
}

.prompt {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.cursor {
  color: var(--accent);
  animation: blink-anim 1s step-end infinite;
}

@keyframes blink-anim {
  50% { opacity: 0; }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  color: #06080f;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(255, 176, 0, 0.55);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 176, 0, 0.45);
  color: var(--accent);
}

/* Sections */
.section-block {
  margin-top: 48px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-kicker {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 4px;
}

.section-title {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  color: #fff;
}

.search-wrap input {
  width: 260px;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-wrap input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 176, 0, 0.16);
}

/* Repository Cards Grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.repo-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-height: 156px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.repo-card:hover {
  transform: translateY(-3px);
  background: var(--surface-hover);
  border-color: rgba(255, 176, 0, 0.45);
  box-shadow: 0 14px 30px -16px rgba(255, 176, 0, 0.25);
}

.repo-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.repo-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
  word-break: break-word;
}

.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.28);
  white-space: nowrap;
  flex-shrink: 0;
}

.tag.archived {
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
  border-color: rgba(148, 163, 184, 0.25);
}

.repo-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.repo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #94a3b8;
  padding-top: 12px;
  border-top: 1px dashed rgba(148, 163, 184, 0.14);
}

/* Code / Notes Box */
.code-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(2, 6, 23, 0.8);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

.dots {
  display: inline-flex;
  gap: 6px;
}

.dots i {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
}

.code-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.note-row {
  display: grid;
  grid-template-columns: 125px 1fr;
  gap: 12px;
  align-items: baseline;
}

.note-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

.note-row p {
  font-size: 13px;
  color: #cbd5e1;
}

/* Two Column About */
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

.info-card h3 {
  font-size: 16px;
  color: #fff;
  margin-bottom: 10px;
}

.info-card p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-list a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.link-list a:hover {
  border-color: rgba(255, 176, 0, 0.45);
  transform: translateX(3px);
}

.link-list strong {
  display: block;
  font-size: 13px;
  color: var(--accent);
}

.link-list span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.footer-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-inner h2 {
  font-size: 18px;
  color: #fff;
  margin-bottom: 4px;
}

.footer-inner p {
  font-size: 13px;
  color: var(--muted);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.7);
  transition: all 0.2s ease;
}

.contact-links a:hover {
  background: var(--accent);
  color: #06080f;
  border-color: var(--accent);
  font-weight: 600;
}

.footer-bottom {
  margin-top: 16px;
  padding: 0 6px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #64748b;
}

@media (max-width: 680px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-card {
    padding: 20px;
  }
  .note-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .search-wrap, .search-wrap input {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}