:root {
  --primary: #02569B;
  --secondary: #0175C2;
  --accent: #13B9FD;
  --background: #F8FAFC;
  --card: #FFFFFF;
  --text: #0F172A;
  --muted: #64748B;
  --border: #E2E8F0;
  --shadow: 0 18px 45px rgba(2, 86, 155, 0.12);
  --radius: 24px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: Inter, "Segoe UI", sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.7;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: min(1180px, 92%);
  margin: auto;
}

.section { padding: 96px 0; }

.header {
  position: sticky;
  top: 0;
  z-index: 99;
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.navbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 1px;
}

.nav-menu {
  display: flex;
  gap: 26px;
}

.nav-menu a {
  position: relative;
  color: var(--muted);
  font-weight: 700;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 3px;
  border-radius: 20px;
  background: var(--accent);
  transition: width .3s ease;
}

.nav-menu a:hover { color: var(--primary); }
.nav-menu a:hover::after { width: 100%; }

.hero {
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at top right, rgba(19, 185, 253, .18), transparent 34%),
    radial-gradient(circle at top left, rgba(1, 117, 194, .14), transparent 30%);
}

.hero-content {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 60px;
}

.badge {
  display: inline-block;
  padding: 8px 16px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(19, 185, 253, .14);
  color: var(--primary);
  font-weight: 800;
}

.hero-text h1 {
  font-size: clamp(48px, 8vw, 82px);
  line-height: 1;
  color: var(--primary);
}

.hero-text h2 {
  margin: 14px 0 18px;
  font-size: clamp(28px, 4vw, 46px);
}

.hero-text p {
  max-width: 650px;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.hero-actions.center { justify-content: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: .3s ease;
}

.btn:active { transform: scale(.97); }

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 16px 30px rgba(1, 117, 194, .28);
}

.btn.secondary {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--border);
}

.btn:hover { transform: translateY(-3px); }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 40px;
}

.stats div {
  padding: 20px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.stats strong {
  display: block;
  color: var(--secondary);
  font-size: 30px;
}

.stats span {
  color: var(--muted);
  font-size: 14px;
}

.hero-image img {
  width: 370px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin: auto;
  border-radius: 36px;
  border: 8px solid #fff;
  box-shadow: 0 30px 80px rgba(2, 86, 155, .24);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header p {
  color: var(--secondary);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
}

.section-header h2 {
  font-size: clamp(32px, 5vw, 48px);
  margin-top: 8px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about-card { padding: 36px; }
.about-card p { color: var(--muted); font-size: 17px; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.skill-card {
  padding: 28px;
  transition: .3s ease;
}

.skill-card:hover { transform: translateY(-6px); }
.skill-card h3 { color: var(--primary); margin-bottom: 16px; }

.skill-card span,
.portfolio-card span {
  display: inline-block;
  margin: 6px 6px 0 0;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(19, 185, 253, .12);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.experience-card {
  background: #fff;
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: .3s ease;
}

.experience-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(2, 86, 155, .16);
}

.experience-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.experience-header h3 {
  color: var(--primary);
  font-size: 24px;
  line-height: 1.3;
}

.experience-header h4 {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  margin-top: 4px;
}

.experience-header span {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(19, 185, 253, .12);
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
}

.experience-card ul {
  padding-left: 20px;
  color: var(--muted);
}

.experience-card li {
  margin-bottom: 8px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.info-card { padding: 30px; }
.info-card h3 { color: var(--primary); }
.info-card p { color: var(--muted); }

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.portfolio-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: .3s ease;
}

.portfolio-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 70px rgba(2, 86, 155, .2);
}

.portfolio-card:active { transform: scale(.97); }

.portfolio-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: #e2e8f0;
}

.portfolio-content {
  padding: 24px;
}

.portfolio-content h3 {
  color: var(--primary);
  font-size: 24px;
  margin-bottom: 8px;
}

.portfolio-content p {
  color: var(--muted);
  margin-bottom: 12px;
}

.contact-section {
  background: linear-gradient(135deg, rgba(2, 86, 155, .07), rgba(19, 185, 253, .1));
}

.contact-card {
  max-width: 760px;
  margin: auto;
  padding: 36px;
  text-align: center;
}

.contact-card p { color: var(--muted); margin-bottom: 10px; }
.contact-card a { color: var(--primary); font-weight: 800; }

.footer {
  padding: 30px;
  text-align: center;
  background: #fff;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.footer p { color: var(--text); font-weight: 800; }

.portfolio-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, .86);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: .3s ease;
}

.portfolio-modal:target {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-content {
  width: min(1100px, 94vw);
  max-height: 90vh;
  overflow: auto;
  padding: 22px;
  text-align: center;
  border-radius: 28px;
  background: #fff;
  transform: scale(.9);
  transition: .3s ease;
}

.portfolio-modal:target .modal-content {
  transform: scale(1);
}

.modal-content img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 18px;
  background: #f1f5f9;
}

.modal-content h3 {
  margin-top: 18px;
  color: var(--primary);
  font-size: 28px;
}

.modal-content p {
  color: var(--muted);
  font-weight: 800;
}

.modal-close {
  position: fixed;
  top: 24px;
  right: 30px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--primary);
  font-size: 34px;
  font-weight: 900;
  z-index: 1000;
}

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease, transform .8s ease;
}

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

/* Hero entrance animations */
.hero-text .badge {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn .7s ease forwards;
  animation-delay: .3s;
}

.hero-text h1 {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn .7s ease forwards;
  animation-delay: .5s;
}

.hero-text h2 {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn .7s ease forwards;
  animation-delay: .7s;
}

.hero-text > p {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn .7s ease forwards;
  animation-delay: .9s;
}

.hero-actions {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn .7s ease forwards;
  animation-delay: 1.1s;
}

.stats {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn .7s ease forwards;
  animation-delay: 1.3s;
}

.hero-image {
  opacity: 0;
  transform: translateX(40px);
  animation: heroSlideIn .8s ease .6s forwards, float 4s ease-in-out 1.4s infinite;
}

@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroSlideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Header slide down animation */
.header {
  animation: slideDown .6s ease both;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1023px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text p { margin: auto; }
  .hero-actions { justify-content: center; }

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

  .stats {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 767px) {
  .section { padding: 72px 0; }

  .navbar {
    padding: 18px 0;
    flex-direction: column;
    gap: 14px;
  }

  .nav-menu {
    width: 100%;
    overflow-x: auto;
    gap: 14px;
    padding-bottom: 6px;
  }

  .nav-menu a {
    white-space: nowrap;
    font-size: 14px;
  }

  .hero { padding-top: 36px; }
  .hero-image img { width: 280px; }

  .stats,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .about-card,
  .contact-card,
  .experience-card {
    padding: 26px;
  }

  .experience-header {
    flex-direction: column;
  }

  .experience-header span {
    align-self: flex-start;
  }

  .portfolio-content h3 { font-size: 22px; }

  .modal-close {
    top: 14px;
    right: 14px;
  }
}
