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

:root {
  --bg: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #1c2128;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79c0ff;
  --green: #3fb950;
  --purple: #bc8cff;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Nav */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 0 2rem;
}

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

nav .logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

nav .logo span {
  color: var(--accent);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav ul a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

nav ul a:hover {
  color: var(--text);
}

/* Sections */
section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 60px;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

.hero h1 {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 500px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Mascot */
.mascot-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.mascot {
  width: 320px;
  height: 320px;
  border-radius: 16px;
}

/* Stylized portrait */
.stylized-portrait {
  position: relative;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
  box-shadow:
    0 0 30px rgba(88, 166, 255, 0.2),
    0 0 60px rgba(88, 166, 255, 0.1),
    inset 0 0 30px rgba(88, 166, 255, 0.1);
  background: var(--bg-secondary);
}

.stylized-portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.15) 0%, transparent 50%, rgba(88, 166, 255, 0.1) 100%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(100%) contrast(1.3) brightness(0.7) sepia(100%) hue-rotate(180deg) saturate(3);
  transition: filter 0.5s;
}

.stylized-portrait:hover .portrait-img {
  filter: grayscale(0%) contrast(1.05) brightness(0.95);
}

/* How it works */
.how-it-works {
  border-top: 1px solid var(--border);
}

.how-it-works h2,
.projects h2,
.about-section h2 {
  font-family: var(--font-mono);
  font-size: 2rem;
  margin-bottom: 3rem;
}

.how-it-works h2 span,
.projects h2 span,
.about-section h2 span {
  color: var(--accent);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: border-color 0.2s;
}

.step:hover {
  border-color: var(--accent);
}

.step-number {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.step h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.step p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Projects */
.projects {
  border-top: 1px solid var(--border);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.project-card .tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--bg);
  background: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 1rem;
  width: fit-content;
}

.project-card .tag.green {
  background: var(--green);
}

.project-card .tag.purple {
  background: var(--purple);
}

.project-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-card .link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* Profile photo */
.profile-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--border);
  filter: grayscale(100%) contrast(1.1) brightness(0.9);
  transition: filter 0.4s, border-color 0.4s;
}

.profile-photo:hover {
  filter: grayscale(0%) contrast(1) brightness(1);
  border-color: var(--accent);
}

/* About section on index */
.about-section {
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
}

.about-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.about-info .title {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.about-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.about-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.about-highlights .chip {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
}

.about-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

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

footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .mascot-container {
    order: -1;
  }

  .mascot {
    width: 220px;
    height: 220px;
  }

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

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

  nav ul {
    gap: 1rem;
  }

  nav ul a {
    font-size: 0.8rem;
  }
}
