/* General Reset */
body, h1, h2, h3, p, ul, li, a, input, textarea, button {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  color-scheme: dark;
  /* VS 2026 splash-style purple gradient scheme */
  --bg: #07031a;
  --bg-2: #14063a;
  --surface: rgba(18, 8, 40, 0.70);
  --surface-2: rgba(28, 12, 62, 0.78);
  --text: #e6e6e6;
  --muted: #b7b7b7;
  --border: rgba(220, 190, 255, 0.14);
  --accent: #d38bff;
  --accent-2: #9d6cff;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 6px 16px rgba(0, 0, 0, 0.35);
}
html, body {
  min-height: 100%;
}
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 12% 18%, rgba(175, 90, 255, 0.62), transparent 60%),
    radial-gradient(1050px 650px at 88% 22%, rgba(230, 150, 255, 0.55), transparent 62%),
    radial-gradient(900px 520px at 55% 70%, rgba(35, 10, 80, 0.92), transparent 62%),
    linear-gradient(135deg, var(--bg), var(--bg-2));
  background-attachment: fixed;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -15vh -15vw;
  pointer-events: none;
  z-index: -1;
}

/* Soft "curved" highlight layers similar to the splash image */
body::before {
  background:
    radial-gradient(1400px 800px at 15% 85%, rgba(150, 70, 255, 0.55), transparent 62%),
    radial-gradient(1100px 700px at 82% 88%, rgba(195, 120, 255, 0.42), transparent 60%);
  filter: blur(18px);
  opacity: 0.65;
}
body::after {
  background:
    conic-gradient(from 210deg at 75% 20%, rgba(235, 170, 255, 0.25), rgba(145, 85, 255, 0.18), rgba(25, 10, 70, 0) 55%, rgba(235, 170, 255, 0.20));
  filter: blur(28px);
  opacity: 0.55;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.site-header {
  position: relative;
  padding: 18px 0 46px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(1100px 320px at 18% 0%, rgba(230, 160, 255, 0.30), transparent 62%),
    radial-gradient(900px 280px at 82% 10%, rgba(175, 90, 255, 0.26), transparent 58%),
    linear-gradient(135deg, rgba(20, 6, 58, 0.42), rgba(8, 3, 26, 0.28));
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 6px 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
}

.brand-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: contain;
  border: 0px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 4px;
  background: rgba(255, 255, 255, 0.03);
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.92);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.84);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
}

.hero {
  padding: 10px 0 0;
}

.hero-card {
  position: relative;
  border-radius: 18px;
  background: transparent;
  overflow: visible;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 26px;
  padding: 40px 40px;
  min-height: 320px;
}

/* Bottom-half panel (remove top-half background) */
.hero-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56%;
  border-radius: 0 0 18px 18px;
  background:
    radial-gradient(760px 320px at 18% 30%, rgba(230, 160, 255, 0.12), transparent 60%),
    radial-gradient(720px 280px at 78% 65%, rgba(175, 90, 255, 0.10), transparent 62%),
    rgba(6, 4, 10, 0.78);
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), var(--shadow);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 72%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to top, rgba(0,0,0,1) 72%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}

.hero-content {
  text-align: left;
  align-self: center;
  position: relative;
  z-index: 1;
}

.hero-kicker {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.70);
  margin-bottom: 8px;
}

.hero-title {
  font-size: 3.0rem;
  line-height: 1.1;
  margin-bottom: 14px;
}

.hero-role {
  display: block;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.hero-name {
  display: block;
  font-weight: 800;
  letter-spacing: 0.2px;
  background: linear-gradient(90deg, rgba(120, 145, 255, 0.95), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.64);
  max-width: 62ch;
  margin-bottom: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: linear-gradient(90deg, rgba(120, 145, 255, 0.95), rgba(165, 90, 255, 0.95));
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.10);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.92);
}

.btn:hover {
  transform: translateY(-1px);
}

.hero-media {
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
}

.hero-photo {
  width: min(360px, 100%);
  height: auto;
  object-fit: contain;
  border: none;
  background: transparent;
  padding: 0;
  opacity: 0.98;
  transform: translateY(-46px);
  filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.55));
}

@media (max-width: 900px) {
  .top-nav {
    flex-direction: column;
  }
  .brand {
    min-width: unset;
  }
  .hero-card {
    grid-template-columns: 1fr;
    padding: 26px 22px;
  }
  .hero-card::before {
    height: 60%;
  }
  .hero-photo {
    transform: translateY(-18px);
  }
  .hero-content {
    text-align: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-title {
    font-size: 2.1rem;
  }
  .hero-role {
    font-size: 1.2rem;
  }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Sections */
.section {
  padding: 50px 20px;
  background: var(--surface);
  margin-bottom: 25px;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: fadeIn 0.6s ease-in-out;
}
.section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--text);
  text-align: center;
}
.section h2::after {
  content: "";
  display: block;
  width: 54px;
  height: 3px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* Skills Grid */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.skills-grid span {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.95rem;
  transition: transform 0.2s ease, background 0.3s ease;
}
.skills-grid span:hover {
  transform: scale(1.05);
  background: rgba(197, 134, 255, 0.16);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.project-card {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease;
  text-align: center;
  padding-bottom: 15px;
  display: flex;
  flex-direction: column;
}
.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

/* Project Gallery (Unlimited Images) */
.project-gallery {
  position: relative;
  padding: 8px;
}
.gallery-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 6px;
}
.gallery-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 180px;
  border-radius: 10px;
  scroll-snap-align: start;
}
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(37, 37, 38, 0.80);
  border: 1px solid var(--border);
  color: #fff;
  cursor: pointer;
  z-index: 2;
}
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
.gallery-nav:hover { background: rgba(37, 37, 38, 0.95); }
.gallery-nav:disabled { opacity: 0.35; cursor: default; }

@media (max-width: 480px) {
  .gallery-nav { display: none; }
  .project-gallery { padding: 6px; }
  .gallery-track img { height: 180px; }
}
.project-card h3 {
  margin: 15px 0 10px;
  color: var(--text);
}
.project-card p {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 10px 15px;
}
.project-card .project-link {
  display: inline-block;
  background: var(--accent-2);
  color: #0b0713;
  padding: 8px 16px;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.3s ease;
  margin: auto auto 14px;
}
.project-card .project-link:hover {
  background: var(--accent);
  color: #0b0713;
}
.project-card:hover {
  transform: translateY(-5px);
}

/* Contact */
.contact-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 15px;
}
.contact-links img {
  width: 35px;
  height: 35px;
  filter: invert(1);
  opacity: 0.92;
  transition: transform 0.3s ease;
}
.contact-links img:hover {
  transform: scale(1.2);
  opacity: 1;
}

/* Footer */
footer {
  background: linear-gradient(135deg, rgba(20, 6, 58, 0.78), rgba(8, 3, 26, 0.86));
  color: var(--muted);
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}
footer a {
  color: var(--accent);
  text-decoration: none;
  margin: 0 10px;
  font-weight: bold;
  transition: color 0.3s ease;
}
footer a:hover {
  color: var(--text);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Modal styles for maximized image */
.img-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  overflow: auto;
  background: rgba(0,0,0,0.86);
  align-items: center;
  justify-content: center;
}
.img-modal-content {
  display: block;
  margin: 5% auto;
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--border), var(--shadow);
}
.img-modal-close {
  position: absolute;
  top: 30px;
  right: 50px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
}

/* Floating Back to Top Button */
#backToTopBtn {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 10001;
  background: rgba(37, 37, 38, 0.9);
  color: var(--accent);
  border: 1px solid var(--border);
  outline: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  padding: 0;
  transition: box-shadow 0.2s;
}
#backToTopBtn svg {
  display: block;
  margin: auto;
}
#backToTopBtn:hover {
  box-shadow: 0 0 0 1px rgba(55, 148, 255, 0.35), var(--shadow);
}

/* Training Items */
.training-item.horizontal {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 18px;
}
.training-item.horizontal .certificate-img {
  flex-shrink: 0;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}
.training-item.horizontal div {
  flex: 1;
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(197, 134, 255, 0.85);
  outline-offset: 2px;
}
