:root {
  --bg-dark: #060b11;
  --bg-hero: #050910;
  --accent: #00c0a3;
  --accent-soft: #0b9181;
  --text-main: #f7f7f7;
  --text-muted: #c1c6d0;
  --btn-primary: #f3a41c;
  --btn-primary-hover: #ffb939;
  --btn-outline-border: #2a3744;
  --nav-link: #e3e5ea;
  --nav-link-active: #f3a41c;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-snap-type: y mandatory;
}

/* Main scrollbar – vertical glass style */
html {
  scrollbar-width: thin;
  scrollbar-color: #0b9181 #2a3d35;
}

html::-webkit-scrollbar {
  width: 12px;
}

html::-webkit-scrollbar-track {
  background: linear-gradient(
    180deg,
    #2d4038 0%,
    #1e2e28 50%,
    #182822 100%
  );
  border-radius: 6px;
  margin: 4px 0;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.4);
}

html::-webkit-scrollbar-thumb {
  background: radial-gradient(
    ellipse 70% 70% at 50% 30%,
    #2dd4b4 0%,
    #1ab399 35%,
    #0b9181 70%,
    #077a6b 100%
  );
  border: 3px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  min-height: 48px;
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.25),
    inset 0 -1px 2px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(0, 0, 0, 0.1);
}

html::-webkit-scrollbar-thumb:hover {
  background: radial-gradient(
    ellipse 70% 70% at 50% 30%,
    #3ee0c4 0%,
    #00c0a3 35%,
    #0b9181 70%,
    #088f7a 100%
  );
  border-color: rgba(255, 255, 255, 0.65);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Play", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    radial-gradient(ellipse 120% 80% at 20% 0%, rgba(15, 45, 70, 0.5) 0%, transparent 50%),
    radial-gradient(ellipse 100% 60% at 80% 100%, rgba(0, 80, 90, 0.25) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, #0d1520 0%, #060b12 40%, #030508 100%);
  color: var(--text-main);
}

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

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

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: linear-gradient(to bottom, rgba(3, 6, 12, 0.98), rgba(3, 6, 12, 0.9), transparent);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0;
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2.25rem;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--nav-link);
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

.main-nav a.active {
  color: var(--nav-link-active);
  font-weight: 500;
}

.main-nav .nav-cta {
  min-width: 0;
  padding: 0.4rem 10px;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 0.35rem;
  color: #131313;
}

.main-nav .nav-cta:hover {
  color: #131313;
}

.main-nav .nav-cta.active {
  color: #131313;
  background-color: var(--btn-primary-hover);
}

/* Desktop: overlay is a transparent bar so nav appears in header area */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1120px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 1.5rem;
  box-sizing: border-box;
  z-index: 21;
  background: transparent;
  pointer-events: none;
  visibility: visible;
  opacity: 1;
}

.nav-overlay .main-nav {
  pointer-events: auto;
}

.nav-close-btn {
  display: none;
}

.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: none;
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.burger-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent);
}

.burger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger-btn[aria-expanded="true"] .burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger-btn[aria-expanded="true"] .burger-line:nth-child(2) {
  opacity: 0;
}

.burger-btn[aria-expanded="true"] .burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  position: relative;
  min-height: 100vh;
  padding-top: 140px;
  padding-bottom: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("../img/hero-bg.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    rgba(9, 12, 17, 0.35),
    radial-gradient(circle at top center, rgba(0, 192, 163, 0.2), transparent 60%),
    radial-gradient(circle at bottom, rgba(0, 0, 0, 0.6), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  text-align: center;
  z-index: 2;
}

.hero-avatar-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.hero-avatar-ring {
  padding: 6px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(0, 192, 163, 0.12), transparent 25%);
  box-shadow: 0 0 18px rgba(0, 192, 163, 0.2);
}

.hero-avatar-ring.hero-focus-area:hover,
.hero-avatar-ring.hero-focus-area:focus {
  animation: avatar-bounce 0.55s ease;
}

@keyframes avatar-bounce {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); }
  55% { transform: scale(0.96); }
  75% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.hero-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(2, 8, 15, 0.9);
}

.hero-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  font-weight: 600;
  cursor: default;
}

.hero-title:focus,
.hero-title--hired {
  cursor: pointer;
}

.hero-focus-area:hover,
.hero-focus-area:focus {
  cursor: pointer;
  outline: none;
}

.hero-title--hired:hover {
  color: var(--accent);
}

.hero-title-main--button {
  display: inline-block;
  background-color: var(--btn-primary);
  color: #131313;
  font-weight: 700;
  padding: 0.12em 0.4em;
  border-radius: 0.35rem;
  margin-right: 0;
  vertical-align: baseline;
  line-height: inherit;
}

.hero-title--hired:hover .hero-title-main--button {
  background-color: var(--btn-primary-hover);
}

.hero-title .hero-title-cursor {
  display: none;
  margin-left: 1px;
  color: var(--accent);
}

.hero-title .hero-title-cursor.hero-title-cursor--blink {
  animation: blink 0.7s step-end infinite;
  letter-spacing: 0.02em;
}

.accent {
  color: var(--accent);
}

.hero-subtitle {
  max-width: 640px;
  margin: 0 auto 2.25rem;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-muted);
  min-height: 3.4em;
}

.hero-subtitle-typed {
  display: inline;
}

.hero-subtitle-cursor {
  display: inline-block;
  animation: blink 0.7s step-end infinite;
  margin-left: 2px;
  color: var(--accent);
}

.hero-subtitle-cursor--stopped {
  animation: none;
  opacity: 1;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  padding: 0.85rem 2.5rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

.btn--with-icon {
  gap: 0.5rem;
}

.btn-icon {
  flex-shrink: 0;
}

.btn-primary {
  background-color: var(--btn-primary);
  color: #131313;
  box-shadow: 0 6px 16px rgba(243, 164, 28, 0.25);
}

.btn-primary:hover {
  background-color: var(--btn-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(243, 164, 28, 0.3);
}

.btn-outline {
  position: relative;
  overflow: hidden;
  background-color: rgba(5, 11, 20, 0.85);
  color: var(--text-main);
  border-color: var(--btn-outline-border);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.btn-outline::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 40%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.08) 60%,
    transparent 100%
  );
  pointer-events: none;
  animation: btn-shine 10s ease-in-out infinite;
}

@keyframes btn-shine {
  0% { transform: translateX(0); }
  15% { transform: translateX(350%); }
  100% { transform: translateX(0); }
}

.btn-outline:hover {
  border-color: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-1px);
}

/* About Me */
.about {
  position: relative;
  min-height: 100vh;
  padding: 5rem 0;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
}

.about-bg {
  position: absolute;
  inset: 0;
  background:
    url("../img/pattern-1.png") right bottom no-repeat,
    radial-gradient(ellipse 80% 50% at 85% 100%, rgba(0, 192, 163, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 90% 95%, rgba(20, 217, 195, 0.06) 0%, transparent 40%);
  pointer-events: none;
}

.about-inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.about-title {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  text-align: center;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.about-intro {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-main);
}

.about-goal {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
}

.about-qualities {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
}

.about-qualities li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.about-qualities li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.about-skills {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-skills-label {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-main);
}

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

.skills-grid .skill {
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.skills-grid.skills-grid--visible .skill {
  opacity: 1;
  transform: scale(1);
}

.skills-grid.skills-grid--visible .skill:nth-child(1) { transition-delay: 0.05s; }
.skills-grid.skills-grid--visible .skill:nth-child(2) { transition-delay: 0.1s; }
.skills-grid.skills-grid--visible .skill:nth-child(3) { transition-delay: 0.15s; }
.skills-grid.skills-grid--visible .skill:nth-child(4) { transition-delay: 0.2s; }
.skills-grid.skills-grid--visible .skill:nth-child(5) { transition-delay: 0.25s; }
.skills-grid.skills-grid--visible .skill:nth-child(6) { transition-delay: 0.3s; }
.skills-grid.skills-grid--visible .skill:nth-child(7) { transition-delay: 0.35s; }
.skills-grid.skills-grid--visible .skill:nth-child(8) { transition-delay: 0.4s; }
.skills-grid.skills-grid--visible .skill:nth-child(9) { transition-delay: 0.45s; }
.skills-grid.skills-grid--visible .skill:nth-child(10) { transition-delay: 0.5s; }
.skills-grid.skills-grid--visible .skill:nth-child(11) { transition-delay: 0.55s; }
.skills-grid.skills-grid--visible .skill:nth-child(12) { transition-delay: 0.6s; }

.skill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.6rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  text-align: center;
}

.skill--icon {
  gap: 0;
  background: none;
  border: none;
  padding: 0;
  width: 4.5rem;
  height: 4.5rem;
  perspective: 320px;
}

.skill-flip {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}

.skill--icon:hover .skill-flip {
  transform: rotateY(180deg);
}

.skill-front,
.skill-back {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.skill-back {
  transform: rotateY(180deg);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
  text-align: center;
  padding: 0.25rem;
}

.skill-icon {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  flex-shrink: 0;
}

.about-actions {
  text-align: center;
}

.about-actions .btn {
  min-width: 180px;
  margin-top: 20px;
}

/* Projects */
.projects {
  position: relative;
  min-height: 100vh;
  padding: 5rem 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-image: url("../img/obs-app.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}

.projects::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(4, 10, 18, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.projects-inner {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.projects-inner .project-card {
  margin-top: auto;
  margin-bottom: auto;
}

.projects-title {
  margin: 0 0 2rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  text-align: center;
  color: var(--text-main);
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: stretch;
}

@media (max-width: 768px) {
  .project-card {
    grid-template-columns: 1fr;
  }
}

.project-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.project-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.project-name a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-main);
  transition: color 0.2s ease;
}

.project-name a:hover {
  color: var(--accent);
}

.project-link-icon {
  display: inline-flex;
  opacity: 0.8;
}

.project-desc {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.project-tech-item {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.35rem;
}

.project-preview-wrap {
  display: flex;
  align-items: center;
  border-radius: 0.75rem;
  overflow: visible;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  min-height: 100%;
  background: transparent;
}

.project-preview-wrap .project-preview {
  width: 100%;
}

.project-preview {
  position: relative;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
}

.project-preview-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.project-preview-wrap.project-preview-wrap--visible .project-preview-img {
  opacity: 1;
  transform: translateY(0);
}

.project-preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem;
  background: transparent;
  color: #fff;
  text-align: center;
  pointer-events: none;
}

.project-preview-headline {
  margin: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
}

.project-preview-sub {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.95;
}

.project-preview-cta {
  margin-top: 0.5rem;
}

/* Portfolio / Design Gallery */
.portfolio {
  position: relative;
  min-height: 100vh;
  padding: 5rem 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
}

.portfolio::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 120% 70% at 50% 110%, rgba(0, 192, 163, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(20, 217, 195, 0.15) 0%, transparent 45%);
  pointer-events: none;
}

.portfolio-inner {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  overflow: visible;
}

.portfolio-title {
  margin: 0 0 2rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  text-align: center;
  color: var(--text-main);
}

/* Coverflow slider */
.coverflow {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 3rem;
  overflow: visible;
}

.coverflow-viewport {
  perspective: 1200px;
  overflow: hidden;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coverflow-track {
  position: relative;
  width: 100%;
  height: 560px;
  transform-style: preserve-3d;
  perspective-origin: 50% 50%;
}

.coverflow-slide {
  position: absolute;
  width: 480px;
  left: 50%;
  top: 50%;
  margin-left: -240px;
  margin-top: -180px;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.45s ease, opacity 0.35s ease;
  backface-visibility: hidden;
  cursor: pointer;
}

.coverflow-slide img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top center;
  background: #0a0e14;
}

.coverflow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(120, 160, 220, 0.2);
  background: rgba(15, 28, 48, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 4px 20px rgba(0, 0, 0, 0.25);
  color: var(--text-main);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.coverflow-btn:hover {
  background: rgba(20, 45, 70, 0.55);
  border-color: rgba(0, 192, 163, 0.4);
  color: var(--accent);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 20px rgba(0, 192, 163, 0.15),
    0 4px 20px rgba(0, 0, 0, 0.25);
}

.coverflow-prev {
  left: calc(-52px - 20px);
}

.coverflow-next {
  right: calc(-52px - 20px);
}

@media (max-width: 600px) {
  .coverflow {
    padding: 0;
    max-width: 100%;
  }

  .coverflow-viewport {
    min-height: 380px;
    width: 100%;
  }

  .coverflow-track {
    height: 380px;
    width: 100%;
  }

  .coverflow-slide {
    width: 100%;
    margin-left: -50%;
    margin-top: -135px;
    box-sizing: border-box;
  }

  .coverflow-btn {
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
    top: auto;
    bottom: -2.75rem;
    transform: none;
  }

  .coverflow-prev {
    left: 0.5rem;
    right: auto;
  }

  .coverflow-next {
    right: 0.5rem;
    left: auto;
  }
}

/* Gallery modal */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.gallery-modal[hidden] {
  display: none;
}

.gallery-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.gallery-modal--zoomed .gallery-modal-backdrop {
  opacity: 1;
}

.gallery-modal-dialog {
  position: fixed;
  left: var(--dialog-start-left, 50%);
  top: var(--dialog-start-top, 50%);
  width: var(--dialog-start-width, 90%);
  height: var(--dialog-start-height, auto);
  max-width: 900px;
  max-height: calc(100vh - 3rem);
  margin: 0;
  transform: var(--dialog-start-transform, translate(-50%, -50%));
  background: var(--bg-dark);
  border-radius: 0.5rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  cursor: default;
  transition: left 0.4s ease, top 0.4s ease, width 0.4s ease, height 0.4s ease, transform 0.4s ease, border-radius 0.35s ease;
}

.gallery-modal--zoomed .gallery-modal-dialog {
  left: 50%;
  top: 50%;
  width: 90%;
  height: auto;
  max-height: calc(100vh - 3rem);
  transform: translate(-50%, -50%);
}

.gallery-modal-dialog .gallery-modal-body {
  height: 100%;
  overflow: hidden;
}

.gallery-modal--zoomed .gallery-modal-dialog .gallery-modal-body {
  height: auto;
  min-height: calc(100vh - 3rem);
  overflow-y: auto;
  overflow-x: hidden;
}

.gallery-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.3s ease;
}

.gallery-modal--zoomed .gallery-modal-close {
  opacity: 1;
  pointer-events: auto;
}

.gallery-modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
  color: var(--accent);
}

.gallery-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100vh - 3rem);
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.gallery-modal-dialog .gallery-modal-body img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.gallery-modal--zoomed .gallery-modal-body img {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: none;
  margin-left: auto;
  margin-right: auto;
  margin-top: auto;
  margin-bottom: auto;
}

/* Testimonials */
.testimonials {
  position: relative;
  min-height: 100vh;
  padding: 5rem 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.testimonials::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(20, 60, 100, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(0, 120, 130, 0.2) 0%, transparent 50%),
    linear-gradient(180deg, #0c1628 0%, #070d18 35%, #040810 100%);
  pointer-events: none;
}

.testimonials-inner {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
}

.testimonials-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  text-align: center;
  color: var(--text-main);
}

.testimonials-subtitle {
  margin: 0 0 2.5rem;
  font-size: 0.95rem;
  text-align: center;
  color: var(--text-muted);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.testimonial-card {
  position: relative;
  margin: 0;
  padding: 1.75rem;
  background: rgba(15, 28, 48, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(120, 160, 220, 0.15);
  border-radius: 1rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 4px 24px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.testimonial-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(80, 130, 200, 0.06) 0%, transparent 100%);
  pointer-events: none;
}

.testimonial-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.testimonial-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.02em;
  overflow: hidden;
}

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

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.testimonial-name {
  font-style: normal;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-main);
}

.testimonial-role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.testimonial-quote {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

/* Contact */
.contact {
  position: relative;
  min-height: 100vh;
  padding: 5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.contact-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(0, 192, 163, 0.06) 0%, transparent 55%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}

.contact-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 560px;
}

.contact-title {
  margin: 0 0 0.75rem;
  font-size: clamp(2.5rem, 5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-main);
}

.contact-subtitle {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  color: var(--text-muted);
}

.contact-actions {
  text-align: center;
  margin-bottom: 2.5rem;
}

.contact-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-main);
  transition: color 0.2s ease, transform 0.2s ease;
}

a.contact-item:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.contact-item--plain {
  cursor: default;
}

.contact-icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--accent);
}

.contact-item:hover .contact-icon {
  color: var(--accent);
}

.contact-text {
  font-size: 1rem;
}

/* Footer */
.site-footer {
  padding: 1.5rem 0;
  min-height: 120px;
  background: rgba(3, 8, 14, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

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

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

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

@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 768px) {
  /* Lock scroll when menu open */
  html.nav-open {
    overflow: hidden;
  }

  .burger-btn {
    display: flex;
    position: relative;
    z-index: 10002;
  }

  /*
   * Mobile menu: overlay is a direct child of body so position:fixed
   * is relative to the viewport. Full viewport cover (top to bottom).
   */
  .nav-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    transform: none;
    z-index: 10001;
    background: #040c16;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: visibility 0.25s ease, opacity 0.25s ease;
  }

  body.menu-open .nav-overlay {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .nav-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10002;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 0.35rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
    cursor: pointer;
    pointer-events: auto;
    transition: background 0.2s ease, color 0.2s ease;
  }

  .nav-close-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: var(--accent);
  }

  .nav-close-icon {
    font-size: 1.75rem;
    line-height: 1;
    font-weight: 300;
  }

  .nav-overlay .main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 5rem 1.5rem 2rem;
    box-sizing: border-box;
  }

  .nav-overlay .main-nav ul {
    flex-direction: column;
    gap: 0;
    align-items: center;
    font-size: 1.25rem;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 320px;
    list-style: none;
    box-sizing: border-box;
  }

  .nav-overlay .main-nav li {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav-overlay .main-nav a {
    display: block;
    padding: 1rem 1.5rem;
  }

  .nav-overlay .main-nav .nav-cta {
    margin: 1rem 0 0;
    padding: 0.6rem 1.25rem;
    font-size: 1rem;
    justify-content: center;
  }

  .hero {
    padding-top: 120px;
    padding-bottom: 80px;
  }

  .hero-avatar {
    width: 130px;
    height: 130px;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .btn {
    min-width: 170px;
    padding-inline: 1.8rem;
  }
}

@media (max-width: 540px) {
  .hero {
    padding-top: 160px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-qualities {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

