:root {
  --coral: #6fb1f0;
  --yellow: #ffffff;
  --teal: #ffffff;
  --purple: #3b82d9;
  --blue: #1a4d80;
  --ink: #f4f2fb;
  --muted: #a8a8c4;
  --bg: #0d0d17;
  --card-bg: #16162550;
  --card-bg-solid: #17172a;
  --line: #2b2b42;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --gradient-brand: linear-gradient(135deg, var(--coral), var(--purple) 55%, var(--blue));
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 8px 24px rgba(59, 130, 217, 0.35);
}
.btn-primary:hover { box-shadow: 0 12px 30px rgba(59, 130, 217, 0.5); }

.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--bg); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 23, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.3px;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav { display: flex; gap: 28px; }
.nav a {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--muted);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav a:hover { color: var(--ink); border-color: var(--coral); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px;
  height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}

.hero {
  background: linear-gradient(120deg, #0d0d17, #0f1f33, #0d0d17, #14243a);
  background-size: 300% 300%;
  animation: gradientShift 18s ease infinite;
}

.hero-shapes { position: absolute; inset: 0; z-index: 0; }

.sparkles { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.sparkle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.9);
  opacity: 0;
  animation: twinkle 3.5s ease-in-out infinite;
}
.sparkle:nth-child(3n) { width: 2px; height: 2px; animation-duration: 2.6s; }
.sparkle:nth-child(4n) { width: 4px; height: 4px; animation-duration: 4.2s; }
.sparkle:nth-child(2n) { animation-delay: 0.8s; }
.sparkle:nth-child(3n + 1) { animation-delay: 1.6s; }
.sparkle:nth-child(5n) { animation-delay: 2.4s; }
.sparkle:nth-child(7n) { animation-delay: 3.1s; }

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  50% { opacity: 1; transform: scale(1.3); }
}

.shooting-stars { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.shooting-star {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
}
.shooting-star::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 90px;
  height: 1.5px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), transparent);
  transform: translate(-100%, -50%) rotate(25deg);
  transform-origin: right center;
}

.shooting-star-1 { top: 8%; left: 5%; animation: shoot1 9s linear infinite; animation-delay: 2s; }
.shooting-star-2 { top: 4%; left: 45%; animation: shoot2 13s linear infinite; animation-delay: 6.5s; }
.shooting-star-3 { top: 18%; left: 70%; animation: shoot3 17s linear infinite; animation-delay: 11s; }

@keyframes shoot1 {
  0% { transform: translate(0, 0); opacity: 0; }
  1% { opacity: 1; }
  6% { transform: translate(320px, 150px); opacity: 0; }
  100% { transform: translate(320px, 150px); opacity: 0; }
}

@keyframes shoot2 {
  0% { transform: translate(0, 0); opacity: 0; }
  1% { opacity: 1; }
  5% { transform: translate(280px, 130px); opacity: 0; }
  100% { transform: translate(280px, 130px); opacity: 0; }
}

@keyframes shoot3 {
  0% { transform: translate(0, 0); opacity: 0; }
  1% { opacity: 1; }
  7% { transform: translate(300px, 140px); opacity: 0; }
  100% { transform: translate(300px, 140px); opacity: 0; }
}
.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}
.shape-1 { width: 420px; height: 420px; background: var(--coral); top: -120px; left: -100px; animation: floatShape1 16s ease-in-out infinite; }
.shape-2 { width: 380px; height: 380px; background: var(--teal); bottom: -140px; right: -80px; animation: floatShape2 20s ease-in-out infinite; }
.shape-3 { width: 300px; height: 300px; background: var(--purple); top: 40%; right: 20%; opacity: 0.3; animation: floatShape3 14s ease-in-out infinite; }

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes floatShape1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.15); }
}

@keyframes floatShape2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, -30px) scale(1.1); }
}

@keyframes floatShape3 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
  50% { transform: translate(-40px, 50px) scale(1.2); opacity: 0.45; }
}

.hero-content { position: relative; z-index: 1; max-width: 900px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  font-size: 13px;
  color: var(--purple);
  margin: 0 0 12px;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 60px);
  margin: 0 0 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.highlight {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 34px;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Sections */
.section { padding: 100px 24px; }
.section-inner { max-width: 1140px; margin: 0 auto; }

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 44px;
}

.title-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gradient-brand);
  flex-shrink: 0;
}

.about { background: #0f0f1c; }

.about-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
  align-items: center;
}

.portrait-frame {
  aspect-ratio: 1;
  border-radius: 28px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 56px;
  font-weight: 800;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.about-text p { color: var(--muted); font-size: 16px; margin: 0 0 16px; }

.about-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.tag {
  background: #16324d;
  color: #a8d0fa;
  font-weight: 600;
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 999px;
}

/* Gallery */
.filter-bar { display: flex; gap: 10px; margin-bottom: 32px; flex-wrap: wrap; }
.filter-btn {
  background: var(--card-bg-solid);
  border: 2px solid var(--line);
  padding: 8px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s ease;
}
.filter-btn:hover { border-color: var(--purple); color: var(--purple); }
.filter-btn.active { background: var(--gradient-brand); border-color: transparent; color: #fff; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.gallery-item {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg-solid);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
  cursor: pointer;
}
.gallery-item:hover { transform: translateY(-6px); }
.gallery-item.hidden { display: none; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.95);
  padding: 40px;
}
.lightbox.open { display: flex; }

.lightbox-figure {
  margin: 0;
  max-width: min(90vw, 1000px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lightbox-img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
}
.lightbox-close:hover { color: var(--coral); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.lightbox-nav:hover { background: var(--purple); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

@media (max-width: 700px) {
  .lightbox { padding: 20px; }
  .lightbox-nav { width: 40px; height: 40px; font-size: 15px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close { top: 10px; right: 14px; }
}

.gallery-thumb {
  aspect-ratio: 4 / 3;
  background: var(--line);
  overflow: hidden;
}

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

.gallery-item figcaption {
  padding: 14px 18px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
}

.gallery-note { margin-top: 28px; color: var(--muted); font-size: 13.5px; }
.gallery-note code { background: #16324d; color: #a8d0fa; padding: 2px 6px; border-radius: 4px; }

/* Resume */
.resume { background: #0f0f1c; }

.resume-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.resume-subtitle { font-size: 20px; font-weight: 700; margin: 0 0 24px; }
.resume-subtitle-spaced { margin-top: 40px; }

.timeline { display: flex; flex-direction: column; gap: 28px; }
.timeline-item { display: flex; gap: 16px; }
.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gradient-brand);
  margin-top: 6px;
  flex-shrink: 0;
}
.timeline-content h4 { margin: 0 0 4px; font-size: 16.5px; color: var(--ink); }
.timeline-meta { color: var(--purple); font-weight: 600; font-size: 13px; margin: 0 0 8px; }
.timeline-content p:last-child { color: var(--muted); margin: 0; font-size: 15px; }

.timeline-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 15px;
}
.timeline-list li { margin-bottom: 6px; }
.timeline-list li:last-child { margin-bottom: 0; }

.skills-category {
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--purple);
  margin: 0 0 12px;
}
.skills-category-spaced { margin-top: 24px; }

.skills-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-pill {
  background: #8b3ef2;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(139, 62, 242, 0.45);
}

.resume-download { margin-top: 36px; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
}

.contact-form { display: flex; flex-direction: column; gap: 18px; }
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}
.contact-form input,
.contact-form textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--card-bg-solid);
  color: var(--ink);
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--purple); }

.contact-form .btn { align-self: flex-start; border: none; }

.form-note { font-size: 14px; font-weight: 600; color: var(--teal); min-height: 20px; margin: 0; }

.contact-info p { margin: 0 0 24px; color: var(--muted); }
.contact-info strong { display: block; color: var(--ink); margin-bottom: 4px; }
.contact-info a:hover { color: var(--purple); }

.social-links { display: flex; gap: 16px; flex-wrap: wrap; }
.social-links a {
  font-weight: 600;
  font-size: 14px;
  padding: 8px 18px;
  border-radius: 999px;
  background: #16324d;
  color: #a8d0fa;
}
.social-links a:hover { background: var(--purple); color: #fff; }

/* Footer */
.site-footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--muted);
  font-size: 13.5px;
  border-top: 1px solid var(--line);
}

/* Responsive */
@media (max-width: 860px) {
  .about-grid, .resume-columns, .contact-grid { grid-template-columns: 1fr; }
  .about-portrait { max-width: 200px; margin: 0 auto; }
}

@media (max-width: 700px) {
  .hero h1 { white-space: normal; }
  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg-solid);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    transition: max-height 0.25s ease;
  }
  .nav.open { max-height: 300px; }
  .nav a { padding: 14px 24px; border-bottom: 1px solid var(--line); }
  .section { padding: 70px 20px; }
}
