*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0b0b0f;
  --bg-elevated: #131318;
  --bg-card: #18181f;
  --border: #23232b;
  --text-primary: #e8e8ed;
  --text-secondary: #8a8a9a;
  --text-muted: #55556a;
  --accent: #6366f1;
  --accent-dim: rgba(99, 102, 241, 0.12);
  --radius: 12px;
  --radius-lg: 16px;
  --max-width: 1080px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent);
}

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

/* ─── NAV ─── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  background: rgba(11, 11, 15, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 450;
}

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

/* ─── HERO ─── */

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 160px 24px 100px;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 56px);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero .subtitle {
  font-size: clamp(18px, 2.5vw, 22px);
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.5;
  margin-bottom: 32px;
  font-weight: 400;
}

.hero-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
}

.hero-links a.primary {
  background: var(--accent);
  color: #fff;
}

.hero-links a.primary:hover {
  background: #5558e6;
  color: #fff;
}

.hero-links a.secondary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.hero-links a.secondary:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

/* ─── SECTIONS ─── */

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 650;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.6;
  margin-bottom: 48px;
}

/* ─── PROJECT CARD ─── */

.project {
  margin-bottom: 80px;
}

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

.project-header {
  margin-bottom: 32px;
}

.project-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.project-name {
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.project-role {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.project-description {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.65;
}

.project-site {
  margin-top: 12px;
  font-size: 14px;
}

.project-site a {
  color: var(--accent);
  font-weight: 500;
}

.project-site a:hover {
  color: #818cf8;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.project-tech span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
}

/* ─── SCREENSHOT GALLERY ─── */

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  cursor: pointer;
  transition: all var(--transition);
}

.gallery-item:hover {
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-item.featured {
  grid-column: 1 / -1;
}

.gallery-item .caption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 450;
}

/* ─── MOBILE GALLERY (for wallet/memetrade) ─── */

.gallery-mobile {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.gallery-mobile::-webkit-scrollbar {
  display: none;
}

.gallery-mobile .gallery-item {
  flex: 0 0 220px;
  border-radius: var(--radius);
}

.gallery-mobile .gallery-item {
  display: flex;
  align-items: center;
}

.gallery-mobile .gallery-item img {
  border-radius: var(--radius);
}

/* ─── SUBSECTION (e.g., Ledger vs Wallet within Axiomatic) ─── */

.subsection {
  margin-top: 40px;
}

.subsection-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.subsection-desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  line-height: 1.6;
}

/* ─── EARLIER WORK ─── */

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

.earlier-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
}

.earlier-card:hover {
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

.earlier-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.earlier-card .role {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 500;
}

.earlier-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ─── ABOUT ─── */

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.about-text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.about-text p + p {
  margin-top: 16px;
}

.education-list {
  list-style: none;
}

.education-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.education-list li:first-child {
  padding-top: 0;
}

.education-list li:last-child {
  border-bottom: none;
}

.education-list .school {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.education-list .degree {
  font-size: 14px;
  color: var(--text-secondary);
}

.education-list .year {
  font-size: 13px;
  color: var(--text-muted);
}

/* ─── FOOTER ─── */

.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ─── LIGHTBOX ─── */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

/* ─── FADE-IN ANIMATION ─── */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── RESPONSIVE ─── */

@media (max-width: 768px) {
  .hero {
    padding: 120px 20px 60px;
  }

  .section {
    padding: 48px 20px;
  }

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

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

  .about-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 13px;
  }

  .gallery-mobile .gallery-item {
    flex: 0 0 180px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 32px;
  }

  .hero-links {
    flex-direction: column;
  }

  .hero-links a {
    justify-content: center;
  }
}
