:root {
  color-scheme: light;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #111827;
  background: #f9fafb;
  --surface: #ffffff;
  --surface-alt: #f3f4f6;
  --text: #111827;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-soft: rgba(37, 99, 235, 0.12);
  --border: rgba(15, 23, 42, 0.08);
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 28%),
              radial-gradient(circle at bottom right, rgba(79, 70, 229, 0.1), transparent 30%),
              var(--background, #f9fafb);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

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

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

button {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.1rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.3rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

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

.theme-toggle,
.nav-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text);
  font-size: 1.1rem;
}

.nav-toggle {
  display: none;
}

.section {
  padding: 5rem 0;
}

.section__header {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 2.5rem;
}

.section__label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--primary);
  font-size: 0.78rem;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: clamp(2.6rem, 4vw, 4rem);
  line-height: 1.03;
}

h1 span {
  color: var(--primary);
}

h2 {
  font-size: clamp(2rem, 3.4vw, 2.7rem);
}

h3 {
  font-size: 1.15rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.95fr;
  gap: 2rem;
  align-items: center;
}

.hero__content p {
  max-width: 42rem;
  margin: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 1rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--primary-soft);
  color: var(--primary);
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.2);
}

.button.secondary {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}

.profile-card {
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 2rem;
  display: grid;
  gap: 1.5rem;
}

.profile-card__image {
  width: 100%;
  min-height: 320px;
  border-radius: 24px;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 32%),
              linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  display: grid;
  place-items: center;
}

.profile-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-card__title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.about__grid,
.skills__grid,
.experience__grid,
.projects__grid,
.gallery__grid,
.contact__grid {
  display: grid;
  gap: 1.75rem;
}

.about__grid {
  grid-template-columns: 1.5fr 1fr;
}

.detail-card,
.experience__card,
.project-card,
.contact__card {
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.05);
  padding: 1.8rem;
}

.detail-card h3,
.experience__card h3,
.project-card h3,
.contact__card strong {
  color: #111827;
}

.detail-card p,
.experience__card p,
.project-card p,
.contact__card p,
.about__copy p {
  color: var(--muted);
}

.timeline__list {
  display: grid;
  gap: 1.2rem;
}

.timeline__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.75rem 1.75rem 1.75rem 1.2rem;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.05);
}

.timeline__year {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  min-width: 4.5rem;
}

.skills__group {
  border-radius: 24px;
  background: var(--surface);
  padding: 2rem;
  border: 1px solid var(--border);
}

.skill-bar {
  margin-bottom: 1.4rem;
}

.skill-bar__meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
  color: var(--muted);
}

.skill-bar__track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.skill-bar__fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #8b5cf6);
  transition: width 1.4s ease;
}

.strength-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.9rem;
}

.strength-list li {
  padding: 1rem 1.2rem;
  border-radius: 16px;
  background: var(--surface-alt);
  color: var(--text);
}

.experience__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.projects__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  min-height: 220px;
}

.gallery__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery__item {
  min-height: 220px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(99, 102, 241, 0.06));
  display: grid;
  place-items: center;
}

.gallery__placeholder {
  color: var(--text);
  text-align: center;
  padding: 1.5rem;
  font-weight: 600;
}

.contact__grid {
  grid-template-columns: 1.2fr 0.9fr;
}

.contact__info {
  display: grid;
  gap: 1rem;
  padding: 2rem;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.contact__info h3 {
  margin-bottom: 0.5rem;
}

.contact__info p,
.contact__info a {
  color: var(--muted);
}

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

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.social-links a {
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: 0.95rem;
}

.footer {
  padding: 2rem 0 3rem;
  background: transparent;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
}

.content-reveal,
.visual-reveal,
.animate-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.85s ease, transform 0.85s ease;
}

.animate-up.visible,
.content-reveal.visible,
.visual-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.15s;
}

.delay-2 {
  transition-delay: 0.25s;
}

.delay-3 {
  transition-delay: 0.35s;
}

.dark {
  color-scheme: dark;
  --background: #080b14;
  --surface: rgba(15, 23, 42, 0.94);
  --surface-alt: rgba(20, 29, 53, 0.95);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.16);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.14), transparent 28%),
              radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.12), transparent 30%),
              var(--background);
}

.dark .header {
  background: rgba(7, 10, 21, 0.82);
  border-color: rgba(148, 163, 184, 0.12);
}

.dark .button.secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(148, 163, 184, 0.16);
}

.dark .detail-card,
.dark .experience__card,
.dark .project-card,
.dark .contact__card,
.dark .profile-card,
.dark .contact__info,
.dark .gallery__item {
  background: rgba(15, 23, 42, 0.9);
}

.dark .skill-bar__track {
  background: rgba(255,255,255,0.08);
}

.dark .skill-bar__fill {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
}

@media (max-width: 980px) {
  .hero__grid,
  .about__grid,
  .experience__grid,
  .skills__grid,
  .projects__grid,
  .gallery__grid,
  .contact__grid {
    grid-template-columns: 1fr;
  }

  .header__inner {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100%, calc(100% - 1.5rem));
  }

  .nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav.open {
    display: flex;
    position: absolute;
    top: 76px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: rgba(255,255,255,0.98);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
  }

  .dark .nav.open {
    background: rgba(7,10,21,0.98);
  }

  .nav a {
    padding: 0.75rem 1.5rem;
  }

  .hero__content,
  .profile-card {
    width: 100%;
  }
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    transition-duration: 0s !important;
    animation-duration: 0s !important;
  }
}
