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

:root {
  --bg: #0a0a0a;
  --bg-card: #111113;
  --bg-card-hover: #18181b;
  --border: #222225;
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --accent: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --accent2: #818cf8;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#field-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(10, 10, 10, 0.8);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-weight: 600; font-size: 15px;
}
.nav-logo img { border-radius: 6px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  text-decoration: none; color: var(--text-secondary);
  font-size: 14px; font-weight: 400;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* HERO */
.hero { 
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
}
.hero-content { max-width: 700px; }
.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  background: rgba(17, 17, 19, 0.6);
}
.hero h1 {
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #fff 40%, #71717a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-tagline {
  font-size: clamp(20px, 3vw, 28px);
  color: var(--accent2);
  font-weight: 500;
  margin-bottom: 16px;
}
.hero-sub {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer; border: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}
.btn-primary:hover { background: #5558e6; box-shadow: 0 0 30px var(--accent-glow); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: #444; color: var(--text); }
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  background: transparent;
  color: var(--accent2);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-sm:hover { border-color: var(--accent); background: var(--accent-glow); }

/* SECTIONS */
.section-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.about, .projects {
  position: relative; z-index: 1;
  padding: 120px 0;
}
.about h2, .projects h2 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 56px;
  line-height: 1.15;
}

/* ABOUT GRID */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.about-card {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.25s;
}
.about-card:hover {
  background: var(--bg-card-hover);
  border-color: #333;
  transform: translateY(-2px);
}
.about-icon { font-size: 28px; margin-bottom: 16px; }
.about-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.about-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

/* PROJECT CARD */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}
.project-header { padding: 40px 40px 32px; }
.project-title-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.project-title-row h3 {
  font-size: 28px; font-weight: 700; font-family: var(--mono);
}
.project-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent2);
  border: 1px solid rgba(99, 102, 241, 0.2);
}
.badge-license { background: rgba(255,255,255,0.05); color: var(--text-secondary); border-color: var(--border); }
.project-desc {
  font-size: 16px; color: var(--text-secondary);
  max-width: 600px; line-height: 1.7;
  margin-bottom: 20px;
}

/* FEATURES */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  border-top: 1px solid var(--border);
}
.feature {
  padding: 24px 40px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.feature:hover { background: var(--bg-card-hover); }
.features-grid .feature:nth-child(odd) { border-right: 1px solid var(--border); }
.feature-name {
  font-size: 14px; font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.feature-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* TERMINAL */
.terminal {
  border-top: 1px solid var(--border);
  background: #09090b;
}
.terminal-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}
.terminal-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }
.terminal-title {
  margin-left: 8px;
  font-size: 12px; color: var(--text-secondary);
  font-family: var(--mono);
}
.terminal-body {
  padding: 24px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
  overflow-x: auto;
  color: #d4d4d8;
}
.t-comment { color: #52525b; }
.t-prompt { color: var(--accent2); }
.t-output { color: #6ee7b7; }

/* FOOTER */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-left {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500;
}
.footer-left img { border-radius: 4px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-size: 13px; color: var(--text-secondary);
  text-decoration: none; transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 12px; color: #52525b; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links { gap: 16px; }
  .about, .projects { padding: 80px 0; }
  .project-header { padding: 28px 24px 24px; }
  .feature { padding: 20px 24px; }
  .features-grid .feature:nth-child(odd) { border-right: none; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero {  padding: 100px 16px 60px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
}

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-badge { animation: fadeUp 0.6s ease both; }
.hero h1 { animation: fadeUp 0.6s ease 0.1s both; }
.hero-tagline { animation: fadeUp 0.6s ease 0.2s both; }
.hero-sub { animation: fadeUp 0.6s ease 0.3s both; }
.hero-actions { animation: fadeUp 0.6s ease 0.4s both; }

/* Fix: reduce hero-about gap on mobile, remove emoji sizing */
@media (max-width: 768px) {
  .hero { min-height: auto; padding: 100px 24px 40px; }
  .about { padding-top: 40px; }
}
.about-icon { font-size: 0; line-height: 1; }
