:root {
  --bg: #07111f;
  --bg-soft: #0c1728;
  --surface: rgba(10, 20, 36, 0.86);
  --surface-strong: rgba(13, 26, 46, 0.95);
  --surface-soft: rgba(15, 33, 56, 0.9);
  --text: #edf4ff;
  --muted: #9db1c8;
  --accent: #3ab5ff;
  --accent-bright: #77d1ff;
  --accent-dark: #0d8cd6;
  --border: rgba(110, 157, 207, 0.2);
  --shadow: 0 24px 50px rgba(1, 8, 18, 0.45);
  --shadow-strong: 0 30px 60px rgba(2, 10, 22, 0.65);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(58, 181, 255, 0.14), transparent 26%),
    radial-gradient(circle at top right, rgba(64, 224, 255, 0.08), transparent 22%),
    linear-gradient(180deg, #08111f 0%, var(--bg-soft) 45%, var(--bg) 100%);
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 1rem 1rem 0.25rem;
}

.navbar {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 1rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(7, 17, 31, 0.82);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(2, 10, 22, 0.4);
  backdrop-filter: blur(16px);
}

.brand {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--accent-bright);
}

.menu-toggle {
  display: none;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(12, 23, 40, 0.95);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 1.15rem;
  height: 2px;
  margin: 0.27rem auto;
  background: var(--text);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

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

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

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

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

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

.page {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 5rem;
}

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

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

.hero,
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero {
  min-height: 72vh;
  padding: 5.5rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto auto -30% -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(58, 181, 255, 0.12), transparent 68%);
  pointer-events: none;
}

.eyebrow,
.section-label {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 13ch;
  margin-bottom: 1.25rem;
  font-size: clamp(3rem, 8vw, 5.3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.96;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

h3 {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.intro,
.section-card p,
.skill-card p,
.learning-card p,
.project-card p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.04rem;
}

.intro {
  max-width: 44rem;
  margin-bottom: 0;
  font-size: 1.1rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 180px;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.22s ease, background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.button:focus {
  outline: none;
  box-shadow: none;
}

.button svg {
  width: 1rem;
  height: 1rem;
  display: block;
}

.icon-button {
  min-width: 0;
  width: 3.4rem;
  height: 3.4rem;
  padding: 0;
  border-radius: 18px;
}

.icon-button svg {
  width: 1.2rem;
  height: 1.2rem;
}

.icon-button:hover {
  color: var(--accent-bright);
  border-color: rgba(119, 209, 255, 0.42);
  box-shadow: 0 0 0 1px rgba(58, 181, 255, 0.1), 0 14px 26px rgba(58, 181, 255, 0.16);
}

.button:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 26px rgba(58, 181, 255, 0.16);
}

.button:active {
  transform: scale(0.98);
}

.primary {
  background: rgba(7, 17, 31, 0.76);
  color: var(--text);
  border-color: var(--border);
}

.primary:hover {
  background: linear-gradient(135deg, #1390d7, var(--accent-bright));
  color: #03101d;
}

.secondary {
  background: rgba(7, 17, 31, 0.76);
  color: var(--text);
  border-color: var(--border);
}

.secondary:hover {
  background: linear-gradient(135deg, #1390d7, var(--accent-bright));
  color: #03101d;
}

.hero-note {
  min-height: 1.5rem;
  margin-bottom: 0;
  color: var(--accent-bright);
  font-weight: 600;
}

.section-card {
  margin-top: 2rem;
  padding: 2.75rem;
}

#projects.section-card {
  margin-top: 3rem;
  padding: 3rem;
  box-shadow: 0 28px 60px rgba(2, 10, 22, 0.62);
}

.section-heading {
  margin-bottom: 2rem;
  text-align: center;
}

.about-grid,
.projects-grid,
.skills-grid,
.learning-grid,
.current-learning-grid {
  display: grid;
  gap: 1.5rem;
}

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

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

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

.current-learning-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.5rem;
}

.section-intro {
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}

.project-card,
.skill-card,
.learning-card {
  padding: 1.6rem;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.project-card {
  transition: all 0.25s ease;
}

.project-card:hover,
.project-card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(119, 209, 255, 0.28);
  background: var(--surface-strong);
  box-shadow: 0 16px 30px rgba(58, 181, 255, 0.12);
}

.skill-card,
.learning-card {
  transition: all 0.2s ease;
}

.skill-card:hover,
.learning-card:hover {
  transform: translateY(-5px);
  border-color: rgba(119, 209, 255, 0.32);
  background: var(--surface-strong);
  box-shadow: var(--shadow-strong);
}

.section-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.section-card:hover {
  transform: translateY(-4px);
  border-color: rgba(119, 209, 255, 0.24);
  box-shadow: 0 26px 54px rgba(2, 10, 22, 0.58);
}

.featured-project {
  position: relative;
  background:
    linear-gradient(180deg, rgba(17, 37, 63, 0.98), rgba(12, 26, 44, 0.94));
  border-color: rgba(119, 209, 255, 0.34);
  box-shadow:
    0 0 0 1px rgba(58, 181, 255, 0.08),
    0 30px 60px rgba(2, 10, 22, 0.72);
}

.featured-project::before {
  content: "Featured";
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(119, 209, 255, 0.26);
  border-radius: 999px;
  background: rgba(7, 17, 31, 0.88);
  color: var(--accent-bright);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-card h3,
.skill-card h3,
.learning-card h3 {
  margin-bottom: 0.85rem;
}

.project-details {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.project-details li {
  margin-bottom: 0.45rem;
  line-height: 1.6;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  padding: 0.72rem 1rem;
  border: 1px solid rgba(119, 209, 255, 0.24);
  border-radius: 999px;
  color: var(--accent-bright);
  background: rgba(8, 17, 31, 0.72);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.22s ease, border-color 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease;
}

.project-link:hover,
.project-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(119, 209, 255, 0.42);
  background: linear-gradient(135deg, #1390d7, var(--accent-bright));
  color: #03101d;
  box-shadow: 0 12px 22px rgba(58, 181, 255, 0.14);
}

.contact-link {
  color: var(--accent-bright);
  font-weight: 700;
  text-decoration: none;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.contact-card .project-details {
  display: inline-block;
  text-align: left;
  margin-top: 0;
}

.contact-link:hover,
.contact-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.contact-card {
  text-align: center;
}

#home,
#about,
#skills,
#projects,
#learning,
#contact {
  scroll-margin-top: 7rem;
}

.site-footer {
  padding: 0 1rem 2rem;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 980px) {
  .projects-grid,
  .skills-grid,
  .learning-grid,
  .current-learning-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .page {
    padding: 2rem 0 4rem;
  }

  .hero {
    min-height: auto;
    padding: 4.25rem 1.75rem;
  }

  .section-card {
    padding: 2rem;
  }

  #projects.section-card {
    margin-top: 2.5rem;
    padding: 2.4rem;
  }

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

  h2 {
    font-size: clamp(1.8rem, 5vw, 2.4rem);
  }

  .about-grid,
  .projects-grid,
  .skills-grid,
  .learning-grid,
  .current-learning-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 0.75rem 0.75rem 0;
  }

  .navbar {
    flex-wrap: wrap;
    padding: 0.9rem 1rem;
  }

  .menu-toggle {
    display: inline-block;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.25rem;
    padding-top: 0.4rem;
    text-align: center;
  }

  .nav-links.nav-open {
    display: flex;
  }

  .nav-links a {
    padding: 0.7rem 0;
  }

  .page {
    width: min(100% - 1rem, 1080px);
    padding: 1rem 0 3rem;
  }

  .hero,
  .section-card {
    border-radius: 22px;
  }

  .hero {
    padding: 3rem 1.25rem;
  }

  .section-card {
    padding: 1.6rem;
  }

  #projects.section-card {
    margin-top: 2.2rem;
    padding: 1.85rem;
  }

  .featured-project::before {
    top: 0.9rem;
    right: 0.9rem;
  }

  h1 {
    font-size: clamp(2.15rem, 10vw, 3rem);
    margin-bottom: 1rem;
  }

  h2 {
    font-size: clamp(1.6rem, 7vw, 2rem);
  }

  .intro,
  .section-card p,
  .skill-card p,
  .learning-card p,
  .project-card p {
    font-size: 1rem;
    line-height: 1.7;
  }

  .section-heading {
    margin-bottom: 1.4rem;
  }

  .actions {
    flex-direction: column;
    width: 100%;
  }

  .button {
    width: 100%;
  }

  .icon-button {
    width: 3.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .button,
  .project-card,
  .skill-card,
  .learning-card,
  .project-link,
  .nav-links a::after,
  .menu-toggle span {
    transition: none;
  }

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