:root {
  --bg-light: #ffffff;
  --bg-dark: #000000;
  --text-light: #1d1d1f;
  --text-dark: #f5f5f7;
  --muted-light: #6e6e73;
  --muted-dark: #a1a1a6;
  --accent: #0071e3;
  --card-dark: #111113;
  --max-width: 980px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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

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

/* Navbar */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: background 0.3s ease;
}

.nav-inner {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-light);
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.nav-links a:hover {
  opacity: 1;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  background: linear-gradient(180deg, #fbfbfd 0%, #ffffff 100%);
}

.hero-photo {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 28px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.hero-content h1 {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-content h1 span {
  background: linear-gradient(90deg, #0071e3, #00c6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  margin-top: 22px;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--muted-light);
  font-weight: 400;
}

.btn-primary {
  display: inline-block;
  margin-top: 36px;
  padding: 14px 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 980px;
  font-size: 17px;
  font-weight: 500;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary:hover {
  background: #0077ed;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 113, 227, 0.35);
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-indicator span {
  display: block;
  width: 1px;
  height: 60px;
  background: linear-gradient(180deg, transparent, var(--muted-light));
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Sections */
.section {
  padding: 140px 24px;
}

.section.light {
  background: #ffffff;
  color: var(--text-light);
}

.section.dark {
  background: var(--bg-dark);
  color: var(--text-dark);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.section h2 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

.lead {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--muted-light);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.5;
}

.section.dark .lead {
  color: var(--muted-dark);
}

/* Projects grid */
.grid {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  text-align: left;
}

.card {
  background: var(--card-dark);
  border-radius: 22px;
  padding: 32px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-media {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-dark);
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.card h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.card p {
  font-size: 0.95rem;
  color: var(--muted-dark);
  line-height: 1.5;
  margin-bottom: 20px;
}

.card-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
}

/* Skills */
.skills-grid {
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.skills-grid span {
  padding: 12px 26px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-light);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.skills-grid span:hover {
  background: var(--text-light);
  color: #fff;
  border-color: var(--text-light);
}

/* Contact */
.contact .btn-primary {
  margin-top: 30px;
}

.socials {
  margin-top: 50px;
  display: flex;
  justify-content: center;
  gap: 30px;
}

.socials a {
  font-size: 14px;
  color: var(--muted-dark);
  transition: color 0.2s ease;
}

.socials a:hover {
  color: #fff;
}

/* Footer */
footer {
  padding: 32px 24px;
  text-align: center;
  background: var(--bg-dark);
  color: var(--muted-dark);
  font-size: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .nav-links {
    gap: 16px;
  }
  .section {
    padding: 90px 20px;
  }
}
