:root {
  --bg: #050509;
  --bg-alt: #0c0c12;
  --card-bg: #14141f;
  --text: #f5f5f5;
  --muted: #a0a0b8;
  --accent: #4b66ff;
  --accent-soft: rgba(75, 102, 255, 0.15);
  --border-subtle: #262638;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.55);
}

:root.light {
  --bg: #f5f6fa;
  --bg-alt: #ffffff;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --muted: #4a4a4a;
  --accent: #4b66ff;
  --accent-soft: rgba(75,102,255,0.15);
  --border-subtle: #d8d8d8;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #141428, #050509 55%);
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
}

:root.light body {
  background: radial-gradient(circle at top, #ffffff, #dfe4f5 60%);
}


.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(5,5,9,0.96), rgba(5,5,9,0.85));
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.3s ease, color 0.3s ease;
}

:root.light .nav {
  background: rgba(255,255,255,0.85);
  border-bottom-color: rgba(0,0,0,0.05);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 20%, #7586ff, #23224f);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.nav nav {
  display: flex;
  gap: 18px;
}

.nav nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav nav a:hover {
  color: var(--text);
  border-color: rgba(75, 102, 255, 0.7);
}

.btn-outline {
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(75, 102, 255, 0.7);
  color: var(--text);
  text-decoration: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease;
}

.btn-outline:hover {
  background: var(--accent-soft);
}

.theme-toggle {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 50%;
  transition: background 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  background: var(--accent-soft);
  transform: scale(1.08);
}

.hero {
  padding: 80px 18px 40px;
}

.hero-content {
  max-width: 1100px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  margin: 0 0 12px;
}

.hero h1 span {
  background: linear-gradient(120deg, #c8d0ff, #6f8fff);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-subtitle {
  max-width: 650px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.hero-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary,
.btn-secondary {
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 30px rgba(75, 102, 255, 0.5);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.04);
}

.hero-meta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.section {
  padding: 40px 18px;
  transition: background 0.3s ease, color 0.3s ease;
}

.section-alt {
  padding: 40px 18px;
  background: radial-gradient(circle at top, #101024, #050509 55%);
  transition: background 0.3s ease, color 0.3s ease;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section h2 {
  font-size: 1.7rem;
  margin-bottom: 14px;
}

.section p {
  font-size: 0.98rem;
  color: var(--muted);
  line-height: 1.7;
}

.section-subtitle {
  margin-bottom: 20px;
}

.section-subtitle.small {
  font-size: 0.85rem;
  opacity: 0.8;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.skill-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  transition: background 0.3s ease, color 0.3s ease;
}

.skill-card h3 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
}

.skill-card i {
  color: var(--accent);
}

.skill-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.skill-card li + li {
  margin-top: 4px;
}

.timeline {
  position: relative;
  margin-top: 20px;
  padding-left: 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  opacity: 0.7;
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
}

.timeline-dot {
  position: absolute;
  left: 4px;
  top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(75, 102, 255, 0.25);
}

.timeline-content {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-left: 24px;
  border: 1px solid var(--border-subtle);
  transition: background 0.3s ease, color 0.3s ease;
}

.timeline-content h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--muted);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.project-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-soft);
  transition: background 0.3s ease, color 0.3s ease;
}

.project-card h3 {
  margin-top: 0;
}

.project-card p {
  font-size: 0.9rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.9rem;
  color: #c6ceff;
  text-decoration: none;
}

.project-link i {
  font-size: 1rem;
}

.contact-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.contact-item {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 0.3s ease, color 0.3s ease;
}

.contact-item i {
  color: var(--accent);
  font-size: 1.1rem;
}

.contact-item span {
  font-size: 0.95rem;
}

.contact-item small {
  color: var(--muted);
  font-size: 0.8rem;
}

.footer {
  text-align: center;
  padding: 20px 14px 30px;
  font-size: 0.8rem;
  color: var(--muted);
}

.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: 768px) {
  .nav-inner {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .nav nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
  }

  .hero {
    padding-top: 70px;
  }

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