/* ═══════════════════════════════════════════════════════
   PORTFOLIO — Global Stylesheet
   Design: Dark luxury with sharp accents
   ═══════════════════════════════════════════════════════ */

@import url("https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap");

/* ── CSS Variables ─────────────────────────────────────── */
:root {
  --bg: #08090c;
  --bg-1: #0e1117;
  --bg-2: #141820;
  --bg-3: #1c2230;
  --border: rgba(255, 255, 255, 0.07);
  --border-2: rgba(255, 255, 255, 0.12);
  --accent: #6c63ff;
  --accent-2: #a78bfa;
  --accent-glow: rgba(108, 99, 255, 0.35);
  --green: #22c55e;
  --red: #ef4444;
  --text: #f0f2f7;
  --text-2: #a0aabb;
  --text-3: #5c6880;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ─────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family:
    "DM Sans",
    -apple-system,
    sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Background grid pattern ───────────────────────────── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(108, 99, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 99, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

/* ── Noise texture overlay ──────────────────────────────── */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-1);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ── Typography ────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5 {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

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

/* ── Layout ────────────────────────────────────────────── */
.wrapper {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Animations ────────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 0 0 var(--accent-glow);
  }
  50% {
    box-shadow: 0 0 0 8px transparent;
  }
}

.anim-up {
  animation: fadeUp 0.6s ease both;
}
.anim-in {
  animation: fadeIn 0.5s ease both;
}
.anim-scale {
  animation: scaleIn 0.5s ease both;
}

/* ── Cards ─────────────────────────────────────────────── */
.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
  cursor: pointer;
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(
    135deg,
    rgba(108, 99, 255, 0.06) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover {
  border-color: rgba(108, 99, 255, 0.4);
  box-shadow:
    0 0 0 1px rgba(108, 99, 255, 0.1),
    var(--shadow-lg);
  transform: translateY(-3px);
}

.card:hover::before {
  opacity: 1;
}

.card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: var(--bg-2);
}

.card-icon-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  max-height: 200px;
  object-fit: contain;
  background: var(--bg-2);
  padding: 20px;
}

.card-body {
  padding: 20px 22px 24px;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(108, 99, 255, 0.1);
  border: 1px solid rgba(108, 99, 255, 0.2);
  border-radius: 99px;
  padding: 4px 10px;
  margin-bottom: 10px;
}

.card-title {
  font-family: "Syne", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-desc {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 18px;
  flex: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-2);
  transition:
    color var(--transition),
    gap var(--transition);
}

.card-link:hover {
  color: var(--text);
  gap: 10px;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  font-family: "DM Sans", sans-serif;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover {
  background: #5a52e8;
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-green {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.btn-green:hover {
  background: rgba(34, 197, 94, 0.25);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--bg-2);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-3);
  color: var(--text);
  border-color: var(--border-2);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.22);
  transform: translateY(-1px);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.btn-lg {
  padding: 13px 28px;
  font-size: 15px;
  border-radius: var(--radius);
}

.btn-full {
  width: 100%;
  justify-content: center;
}
.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ── Forms ─────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: "DM Sans", sans-serif;
  padding: 11px 14px;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition);
  outline: none;
  -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-3);
}

.form-input:focus,
.form-textarea:focus {
  border-color: rgba(108, 99, 255, 0.6);
  background: var(--bg-3);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.form-hint {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 3px;
}

/* ── File upload ───────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition:
    border-color var(--transition),
    background var(--transition);
  position: relative;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: rgba(108, 99, 255, 0.5);
  background: rgba(108, 99, 255, 0.04);
}

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

.upload-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  color: var(--text-3);
}

.upload-text {
  font-size: 13px;
  color: var(--text-2);
}

.upload-sub {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 4px;
}

/* ── Alert / notification ───────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: scaleIn 0.25s ease;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86efac;
}

.hidden {
  display: none !important;
}

/* ── Loading skeleton ───────────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-2) 25%,
    var(--bg-3) 50%,
    var(--bg-2) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ── Grid ──────────────────────────────────────────────── */
.grid-auto {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

@media (max-width: 600px) {
  .grid-auto {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* ── Tag / chip ────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 99px;
  font-weight: 500;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}

/* ── Divider ────────────────────────────────────────────── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

/* ── Modal backdrop (for lightbox) ─────────────────────── */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.25s ease;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}

.lightbox-close:hover {
  background: var(--bg-3);
}

/* ── Responsive helpers ─────────────────────────────────── */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}
