/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary:   #0A0D12;
  --bg-secondary: #111620;
  --bg-panel:     #161C27;
  --bg-panel-hover: #1B2233;
  --text-primary:   #F0F4F8;
  --text-secondary: #9AABB8;
  --text-muted:     #566373;
  --accent:         #38D996;
  --accent-hover:   #4BE6A5;
  --accent-dim:     rgba(56, 217, 150, 0.07);
  --accent-border:  rgba(56, 217, 150, 0.22);
  --border:       #232E3C;
  --border-light: #2E3D50;

  --status-active:          #38D996;
  --status-active-bg:       rgba(56, 217, 150, 0.08);
  --status-active-border:   rgba(56, 217, 150, 0.22);
  --status-progress:        #F2B94B;
  --status-progress-bg:     rgba(242, 185, 75, 0.08);
  --status-progress-border: rgba(242, 185, 75, 0.22);
  --status-research:        #7B8FD4;
  --status-research-bg:     rgba(123, 143, 212, 0.08);
  --status-research-border: rgba(123, 143, 212, 0.22);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --t-fast: 150ms ease;
  --t-med:  220ms ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
code { overflow-wrap: anywhere; word-break: break-word; }

/* Push anchor targets below the fixed nav */
[id] { scroll-margin-top: 88px; }

/* ── Container ─────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Navigation ────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px 0;
  border-bottom: 1px solid transparent;
  transition: background var(--t-med), border-color var(--t-med), padding var(--t-med);
}

.nav.scrolled {
  background: rgba(10, 13, 18, 0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
  padding: 14px 0;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

.nav__logo {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  transition: color var(--t-fast);
}
.nav__logo:hover { color: var(--accent); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav__links a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--t-fast);
}
.nav__links a:hover { color: var(--text-primary); }

.nav__cta {
  color: var(--accent) !important;
  border: 1px solid var(--accent-border);
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  transition: background var(--t-fast), border-color var(--t-fast) !important;
}
.nav__cta:hover {
  background: var(--accent-dim);
  border-color: var(--accent) !important;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  width: 32px;
  height: 32px;
}
.nav__toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--t-med), opacity var(--t-fast);
  transform-origin: center;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 96px;
  position: relative;
  overflow: hidden;
}

/* Ambient glow — top-left */
.hero::before {
  content: '';
  position: absolute;
  top: -300px;
  left: -200px;
  width: 750px;
  height: 750px;
  background: radial-gradient(circle, rgba(56, 217, 150, 0.055) 0%, transparent 62%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Two-column layout: content left, panel right */
.hero__layout {
  display: grid;
  grid-template-columns: 1fr 308px;
  gap: 72px;
  align-items: center;
}

.hero__content { max-width: 640px; }

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}
.hero__tags span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
}

.hero__headline {
  font-size: clamp(40px, 5.4vw, 66px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.07;
  color: var(--text-primary);
  margin-bottom: 28px;
}

.hero__bio {
  font-size: 16px;
  line-height: 1.78;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.hero__sub {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 44px;
  font-style: italic;
}

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

/* Hero project panel */
.hero__aside {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.hero__panel {
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  /* Depth: shadow + very subtle inner highlight ring */
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(255, 255, 255, 0.03);
}

.hero__panel-header {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.hero__panel-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero__panel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}
.hero__panel-item:last-child { border-bottom: none; }
.hero__panel-item:hover { background: rgba(255, 255, 255, 0.02); }

.hero__panel-item-icon {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid;
}
.hero__panel-item-icon--security {
  color: var(--status-active);
  background: rgba(56, 217, 150, 0.08);
  border-color: rgba(56, 217, 150, 0.2);
}
.hero__panel-item-icon--voice {
  color: var(--status-research);
  background: rgba(123, 143, 212, 0.08);
  border-color: rgba(123, 143, 212, 0.2);
}
.hero__panel-item-icon--infra {
  color: var(--status-progress);
  background: rgba(242, 185, 75, 0.08);
  border-color: rgba(242, 185, 75, 0.2);
}

.hero__panel-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  flex: 1;
}

.hero__panel-footer {
  padding: 11px 18px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
}

.hero__panel-more {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--t-fast);
}
.hero__panel-more:hover { color: var(--accent); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 11px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: all var(--t-med);
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: #0A0D12;
}
.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(56, 217, 150, 0.22);
}

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ── Section commons ───────────────────────────────────────── */
.section { padding: 100px 0; }
.section--alt { background: var(--bg-secondary); }

.section__header { margin-bottom: 52px; }

.section__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 9px;
}

.section__title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text-primary);
}

/* ── Project Cards ─────────────────────────────────────────── */
.projects__actions {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

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

.card--center-row {
  grid-column: 2;
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color var(--t-med), background var(--t-med), transform var(--t-med), box-shadow var(--t-med);
}

.card:hover {
  border-color: var(--border-light);
  background: var(--bg-panel-hover);
  transform: translateY(-3px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.32);
}

/* Visual header area */
.card__visual {
  height: 96px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* Abstract circle — decorative depth in top-right */
.card__visual::after {
  content: '';
  position: absolute;
  right: -32px;
  top: -32px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  pointer-events: none;
}

.card__visual--security {
  background: linear-gradient(130deg, rgba(56, 217, 150, 0.055) 0%, transparent 60%);
}
.card__visual--security::after {
  background: radial-gradient(circle, rgba(56, 217, 150, 0.09), transparent 70%);
}
.card__visual--security .card__icon-wrap {
  color: var(--status-active);
  background: rgba(56, 217, 150, 0.1);
  border-color: rgba(56, 217, 150, 0.25);
}

.card__visual--voice {
  background: linear-gradient(130deg, rgba(123, 143, 212, 0.055) 0%, transparent 60%);
}
.card__visual--voice::after {
  background: radial-gradient(circle, rgba(123, 143, 212, 0.09), transparent 70%);
}
.card__visual--voice .card__icon-wrap {
  color: var(--status-research);
  background: rgba(123, 143, 212, 0.1);
  border-color: rgba(123, 143, 212, 0.25);
}

.card__visual--infra {
  background: linear-gradient(130deg, rgba(242, 185, 75, 0.05) 0%, transparent 60%);
}
.card__visual--infra::after {
  background: radial-gradient(circle, rgba(242, 185, 75, 0.09), transparent 70%);
}
.card__visual--infra .card__icon-wrap {
  color: var(--status-progress);
  background: rgba(242, 185, 75, 0.1);
  border-color: rgba(242, 185, 75, 0.25);
}

.card__icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* Card content body */
.card__body {
  padding: 22px 24px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.card__name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  line-height: 1.2;
}

.card__desc {
  font-size: 13.5px;
  line-height: 1.68;
  color: var(--text-secondary);
  flex: 1;
  margin-bottom: 20px;
}

/* Footer row with divider */
.card__footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  transition: color var(--t-fast);
}
.card__link svg { transition: transform var(--t-fast); }
.card__link:hover { color: var(--accent-hover); }
.card__link:hover svg { transform: translateX(4px); }

/* ── Status Badges ─────────────────────────────────────────── */
.status {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.status--active   { color: var(--status-active);   background: var(--status-active-bg);   border: 1px solid var(--status-active-border); }
.status--progress { color: var(--status-progress); background: var(--status-progress-bg); border: 1px solid var(--status-progress-border); }
.status--research { color: var(--status-research); background: var(--status-research-bg); border: 1px solid var(--status-research-border); }

.status--stable {
  color: var(--text-secondary);
  background: rgba(154, 171, 184, 0.07);
  border: 1px solid rgba(154, 171, 184, 0.2);
}
.status--maintained {
  color: #9AB4D4;
  background: rgba(154, 180, 212, 0.07);
  border: 1px solid rgba(154, 180, 212, 0.2);
}
.status--archived {
  color: var(--text-muted);
  background: rgba(86, 99, 115, 0.08);
  border: 1px solid rgba(86, 99, 115, 0.2);
}

/* ── Current Focus ─────────────────────────────────────────── */
.focus__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: flex-start;
}

.focus__intro .section__label { margin-bottom: 9px; }
.focus__intro .section__title { margin-bottom: 16px; }

.focus__desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 340px;
}

/* Timeline entries */
.focus__entries { position: relative; }

/* Vertical guide line */
.focus__entries::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 20px;
  bottom: 20px;
  width: 1px;
  background: var(--border);
}

.focus__entry {
  position: relative;
  padding: 18px 0 18px 32px;
  border-bottom: 1px solid var(--border);
}
.focus__entry:last-child { border-bottom: none; }

/* Timeline dot */
.focus__entry::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 24px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-light);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.focus__entry:hover::before {
  border-color: var(--accent);
  background: rgba(56, 217, 150, 0.1);
}

.focus__entry-title {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}

.focus__entry-sub {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* ── Knowledge Cards ───────────────────────────────────────── */
.knowledge__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.knowledge__card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.knowledge__card:hover {
  border-color: var(--border-light);
  background: var(--bg-panel-hover);
}

.knowledge__card-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-top: 1px;
}

.knowledge__card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 5px;
  line-height: 1.2;
}

.knowledge__card-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  padding: 44px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}
.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__credit {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.footer__links { display: flex; align-items: center; gap: 24px; }
.footer__links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--t-fast);
}
.footer__links a:hover { color: var(--accent); }

/* ── Responsive ────────────────────────────────────────────── */

/* Narrow the hero panel column slightly */
@media (max-width: 1080px) {
  .hero__layout {
    grid-template-columns: 1fr 280px;
    gap: 56px;
  }
}

/* Hide panel; collapse to single column hero */
@media (max-width: 900px) {
  .hero__layout {
    grid-template-columns: 1fr;
  }
  .hero__aside { display: none; }

  .projects__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .card--center-row {
    grid-column: auto;
  }

  .focus__layout {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .focus__desc { max-width: none; }

  .knowledge__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile nav */
@media (max-width: 800px) {
  .nav__toggle { display: flex; }

  .nav__links {
    display: none;
    position: fixed;
    top: 61px;
    left: 0; right: 0;
    background: rgba(10, 13, 18, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  .nav__links.open { display: flex; }
  .nav__links li { width: 100%; }
  .nav__links a {
    display: block;
    padding: 13px 28px;
    font-size: 15px;
    color: var(--text-secondary);
  }
  .nav__links a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
  }
  .nav__cta {
    display: block !important;
    margin: 4px 16px !important;
    padding: 11px 20px !important;
    border-radius: var(--radius-sm) !important;
    text-align: center !important;
    width: auto !important;
  }

  .section { padding: 80px 0; }
  .hero { padding: 108px 0 80px; min-height: auto; }
  .footer .container { flex-direction: column; align-items: flex-start; }
}

/* Single-column cards */
@media (max-width: 560px) {
  .projects__grid { grid-template-columns: 1fr; }
  .knowledge__grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container  { padding: 0 18px; }
  .nav__inner { padding: 0 18px; }

  .hero__headline { font-size: 36px; letter-spacing: -0.025em; }
  .hero__bio      { font-size: 15.5px; }

  .section__title { font-size: 23px; }
  .section        { padding: 64px 0; }
}
