@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  --bg-dark: #0b0f19;
  --bg-card: #151c2c;
  --bg-card-hover: #1e293b;
  --border: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(99, 102, 241, 0.3);
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.25);
  --accent: #06b6d4;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --radius-xl: 18px;
  --radius-lg: 12px;
  --radius-md: 8px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

section,
[id] {
  scroll-margin-top: 5rem;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header & Glass Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 25, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  min-height: 57px;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1;
  transition: var(--transition);
}

.brand-logo:hover {
  color: var(--accent);
}

.brand-logo .dot {
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.925rem;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

/* Page Layout */
.main-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  flex: 1;
  width: 100%;
}

/* Typography & Headings */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--text-main);
  line-height: 1.25;
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.25rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.75rem 0 0.75rem;
  color: #e2e8f0;
}

p {
  margin-bottom: 1.25rem;
  color: #cbd5e1;
  font-size: 1.025rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Badges & Meta Info */
.meta-subtitle {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
  list-style: none;
}

.tag {
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Bullet Lists */
ul,
ol {
  margin: 1rem 0 1.5rem 1.25rem;
  color: #cbd5e1;
}

li {
  margin-bottom: 0.4rem;
}

/* Images & Media */
.hero-image {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  margin-bottom: 2rem;
  cursor: pointer;
}

.profile-avatar {
  width: 100%;
  max-width: 340px;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  margin-bottom: 2rem;
  display: block;
}

/* 2-Column Hero Section */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 2rem;
}

.hero-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.hero-image-wrapper .profile-avatar {
  width: 100%;
  max-width: 320px;
  margin-bottom: 0;
}

video {
  width: 100%;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: #000;
  margin: 1.5rem 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  display: block;
}

video.video-half,
video.video-sm,
video.half-width {
  max-width: 50%;
  margin: 1.5rem auto;
}

/* Side-by-side Hero Media Grid */
.hero-media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin-bottom: 2rem;
  align-items: center;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  background: var(--bg-card);
}

.hero-media-grid .hero-image,
.hero-media-grid video,
.hero-media-grid img {
  margin: 0;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 0;
  border: none;
  box-shadow: none;
  cursor: pointer;
}

.hero-media-grid.tall .hero-image,
.hero-media-grid.tall video,
.hero-media-grid.tall img {
  max-height: 700px;
}

@media (max-width: 768px) {

  video.video-half,
  video.video-sm,
  video.half-width {
    max-width: 100%;
  }

  .hero-section {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-media-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* Gallery Component */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

figure {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

figure:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
  box-shadow: 0 10px 25px var(--primary-glow);
}

figure.hero-backfade-wrapper {
  border-radius: var(--radius-xl);
  margin-bottom: 2rem;
}

figure.hero-backfade-wrapper:hover {
  transform: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

figure.hero-backfade-wrapper img.hero-image {
  margin-bottom: 0;
  border: none;
  box-shadow: none;
  position: relative;
  z-index: 1;
  background: transparent;
}

figure img,
figure video {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
  transition: var(--transition);
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
}

figcaption {
  padding: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
  background: rgba(15, 23, 42, 0.6);
  flex: 1;
}

/* Portfolio Cards Grid (Home Page) */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.portfolio-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-highlight);
  box-shadow: 0 12px 30px var(--primary-glow);
  text-decoration: none;
}

.portfolio-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.portfolio-card-content {
  padding: 1.25rem;
  flex: 1;
}

.portfolio-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.portfolio-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(11, 15, 25, 0.6);
  padding: 2rem 1.5rem;
  text-align: center;
  margin-top: auto;
}

.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  color: var(--text-dim);
  font-size: 0.875rem;
}

/* Button / CTA styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: #fff;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn:hover {
  background: linear-gradient(135deg, #4f46e5, var(--accent));
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

/* 404 Error Page Styling */
.error-container {
  text-align: center;
  padding: 4rem 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.error-code {
  font-family: var(--font-heading);
  font-size: 6rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.error-title {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.error-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 6.5rem;
  }

  section,
  [id] {
    scroll-margin-top: 6.5rem;
  }

  .site-header {
    min-height: 81px;
  }

  h1 {
    font-size: 2rem;
  }

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 0.4rem 0.6rem;
    width: 100%;
  }

  .nav-link {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
  }

  .main-wrapper {
    padding: 1.5rem 1rem 3rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* Footer Links */
.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
}

.footer-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

/* Clickable images hint */
.gallery-grid figure img,
.hero-image,
.hero-media-grid img {
  cursor: zoom-in;
}

/* Universal Lightbox Modal */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 11, 19, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lightbox-content {
  position: relative;
  z-index: 1001;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  background: var(--bg-dark);
  border: 1px solid var(--border);
}

.lightbox-img,
.lightbox-video {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

.lightbox-video {
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #000;
}

.lightbox-caption {
  width: 100%;
  padding: 0.85rem 1.25rem;
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.925rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid var(--border);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1002;
  transition: var(--transition);
}

.lightbox-close:hover {
  background: var(--primary);
}

/* Wobble Text Animation (0.25Hz / 4s cycle) */
.wobble-word {
  display: inline-block;
  white-space: nowrap;
}

.wobble-char {
  display: inline-block;
  animation: wobble-wave 4s ease-in-out infinite;
}

@keyframes wobble-wave {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}