/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}


body {
  font-family: 'Helvetica Neue', sans-serif;
  color: #111;
  background: #fff;
  transition: background 0.3s, color 0.3s;
  padding-top: 70px;
}

body[data-theme='dark'] {
  background: #111;
  color: #eee;
}

img, video {
  max-width: 100%;
  display: block;
  border-radius: 10px;
}

.container {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
}

/* Default: Light Mode */
/* Base navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(34, 34, 34, 0.65); /* dark, semi-transparent */
  border-bottom: 1px solid #eee;
  z-index: 1000;
  padding: 1rem 0;
  transition: background 0.3s, border 0.3s;
  backdrop-filter: blur(8px); /* smooth effect */
}

/* Invert in dark mode */
body[data-theme='dark'] .navbar {
  background: rgba(255, 255, 255, 0.65); /* light, semi-transparent */
  border-bottom: 1px solid #444;
}

/* Container layout */
.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: bold;
  color: #fff;
}

body[data-theme='dark'] .logo {
  color: #222;
}

/* Nav links */
.nav-links a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: #fff;
  font-weight: normal;
  transition: font-weight 0.2s ease, color 0.3s;
}

/* Hover or active link bold */
.nav-links a:hover,
.nav-links a:focus,
.nav-links a.active {
  font-weight: bold;
}

.nav-links a {
  font-weight: normal;
  transition: font-weight 0.2s ease;
}

.nav-links a.active {
  font-weight: bold;
}


body[data-theme='dark'] .nav-links a {
  color: #222;
}

body[data-theme='dark'] .nav-links a:hover,
body[data-theme='dark'] .nav-links a:focus,
body[data-theme='dark'] .nav-links a.active {
  font-weight: bold;
}



/* Hero */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.name {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.subtitle {
  font-size: 1.1rem;
  color: #666;
}

body[data-theme='dark'] .subtitle {
  color: #bbb;
}

/* Carousel */
.carousel-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 2rem 0;
}

.carousel-track {
  display: flex;
  gap: 2rem;
  transition: transform 0.2s ease-out;
  will-change: transform;
}

.carousel-item {
  flex: 0 0 auto;
  width: 300px;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body[data-theme='dark'] .carousel-item {
}

.carousel-item:hover {
  transform: translateY(-6px) scale(1.02);
}

/* Video Wrapper */
.video-wrapper {
  position: relative;
}

/* Caption Below */
.caption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.caption h2 {
  font-size: 1rem;
  font-weight: bold;
}

.caption p {
  font-size: 0.85rem;
  color: #555;
}

body[data-theme='dark'] .caption p {
  color: #ccc;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.85rem;
  color: #aaa;
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  font-size: 1.4rem;
  cursor: pointer;
  background: transparent;
  border: none;
  color: #333;
  z-index: 1100;
}

body[data-theme='dark'] .theme-toggle {
  color: #eee;
}

/* Responsive */
@media (max-width: 768px) {
  .carousel-item {
    width: 90vw;
  }
}


.intro {
  font-size: 1rem;
  color: #444;
  max-width: 700px;
  margin: 2rem auto 4rem;
}

body[data-theme='dark'] .intro {
  color: #ccc;
}

.intro p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: left;
}

.profile-photo {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}

.profile-photo img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ccc;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

body[data-theme='dark'] .profile-photo img {
  border-color: #555;
}

.profile-photo img:hover {
  transform: scale(1.05);
  border-color: #007bff;
}

.tagline {
  margin-top: 1rem;
  font-size: 1rem;
  color: #555;
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

body[data-theme='dark'] .tagline {
  color: #ccc;
}


.carousel-section {
  padding: 3rem 0;
}

.carousel-wrapper {
  position: relative;
  overflow-x: hidden;
  padding: 1rem 0;
}

.carousel-track {
  display: flex;
  gap: 2rem;
  transition: transform 0.3s ease-out;
  will-change: transform;
  padding-bottom: 1rem;
}

.scroll-next,
.scroll-prev {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgb(0,0,0,0.5);
  color: white;
  border: none;
  padding: 0.6rem 0.9rem;
  font-size: 1.4rem;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10;
  transition: background 0.2s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.scroll-next:hover,
.scroll-prev:hover {
}

.scroll-prev {
  left: 10px;
}

.scroll-next {
  right: 10px;
}

body[data-theme='dark'] .scroll-next,
body[data-theme='dark'] .scroll-prev {
  background: #444;
  color: white;
}

@media (max-width: 500px) {
  .scroll-next,
  .scroll-prev {
    display: none;
  }
}


.skills {
  margin-top: 4rem;
  margin-bottom: 3rem;
  text-align: center;
}

.skills h2 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  font-weight: 600;
}

.skill-group {
  margin-bottom: 2rem;
}

.skill-group h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #666;
}

body[data-theme='dark'] .skill-group h3 {
  color: #aaa;
}

.skill-tags {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.skill-tags li {
  background: #f0f0f0;
  color: #333;
  padding: 0.5rem 1.1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: background 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-tags li:hover {
  background: #ddd;
  transform: translateY(-3px);
}

body[data-theme='dark'] .skill-tags li {
  background: #333;
  color: #eee;
}

body[data-theme='dark'] .skill-tags li:hover {
  background: #444;
}

.skill-tags li i {
  transition: transform 0.3s ease;
}

.skill-tags li:hover i {
  animation: bounce 0.6s ease;
}

/* Optional: alternate spin */
.skill-tags li.spin-icon:hover i {
  animation: spin 0.6s linear;
}

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

@keyframes spin {
  0% { transform: rotate(0); }
  100% { transform: rotate(360deg); }
}


.split-section {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 4rem auto;
  align-items: flex-start;
}

.split-column {
  flex: 1 1 300px;
  min-width: 300px;
}

.skills-column {
  max-width: 600px;
}

.about-column {
  max-width: 500px;
}

.about-column h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.about-column p {
  line-height: 1.6;
  margin-bottom: 1rem;
  color: #444;
}

body[data-theme='dark'] .about-column p {
  color: #ccc;
}

@media (max-width: 768px) {
  .split-section {
    flex-direction: column;
  }
}

.results-stats {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
  flex: 1 1 30%;
  min-width: 100px;
}

.stat .number {
  display: block;
  font-size: 1.5rem;
  font-weight: bold;
  color: #007bff;
}

.stat .label {
  font-size: 0.9rem;
  color: #555;
}

body[data-theme='dark'] .stat .number {
  color: #5cb8ff;
}

body[data-theme='dark'] .stat .label {
  color: #aaa;
}


.about-toggle {
  display: none;
  background: #007bff;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .about-toggle {
    display: inline-block;
  }

  .about-column.collapsible {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
  }

  .about-column.collapsible.open {
    max-height: 1000px; /* adjust as needed */
  }
}



.masonry-gallery {
  margin: 4rem auto;
  text-align: center;
}

.masonry-gallery h2 {
  font-size: 1.6rem;
  margin-bottom: 2rem;
}

/* Layout columns */
.masonry-grid {
  column-count: 3;
  column-gap: 1.2rem;
}

/* Masonry items */
.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.2rem;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background-color: #f8f8f8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Dark theme background */
body[data-theme='dark'] .masonry-item {
  background-color: #2a2a2a;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* Images */
.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover effect */
.masonry-item img:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive layout */
@media (max-width: 900px) {
  .masonry-grid {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .masonry-grid {
    column-count: 1;
  }
}


.social-links {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.social-links a {
  font-size: 1.4rem;
  color: #333;
  transition: transform 0.3s ease, color 0.3s ease;
}

.social-links a:hover {
  transform: scale(1.2);
  color: #007bff;
}

body[data-theme='dark'] .social-links a {
  color: #eee;
}

body[data-theme='dark'] .social-links a:hover {
  color: #5cb8ff;
}


.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  font-size: 1rem;
  border: none;
  border-radius: 30px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.primary-btn {
  color: #000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.primary-btn:hover {
  transform: translateY(-2px);
}

/* Dark theme adaptation */
body[data-theme='dark'] .primary-btn {
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

body[data-theme='dark'] .primary-btn:hover {
}

.contact-section {
  width: 100%;
  background: var(--bg-light);
  padding: 4rem 2rem;
}

body[data-theme='dark'] .contact-section {
  background: var(--bg-dark);
}

.contact-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  gap: 2rem;
}

.contact-info {
  flex: 1 1 400px;
}

.contact-info h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.contact-info p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  color: #444;
}

body[data-theme='dark'] .contact-info p {
  color: #ccc;
}

.contact-image {
  flex: 1 1 400px;
  text-align: center;
}

.contact-image img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Social links already styled previously */
.social-links {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Responsive layout */
@media (max-width: 768px) {
  .contact-content {
    flex-direction: column;
    text-align: center;
  }

  .contact-info {
    order: 2;
  }

  .contact-image {
    order: 1;
  }
}


section[id] {
  scroll-margin-top: 100px;
}


.frame-wrapper {
  position: relative;
  width: 260px;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
}

.phone-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 12px solid #111;
  border-radius: 36px;
  pointer-events: none;
  z-index: 2;
  background: transparent;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
}

.phone-frame::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 16px;
  background: #111;
  border-radius: 10px;
  z-index: 3;
}

.phone-frame::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: #444;
  border-radius: 50%;
  z-index: 4;
}

body[data-theme="dark"] .phone-frame {
  border-color: #000;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.3);
}

body[data-theme="dark"] .phone-frame::before {
  background: #000;
}

body[data-theme="dark"] .phone-frame::after {
  background: #000;
}


.video-embed {
  margin-top: 2%;
  margin-left: 2%;
  width: 98%;
  height: 98%;
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: 24px; 
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-embed iframe,
.video-embed video {
  width: 90%;
  height: 90%;
  border: none;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}



@keyframes shake {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(0.35deg); }
  50% { transform: rotate(-0.35deg); }
  75% { transform: rotate(0.35deg); }
  100% { transform: rotate(0deg); }
}

.edit-mode .editable {
  animation: shake 1s infinite;
  cursor: pointer;
  outline: 1px dashed #aaa;
}

.editable[contenteditable="true"]:focus {
  outline: 2px solid #007bff;
  background-color: rgba(0, 123, 255, 0.05);
}

/* Editable image wrapper */
.editable-image-wrapper {
  position: relative;
  display: inline-block;
}

/* ✏️ Image overlay icon */
.editable-image-wrapper .edit-overlay {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.8rem;
  padding: 3px 6px;
  border-radius: 4px;
  display: none;
  z-index: 5;
  cursor: pointer;
  font-family: sans-serif;
}

.edit-mode .editable-image-wrapper:hover .edit-overlay {
  display: block;
}

/* Optional: prevent editing links/buttons */
.editable a,
.editable button {
  pointer-events: none;
}












.add-btn,
.add-section-btn {
  display: none;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  padding: 2px 8px;
  cursor: pointer;
  margin: 6px 0;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.edit-mode .add-btn,
.edit-mode .add-section-btn {
  display: inline-block;
}

.add-section-btn {
  display: block;
  margin: 1.5rem auto;
  font-size: 1.2rem;
  padding: 4px 12px;
  background: #28a745;
}