/* === Variables === */
:root {
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-subtle: rgba(99, 102, 241, 0.08);
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
  --radius: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* === Navbar === */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: rgba(248, 250, 252, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-back {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition);
}

.nav-back:hover {
  color: var(--accent);
}

.nav-brand {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* === Hero === */
.hero {
  position: relative;
  text-align: center;
  padding: 100px 1.5rem 60px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-avatar {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--border);
  box-shadow: var(--shadow-md);
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 0.7rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  cursor: pointer;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-ghost {
  color: var(--accent);
  background: transparent;
  border: 2px solid var(--border);
}

.btn-ghost:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* === Sections === */
.section {
  padding: 80px 1.5rem;
  scroll-margin-top: 56px;
}

.section-inner {
  max-width: 680px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 0.5rem;
}

/* === About === */
.about-content {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.about-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.8;
}

.about-content p:last-child {
  margin-bottom: 0;
}

/* === Contact === */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.contact-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99, 102, 241, 0.3);
}

.contact-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 12px;
  background: var(--accent-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.contact-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.contact-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.contact-card a {
  color: var(--accent);
  text-decoration: none;
}

.contact-card a:hover {
  text-decoration: underline;
}

/* === Footer === */
footer {
  text-align: center;
  padding: 2rem 1.5rem 3rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* === Animations === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.anim-hidden {
  opacity: 0;
}

.anim-in {
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.anim-in.delay-1 {
  animation-delay: 0.15s;
}

.anim-in.delay-2 {
  animation-delay: 0.3s;
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* === Responsive === */
@media (max-width: 768px) {
  .hero {
    padding: 70px 1.5rem 40px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-avatar {
    width: 100px;
    height: 100px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 60px 1.5rem;
  }

  .navbar {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 50px 1rem 30px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .hero-tagline {
    font-size: 0.95rem;
  }

  .hero-avatar {
    width: 80px;
    height: 80px;
  }

  .section {
    padding: 50px 1rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .contact-card {
    padding: 1.5rem 1rem;
  }

  .hero-glow {
    width: 300px;
    height: 300px;
  }
}
