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

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  /* Smooth theme transitions for colors/backgrounds, leaving transform/opacity transitions unaffected */
  transition:
    background-color 0.4s ease,
    color 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease,
    background-image 0.4s ease;
}

:root {
  --bg: #070708;
  --block-bg: #e2e2e2;
  --block-bg-hover: #ededed;
  --block-dark: #121214;
  --block-dark-hover: #1b1b1e;
  --text-on-light: #000000; /* Pure black text */
  --text-on-dark: #ffffff;
  --text-muted: #a0a0a0;
  --accent: #e12a54;
  --accent-hover: #ff3d66;
  --drawer-bg: #121214;
  --drawer-border: rgba(255, 255, 255, 0.08);
  --border-radius: 12px;
  --gap: 22px; /* Increased gap between blocks */
  --font: "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   LIGHT THEME OVERRIDES
   ============================================ */
body.light-theme {
  --bg: #f1f2f5;
  --block-bg: #ffffff;
  --block-bg-hover: #f7f8fa;
  --block-dark: #e4e5eb;
  --block-dark-hover: #dadbe2;
  --text-on-light: #000000; /* Rich pure black */
  --text-on-dark: #000000; /* Rich pure black */
  --text-muted: #4b5563;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --drawer-bg: #ffffff;
  --drawer-border: rgba(0, 0, 0, 0.09);
}

body.light-theme .site-header {
  background: transparent;
}
body.light-theme .header-logo {
  color: #000000;
  background: rgba(241, 242, 245, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.06);
}
body.light-theme .header-nav {
  background: rgba(241, 242, 245, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.06);
}
body.light-theme .nav-filter {
  color: rgba(0, 0, 0, 0.6);
}
body.light-theme .nav-filter:hover {
  color: #000000;
  background: rgba(0, 0, 0, 0.06);
}
body.light-theme .nav-filter.active {
  color: #ffffff;
  background: var(--accent);
}
body.light-theme .admin-link {
  color: rgba(0, 0, 0, 0.6);
}
body.light-theme .admin-link:hover {
  color: #000000;
  background: rgba(0, 0, 0, 0.06);
}
body.light-theme .hamburger {
  background: rgba(241, 242, 245, 0.8);
  color: #000000;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
body.light-theme .project-drawer {
  background: var(--drawer-bg);
  border-color: var(--drawer-border);
}
body.light-theme .drawer-close {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.6);
}
body.light-theme .drawer-close:hover {
  background: var(--accent);
  color: #ffffff;
}
body.light-theme .drawer-media {
  background: #e5e7eb;
}
body.light-theme .gallery-slides {
  background: #d1d5db;
}
body.light-theme .gallery-thumbs {
  background: #e5e7eb;
}
body.light-theme .gallery-thumb {
  border-color: transparent;
  opacity: 0.7;
}
body.light-theme .gallery-thumb.active,
body.light-theme .gallery-thumb:hover {
  opacity: 1;
  border-color: var(--accent);
}
body.light-theme .drawer-cat-label {
  color: var(--accent);
}
body.light-theme .drawer-title {
  color: #000000;
}
body.light-theme .drawer-subtitle {
  color: rgba(0, 0, 0, 0.5);
}
body.light-theme .drawer-desc {
  color: rgba(0, 0, 0, 0.72);
}
body.light-theme .drawer-tech-heading {
  color: rgba(0, 0, 0, 0.45);
}
body.light-theme .drawer-tech-list li {
  color: rgba(0, 0, 0, 0.7);
}
body.light-theme .about-drawer-trait {
  background: #eef0f6;
  border-color: rgba(0, 0, 0, 0.06);
}
body.light-theme .about-drawer-trait h4 {
  color: #000000;
}
body.light-theme .about-drawer-trait p {
  color: rgba(0, 0, 0, 0.6);
}
body.light-theme .skill-card {
  background: #eef0f6;
  border-color: rgba(0, 0, 0, 0.06);
}
body.light-theme .skill-card h4 {
  color: #000000;
}
body.light-theme .skill-card p {
  color: rgba(0, 0, 0, 0.6);
}
body.light-theme .site-footer {
  color: rgba(0, 0, 0, 0.4);
  border-top-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .mobile-nav {
  background: rgba(241, 242, 245, 0.98);
}
body.light-theme .mobile-nav .nav-filter {
  color: rgba(0, 0, 0, 0.7);
}
body.light-theme .mobile-nav .nav-filter.active {
  color: #ffffff;
}
body.light-theme .mobile-close {
  color: rgba(0, 0, 0, 0.6);
}
body.light-theme .brand-block {
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .about-block {
  background: var(--block-bg);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .skills-block {
  background: var(--block-dark);
}
body.light-theme .skills-mini-item {
  color: rgba(0, 0, 0, 0.85);
}
body.light-theme .skills-mini-item span {
  color: rgba(0, 0, 0, 0.6);
}

html,
body {
  height: 100%;
  background-color: var(--bg);
  /* Dark mode mesh gradient background */
  background-image:
    radial-gradient(at 0% 0%, rgba(225, 42, 84, 0.12) 0px, transparent 55%),
    radial-gradient(at 100% 0%, rgba(37, 99, 235, 0.12) 0px, transparent 55%),
    radial-gradient(at 100% 100%, rgba(225, 42, 84, 0.08) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(37, 99, 235, 0.08) 0px, transparent 50%);
  background-attachment: fixed;
  background-size: cover;
  color: var(--text-on-dark);
  font-family: var(--font);
  font-size: 16px; /* Slightly bigger default font size */
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.light-theme {
  /* Light mode mesh gradient background */
  background-image:
    radial-gradient(at 0% 0%, rgba(225, 42, 84, 0.08) 0px, transparent 55%),
    radial-gradient(at 100% 0%, rgba(37, 99, 235, 0.08) 0px, transparent 55%),
    radial-gradient(at 100% 100%, rgba(225, 42, 84, 0.04) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(37, 99, 235, 0.04) 0px, transparent 50%);
}

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

/* ============================================
   FLOATING HEADER
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2.5rem; /* Better matching padding */
  pointer-events: none;
}
.site-header > * {
  pointer-events: auto;
}

.header-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-on-dark);
  letter-spacing: -0.5px;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(12px);
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.header-logo span {
  color: var(--accent);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(12px);
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-filter {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  padding: 0.3rem 0.75rem;
  border-radius: 5px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: var(--font);
  white-space: nowrap;
}
.nav-filter:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.08);
}
.nav-filter.active {
  color: #ffffff;
  background: var(--accent);
}

.nav-separator {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 0.2rem;
}

.admin-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 5px;
  transition: all 0.2s ease;
}
.admin-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* Mobile hamburger */
.hamburger {
  display: none;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-on-dark);
  font-size: 1.25rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
}

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(20px);
  z-index: 201;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  padding: 4rem 2rem;
}
.mobile-nav.open {
  display: flex;
}
.mobile-nav .nav-filter,
.mobile-nav .admin-link {
  font-size: 1.45rem;
  font-weight: 600;
  padding: 0.8rem 2rem;
  width: 100%;
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
  border-radius: 8px;
}
.mobile-nav .nav-filter.active {
  color: #ffffff;
  background: var(--accent);
}
.mobile-nav .nav-filter:hover,
.mobile-nav .admin-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}
.mobile-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.8rem;
  cursor: pointer;
}

/* ============================================
   PIXEL GRID — full viewport with nice outer padding
   ============================================ */
.pixel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  padding: var(--gap) 5%; /* 5% outer left and right spacing */
  padding-top: calc(var(--gap) + 80px);
  min-height: 100vh;
}

/* ============================================
   BASE PIXEL BLOCK
   ============================================ */
.pixel-block {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
  will-change: transform;
  /* animation: blockBump 4s ease-in-out infinite; */
}

/* Staggered delays for an organic, living grid feel */
.pixel-block:nth-child(2) {
  animation-delay: 0.3s;
}
.pixel-block:nth-child(3) {
  animation-delay: 0.7s;
}
.pixel-block:nth-child(4) {
  animation-delay: 1.1s;
}
.pixel-block:nth-child(5) {
  animation-delay: 0.5s;
}
.pixel-block:nth-child(6) {
  animation-delay: 1.4s;
}
.pixel-block:nth-child(7) {
  animation-delay: 0.9s;
}
.pixel-block:nth-child(8) {
  animation-delay: 1.7s;
}
.pixel-block:nth-child(9) {
  animation-delay: 0.2s;
}
.pixel-block:nth-child(10) {
  animation-delay: 1s;
}
.pixel-block:nth-child(11) {
  animation-delay: 1.6s;
}
.pixel-block:nth-child(12) {
  animation-delay: 0.6s;
}
.pixel-block:nth-child(13) {
  animation-delay: 1.3s;
}
.pixel-block:nth-child(14) {
  animation-delay: 0.4s;
}
.pixel-block:nth-child(15) {
  animation-delay: 1.8s;
}
.pixel-block:nth-child(16) {
  animation-delay: 0.8s;
}
.pixel-block:nth-child(17) {
  animation-delay: 1.2s;
}

/* ============================================
   BRAND BLOCK — Koen Dekker photo + theme toggle
   ============================================ */
.brand-block {
  background-color: var(--block-dark);
  border: 1px solid rgba(255, 255, 255, 0.06);
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 1.5rem;
  cursor: pointer;
  /* animation: blockBump 4s ease-in-out infinite; */
  overflow: hidden;
}

/* Photo fills block - SHARP rendering (not blurred) */
.brand-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0.85; /* Much clearer opacity to avoid looking washed out / blurry */
  filter: none !important; /* No blur filter */
  pointer-events: none;
  transition: opacity 0.45s ease;
}

/* Dark gradient over photo - lighter on top so face stays clear and sharp */
.brand-block::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.1) 60%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
  transition: background-image 0.4s ease;
}

.brand-block:hover .brand-photo {
  opacity: 0.98;
}
.brand-block:hover {
  animation: none;
  transform: scale(1.02);
}

/* Text on top of gradient */
.brand-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-bottom: 0.85rem;
  animation: pulse 2.5s infinite;
}

.brand-name {
  font-size: clamp(1.7rem, 3.2vw, 3.6rem); /* Increased size */
  font-weight: 900;
  line-height: 0.93;
  letter-spacing: -1.5px;
  color: #ffffff;
}

.brand-name span {
  color: var(--accent);
}

.brand-tagline {
  font-size: 0.78rem; /* Slightly larger */
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.theme-hint {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Light-theme overrides for brand block text */
body.light-theme .brand-block::after {
  background: linear-gradient(
    to top,
    rgba(241, 242, 245, 0.9) 0%,
    rgba(241, 242, 245, 0.15) 60%,
    transparent 100%
  );
}
body.light-theme .brand-name {
  color: #000000;
}
body.light-theme .brand-tagline {
  color: rgba(0, 0, 0, 0.55);
}
body.light-theme .theme-hint {
  color: rgba(0, 0, 0, 0.4);
}

/* ============================================
   ABOUT BLOCK — "Who am I?"
   ============================================ */
.about-block {
  background-color: var(--block-bg);
  border: 1px solid rgba(255, 255, 255, 0.04);
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.6rem;
  cursor: default;
  transition:
    background-color 0.4s ease,
    border-color 0.4s ease,
    transform 0.35s var(--ease);
}

.about-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.about-title {
  font-size: clamp(1.4rem, 2.5vw, 2.4rem); /* Bigger headline */
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-on-light);
  margin-top: 0.4rem;
  flex: 1;
  display: flex;
  align-items: center;
}

.about-teaser {
  font-size: 0.85rem; /* Larger body size */
  line-height: 1.6;
  color: var(--text-on-light); /* Direct reference to text color variable */
  opacity: 0.78; /* Highly visible opacity */
  margin-top: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* See more buttons — hidden until parent block is hovered */
.about-block .special-btn,
.skills-block .special-btn {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.about-block:hover .special-btn,
.skills-block:hover .special-btn {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.special-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  margin-top: 0.8rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font);
  border: 1px solid var(--text-on-light);
  border-radius: 4px;
  color: var(--text-on-light);
  background: transparent;
  cursor: pointer;
  align-self: flex-start;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

.skills-block .special-btn {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
}

body.light-theme .skills-block .special-btn {
  color: #000000;
  border-color: rgba(0, 0, 0, 0.55);
}

.special-btn:hover {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #ffffff !important;
}

/* ============================================
   SKILLS BLOCK
   ============================================ */
.skills-block {
  background-color: var(--block-dark);
  border: 1px solid rgba(255, 255, 255, 0.06);
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.5rem;
  cursor: default;
}

.skills-block-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.skills-block-title {
  font-size: clamp(1.2rem, 2vw, 1.8rem); /* Slightly larger */
  font-weight: 800;
  color: var(--text-on-dark);
  margin-top: 0.35rem;
}

/* Mini skill grid: Centered vertically and scaled up */
.skills-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem 0.6rem;
  width: 100%;
  flex: 1;
  margin: 0;
  padding: 0.6rem 0;
  align-items: center; /* Center items vertically */
  justify-content: center;
}

.skills-mini-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
}

.skills-mini-item i {
  font-size: 1.05rem; /* Corrected size */
  color: var(--accent);
}

.skills-mini-item span {
  font-size: 0.52rem; /* Corrected size */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.55);
}

/* Added later */

.about-block:hover,
.skills-block:hover {
  transform: scale(1.025);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  z-index: 5;
}

.about-block,
.skills-block {
  /* Change this property */
  justify-content: center;
}

.about-title {
  /* Change this property */
  flex: none;
}

.skills-mini-grid {
  /* Change this property */
  flex: none;
}

.special-btn {
  /* Add absolute positioning to take it out of the normal flow */
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 10;
}

/* ============================================
   PROJECT BLOCK — Pure image, text on hover
   ============================================ */
.project-block {
  background-color: var(--block-dark);
  cursor: pointer;
}

.project-block:hover {
  animation: none; /* Stop breathing on hover, scale takes over */
  transform: scale(1.025);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  z-index: 5;
}

.project-block .block-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.5s var(--ease),
    filter 0.4s ease;
  filter: brightness(0.85);
}

.project-block:hover .block-img {
  transform: scale(1.07);
  filter: brightness(0.4);
}

/* Overlay — hidden until hover */
.project-block .block-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.5) 45%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-block:hover .block-overlay {
  opacity: 1;
}

.block-overlay .block-cat {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.2rem;
  transform: translateY(10px);
  transition: transform 0.35s var(--ease);
}

.block-overlay .block-title {
  font-size: clamp(0.95rem, 1.6vw, 1.3rem); /* Slightly larger */
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  transform: translateY(10px);
  transition: transform 0.35s var(--ease) 0.04s;
}

/* Slogan / subtitle line */
.block-overlay .block-slogan {
  font-size: 0.78rem; /* Larger slogan text */
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.35;
  margin-top: 0.2rem;
  transform: translateY(10px);
  transition: transform 0.35s var(--ease) 0.07s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.block-overlay .see-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 4px;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
  transform: translateY(10px);
  transition:
    transform 0.35s var(--ease) 0.1s,
    background 0.2s ease,
    border-color 0.2s ease;
  align-self: flex-start;
}

.project-block:hover .block-cat,
.project-block:hover .block-title,
.project-block:hover .block-slogan,
.project-block:hover .see-btn {
  transform: translateY(0);
}

.see-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
}

.project-block.drawer-open {
  box-shadow: 0 0 0 2px var(--accent);
  z-index: 5;
}

.filtered-out {
  display: none !important;
}

/* Category filter exit animation */
.pixel-block.leaving {
  animation: slideOutRight 0.45s var(--ease) forwards !important;
  pointer-events: none;
  z-index: 6;
}

/* Category filter enter animation */
.pixel-block.entering {
  animation: slideInFromLeft 0.45s var(--ease) both !important;
}

/* ============================================
   INLINE PROJECT DRAWER
   ============================================ */
.project-drawer {
  grid-column: 1 / -1;
  background: var(--drawer-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--drawer-border);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.55s var(--ease),
    opacity 0.4s ease;
  position: relative;
}

.project-drawer.open {
  max-height: 1200px; /* Allow enough space for video embed */
  opacity: 1;
}

.drawer-close {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition:
    background 0.2s,
    color 0.2s;
  z-index: 10;
}
.drawer-close:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.drawer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  min-height: 380px;
}

/* Special drawer: about / skills — single column */
.drawer-inner.single-col {
  grid-template-columns: 1fr;
}

/* LEFT: Media column */
.drawer-media {
  background: #09090b;
  display: flex;
  flex-direction: column;
}

.gallery-viewer {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000000;
}

.gallery-slides {
  width: 100%;
  height: 100%;
  position: relative;
}

.gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.gallery-slide.active {
  opacity: 1;
}
.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Video slide inside carousel */
.gallery-video-slide {
  width: 100%;
  height: 100%;
  position: relative;
  background: #000;
}
.gallery-video-slide iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Thumbnail play-icon overlay for video thumbs */
.gallery-thumb {
  position: relative;
}
.thumb-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  font-size: 0.65rem;
  color: #ffffff;
  z-index: 1;
  border-radius: 2px;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.55);
  border: none;
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.gallery-nav:hover {
  background: var(--accent);
}
.gallery-prev {
  left: 0.75rem;
}
.gallery-next {
  right: 0.75rem;
}

.gallery-thumbs {
  display: flex;
  gap: 6px;
  padding: 0.75rem;
  overflow-x: auto;
  background: #0d0d0f;
}

.gallery-thumb {
  width: 64px;
  height: 40px;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.5;
  transition:
    opacity 0.2s,
    border-color 0.2s;
}
.gallery-thumb.active,
.gallery-thumb:hover {
  opacity: 1;
  border-color: var(--accent);
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Video embed inside the info column - SMALL embed under bulletpoints */
.drawer-info .video-wrap {
  position: relative;
  width: 100%;
  max-width: 440px; /* Small size */
  aspect-ratio: 16 / 9;
  margin-top: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  align-self: flex-start;
}

body.light-theme .drawer-info .video-wrap {
  border-color: rgba(0, 0, 0, 0.1);
}

.drawer-info .video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* RIGHT: Info column */
.drawer-info {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 650px;
}

.drawer-cat-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.45rem;
}

.drawer-title {
  font-size: clamp(1.6rem, 2.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-on-dark);
  margin-bottom: 0.3rem;
}

.drawer-subtitle {
  font-size: 1.05rem; /* Larger */
  color: var(--text-muted);
  margin-bottom: 1.4rem;
  font-style: italic;
}

.drawer-desc {
  font-size: 0.98rem; /* Larger */
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.drawer-desc p + p {
  margin-top: 0.8rem;
}

.drawer-tech-heading {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  opacity: 0.6;
  margin-bottom: 0.6rem;
}

.drawer-tech-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.drawer-tech-list li {
  font-size: 0.9rem; /* Larger */
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.drawer-tech-list li::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ============================================
   ABOUT DRAWER — special content layout
   ============================================ */
.about-drawer-content {
  padding: 2.5rem 2.5rem;
  overflow-y: auto;
  max-height: 700px;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.about-drawer-intro {
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--text-muted);
}
.about-drawer-intro p + p {
  margin-top: 0.9rem;
}

.about-drawer-traits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.about-drawer-trait {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 1.25rem;
}

.about-drawer-trait .trait-icon {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.about-drawer-trait h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-on-dark);
  margin-bottom: 0.45rem;
}

.about-drawer-trait p {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ============================================
   SKILLS DRAWER — skill cards grid
   ============================================ */
.skills-drawer-content {
  padding: 2.5rem;
  overflow-y: auto;
  max-height: 700px;
}

.skills-drawer-content h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-on-dark);
  margin-bottom: 0.3rem;
}

.skills-drawer-content p.skills-intro {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.6rem;
}

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

.skill-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 1.25rem;
}

.skill-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.skill-card .skill-icon {
  font-size: 1.6rem;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.skill-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-on-dark);
  margin-bottom: 0.45rem;
}

.skill-card p {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ============================================
   ADMIN PANEL STYLES
   ============================================ */
body.admin-body {
  background: #0a0a0a;
  min-height: 100vh;
}

.login-card {
  max-width: 400px;
  margin: 7rem auto;
  background: #141416;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
}
.login-card h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}
.login-card > p {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.92rem;
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  text-align: left;
  margin-bottom: 1.25rem;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}

.form-control {
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.95rem;
  width: 100%;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(225, 42, 84, 0.15);
}
textarea.form-control {
  min-height: 110px;
  resize: vertical;
}

.btn {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}
.btn:hover {
  background: var(--accent-hover);
}
.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.admin-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.admin-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 2rem;
  position: sticky;
  top: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 2rem;
  align-items: start;
}

.dashboard-card {
  background: #141416;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 1.75rem;
}

.admin-project-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.admin-project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  gap: 0.8rem;
}
.admin-project-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}
.admin-project-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  background: #000;
  flex-shrink: 0;
}

.footer-insta-link {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}
.footer-insta-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem;
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.site-footer span {
  color: var(--accent);
}

/* ============================================
   KEYFRAMES
   ============================================ */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.25);
  }
}

/* @keyframes blockBump {
  0%,
  100% {
    transform: scale(1);
    box-shadow: none;
  }
  50% {
    transform: scale(1.015);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  }
} */

@keyframes slideOutRight {
  from {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translateX(140%) scale(0.8);
    opacity: 0;
  }
}

@keyframes slideInFromLeft {
  from {
    transform: translateX(-110%) scale(0.85);
    opacity: 0;
  }
  to {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 1400px) {
  .pixel-grid {
    grid-template-columns: repeat(5, 1fr);
    padding: var(--gap) 8%; /* More outer padding on large displays */
    padding-top: calc(var(--gap) + 80px);
  }
  .skills-card-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1100px) {
  .pixel-grid {
    grid-template-columns: repeat(3, 1fr);
    padding: var(--gap) 4%;
    padding-top: calc(var(--gap) + 80px);
  }
  .drawer-inner {
    grid-template-columns: 1fr;
  }
  .drawer-info {
    max-height: none;
    padding: 2rem 1.5rem;
  }
  .about-drawer-traits,
  .skills-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .site-footer span {
    display: none;
  }
  /* Disable hover state changes on mobile to allow instant clicks */
  .project-block:hover .block-overlay,
  .project-block:active .block-overlay {
    display: none !important;
  }

  .project-block:hover .block-img,
  .project-block:active .block-img {
    transform: none !important;
    filter: brightness(0.85) !important;
  }

  .pixel-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: var(--gap) 3%;
    padding-top: calc(var(--gap) + 70px);
  }
  .header-nav {
    display: none;
  }
  .hamburger {
    display: block;
  }
  .drawer-inner {
    grid-template-columns: 1fr;
  }
  .drawer-info {
    padding: 1.5rem 1rem;
  }
  .drawer-title {
    font-size: 1.6rem;
  }
  .about-drawer-traits,
  .skills-card-grid {
    grid-template-columns: 1fr;
  }
  .about-drawer-content,
  .skills-drawer-content {
    padding: 1.5rem 1rem;
  }

  .about-block .special-btn,
  .skills-block .special-btn {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  /* Add padding so the centered content doesn't overlap the absolute button */
  .about-block,
  .skills-block {
    padding-bottom: 4rem;
  }

  .skills-mini-item i {
    font-size: 0.85rem;
  }

  .skills-mini-grid {
    gap: 0.5rem 0.4rem;
    padding: 0.2rem 0; /* Reduce padding to save space */
  }
}

@media (max-width: 480px) {
  .pixel-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
    padding-top: 66px;
  }
  .about-teaser {
    display: none;
  }
  .skills-mini-item span {
    display: none;
  }
}
