@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
  --color-dark: #0a0a0a;
  --color-violet: hsl(271, 76%, 53%);
  /* Base violet, will shift in JS */
  --color-text: #f0f0f0;
  --color-text-muted: #a0a0a0;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.05);
  --gradient-bg: #000000;
}

.mobile-only {
  display: none !important;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', sans-serif;
  background: #000000;
  color: var(--color-text);
  overflow-x: hidden;
  position: relative;
  transition: background 0.5s ease;
  /* Prevent text selection */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Re-enable selection for inputs and textareas */
input, textarea {
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

/* Prevent image dragging */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  filter: blur(150px);
  z-index: -2;
  animation: floatBlobs 20s infinite alternate ease-in-out;
  pointer-events: none;
}

body::before {
  background: var(--color-violet);
  opacity: 0.15;
  top: -20%;
  left: -10%;
}

body::after {
  background: var(--color-violet);
  opacity: 0.1;
  bottom: -20%;
  right: -10%;
  animation-delay: -10s;
}

@keyframes floatBlobs {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(5%, 5%) scale(1.1);
  }
}

/* Mouse Glow */
.glow-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle at center, var(--color-violet) 0%, transparent 70%);
  opacity: 0.15;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: opacity 0.3s;
  mix-blend-mode: screen;
}

/* Scroll Fade Animation Utility */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 100px 0;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

h1,
h2,
h3 {
  font-weight: 800;
  margin-bottom: 1rem;
}

h2 {
  font-size: 3rem;
  margin-bottom: 3rem;
  color: var(--color-text);
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 0;
  background: rgba(10, 10, 10, 0.5);
  /* More transparent by default */
  backdrop-filter: blur(5px);
  z-index: 100;
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.3s, backdrop-filter 0.3s, padding 0.3s;
}

nav.scrolled {
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(50px) saturate(150%);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav.nav-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--color-text);
  letter-spacing: 2px;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-weight: 600;
  transition: color 0.3s;
}

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

/* Hero Section */
.hero {
  position: relative;
  text-align: left;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  /* Centering the container */
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
  /* Behind blobs */
  filter: brightness(1.2);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.05),
      rgba(0, 0, 0, 0.15));
  z-index: -1;
}

.hero .container {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero h1 span {
  background: inherit;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero h1 {
  font-size: 6rem;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #ffffff, #a0a0a0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .hero-subtitle {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--color-violet);
  margin-bottom: 1.5rem;
  transition: color 0.5s ease;
}

.hero .hero-desc {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  max-width: 600px;
  line-height: 1.6;
}

.hero-socials {
  margin-top: 2rem;
  display: flex;
  gap: 1.5rem;
}

.hero-socials a {
  color: var(--color-text);
  font-size: 2.5rem;
  transition: color 0.3s, transform 0.3s;
}

.hero-socials a:hover {
  color: var(--color-violet);
  transform: translateY(-5px);
}

/* About Section */
.about-content {
  display: flex;
  gap: 4rem;
  align-items: center;
}

.about-text {
  flex: 1;
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--color-text-muted);
}

.about-text span {
  color: var(--color-text);
  font-weight: 600;
}

/* About Image Placeholder */
.about-image-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-image {
  width: 300px;
  height: 400px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 5rem;
  color: var(--color-violet);
  transition: border-color 0.5s ease;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Experience / Stats */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.stat-box {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
}

.stat-box h3 {
  font-size: 3rem;
  color: var(--color-violet);
  margin-bottom: 0.5rem;
  transition: color 0.5s ease;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  width: 100%;
}

.skill-box {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s;
}

.skill-box:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
}

.skill-box h4 {
  font-size: 1.5rem;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.skill-box .percentage {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-violet);
  transition: color 0.5s ease;
}

/* Works Section */
.work-category {
  margin-bottom: 5rem;
}

.work-category h3 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--color-text);
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 1rem;
}

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

.work-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  overflow: hidden;
  transition: opacity 0.3s, transform 0.3s;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  position: relative;
}

.work-card:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.work-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  opacity: 0;
  transition: opacity 0.3s;
}

.work-card:hover .work-info {
  opacity: 1;
}

.work-info h4 {
  color: white;
  font-size: 1.2rem;
}

.view-more-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  font-weight: 600;
  border: 1px solid var(--glass-border);
}

.view-more-card:hover {
  background: var(--glass-bg);
  color: var(--color-text);
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
}

.contact-item i {
  font-size: 2rem;
  color: var(--color-violet);
  transition: color 0.5s ease;
}

.contact-item a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.3s;
  word-break: break-all;
}

.contact-item a:hover {
  color: var(--color-violet);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--glass-border);
  color: var(--color-text-muted);
  margin-top: 50px;
}

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

/* Responsive Overrides */
@media (max-width: 992px) {

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

  .hero h1 {
    font-size: 4rem;
  }

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

@media (max-width: 768px) {
  .hero {
    min-height: 100vh;
    /* Back to full height for centering */
    padding-top: 100px;
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Vertical center */
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }

  .hero .container {
    order: 1;
    padding: 0 1.5rem;
    text-align: center;
    width: 100%;
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }

  .hero-video-mobile {
    position: relative;
    width: 100%;
    height: auto;
    order: 2;
    z-index: 1;
    border-radius: 10px;
    object-fit: cover;
    transform: scale(1.05);
    /* Slight scale to show character better */
    margin-top: 1rem;
    filter: brightness(1.2);
  }

  .hero-overlay {
    display: none;
  }

  .hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
  }

  .hero .hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
  }

  .hero .hero-desc {
    font-size: 0.9rem;
    margin: 0 auto;
  }

  .hero-socials {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 1.5rem;
  }

  .about-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.about-image {
    width: 200px;
    height: 260px;
}

.about-text {
    font-size: 0.95rem;
    text-align: left;
    width: 100%;
}

  .stats-grid,
  .skills-grid,
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  /* Center Photoshop Mastery */
  .stats-grid .stat-box:last-child {
    grid-column: 1 / -1;
    text-align: center;
  }

  .contact-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .contact-text p {
    text-align: justify;
    font-size: 1.1rem;
  }

  .contact-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
  }

  .contact-item {
    margin-bottom: 0;
    padding: 1rem;
    flex-direction: column;
    text-align: center;
    font-size: 0.9rem;
  }

  .contact-item i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  nav .container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  section {
    padding: 60px 0;
  }

  .glow-cursor {
    display: none;
  }

  /* Hide mouse glow on mobile */
}

/* Admin Specific */
.admin-panel .fade-up {
  opacity: 1;
  transform: none;
}

/* Admin / Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: 5px;
  color: white;
  font-family: inherit;
  font-size: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-violet);
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--color-text);
  color: var(--color-dark);
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: opacity 0.3s;
  border: none;
  cursor: pointer;
}

.btn:hover {
  opacity: 0.8;
}

/* Drag and Drop Zone */
.drop-zone {
  width: 100%;
  height: 200px;
  border: 2px dashed var(--glass-border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.2);
  transition: border-color 0.3s, background 0.3s;
  position: relative;
  overflow: hidden;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--color-violet);
  background: rgba(138, 43, 226, 0.1);
}

.drop-zone-text {
  color: var(--color-text-muted);
  text-align: center;
  pointer-events: none;
}

.drop-zone-text i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--color-violet);
}

.drop-zone input[type="file"] {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.preview-img {
  max-width: 100%;
  max-height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  object-fit: contain;
  display: none;
  z-index: 10;
  background: var(--color-dark);
}

/* Admin Table */
.admin-table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
}

th,
td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}

th {
  color: var(--color-violet);
}

.action-btn {
  padding: 0.5rem 1rem;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  background: #ff4757;
  color: white;
  display: block;
  width: 100%;
  margin-top: 5px;
}

.action-btn.edit {
  background: #2ed573;
}

/* Modal / Lightbox */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(10px);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  transition: color 0.3s, transform 0.3s;
}

.modal-close:hover {
  color: var(--color-violet);
  transform: scale(1.1);
}

.modal-info {
  margin-top: 1.5rem;
  color: white;
  font-weight: 600;
  font-size: 1.5rem;
  text-align: center;
}

/* Subpage Masonry Layout */
#full-works-grid {
  display: block !important; /* Override standard grid display */
  column-count: 3;
  column-gap: 2rem;
  width: 100%;
}

#full-works-grid .work-card {
  display: inline-block !important; /* Stack columns natively */
  width: 100%;
  margin-bottom: 2rem;
  break-inside: avoid; /* Prevent card splitting across columns */
}

@media (max-width: 992px) {
  #full-works-grid {
    column-count: 2;
    column-gap: 1.5rem;
  }
  #full-works-grid .work-card {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 576px) {
  #full-works-grid {
    column-count: 1; /* Single column on mobile screens */
    column-gap: 0;
  }
  #full-works-grid .work-card {
    margin-bottom: 1.5rem;
  }
}
