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

:root {
  --bg: #07050f;
  --surface: #0f0a1e;
  --border: #1e1535;
  --accent: #b08fff;
  --accent2: #7c3aed;
  --accent-bright: #d4b3ff;
  --text: #ede9ff;
  --muted: #6b5f8a;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  cursor: none;
}

/* ── Cursor ── */
.cursor {
  width: 12px; height: 12px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s;
  mix-blend-mode: screen;
  top: 0; left: 0;
}

.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.15s ease, opacity 0.15s;
  opacity: 0.5;
  top: 0; left: 0;
}

/* ── Nav ── */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.75rem 3rem;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 5, 15, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo img {
  height: 72px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s;
  cursor: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-bright);
}

/* ── Sections ── */
section {
  padding: 5rem 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Hero ── */
.hero {
  min-height: 82vh;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding-top: 3rem;
  position: relative;
}

.hero-photo { flex-shrink: 0; }

.hero-photo img {
  width: 320px;
  height: auto;
  border: 1px solid var(--border);
  filter: grayscale(20%);
}

.hero-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 80% 50%, rgba(124, 58, 237, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
}

.hero-name {
  font-size: clamp(3.5rem, 10vw, 8rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

.hero-name span {
  color: var(--accent-bright);
  text-shadow: 0 0 60px rgba(176, 143, 255, 0.3);
}

.hero-sub {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 380px;
  line-height: 1.8;
  margin-bottom: 3rem;
  font-family: 'DM Mono', monospace;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
  padding: 0.8rem 2rem;
  border-radius: 3px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.2s;
  border: none;
}

.btn-primary { background: var(--accent2); color: #fff; }
.btn-primary:hover { background: var(--accent); color: var(--bg); transform: translateY(-2px); }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-bright); transform: translateY(-2px); }

/* ── Section Label ── */
.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Projects Grid ── */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}

/* ── Project Card ── */
.project-card {
  background: var(--bg);
  cursor: pointer;
  transition: background 0.3s;
  position: relative;
  overflow: hidden;
  min-height: 320px;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 0;
}

.project-card:hover { background: var(--surface); }
.project-card:hover::before { opacity: 1; }
.project-card:hover .tag { border-color: rgba(176, 143, 255, 0.2); color: var(--accent); }

.proj-card-featured { grid-column: 1 / -1; }
.proj-card-featured .proj-title { font-size: 2rem; }

/* ── Card Slides ── */
.card-slide {
  display: none;
  padding: 2.5rem;
  height: 100%;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.card-slide.active {
  display: flex;
  flex-direction: column;
}

/* ── Project Logo ── */
.proj-logo {
  margin-bottom: 1rem;
}

.proj-logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
}

.proj-card-featured .proj-logo img {
  height: 48px;
}

/* ── Project Info ── */
.proj-num {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.proj-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.proj-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-family: 'DM Mono', monospace;
  flex: 1;
}

.proj-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.tag {
  font-size: 0.68rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: border-color 0.2s, color 0.2s;
}

/* ── Card Footer ── */
.proj-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.proj-status {
  font-size: 0.68rem;
  font-family: 'DM Mono', monospace;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
}

.live-dot {
  width: 6px; height: 6px;
  background: #a78bfa;
  border-radius: 50%;
  animation: pulse 2s infinite;
  box-shadow: 0 0 6px rgba(167, 139, 250, 0.5);
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── Card Controls ── */
.card-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.slide-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--accent);
  width: 32px;
  height: 32px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.slide-btn:hover {
  border-color: var(--accent);
  background: rgba(176, 143, 255, 0.1);
}

.ctrl-icon {
  font-family: sans-serif;
  line-height: 1;
  display: block;
}

.proj-arrow {
  font-size: 1.2rem;
  color: var(--accent);
  transition: transform 0.2s, color 0.2s;
  font-family: sans-serif;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.proj-arrow:hover {
  color: var(--accent-bright);
  transform: translate(2px, -2px);
}

/* ── Screenshots ── */
.screenshot-gallery {
  flex: 1;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  margin-bottom: 1rem;
  background: var(--surface);
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screenshot {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 220px;
}

.screenshot.active { display: block; }

.screenshot-dots {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.screenshot-dots .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s;
  cursor: pointer;
}

.screenshot-dots .dot.active { background: var(--accent); }

/* ── Writing ── */
.writing-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
}

.article-row {
  background: var(--bg);
  padding: 2rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s;
  gap: 2rem;
}

.article-row:hover { background: var(--surface); }
.article-row:hover .art-arrow { transform: translate(4px, -4px); color: var(--accent-bright); }

.art-content { flex: 1; }

.art-topic {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
}

.art-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.art-desc {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  line-height: 1.6;
}

.art-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
}

.art-date {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
}

.art-arrow {
  font-size: 1.1rem;
  color: var(--muted);
  transition: all 0.2s;
  font-family: sans-serif;
}

/* ── Skills ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--border);
}

.skill-item {
  background: var(--bg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: background 0.2s;
}

.skill-item:hover { background: var(--surface); }
.skill-name { font-weight: 700; font-size: 0.88rem; color: var(--text); }
.skill-bar-bg { height: 1px; background: var(--border); }
.skill-bar { height: 1px; background: var(--accent); width: 0; transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1); }
.skill-level { font-family: 'DM Mono', monospace; font-size: 0.62rem; color: var(--muted); }

/* ── Contact ── */
.contact-block {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 5rem 0 3rem;
  border-top: 1px solid var(--border);
}

.contact-headline {
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.contact-headline span { color: var(--accent-bright); }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: flex-end;
}

.contact-link {
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.05em;
  cursor: none;
}

.contact-link:hover { color: var(--accent-bright); }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 2rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  nav { padding: 1rem 1.25rem; flex-wrap: wrap; gap: 0.75rem; }
  .nav-logo img { height: 48px; }
  .nav-links { gap: 1rem; flex-wrap: wrap; }
  .nav-links a { font-size: 0.65rem; letter-spacing: 0.08em; }

  section { padding: 4rem 1.5rem; }

  .hero { flex-direction: column; align-items: flex-start; }
  .hero-photo { width: 100%; }
  .hero-photo img { width: 100%; height: auto; }

  .projects-grid { grid-template-columns: 1fr; }
  .proj-card-featured { grid-column: 1; }
  .proj-card-featured .proj-title { font-size: 1.6rem; }

  .card-slide { padding: 1.5rem; }

  .screenshot { max-height: 180px; }
  .screenshot-gallery { min-height: 120px; }

  .contact-block { flex-direction: column; gap: 3rem; align-items: flex-start; }
  .contact-links { align-items: flex-start; }

  .article-row { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .art-meta { flex-direction: row; align-items: center; }
}

.proj-card-featured .screenshot-gallery {
  min-height: 380px;
}

.proj-card-featured .screenshot {
  max-height: 380px;
  object-fit: contain;
}

.proj-card-featured .proj-logo img {
  height: 64px;
}