:root {
  --bg: #121212;
  --fg: #e8e8e8;
  --muted: #999999;
  --link: #e8e8e8;
  --border: #2a2a2a;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  font-size: 110%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 18.7px;
  transition: background 0.15s ease, color 0.15s ease;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}

.site-header {
  position: relative;
  margin-bottom: 48px;
}

.site-header h1 {
  font-size: 1.6rem;
  margin: 0 0 4px;
}

.tagline {
  margin: 0 0 16px;
  color: var(--muted);
}

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

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

nav a:hover {
  color: var(--fg);
  text-decoration: underline;
}

nav a.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

nav a.icon-link:hover {
  text-decoration: none;
}

section {
  margin-bottom: 48px;
}

h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

p {
  margin: 0 0 12px;
  font-size: 0.85rem;
}

.links a {
  color: var(--link);
}

a {
  color: var(--link);
}

.entry {
  margin-bottom: 24px;
}

.entry:last-child {
  margin-bottom: 0;
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.entry-header h3 {
  font-size: 0.85rem;
  margin: 0;
  font-weight: 600;
}

.entry-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.entry-company {
  font-size: 1rem;
  margin: 0;
  font-weight: 700;
}

.entry-role {
  font-size: 0.85rem;
  margin: 0;
  font-weight: 500;
  color: var(--muted);
}

.entry .date {
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.entry p {
  margin: 6px 0 0;
  color: var(--fg);
}

.entry-list {
  margin: 6px 0 0;
  padding-left: 20px;
  color: var(--fg);
}

.entry-list li {
  margin: 0 0 4px;
  font-size: 0.85rem;
}

.entry-list li:last-child {
  margin-bottom: 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: color-mix(in srgb, var(--fg) 6%, transparent);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  line-height: 1.4;
}

.tags li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lang-color, var(--muted));
  flex-shrink: 0;
}

.tags li[data-lang="solidity"] { --lang-color: #aa6746; }
.tags li[data-lang="javascript"] { --lang-color: #f1e05a; }
.tags li[data-lang="rust"] { --lang-color: #dea584; }
.tags li[data-lang="cpp"] { --lang-color: #f34b7d; }
.tags li[data-lang="cmake"] { --lang-color: #da3434; }
.tags li[data-lang="python"] { --lang-color: #3572a5; }
.tags li[data-lang="claude-code"] { --lang-color: #d97757; }

.tags li[data-tag="gtm"] { --lang-color: #7c5cff; }
.tags li[data-tag="sales"] { --lang-color: #2e9e6a; }
.tags li[data-tag="marketing"] { --lang-color: #e0712b; }
.tags li[data-tag="content"] { --lang-color: #d6336c; }

/* Selected work */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 20px;
}

.filters button {
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
}

.filters button:hover {
  border-color: var(--muted);
  color: var(--fg);
}

.filters button[aria-pressed="true"] {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
}

.project {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.project[hidden] {
  display: none;
}

.entry p.project-result {
  margin: 4px 0 10px;
  font-weight: 600;
}

.case {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 12px;
  margin: 0;
  font-size: 0.8rem;
}

.case dt {
  color: var(--muted);
  font-weight: 600;
}

.case dd {
  margin: 0;
}

/* Content / reels */

.reels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.reel {
  display: block;
  text-decoration: none;
  color: var(--fg);
}

.reel-cover {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--fg) 6%, transparent);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.reel-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.reel-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent 45%);
  pointer-events: none;
}

.reel:hover .reel-cover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.reel:hover .reel-cover img {
  transform: scale(1.04);
}

.reel-play {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.75rem;
  padding-left: 3px;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.reel:hover .reel-play {
  opacity: 1;
  transform: scale(1.08);
}

.reel-meta {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  line-height: 1.35;
}

.reel-title {
  font-size: 0.8rem;
  font-weight: 600;
}

.reel-stat {
  font-size: 0.7rem;
  color: var(--muted);
}

.reels-more {
  margin: 16px 0 0;
  font-size: 0.8rem;
}

#reel-dialog {
  width: min(400px, 92vw);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--fg);
}

#reel-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.reel-frame iframe {
  display: block;
  width: 100%;
  height: min(720px, 80vh);
  border: 0;
}

.dialog-close {
  position: absolute;
  top: 6px;
  right: 8px;
  z-index: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--fg);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  width: 30px;
  height: 30px;
}

.reel-open {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  padding: 10px;
  border-top: 1px solid var(--border);
}

footer {
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

@media (max-width: 480px) {
  .container {
    padding: 40px 20px 60px;
  }

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

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

  .case dd {
    margin-bottom: 6px;
  }
}
