/* ===== Variables ===== */
:root {
  --bg: #0a0a0b;
  --bg-elevated: #121214;
  --bg-card: #161618;
  --border: #27272a;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --accent: #e4e4e7;
  --accent-hover: #ffffff;
  --tag-bg: #1f1f23;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --max-width: 1100px;
  --transition: 0.2s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 11, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.nav.scrolled {
  border-bottom-color: var(--border);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

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

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 6rem 1.5rem 4rem;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(120, 120, 140, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(80, 80, 100, 0.08), transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.hero-logo {
  width: 96px;
  height: 96px;
  margin: 0 auto 1.5rem;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.08));
}

.hero h1 {
  font-size: clamp(2.75rem, 8vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 0.75rem;
  line-height: 1.1;
}

.tagline {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
}

.hero-sub {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 420px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 999px;
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  border-color: var(--text-dim);
  color: var(--text);
}

/* ===== Sections ===== */
.section {
  padding: 5rem 0;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.75;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.skills {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.skill-group h3 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
}

.skill-group ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-group li {
  font-size: 0.85rem;
  padding: 0.3rem 0.7rem;
  background: var(--tag-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
}

/* ===== Projects ===== */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.tab {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}

.tab:hover {
  border-color: var(--text-dim);
  color: var(--text);
}

.tab.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: #3f3f46;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.project-card.hidden {
  display: none;
}

.project-header {
  margin-bottom: 0.75rem;
}

.project-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.project-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.65;
  flex-grow: 1;
  margin-bottom: 1.25rem;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-meta span {
  font-size: 0.75rem;
  font-family: var(--mono);
  padding: 0.25rem 0.55rem;
  background: var(--tag-bg);
  border-radius: 4px;
  color: var(--text-dim);
}

/* ===== Contact ===== */
.contact {
  text-align: center;
}

.contact-card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
}

.contact-card p {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  font-size: 0.95rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-link {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  transition: all var(--transition);
}

.contact-link:hover {
  border-color: var(--text-dim);
  color: var(--text);
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.footer-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.footer-note {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  .nav-toggle {
    display: flex;
  }

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

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

  .hero {
    padding-top: 7rem;
  }

  .section {
    padding: 3.5rem 0;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}
