/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #6c5ce7;
  --primary-light: #a29bfe;
  --accent: #fd79a8;
  --accent-alt: #00cec9;
  --dark: #0a0a0a;
  --dark-surface: #141414;
  --dark-card: #1e1e1e;
  --text: #f0f0f0;
  --text-muted: #999;
  --gradient-1: linear-gradient(135deg, #6c5ce7, #fd79a8);
  --gradient-2: linear-gradient(135deg, #00cec9, #6c5ce7);
  --gradient-3: linear-gradient(135deg, #fd79a8, #fdcb6e);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--dark);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.3s;
}

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

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

/* ===== NAVIGATION ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s, backdrop-filter 0.3s;
}

nav.scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(108, 92, 231, 0.2);
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-1);
  transition: width 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.nav-hamburger span {
  width: 25px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

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

.hero-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  animation: float 8s ease-in-out infinite;
}

.hero-bg .orb-1 {
  width: 500px;
  height: 500px;
  background: var(--primary);
  top: -10%;
  right: -10%;
  animation-delay: 0s;
}

.hero-bg .orb-2 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  bottom: -10%;
  left: -5%;
  animation-delay: -3s;
}

.hero-bg .orb-3 {
  width: 300px;
  height: 300px;
  background: var(--accent-alt);
  top: 40%;
  left: 30%;
  animation-delay: -5s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
}

.hero-greeting {
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1rem;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.hero-name {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--gradient-1);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(108, 92, 231, 0.4);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid rgba(255,255,255,0.2);
}

.btn-outline:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
  transform: translateY(-2px);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* ===== SECTION BASE ===== */
section {
  padding: 6rem 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.section-title .gradient {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== CAREER ===== */
#career {
  background: var(--dark-surface);
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--primary), var(--accent), var(--accent-alt));
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.6s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 8px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--dark-surface);
  box-shadow: 0 0 15px rgba(108, 92, 231, 0.5);
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.timeline-card {
  background: var(--dark-card);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.3s;
}

.timeline-card:hover {
  border-color: rgba(108, 92, 231, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.timeline-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.timeline-card .role {
  color: var(--primary-light);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.timeline-card .location {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.timeline-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.timeline-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(108, 92, 231, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(108, 92, 231, 0.2);
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 3rem auto 0;
}

.edu-card {
  background: var(--dark-card);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.3s;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 1.5rem;
}

.edu-card:hover {
  border-color: rgba(0, 206, 201, 0.3);
}

.edu-card .edu-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  flex-shrink: 0;
  max-width: 50px;
}

.edu-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.edu-card .degree {
  color: var(--accent-alt);
  font-size: 0.9rem;
}

.edu-card .year {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== PHOTOGRAPHY ===== */
.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--gradient-1);
  color: white;
  border-color: transparent;
}

.gallery-masonry {
  columns: 3;
  column-gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s;
  will-change: transform;
  contain: layout style paint;
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-item img,
.gallery-item .thumb-wrap {
  width: 100%;
  display: block;
}

.thumb-wrap {
  position: relative;
  overflow: hidden;
  background: var(--dark-card);
}

.thumb-wrap .thumb {
  width: 100%;
  display: block;
  filter: blur(20px);
  transform: scale(1.1);
  transition: opacity 0.5s;
}

.thumb-wrap .full {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s;
}

.thumb-wrap .full.loaded {
  opacity: 1;
}

.gallery-item img {
  transition: transform 0.5s;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}

.gallery-item:hover .overlay {
  opacity: 1;
}

.overlay span {
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  background: none;
  border: none;
  transition: transform 0.3s;
}

.lightbox-close:hover {
  transform: rotate(90deg);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
  background: rgba(255,255,255,0.1);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.lightbox-nav:hover {
  background: rgba(255,255,255,0.2);
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

/* ===== TRAVELS ===== */
#travels {
  background: var(--dark-surface);
}

.travels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.travel-card {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  height: 400px;
  cursor: pointer;
  transition: transform 0.3s;
}

.travel-card:hover {
  transform: translateY(-5px);
}

.travel-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.travel-card .thumb-wrap {
  width: 100%;
  height: 100%;
}

.travel-card .thumb-wrap .thumb {
  height: 100%;
  object-fit: cover;
}

.travel-card .thumb-wrap .full {
  object-fit: cover;
}

.travel-card:hover img {
  transform: scale(1.1);
}

.travel-card .travel-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
}

.travel-card .travel-location {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.travel-card .travel-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== CATS ===== */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.cat-card {
  border-radius: 20px;
  overflow: hidden;
  background: var(--dark-card);
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.3s;
}

.cat-card:hover {
  border-color: rgba(253, 121, 168, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.cat-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.5s;
}

.cat-card .thumb-wrap {
  height: 300px;
}

.cat-card .thumb-wrap .thumb {
  height: 100%;
  object-fit: cover;
}

.cat-card .thumb-wrap .full {
  object-fit: cover;
}

.cat-card:hover img {
  transform: scale(1.05);
}

.cat-card .cat-info {
  padding: 1.2rem 1.5rem;
}

.cat-card .cat-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.cat-card .cat-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== FOOTER ===== */
footer {
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.3s;
}

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

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

/* ===== EDIT MODE ===== */
.edit-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  border: none;
  background: var(--dark-card);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.edit-toggle:hover {
  border-color: var(--primary-light);
  color: var(--text);
}

.edit-toggle.active {
  background: var(--gradient-1);
  color: white;
  border-color: transparent;
}

.edit-bar {
  position: fixed;
  bottom: 5rem;
  right: 2rem;
  z-index: 900;
  display: none;
  gap: 0.5rem;
}

.edit-bar.visible {
  display: flex;
}

.edit-bar button {
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.edit-bar .save-btn {
  background: var(--accent-alt);
  color: var(--dark);
}

.edit-bar .save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 206, 201, 0.4);
}

.edit-bar .reset-btn {
  background: var(--dark-card);
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.1);
}

.edit-bar .reset-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

body.edit-mode .gallery-masonry {
  columns: unset;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

body.edit-mode .gallery-item {
  cursor: grab;
  border: 2px solid transparent;
  transition: border-color 0.2s, opacity 0.2s, transform 0.2s;
}

body.edit-mode .gallery-item:hover {
  border-color: var(--primary-light);
}

body.edit-mode .gallery-item.dragging {
  opacity: 0.3;
  cursor: grabbing;
}

body.edit-mode .gallery-item.drag-over {
  border-color: var(--accent);
  transform: scale(1.03);
}

body.edit-mode .gallery-item .overlay {
  display: none;
}

body.edit-mode .gallery-item .drag-handle {
  display: flex;
}

.drag-handle {
  display: none;
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: rgba(0,0,0,0.7);
  color: white;
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  font-size: 0.7rem;
  z-index: 5;
  pointer-events: none;
  align-items: center;
  gap: 0.3rem;
}

.delete-btn {
  display: none;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 55, 55, 0.85);
  color: white;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.delete-btn:hover {
  background: #ff2222;
  transform: scale(1.15);
}

body.edit-mode .gallery-item .delete-btn {
  display: flex;
}

@media (max-width: 768px) {
  body.edit-mode .gallery-masonry {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  body.edit-mode .gallery-masonry {
    grid-template-columns: 1fr;
  }
}

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--dark-surface);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.4s;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-hamburger.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .gallery-masonry {
    columns: 2;
  }

  .travels-grid {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    left: 0;
  }

  section {
    padding: 4rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .gallery-masonry {
    columns: 1;
  }

  .cats-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
}
