:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #eef4ff;
  --text: #172033;
  --muted: #5d6a82;
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --accent: #10b981;
  --border: #dbe3ef;
  --shadow: 0 20px 45px rgba(23, 32, 51, 0.12);
  --radius: 8px;
}


* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  font-family: 'Inter', Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 30rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 42%, #eef4ff 100%);
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

a {
  color: inherit;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(219, 227, 239, 0.85);
  backdrop-filter: blur(18px);
}

.brand {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-dark);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-links a {
  position: relative;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--primary-dark);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  align-items: center;
  gap: clamp(36px, 6vw, 80px);
  width: min(1120px, calc(100% - 36px));
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) 0;
}

.hero-content,
.hero-visual {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.55rem, 7vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy,
.section-copy {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions,
.resume-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
}

.hero-visual::before {
  content: "";
  position: absolute;
  width: min(100%, 360px);
  aspect-ratio: 1;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(16, 185, 129, 0.2));
  transform: rotate(-7deg);
}

.profile-img {
  position: relative;
  width: min(82vw, 320px);
  aspect-ratio: 1;
  object-fit: cover;
  border: 8px solid #ffffff;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

main {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto 56px;
}

.section {
  margin: 28px 0;
  padding: clamp(28px, 5vw, 48px);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(219, 227, 239, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 16px 35px rgba(23, 32, 51, 0.07);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.skills span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 16px;
  color: var(--primary-dark);
  background: var(--surface-soft);
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 24px;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 26px rgba(23, 32, 51, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 20px 42px rgba(23, 32, 51, 0.13);
  transform: translateY(-6px);
}

.card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.card p {
  margin: 12px 0 22px;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 14px 24px rgba(37, 99, 235, 0.25);
}

.button.primary:hover,
.button.primary:focus-visible {
  box-shadow: 0 18px 30px rgba(37, 99, 235, 0.3);
}

.button.secondary,
.project-button {
  color: var(--primary-dark);
  background: #ffffff;
  border-color: var(--border);
}

.button.secondary:hover,
.button.secondary:focus-visible,
.project-button:hover,
.project-button:focus-visible {
  border-color: rgba(37, 99, 235, 0.45);
  background: var(--surface-soft);
}

.project-button {
  width: 100%;
  margin-top: auto;
  cursor: default;
}

.project-button:hover {
  transform: none;
}

.contact-section {
  background: linear-gradient(135deg, #12213d, #173b64);
  color: #ffffff;
}

.contact-section .eyebrow,
.contact-section .section-copy {
  color: #cfe1ff;
}

.contact-section .button.secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
}

.contact-section .button.secondary:hover,
.contact-section .button.secondary:focus-visible {
  background: rgba(255, 255, 255, 0.16);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    text-align: center;
  }

  .hero-copy,
  .section-copy {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions,
  .resume-actions,
  .contact-actions,
  .skills {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .profile-img {
    width: min(72vw, 260px);
  }

  .project-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 124px;
  }

  .navbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  .nav-links {
    width: 100%;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-links a {
    display: inline-flex;
    white-space: nowrap;
    padding: 6px 2px;
  }

  .hero,
  main {
    width: min(100% - 28px, 1120px);
  }

  .section {
    padding: 24px 18px;
  }

  .button {
    width: 100%;
  }

}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
