:root {
  --bg: #f6f7f9;
  --surface: rgba(255,255,255,.78);
  --surface-solid: #ffffff;
  --text: #101114;
  --muted: #656b73;
  --line: #dfe3e8;
  --accent: #6d4aff;
  --accent-2: #9d86ff;
  --shadow: 0 20px 60px rgba(23, 27, 38, .10);
}

[data-theme="dark"] {
  --bg: #0d0f13;
  --surface: rgba(21,24,31,.8);
  --surface-solid: #15181f;
  --text: #f2f4f7;
  --muted: #a0a7b2;
  --line: #282d36;
  --accent: #9a84ff;
  --accent-2: #c0b1ff;
  --shadow: 0 20px 60px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(109,74,255,.12), transparent 32rem),
    var(--bg);
  color: var(--text);
  transition: background .25s ease, color .25s ease;
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }

.site-header {
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 0;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 14px;
  z-index: 10;
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(18px);
  background: var(--surface);
}
.brand { font-weight: 800; letter-spacing: -.04em; }
.brand span { color: var(--accent); }
nav { display: flex; gap: 18px; align-items: center; }
nav a { color: var(--muted); font-size: .92rem; }
nav a:hover { color: var(--text); }

.icon-button {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-solid);
  color: var(--text);
  cursor: pointer;
}

main, footer { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.hero {
  min-height: 76vh;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 60px;
  align-items: center;
  padding: 80px 0 60px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .76rem;
  color: var(--accent);
  font-weight: 800;
}
h1 {
  margin: 10px 0 20px;
  font-size: clamp(3.4rem, 8vw, 7.5rem);
  line-height: .88;
  letter-spacing: -.07em;
}
h1 span { color: var(--muted); }
.lead {
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.7;
}
.hero-actions, .project-links { display: flex; gap: 12px; flex-wrap: wrap; }
.button {
  display: inline-flex;
  padding: 13px 18px;
  border-radius: 12px;
  font-weight: 700;
  border: 1px solid var(--line);
}
.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.secondary { background: var(--surface-solid); }

.hero-card {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-solid);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.terminal-bar { display: flex; gap: 7px; padding: 16px; border-bottom: 1px solid var(--line); }
.terminal-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
pre { margin: 0; padding: 28px; overflow: auto; min-height: 280px; }
code { color: var(--muted); line-height: 1.8; }

.section { padding: 90px 0; border-top: 1px solid var(--line); }
.section-heading {
  display: flex; justify-content: space-between; align-items: end; gap: 32px;
  margin-bottom: 34px;
}
h2 { margin: 6px 0 0; font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -.05em; }
.section-heading > p { color: var(--muted); max-width: 430px; }

.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.project-card {
  border: 1px solid var(--line);
  background: var(--surface-solid);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .22s ease;
}
.project-card:hover { transform: translateY(-4px); }
.project-card.featured { grid-column: span 2; display: grid; grid-template-columns: 1.25fr .75fr; }
.media { position: relative; background: #eceef2; min-height: 280px; }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; }
.project-card.featured .media { background: #15191f; display: flex; align-items: center; }
.project-card.featured .media img { min-width: 0; max-width: 100%; height: auto; max-height: 100%; object-fit: contain; }
.project-card.featured { min-width: 0; }
.project-card.featured .media { min-width: 0; }
.badge {
  position: absolute; left: 16px; top: 16px;
  background: rgba(16,17,20,.86); color: white;
  padding: 7px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700;
}
.project-content { padding: 24px; }
.project-topline { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.project-topline h3 { font-size: 1.5rem; margin: 0; }
.project-topline span { color: var(--muted); font-size: .8rem; }
.project-content p { color: var(--muted); line-height: 1.7; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 22px; }
.tags span {
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
}
.project-links a { font-weight: 700; font-size: .9rem; }
.project-links a:hover { color: var(--accent); }

.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; }
.about-copy { color: var(--muted); font-size: 1.1rem; line-height: 1.8; max-width: 700px; }
.tea-button {
  display: inline-flex;
  margin-top: 12px;
  padding: 14px 18px;
  border-radius: 12px;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

footer {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 28px 0 50px;
  color: var(--muted);
  font-size: .85rem;
}

@media (max-width: 820px) {
  nav a { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 70px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card.featured { grid-column: auto; grid-template-columns: 1fr; }
  .project-card.featured .media { min-height: 0; }
  .section-heading, .about { display: block; }
  .section-heading > p { margin-top: 18px; }
  .about-copy { margin-top: 26px; }
}
