:root {
  --bg: #0a0d12;
  --panel: #111722;
  --panel-2: #151d2a;
  --text: #f5f7fb;
  --muted: #9ba7b7;
  --line: #263142;
  --accent: #D4A017;
  --accent-soft: rgba(245, 158, 11, 0.12);
  --max: 1180px;
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 80% 10%, rgba(216, 255, 79, 0.06), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.site-shell { min-height: 100vh; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 20px 0;
  background: rgba(10, 13, 18, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(38, 49, 66, 0.7);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: "DM Mono", monospace;
  font-size: 0.8rem;
  border-radius: 8px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-nav a:hover { color: var(--text); }

.nav-cta {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text) !important;
}

.menu-toggle {
  display: none;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

.section {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 105px 0;
  border-bottom: 1px solid var(--line);
}

.hero {
  min-height: 82vh;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 70px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-family: "DM Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.13em;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 24px;
  max-width: 820px;
  font-size: clamp(3.2rem, 7vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

h1 span { color: var(--accent); }

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
}

.hero-lede {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.24rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0 48px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 10px;
  font-weight: 700;
}

.button-primary {
  background: var(--accent);
  color: #111;
}

.button-ghost {
  border: 1px solid var(--line);
  color: var(--text);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
}

.hero-meta div { display: grid; }
.hero-meta strong { font-size: 1.3rem; }
.hero-meta span { color: var(--muted); font-size: 0.82rem; }

.hero-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #121925, #0d121b);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.terminal-bar {
  display: flex;
  gap: 7px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
}

.terminal-bar span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #475366;
}

.terminal-content {
  padding: 26px;
  font-family: "DM Mono", monospace;
  font-size: 0.88rem;
}

.prompt { color: var(--accent); }

.terminal-content ul {
  padding: 0;
  margin: 24px 0 28px;
  list-style: none;
}

.terminal-content li {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed #243043;
  color: #c8d0dc;
}

.terminal-content li span { color: #65758d; }
.terminal-status { margin: 0; color: var(--accent); }
.cursor { animation: blink 1s infinite; }

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

.section-heading {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 0.7fr);
  gap: 60px;
  align-items: end;
  margin-bottom: 42px;
}

.section-heading > p {
  margin-bottom: 0;
  color: var(--muted);
}

.project-toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.filter-button.active,
.filter-button:hover {
  color: #101216;
  border-color: var(--accent);
  background: var(--accent);
}

.search-box input {
  width: min(280px, 42vw);
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0d1219;
  color: var(--text);
  outline: none;
}

.search-box input:focus { border-color: var(--accent); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.project-card {
  grid-column: span 6;
  position: relative;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(21, 29, 42, 0.95), rgba(13, 18, 27, 0.96));
  transition: transform 160ms ease, border-color 160ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: #43516a;
}

.project-card.featured { grid-column: span 8; }
.project-card.compact { grid-column: span 4; }

.project-topline,
.project-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.project-topline {
  margin-bottom: 36px;
  font-family: "DM Mono", monospace;
  font-size: 0.76rem;
  color: var(--muted);
}

.project-status {
  color: var(--accent);
}

.project-card h3 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.project-card > p {
  color: var(--muted);
  max-width: 58ch;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.project-tags span,
.credential-tag {
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
}

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

.project-footer button {
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.project-footer button:hover { color: var(--accent); }

.project-source {
  color: var(--muted);
  font-size: 0.78rem;
}

.empty-state {
  padding: 40px 0;
  color: var(--muted);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.skill-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(17, 23, 34, 0.55);
}

.skill-number {
  display: inline-block;
  margin-bottom: 42px;
  color: #69788f;
  font-family: "DM Mono", monospace;
}

.skill-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.credential-list {
  border-top: 1px solid var(--line);
}

.credential-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.credential-list h3 {
  margin: 3px 0;
}

.credential-list p {
  margin-bottom: 0;
  color: var(--muted);
}

.credential-date {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
}

.about-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: 80px;
}

.about-copy {
  color: var(--muted);
  font-size: 1.05rem;
}

.about-copy p:last-child {
  margin-bottom: 0;
  color: var(--text);
  font-weight: 700;
}

.site-footer {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 38px 0 55px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  color: var(--muted);
}

.site-footer > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-footer p { margin: 0; }
.footer-links { display: flex; gap: 18px; }

.project-modal {
  width: min(760px, calc(100% - 28px));
  max-height: 88vh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #101620;
  color: var(--text);
}

.project-modal::backdrop {
  background: rgba(3, 5, 8, 0.78);
  backdrop-filter: blur(4px);
}

.modal-close {
  position: sticky;
  float: right;
  top: 14px;
  margin: 14px 14px 0 0;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #151d2a;
  color: var(--text);
  font-size: 1.35rem;
  cursor: pointer;
}

.modal-inner { padding: 42px; }
.modal-inner h2 { margin-bottom: 18px; }
.modal-inner > p { color: var(--muted); }

.case-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 30px;
}

.case-block {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.case-block h3 {
  color: var(--accent);
  font-family: "DM Mono", monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.case-block p, .case-block ul {
  margin-bottom: 0;
  color: var(--muted);
}

.case-block ul { padding-left: 18px; }

.modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .hero,
  .section-heading,
  .about-section {
    grid-template-columns: 1fr;
  }

  .hero { padding-top: 70px; min-height: auto; }
  .section-heading { gap: 18px; align-items: start; }
  .project-card,
  .project-card.featured,
  .project-card.compact { grid-column: span 12; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .site-header { width: min(calc(100% - 28px), var(--max)); }
  .section, .site-footer { width: min(calc(100% - 28px), var(--max)); }
  .section { padding: 78px 0; }

  .menu-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 70px;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    background: #0d1219;
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  .site-nav.open { display: flex; }

  .hero { gap: 40px; }
  h1 { font-size: clamp(3rem, 17vw, 4.8rem); }

  .project-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box input { width: 100%; }
  .skills-grid { grid-template-columns: 1fr; }

  .credential-list article,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .case-grid { grid-template-columns: 1fr; }
  .modal-inner { padding: 32px 22px; }
}
