:root {
  color-scheme: dark;
  --bg: #101010;
  --panel: #171717;
  --panel-2: #202020;
  --text: #f5f5f0;
  --muted: #a6a6a0;
  --line: #2e2e2c;
  --accent: #b7ff5a;
  --accent-2: #78d7ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5ef;
  --panel: #ffffff;
  --panel-2: #ecece4;
  --text: #151515;
  --muted: #66665f;
  --line: #dbdbd0;
  --accent: #2b7a10;
  --accent-2: #006f9f;
  --shadow: 0 24px 70px rgba(32, 32, 24, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.desktop-nav {
  display: flex;
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--text);
}

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

.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.menu-btn {
  display: none;
  place-items: center;
  gap: 4px;
}

.menu-btn span {
  width: 16px;
  height: 2px;
  background: currentColor;
}

.mobile-nav {
  display: none;
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0;
}

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: 56px;
  padding-top: 42px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 24px;
  font-size: clamp(42px, 8vw, 92px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  font-size: 22px;
  line-height: 1.25;
}

.lead {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
}

.compact {
  max-width: 560px;
}

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

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 700;
}

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

.secondary-link {
  border: 1px solid var(--line);
  background: var(--panel);
}

.profile-panel {
  min-width: 0;
}

.profile-card {
  display: grid;
  gap: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.avatar-mark {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
}

.stats div {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.stats dt {
  color: var(--muted);
  font-size: 12px;
}

.stats dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.strip {
  padding-top: 0;
}

.skill-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.skill-strip span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: var(--panel);
  font-size: 14px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 32px;
}

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

.project-card {
  position: relative;
  min-height: 300px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.card-index {
  display: inline-flex;
  margin-bottom: 64px;
  color: var(--accent-2);
  font-weight: 900;
}

.project-card p,
.service-item p,
.post-item p {
  color: var(--muted);
}

.project-card a {
  display: inline-flex;
  margin-top: 16px;
  color: var(--accent);
  font-weight: 800;
}

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

.service-item {
  display: grid;
  grid-template-columns: 0.45fr 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.journal {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
}

.post-list {
  display: grid;
  gap: 14px;
}

.post-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.post-item time {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
}

.contact-section {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 40px;
  align-items: start;
  border-top: 1px solid var(--line);
}

.contact-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.contact-line {
  padding: 14px;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
}

.contact-line:hover {
  color: var(--text);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

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

@media (max-width: 860px) {
  .desktop-nav {
    display: none;
  }

  .menu-btn {
    display: grid;
  }

  .mobile-nav {
    position: fixed;
    top: 75px;
    left: 20px;
    right: 20px;
    z-index: 19;
    display: none;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: var(--shadow);
  }

  .mobile-nav.open {
    display: grid;
  }

  .mobile-nav a {
    padding: 12px;
    color: var(--muted);
  }

  .hero,
  .journal,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .service-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .post-item {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding: 14px 20px;
  }

  .section {
    width: min(100% - 28px, 1180px);
    padding: 52px 0;
  }

  .hero {
    padding-top: 24px;
  }

  h1 {
    font-size: 44px;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}
