:root {
  --bg-main: #04163f;
  --bg-deep: #020b20;
  --bg-card: rgba(255, 255, 255, 0.06);
  --bg-card-border: rgba(173, 212, 255, 0.24);
  --text-main: #ffffff;
  --text-soft: rgba(236, 244, 255, 0.86);
  --accent: #8cd3ff;
  --shadow-strong: 0 20px 44px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at 10% 8%, #123378 0%, var(--bg-main) 36%, var(--bg-deep) 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.cursor-glow {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.28;
  background: radial-gradient(circle, rgba(255, 150, 47, 0.22) 0%, rgba(255, 150, 47, 0) 70%);
  transform: translate(-50%, -50%);
}

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.2;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 0.6px, transparent 0.6px);
  background-size: 4px 4px;
  pointer-events: none;
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(32px);
  z-index: -1;
}

.bg-shape-1 {
  width: 420px;
  height: 420px;
  background: rgba(74, 130, 255, 0.2);
  top: -110px;
  right: -80px;
}

.bg-shape-2 {
  width: 350px;
  height: 350px;
  background: rgba(58, 99, 194, 0.25);
  left: -120px;
  bottom: 14%;
}

.container {
  width: min(960px, calc(100% - 2rem));
  margin-inline: auto;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  background: rgba(4, 22, 63, 0.72);
  backdrop-filter: blur(8px);
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.logo {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-main);
  border: 1px solid var(--bg-card-border);
  border-radius: 50%;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.94;
}

.nav a:hover,
.nav a:focus-visible {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav a.is-active {
  color: #ff962f;
}

.section {
  margin-top: 2rem;
}

main section[id] {
  scroll-margin-top: 108px;
}

.hero {
  padding: 3.4rem 0 1.6rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.2rem;
  align-items: center;
}

.accent-text {
  color: #ff962f;
}

.kicker {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: 0.86rem;
  margin-bottom: 0.65rem;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  margin-bottom: 0.95rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

h3 {
  font-size: 1.12rem;
}

.lead {
  max-width: 72ch;
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.68;
  margin: 1rem 0 0;
}

.hero-cta {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.social-mini {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
}

.icon-link {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-main);
  border: 1px solid var(--bg-card-border);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  font-weight: 700;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.icon-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.icon-link:hover,
.icon-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 166, 76, 0.75);
  background: rgba(255, 255, 255, 0.08);
}

.hero-avatar-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.hero-avatar {
  width: min(360px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 3px solid rgba(255, 150, 47, 0.65);
  box-shadow: 0 0 0 12px rgba(17, 43, 102, 0.52), var(--shadow-strong);
  object-fit: cover;
}

.hero-avatar--portrait {
  object-position: 50% 26%;
  transform: scale(1.07);
}

.experience-chip {
  position: absolute;
  right: 0;
  bottom: 10%;
  background: rgba(10, 28, 74, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 0.5rem 0.72rem;
  font-size: 0.88rem;
}

.experience-chip strong {
  color: #ff962f;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.72rem 1.15rem;
  text-decoration: none;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #003e9f;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-ghost {
  color: var(--text-main);
  border: 1px solid var(--bg-card-border);
  background: rgba(255, 255, 255, 0.04);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 14px;
  padding: 1.2rem;
  box-shadow: var(--shadow-strong);
}

.section-note {
  margin-bottom: 0.85rem;
  font-size: 0.94rem;
}

p {
  margin: 0;
  line-height: 1.62;
  color: var(--text-soft);
}

.about-block + .about-block {
  margin-top: 1rem;
}

.about-block h3 {
  margin-bottom: 0.55rem;
}

.skills-layout {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: 1rem;
}

.skill-bars {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.72rem;
}

.skill-row {
  display: grid;
  gap: 0.35rem;
}

.skill-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.92rem;
}

.skill-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.skill-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff962f, #ffb566);
  transition: width 900ms ease;
}

.skills-side {
  display: grid;
  gap: 1rem;
}

.chips-grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.chips-grid span {
  border: 1px solid var(--bg-card-border);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9px;
  padding: 0.55rem;
  font-size: 0.9rem;
}

.lang-line {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.35rem;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

ul {
  margin: 0.7rem 0 0;
  padding-left: 1.2rem;
  color: var(--text-soft);
}

li {
  margin-bottom: 0.52rem;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.about-pillars {
  margin-top: 0.6rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.about-pillars__item {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 0.95rem;
}

.about-pillars__kicker {
  margin: 0 0 0.4rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.82rem;
}

.about-pillars__item h3 {
  margin-bottom: 0.5rem;
}

.portfolio-filters {
  margin-bottom: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  border: 1px solid var(--bg-card-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.skills-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.95rem;
}

.skills-panel__head .btn-ghost {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.edu-events h3 {
  margin-bottom: 0.95rem;
}

.skills-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-filter-btn {
  border: 1px solid var(--bg-card-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.skill-filter-btn.is-active {
  background: rgba(255, 150, 47, 0.2);
  border-color: rgba(255, 166, 76, 0.8);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 0.7rem;
}

@media (max-width: 1100px) {
  .skills-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .skills-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.skill-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.38rem 0.4rem;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  color: var(--text-main);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.skill-tile img {
  max-width: 100%;
  height: auto;
  display: block;
}

.skill-tile__icon {
  width: 19px;
  height: 19px;
}

.skill-tile__brand {
  width: 19px;
  height: 19px;
  object-fit: contain;
}

.skill-tile__brand--wide {
  width: 25px;
  height: 19px;
  object-fit: contain;
}

.skill-tile__brand--icon-only {
  width: 19px;
  height: 19px;
  object-fit: cover;
  object-position: 33% 50%;
  border-radius: 5px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skill-tile__icon--mono {
  filter: invert(1);
}

.skill-tile__svg {
  width: 19px;
  height: 19px;
}

.skill-tile__label {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 0.85rem;
  line-height: 1.15;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-tile[aria-label="TestNG"] .skill-tile__icon {
  width: 24px !important;
  height: 24px !important;
}

.skill-tile[aria-label="TestNG"] img {
  width: 24px !important;
  height: 24px !important;
  max-width: none !important;
  object-fit: contain !important;
}

/* Force TestNG icon size */
a.skill-tile[aria-label="TestNG"] img.skill-tile__icon {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  min-width: 24px !important;
}

.skill-tile:hover,
.skill-tile:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(168, 225, 255, 0.75);
  background: rgba(255, 255, 255, 0.06);
}

.skill-tile.is-hidden {
  display: none;
}

.filter-btn.is-active {
  background: rgba(255, 150, 47, 0.2);
  border-color: rgba(255, 166, 76, 0.8);
}

.project-card.is-hidden {
  display: none;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-card__kicker {
  margin: 0;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.78rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.project-tags span {
  border: 1px solid var(--bg-card-border);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 0.35rem 0.68rem;
  font-size: 0.82rem;
  color: var(--text-main);
}

.project-card--interactive {
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.project-card--interactive:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 225, 255, 0.8);
  background: rgba(255, 255, 255, 0.09);
}

.card-action {
  border: 1px solid var(--bg-card-border);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 0.48rem 0.8rem;
  font-weight: 700;
  width: fit-content;
  cursor: pointer;
}

.card-action:hover {
  background: rgba(140, 211, 255, 0.18);
}

.project-card a,
.contacts-grid a {
  color: var(--text-main);
}

.project-card a {
  text-underline-offset: 4px;
}

.project-card a:hover {
  opacity: 0.9;
}

.education-layout {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: 1.1rem;
}

.edu-events {
  display: flex;
  flex-direction: column;
}

.edu-timeline .timeline-list {
  margin-top: 0.8rem;
  border-left: 2px solid rgba(255, 255, 255, 0.16);
  padding-left: 0.95rem;
  display: grid;
  gap: 0.75rem;
}

.timeline-item h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.edu-story .section-note {
  margin-top: 0.6rem;
  margin-bottom: 1rem;
}

.track-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.95rem;
}

.track-item {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.9rem 0.95rem;
}

.track-stage {
  margin-bottom: 0.22rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
}

.track-item h4 {
  margin: 0;
  font-size: 1rem;
}

.track-item p + p {
  margin-top: 0.45rem;
}

.track-item--active {
  border-color: rgba(255, 166, 76, 0.75);
  background: linear-gradient(135deg, rgba(255, 150, 47, 0.14), rgba(255, 255, 255, 0.05));
  box-shadow: inset 0 0 0 1px rgba(255, 166, 76, 0.22);
}

.period {
  color: var(--accent);
  font-size: 0.75rem;
  line-height: 1.1;
  margin-bottom: 0.18rem;
}

.contacts-grid {
  display: grid;
  gap: 0.65rem;
}

.contacts-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-card {
  border: 1px solid var(--bg-card-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.75rem;
  text-decoration: none;
  display: grid;
  gap: 0.2rem;
  transition: transform 180ms ease, border-color 180ms ease;
}

.contact-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 166, 76, 0.75);
}

.contact-card span {
  font-size: 0.83rem;
  opacity: 0.82;
}

.contact-card strong {
  font-size: 1rem;
}

.quote {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-main);
}

.quote-author {
  margin-top: 0.1rem;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.quote-meta {
  margin-top: 0.9rem;
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.quote-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ff962f;
  color: #1f170f;
  font-weight: 800;
}

.quote-role {
  font-size: 0.88rem;
  opacity: 0.9;
}

.recommendation-link {
  margin-top: 0.9rem;
  display: inline-block;
  color: #ff962f;
  text-decoration: none;
}

.quote-secondary {
  margin-top: 1rem;
}

.skills-heading {
  margin-top: 1rem;
  margin-bottom: 0.65rem;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skills-tags span {
  border: 1px solid var(--bg-card-border);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.87rem;
  color: var(--text-main);
}

.footer {
  padding: 2rem 0 2.4rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: var(--text-main);
}

.footer-tagline {
  margin-top: 0.3rem;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.footer-links {
  display: flex;
  gap: 0.6rem;
}

.footer p {
  font-size: 0.92rem;
  opacity: 0.92;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
  z-index: 30;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 8, 24, 0.72);
  backdrop-filter: blur(5px);
}

.modal-dialog {
  position: relative;
  width: min(560px, calc(100% - 2rem));
  background: #071a4b;
  border: 1px solid rgba(163, 221, 255, 0.45);
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: var(--shadow-strong);
}

.modal-content {
  color: var(--text-soft);
  line-height: 1.65;
}

.modal-content p {
  margin: 0.75rem 0 0;
}

.modal-content ul {
  margin: 0.85rem 0 0;
  padding-left: 1.15rem;
}

.modal-content li + li {
  margin-top: 0.35rem;
}

.modal-content a {
  color: #ffb15f;
  text-underline-offset: 4px;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 900px) {
  .grid-two,
  .project-grid,
  .hero-grid,
  .skills-layout,
  .education-layout,
  .contacts-grid-2 {
    grid-template-columns: 1fr;
  }

  .about-pillars {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding-top: 2.2rem;
  }

  .hero-avatar--portrait {
    object-position: 50% 24%;
    transform: scale(1.05);
  }

  .experience-chip {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    bottom: -14px;
  }

  .cursor-glow {
    display: none;
  }
}
