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

:root {
  --bg: #0b0d11;
  --bg-alt: #111318;
  --surface: #181a20;
  --border: #23262f;
  --text: #e2e4e9;
  --text-muted: #8b8f9a;
  --accent: #60a5fa;
  --accent-dim: rgba(96, 165, 250, 0.1);
  --radius: 12px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ===== Layout ===== */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 48px;
  letter-spacing: -0.02em;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 32px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

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

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

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

.nav-logo {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--accent);
}

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

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

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

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

.hero-greeting {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 12px;
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 36px;
  line-height: 1.8;
}

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #0b0d11;
}

.btn-primary:hover {
  background: #7db8fc;
  transform: translateY(-1px);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--text-muted);
  background: var(--surface);
  transform: translateY(-1px);
}

/* ===== About ===== */
.about-content {
  max-width: 640px;
  margin: 0 auto;
}

.about-content p {
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin-bottom: 16px;
  line-height: 1.8;
}

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

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color var(--transition);
}

.skill-card:hover {
  border-color: var(--text-muted);
}

.skill-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
}

.tag-sm {
  padding: 4px 10px;
  font-size: 0.75rem;
}

/* ===== Projects ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.project-name {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.project-link {
  color: var(--text-muted);
  transition: color var(--transition);
  flex-shrink: 0;
}

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

.project-desc {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

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

.contact-container .section-title::after {
  left: 50%;
  transform: translateX(-50%);
}

.contact-desc {
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin-bottom: 36px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 1rem;
  transition: color var(--transition);
}

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

/* ===== Footer ===== */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

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

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

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

/* Hero animations play immediately */
.hero .fade-in {
  animation: fadeInUp 0.8s ease forwards;
}

.hero .fade-in:nth-child(1) { animation-delay: 0.1s; }
.hero .fade-in:nth-child(2) { animation-delay: 0.2s; }
.hero .fade-in:nth-child(3) { animation-delay: 0.3s; }
.hero .fade-in:nth-child(4) { animation-delay: 0.4s; }
.hero .fade-in:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .section {
    padding: 72px 0;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 36px;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-links a {
    font-size: 0.8125rem;
  }

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

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

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

  .btn {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: 16px;
  }

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