:root {
  /* Light Theme */
  --bg-color: #fcfcfc;
  --text-main: #1a1a1a;
  --text-muted: #666666;
  --accent: #2563eb;
  --nav-bg: rgba(220, 220, 220, 0.85);
  --nav-border: rgba(0, 0, 0, 0.2);
  --card-bg: #e3e3e3;
  --btn-bg: #1a1a1a;
  --btn-text: #ffffff;
  --btn-hover: #333333;
  --btn-sec-bg: transparent;
  --btn-sec-text: #1a1a1a;
  --btn-sec-border: #e5e5e5;
  --btn-sec-hover: #f5f5f5;
}

[data-theme="dark"] {
  /* Dark Theme */
  --bg-color: #0d0d0d;
  --text-main: #f2f2f2;
  --text-muted: #a1a1aa;
  --accent: #60a5fa;
  --nav-bg: rgba(13, 13, 13, 0.85);
  --nav-border: rgba(255, 255, 255, 0.08);
  --card-bg: #161616;
  --btn-bg: #f2f2f2;
  --btn-text: #0d0d0d;
  --btn-hover: #d4d4d4;
  --btn-sec-bg: transparent;
  --btn-sec-text: #f2f2f2;
  --btn-sec-border: #333333;
  --btn-sec-hover: #1a1a1a;
}

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

body {
  font-family: "Outfit", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  transition:
    background-color 0.4s ease,
    color 0.4s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--nav-border);
  z-index: 1000;
  transition:
    background 0.4s ease,
    border-color 0.4s ease,
    padding 0.3s ease;
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
  color: var(--text-main);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  position: relative;
}

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

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 50%;
  transition:
    background-color 0.3s ease,
    transform 0.3s ease;
}

.theme-toggle:hover {
  background-color: var(--nav-border);
  transform: scale(1.05);
}

.theme-toggle svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.5rem;
}

/* Main Content (Hero) */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero {
  max-width: 1200px;
  padding: 1.2rem clamp(1rem, 4vw, 2rem);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  text-align: left;
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(30px);
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-image-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-image {
  width: 100%;
  max-width: 400px;
  height: 400px;
  object-fit: cover;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 4px solid var(--btn-sec-border);
  animation: blob-morph 12s ease-in-out infinite;
  transition:
    transform 0.4s ease,
    border-color 0.4s ease;
}

.hero-image:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--accent);
}

@keyframes blob-morph {
  0%,
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  33% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
  66% {
    border-radius: 73% 27% 41% 59% / 40% 58% 42% 50%;
  }
}

.hero-subtitle {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: block;
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1.5px;
  color: var(--text-main);
}

.hero-desc {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 650px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid var(--btn-bg);
}

.btn-primary:hover {
  background-color: var(--btn-hover);
  border-color: var(--btn-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-primary svg {
  transition: transform 0.3s ease;
}

.btn-primary:hover svg {
  transform: translateX(5px);
}

.btn-secondary {
  background-color: var(--btn-sec-bg);
  color: var(--btn-sec-text);
  border: 1px solid var(--btn-sec-border);
}

.btn-secondary:hover {
  background-color: var(--btn-sec-hover);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

/* Footer */
footer {
  padding: 1.2rem clamp(1rem, 4vw, 2rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--nav-border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.socials {
  display: flex;
  gap: 1.25rem;
}

.socials a {
  color: var(--text-muted);
  transition:
    color 0.3s ease,
    transform 0.3s ease;
  display: flex;
}

.socials a:hover {
  color: var(--text-main);
  transform: translateY(-2px);
}

/* Page Shared Layout */
.page-main {
  padding: 1rem 0;
}

.page-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 1.2rem clamp(1rem, 4vw, 2rem);
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(30px);
}

.page-title {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 800;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
  letter-spacing: -1px;
}

.section-heading {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-main);
  position: relative;
  display: inline-block;
}

.section-heading.mt-2 {
  margin-top: 2rem;
}

.section-text {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.text-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.text-link:hover {
  color: var(--text-main);
  text-decoration: underline;
}

/* About Page Specific Layout */
.about-grid {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
}

.about-image-col {
  flex: 0 0 35%;
  position: sticky;
  top: 8rem;
}

.about-text-col {
  flex: 1;
}

.image-stack {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
}

.stack-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 4px solid var(--btn-sec-border);
  transition: transform 0.3s ease;
}

.stack-img:hover {
  transform: scale(1.02);
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.exp-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background-color: var(--nav-bg);
  border: 1px solid var(--nav-border);
  border-radius: 12px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.exp-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-color: var(--nav-border);
}

.exp-year {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
  white-space: nowrap;
}

.exp-details h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  margin-top: -0.3rem;
  color: var(--text-main);
}

.exp-details p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Projects Page Layout */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 2.5rem;
  margin-top: 1rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--nav-border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease,
    border-color 0.4s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border-color: var(--accent);
}

.project-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.project-card:hover .project-overlay,
.project-card:focus-within .project-overlay {
  opacity: 1;
}

.overlay-btn {
  background: var(--bg-color);
  color: var(--text-main);
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transform: translateY(20px);
  transition:
    transform 0.3s ease,
    background 0.3s ease,
    color 0.3s ease;
  text-decoration: none;
}

.project-card:hover .overlay-btn,
.project-card:focus-within .overlay-btn {
  transform: translateY(0);
}

.overlay-btn:hover {
  background: var(--accent);
  color: #fff;
}

.project-status-overlay {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-weight: 600;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  display: inline-block;
}

.project-card:hover .project-status-overlay {
  transform: translateY(0);
}

.project-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--text-main);
  line-height: 1.3;
}

.project-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.tag {
  background: var(--btn-sec-border);
  border: 1px solid var(--nav-border);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-main);
}

/* Carousel */
.carousel {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 300px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  border: 1px solid var(--nav-border);
}

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

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px;
  border-radius: 50px;
  backdrop-filter: blur(10px);
}

.carousel-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Resume Layout */
.resume-container {
  width: 100%;
  aspect-ratio: 8.5/11;
  max-width: 800px;
  background: var(--nav-bg);
  border: 1px solid var(--nav-border);
  border-radius: 20px;
  overflow: hidden;
  margin: 0 auto 1.5rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.resume-frame {
  width: 100%;
  height: 100%;
  border: none;
}

.updated-note {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Contact Layout */
.contact-page .page-title {
  margin-bottom: 0;
}

.contact-page .section-text {
  margin-bottom: 3rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: flex-start;
}

.contact-info {
  display: flex;
  flex-direction: column;
}

.info-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--nav-bg);
  border: 1px solid var(--nav-border);
  border-radius: 16px;
  text-decoration: none;
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.text-link-card.info-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border-color: var(--accent);
}

.text-link-card.info-item:hover .info-icon {
  background: var(--accent);
  color: #fff;
}

.info-icon {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: var(--btn-sec-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

.info-details h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: var(--text-main);
}

.info-details p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--nav-border);
  border-radius: 20px;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  text-align: left;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--nav-border);
  background: var(--bg-color);
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.w-100 {
  width: 100%;
  justify-content: center;
}

.form-status {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
}

.form-status.success {
  color: #10b981;
}

.form-status.error {
  color: #ef4444;
}

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

/* Responsive */
@media (max-width: 992px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    gap: 3rem;
    padding-block: 4rem;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-actions {
    align-items: center;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .navbar .nav-container {
    padding: 1rem 5%;
  }

  .nav-links {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(252, 252, 252, 1);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    border: none;
    gap: 2.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.4s ease,
      visibility 0.4s ease;
    z-index: 900;
  }

  [data-theme="dark"] .nav-links {
    background: rgba(13, 13, 13, 1);
  }

  .nav-links.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-links a {
    font-size: 2rem;
    font-weight: 700;
    font-family: inherit;
    color: var(--text-muted);
    transition:
      color 0.3s ease,
      transform 0.3s ease;
  }

  .nav-links a:hover,
  .nav-links a.active {
    color: var(--text-main);
    transform: translateX(10px);
  }

  .mobile-toggle {
    display: block;
    z-index: 999;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-desc {
    font-size: 1.1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-image {
    max-width: 250px;
    height: 250px;
  }

  footer {
    flex-direction: column-reverse;
    gap: 1.5rem;
    text-align: center;
  }

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

  .about-image-col {
    position: static;
    max-width: 400px;
    margin: 0 auto;
  }

  .exp-item {
    flex-direction: column;
    gap: 0.5rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Touch devices: reveal hover-only overlays */
@media (hover: none) {
  .project-overlay {
    opacity: 1;
  }

  .overlay-btn {
    transform: translateY(0);
  }
}

/* Visible keyboard focus */
a:focus-visible,
button:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.overlay-btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Keep the ring inside the clipped card overlay */
.overlay-btn:focus-visible {
  outline-offset: -3px;
}

/* Small screens */
@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(2rem, 9vw, 2.75rem);
    letter-spacing: -0.5px;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .page-title {
    letter-spacing: -0.5px;
  }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .hero,
  .page-container {
    opacity: 1;
    transform: none;
  }

  .hero-image {
    animation: none;
  }
}

/* ===== Light-mode card contrast, blur and shadow ===== */
[data-theme="light"] .project-card,
[data-theme="light"] .bio-card,
[data-theme="light"] .info-box,
[data-theme="light"] .exp-item,
[data-theme="light"] .contact-card,
[data-theme="light"] .release-card {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: rgba(0, 0, 0, 0.2);
}

/* ===== About page specific styles ===== */
.about-hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 3rem;
}
.about-photo {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
  border: 1px solid var(--nav-border);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-photo .photo-badge {
  position: absolute; left: 1rem; bottom: 1rem;
  background: rgba(0, 0, 0, .6); backdrop-filter: blur(8px);
  padding: .4rem .8rem; border-radius: 999px; font-size: .85rem; color: #fff;
}
.bio-card {
  background: var(--card-bg); border: 1px solid var(--nav-border);
  border-radius: 16px; padding: 1.4rem; margin-bottom: 1rem;
  transition: transform .25s ease, border-color .25s ease;
}
.bio-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.bio-card h3 { margin: 0 0 .4rem; font-size: 1.1rem; }
.bio-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (min-width: 992px) { .bio-grid { grid-template-columns: repeat(2, 1fr); } }
.bio-card p { margin: 0; color: var(--text-muted); line-height: 1.6; }
.dual-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin: 1.5rem 0; }
@media (min-width: 992px) { .dual-grid { grid-template-columns: repeat(2, 1fr); align-items: start; } }
.tag-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.tag2 { padding: .3rem .75rem; border-radius: 999px; background: var(--btn-sec-border); border: 1px solid var(--nav-border); font-size: .78rem; font-weight: 500; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; margin: 1.5rem 0; }
.info-box { background: var(--nav-bg); border: 1px solid var(--nav-border); border-radius: 12px; padding: .9rem; }
.info-box .k { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.info-box .v { font-size: 1rem; font-weight: 600; margin-top: .3rem; }
.timeline { position: relative; padding-left: 1.5rem; margin: 1.5rem 0; max-width: none; text-align: left; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: var(--nav-border); transform: none; }
.tl-item { position: relative; margin-bottom: 1.4rem; padding-top: 0; }
.tl-item::before { content: ""; position: absolute; left: -1.5rem; top: .35rem; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg-color); transform: none; }
.tl-item .yr { font-size: .78rem; color: var(--accent); font-weight: 600; margin-bottom: .2rem; }
.tl-item .tt { font-weight: 600; margin-bottom: .15rem; }
.tl-item .dd { color: var(--text-muted); font-size: .9rem; line-height: 1.5; }
.release-card {
  background: var(--card-bg); border: 1px solid var(--nav-border); border-radius: 14px; padding: 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem;
  transition: transform .2s ease, border-color .2s ease;
}
.release-card:hover { transform: translateX(4px); border-color: var(--accent); }
.release-card .name { font-weight: 600; }
.release-card .meta { color: var(--text-muted); font-size: .85rem; }
.release-card a { color: var(--accent); text-decoration: none; font-weight: 500; white-space: nowrap; }
@media (max-width: 992px) {
  .about-hero { grid-template-columns: 1fr; }
  .about-photo { max-width: 360px; margin: 0 auto; }
}

/* ===== Home page: photo on top, everything below ===== */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  min-height: auto;
  max-width: none;
  width: 100%;
  align-self: flex-start;
  margin-top: calc(-1 * var(--nav-h, 72px));
  padding: 0 0 3rem;
  text-align: center;
  overflow: visible;
}
.hero-visual {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 0 auto;
}
.hero-visual img {
  width: 100%;
  height: 100vh;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  opacity: 0.6;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .3));
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 32%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.28) 68%, rgba(0, 0, 0, 0.08) 82%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 32%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.28) 68%, rgba(0, 0, 0, 0.08) 82%, transparent 92%);
}
.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  text-align: center;
  margin-top: -340px;
  padding: 0 1rem;
}
.hero-subtitle {
  font-size: 0.8rem;
  letter-spacing: 1.5px;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -1px;
  margin-bottom: 1.1rem;
}
.hero-desc {
  font-size: 1.05rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.8rem;
}
.hero-actions {
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Mobile responsiveness refinements ===== */
@media (max-width: 992px) {
  .hero {
    flex-direction: column;
    text-align: center;
    gap: 0;
    padding: 0 0 2.5rem;
    min-height: auto;
  }
  .hero-content { max-width: 100%; margin-top: -230px; }
  .about-hero { grid-template-columns: 1fr; gap: 1.5rem; }
  .bio-grid, .dual-grid { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 768px) {
  .nav-links { background: var(--bg-color); }

  .hero {
    min-height: auto;
    padding: 0 0 2.5rem;
  }
  .hero-title { font-size: clamp(2rem, 8vw, 2.75rem); line-height: 1.15; }
  .hero-desc { font-size: 1rem; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn-primary,
  .hero-actions .btn-secondary { width: 100%; justify-content: center; }

  .about-photo { max-width: 340px; margin: 0 auto; }
  .info-box { padding: .75rem; }
  .release-card { flex-direction: column; align-items: flex-start; gap: .35rem; }
  .release-card a { white-space: normal; }
  .page-title { font-size: clamp(2rem, 7vw, 2.75rem); }
  .section-heading { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: clamp(1.7rem, 8.5vw, 2.2rem); }
  .hero-visual { max-width: none; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .about-photo { max-width: 280px; }
  .tag2 { font-size: .72rem; }
  .release-card { padding: .85rem; }
}

/* ===== Show both photos for comparison ===== */
.hero-visual {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  max-width: none;
  width: 100%;
  margin: 0;
}
.hero-visual img {
  grid-area: 1 / 1;
  width: 100%;
  max-width: none;
  height: 100vh;
  max-height: none;
  object-fit: cover;
  object-position: center 18%;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 32%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.28) 68%, rgba(0, 0, 0, 0.08) 82%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 32%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.28) 68%, rgba(0, 0, 0, 0.08) 82%, transparent 92%);
  filter: none;
}
.hero-visual img:first-child {
  transform: none;
  opacity: 0.4;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 52%, rgba(0, 0, 0, 0.5) 66%, rgba(0, 0, 0, 0.22) 78%, rgba(0, 0, 0, 0.06) 86%, transparent 94%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 52%, rgba(0, 0, 0, 0.5) 66%, rgba(0, 0, 0, 0.22) 78%, rgba(0, 0, 0, 0.06) 86%, transparent 94%);
}
.hero-visual img:last-child {
  transform: none;
  opacity: 0.5;
}
.hero-content {
  margin-top: -300px;
}
@media (max-width: 767px) {
  .hero-visual img { max-width: none; max-height: none; }
}

/* ===== Desktop: keep the hero photo from getting too big ===== */
@media (min-width: 992px) {
  .hero-visual img {
    width: auto;
    max-width: 44vw;
    height: auto;
    max-height: 82vh;
    object-fit: contain;
  }
}

/* ===== Desktop: framed base photo on the left, text on the right ===== */
@media (min-width: 992px) {
  .hero {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 3.5rem;
    margin-top: 0;
    padding: 2.5rem 2rem;
  }
  .hero-visual {
    display: block;
    width: auto;
    max-width: none;
    margin: 0;
  }
  .hero-visual img:last-child { display: none; }
  .hero-visual img:first-child {
    display: block;
    width: auto;
    max-width: 380px;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    object-position: center;
    opacity: 1;
    -webkit-mask-image: none;
    mask-image: none;
    border: 8px solid var(--card-bg);
    border-radius: 22px;
    box-shadow: 0 0 0 1px var(--nav-border), 0 25px 60px rgba(0, 0, 0, .35);
    filter: none;
  }
  .hero-content {
    width: auto;
    max-width: 520px;
    margin-top: 0;
    text-align: left;
    padding: 0;
  }
  .hero-actions { justify-content: flex-start; }
}

/* ===== Phone: smaller hero buttons ===== */
@media (max-width: 768px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: auto;
  }
  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    width: auto;
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
  }
}

/* ===== Tall viewports (>700px): lift the hero text further up ===== */
@media (min-height: 700px) {
  .hero-content { margin-top: -430px; }
}

/* Light mode: home hero images at full opacity */
[data-theme="light"] .hero-visual img,
[data-theme="light"] .hero-visual img:first-child,
[data-theme="light"] .hero-visual img:last-child {
  opacity: 1;
}

/* ===== Live updating indicator (Projects) ===== */
.live-badge{display:inline-flex;align-items:center;gap:.45rem;margin-left:.7rem;padding:.28rem .7rem;
  border-radius:999px;font-size:.68rem;font-weight:700;letter-spacing:1px;text-transform:uppercase;
  color:#4ade80;background:rgba(34,197,94,.12);border:1px solid rgba(34,197,94,.4);
  vertical-align:middle;white-space:nowrap}
.live-dot{width:.5rem;height:.5rem;border-radius:50%;background:#4ade80;flex:0 0 auto;
  box-shadow:0 0 0 0 rgba(34,197,94,.7);animation:livePulse 1.6s infinite}
@keyframes livePulse{0%{box-shadow:0 0 0 0 rgba(34,197,94,.7)}70%{box-shadow:0 0 0 8px rgba(34,197,94,0)}100%{box-shadow:0 0 0 0 rgba(34,197,94,0)}}
.live-note{color:#a1a1aa;font-size:.85rem;margin:.5rem 0 1.4rem;display:flex;align-items:center;gap:.5rem}
@media (prefers-reduced-motion:reduce){.live-dot{animation:none}}

/* Gallery: show full images (no crop) */
#uploaded-gallery .project-img-wrapper { aspect-ratio: auto; height: auto; overflow: hidden; }
#uploaded-gallery .project-img { height: auto; object-fit: contain; }
#uploaded-gallery .project-card:hover .project-img { transform: none; }

/* GALLERY-BASELINE-FIX: kill the inline-image gap under gallery photos */
#uploaded-gallery .project-img { display: block; }
#uploaded-gallery .project-img-wrapper { line-height: 0; font-size: 0; }

/* scroll-reveal + loader (Facebook-ish) */
.g-reveal{opacity:0;transform:translateY(18px);transition:opacity .5s ease,transform .5s ease}
.g-reveal.in{opacity:1;transform:none}
.grid-loader{grid-column:1/-1;display:flex;justify-content:center;align-items:center;padding:3rem 0}
.spinner{width:34px;height:34px;border-radius:50%;border:3px solid rgba(255,255,255,.15);border-top-color:#6366f1;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.g-reveal{opacity:1;transform:none;transition:none}.spinner{animation:none}}

/* gallery infinite scroll: sentinel + small spinner */
.g-sentinel{grid-column:1/-1;display:flex;justify-content:center;align-items:center;padding:1.2rem 0}
.spinner-sm{width:22px;height:22px;border-width:2px}

/* gallery heart reaction */
#uploaded-gallery .heart{position:absolute;top:.55rem;right:.55rem;z-index:2;display:inline-flex;align-items:center;gap:.3rem;
  padding:.32rem .55rem;border-radius:999px;cursor:pointer;font-size:.8rem;font-weight:700;line-height:1;color:#fff;
  background:rgba(0,0,0,.5);border:1px solid rgba(255,255,255,.22);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
  transition:transform .15s ease,background .15s ease,border-color .15s ease,color .15s ease}
#uploaded-gallery .heart svg{width:15px;height:15px;fill:none;transition:fill .15s ease}
#uploaded-gallery .heart:hover{transform:scale(1.07)}
#uploaded-gallery .heart.liked{color:#ff4d6d;background:rgba(255,77,109,.16);border-color:rgba(255,77,109,.55)}
#uploaded-gallery .heart.liked svg{fill:currentColor}
#uploaded-gallery .heart-count{font-variant-numeric:tabular-nums}

/* heart count pop when it updates live */
#uploaded-gallery .heart.bump .heart-count{display:inline-block;animation:heartPop .4s ease}
@keyframes heartPop{0%{transform:scale(1)}40%{transform:scale(1.4)}100%{transform:scale(1)}}

/* gallery image load animation (blur-up + fade/zoom) */
#uploaded-gallery .project-img{opacity:0;transform:scale(1.05);filter:blur(6px);
  transition:opacity .6s ease,transform .6s ease,filter .6s ease}
#uploaded-gallery .project-img.is-loaded{opacity:1;transform:none;filter:none}
@media (prefers-reduced-motion:reduce){#uploaded-gallery .project-img{opacity:1;transform:none;filter:none;transition:none}}

/* gallery lightbox */
#uploaded-gallery .project-img{cursor:zoom-in}
.lightbox{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:1.2rem;
  background:rgba(5,7,12,.86);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  opacity:0;visibility:hidden;transition:opacity .3s ease,visibility .3s ease}
.lightbox.open{opacity:1;visibility:visible}
.lightbox .lb-img{max-width:94vw;max-height:92vh;border-radius:14px;box-shadow:0 30px 80px rgba(0,0,0,.6);
  transform:scale(.92);opacity:0;transition:transform .38s cubic-bezier(.2,.8,.2,1),opacity .38s ease}
.lightbox.open .lb-img{transform:none;opacity:1}
.lightbox .lb-close{position:absolute;top:1rem;right:1rem;width:44px;height:44px;border-radius:12px;
  border:1px solid rgba(255,255,255,.25);background:rgba(0,0,0,.5);color:#fff;font-size:1.05rem;cursor:pointer;line-height:1}
.lightbox .lb-close:hover{background:rgba(255,255,255,.15)}
body.lb-lock{overflow:hidden}
@media (prefers-reduced-motion:reduce){.lightbox .lb-img{transition:none}}

/* close button styled like the heart */
.lightbox .lb-close{width:auto;height:auto;padding:.5rem;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;
  background:rgba(0,0,0,.5);border:1px solid rgba(255,255,255,.22);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
  transition:transform .15s ease,background .15s ease,color .15s ease}
.lightbox .lb-close svg{width:20px;height:20px;display:block}
.lightbox .lb-close:hover{transform:scale(1.08);background:rgba(255,255,255,.16)}

/* let the heart pop without being clipped (gallery cards do not clip) */
#uploaded-gallery .project-card{overflow:visible}
#uploaded-gallery .project-img-wrapper{overflow:visible}
#uploaded-gallery .project-img{border-radius:20px}
#uploaded-gallery .heart{overflow:visible}

/* compact mobile nav (not full screen) */
@media (max-width: 768px) {
  .nav-links{
    top: calc(var(--nav-h, 72px) + 8px);
    left: 5%; right: 5%;
    width: auto; height: auto; max-height: 78vh; overflow-y: auto;
    background: #fcfcfc;
    flex-direction: column; justify-content: flex-start; align-items: stretch;
    padding: .5rem; gap: .25rem;
    border: 1px solid #e6e6e6; border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0,0,0,.28);
    transform: translateY(-8px);
    transition: opacity .25s ease, visibility .25s ease, transform .25s ease;
  }
  [data-theme="dark"] .nav-links{ background:#0d0d0d; border-color:#2a2a2a; }
  .nav-links.active{ transform: none; }
  .nav-links a{ font-size:1.05rem; font-weight:600; color:var(--text-main); padding:.75rem .9rem; border-radius:12px; }
  .nav-links a:hover, .nav-links a.active{ color:var(--text-main); background: rgba(127,127,127,.14); transform:none; }
}

/* side drawer mobile nav (slides in from the right) */
@media (max-width: 768px) {
  .nav-links{
    top: 0; right: 0; left: auto; bottom: 0;
    width: 65%; max-width: 340px; height: 100dvh; max-height: none;
    overflow-y: auto;
    background: rgba(15,15,15,.5);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
    flex-direction: column; justify-content: flex-start; align-items: stretch;
    padding: 5.2rem 1rem 1.4rem; gap: .3rem;
    border: none; border-left: 1px solid #2a2a2a;
    border-top-left-radius: 20px; border-bottom-left-radius: 20px; border-top-right-radius: 0; border-bottom-right-radius: 0;
    box-shadow: -30px 0 70px rgba(0,0,0,.45);
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateX(100%);
    transition: transform .32s cubic-bezier(.2,.8,.2,1), opacity .32s ease, visibility .32s ease;
  }
  .nav-links.active{ opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(0); }
  .nav-links a{ font-size: 1.1rem; font-weight: 600; color: #e8eef7; padding: .85rem 1rem; border-radius: 12px; }
  .nav-links a:hover, .nav-links a.active{ color: #fff; background: rgba(255,255,255,.09); transform: none; }

  [data-theme="light"] .nav-links{ background: rgba(252,252,252,.62); border-left-color: rgba(0,0,0,.08); box-shadow: -30px 0 70px rgba(0,0,0,.25); }
  [data-theme="light"] .nav-links a{ color: #1a1a1a; }
  [data-theme="light"] .nav-links a:hover, [data-theme="light"] .nav-links a.active{ color: #000; background: rgba(0,0,0,.06); }
}

/* mobile drawer backdrop (tap the side to close) */
.nav-backdrop{position:fixed;inset:0;z-index:850;background:rgba(0,0,0,.5);
  -webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);
  opacity:0;visibility:hidden;transition:opacity .3s ease,visibility .3s ease}
.nav-backdrop.open{opacity:1;visibility:visible}
@media (min-width:769px){.nav-backdrop{display:none}}

/* frosted-glass navbar (strong) */
.navbar{
  background: rgba(18,22,30,.38) !important;
  -webkit-backdrop-filter: blur(22px) saturate(180%) !important;
  backdrop-filter: blur(22px) saturate(180%) !important;
  border-bottom: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
}
[data-theme="light"] .navbar{
  background: rgba(252,252,252,.5) !important;
  border-bottom: 1px solid rgba(0,0,0,.10) !important;
}

/* heart appears only after its image loads (one by one) */
#uploaded-gallery .heart{opacity:0;transition:opacity .35s ease,transform .15s ease,background .15s ease,border-color .15s ease,color .15s ease}
#uploaded-gallery .heart.ready{opacity:1}
@media (prefers-reduced-motion:reduce){#uploaded-gallery .heart{transition:none}}

/* gallery card appears only when its image is ready (no empty outlines) */
#uploaded-gallery .gal-card{opacity:0;transform:translateY(10px);transition:opacity .5s ease,transform .5s ease}
#uploaded-gallery .gal-card.gal-ready{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){#uploaded-gallery .gal-card{opacity:1;transform:none;transition:none}}

/* clean blur-up: card is borderless, only the photo animates in */
#uploaded-gallery .project-card{background:transparent;border:none;box-shadow:none}
#uploaded-gallery .gal-card{opacity:1;transform:none}
#uploaded-gallery .project-img{opacity:0;transform:scale(1.08);filter:blur(16px);
  transition:opacity .6s ease,transform .9s cubic-bezier(.2,.8,.2,1),filter .9s ease}
#uploaded-gallery .project-img.is-loaded{opacity:1;transform:none;filter:none}

/* guaranteed blur-up (stronger, mirrors the demo) */
#uploaded-gallery .project-img{opacity:0;transform:scale(1.1);filter:blur(22px);
  transition:opacity .6s ease,transform 1s ease,filter 1s ease}
#uploaded-gallery .project-img.is-loaded{opacity:1;transform:none;filter:none}

/* no border on gallery (belt and braces) */
#uploaded-gallery .project-card{background:none;border:0;box-shadow:none}
#uploaded-gallery .project-img{border:0}

/* REVERT: gallery back to the simple look (card border, heart always visible, light blur-up) */
#uploaded-gallery .project-card,#uploaded-gallery .gal-card{opacity:1;transform:none;
  background:var(--card-bg);border:1px solid var(--nav-border);
  box-shadow:0 3px 6px rgba(0,0,0,.05);border-radius:20px;overflow:visible}
#uploaded-gallery .project-img-wrapper{overflow:visible}
#uploaded-gallery .project-img{border:0;border-radius:20px;opacity:0;transform:scale(1.04);filter:blur(6px);
  transition:opacity .5s ease,transform .5s ease,filter .5s ease}
#uploaded-gallery .project-img.is-loaded{opacity:1;transform:none;filter:none}
#uploaded-gallery .heart{opacity:1}

/* hide card + heart until the image loads (no border / likes before the photo) */
#uploaded-gallery .gal-card{opacity:0;transition:opacity .35s ease}
#uploaded-gallery .gal-card.gal-ready{opacity:1}
#uploaded-gallery .heart{opacity:0;transition:opacity .35s ease}
#uploaded-gallery .heart.ready{opacity:1}

/* hero image nice reveal (desktop / PC only) */
@media (min-width: 992px) {
  .hero-visual img.hero-armed{opacity:0;transform:scale(1.06);
    transition:opacity 1s ease,transform 1.3s cubic-bezier(.2,.8,.2,1)}
  .hero-visual img.hero-armed.hero-in{opacity:.6;transform:none}
}

/* hero blur-up (same as gallery), desktop only */
@media (min-width: 992px) {
  .hero-visual img.hero-armed{opacity:0;transform:scale(1.04);
    filter:blur(6px) drop-shadow(0 20px 40px rgba(0,0,0,.3));
    transition:opacity .6s ease,transform .6s ease,filter .6s ease}
  .hero-visual img.hero-armed.hero-in{opacity:.6;transform:none;
    filter:blur(0px) drop-shadow(0 20px 40px rgba(0,0,0,.3))}
}

/* hero blur-only (no opacity change), desktop only */
@media (min-width: 992px) {
  .hero-visual img.hero-armed{transform:scale(1.04);
    filter:blur(6px) drop-shadow(0 20px 40px rgba(0,0,0,.3));
    transition:transform .6s ease,filter .6s ease}
  .hero-visual img.hero-armed.hero-in{transform:none;
    filter:blur(0px) drop-shadow(0 20px 40px rgba(0,0,0,.3))}
}

/* hero load effect removed (force normal look even if old JS adds the class) */
.hero-visual img.hero-armed,
.hero-visual img.hero-armed.hero-in{opacity:.6;transform:none;
  filter:drop-shadow(0 20px 40px rgba(0,0,0,.3));transition:none}

/* section scroll reveal (home -> about) */
.reveal-section.reveal-armed{opacity:0;transform:translateY(44px);
  transition:opacity .9s ease,transform .9s ease}
.reveal-section.reveal-armed.in{opacity:1;transform:none}
.home-about{padding-top:2rem;border-top:1px solid var(--nav-border)}
@media (prefers-reduced-motion:reduce){.reveal-section.reveal-armed{opacity:1;transform:none;transition:none}}

/* scroll-down indicator (home hero) */
.scroll-down{position:absolute;left:50%;bottom:1.2rem;transform:translateX(-50%);z-index:3;
  display:flex;flex-direction:column;align-items:center;gap:.3rem;
  color:var(--text-muted);text-decoration:none;font-size:.68rem;letter-spacing:2px;text-transform:uppercase;
  transition:color .2s ease}
.scroll-down:hover{color:var(--text-main)}
.scroll-down svg{width:24px;height:24px;animation:scrollBounce 1.6s ease-in-out infinite}
@keyframes scrollBounce{0%,100%{transform:translateY(0);opacity:.45}50%{transform:translateY(7px);opacity:1}}
@media (prefers-reduced-motion:reduce){.scroll-down svg{animation:none}}

/* scroll-up indicator (about page -> home) */
.scroll-up{position:fixed;right:1rem;bottom:1rem;z-index:900;
  display:inline-flex;flex-direction:column;align-items:center;gap:.2rem;
  color:var(--text-main);text-decoration:none;font-size:.62rem;letter-spacing:1.5px;text-transform:uppercase;
  background:var(--nav-bg);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  border:1px solid var(--nav-border);border-radius:16px;padding:.55rem .7rem}
.scroll-up svg{width:22px;height:22px;animation:scrollUpBounce 1.6s ease-in-out infinite}
@keyframes scrollUpBounce{0%,100%{transform:translateY(0);opacity:.5}50%{transform:translateY(-6px);opacity:1}}
@media (prefers-reduced-motion:reduce){.scroll-up svg{animation:none}}

/* fix: no horizontal overflow on phones (prevents the page looking zoomed-out/small) */
html, body{max-width:100%;overflow-x:clip}
img, video, iframe, svg{max-width:100%}
@media (max-width: 992px){
  .page-container, .nav-container, section, .hero, .hero-visual{max-width:100%;overflow-x:clip}
}

/* phones taller than 950px: lift hero-content and photo up */
@media (max-width: 992px) and (min-height: 950px) {
  .hero-content { transform: translateY(-120px); }
  .hero-visual { transform: translateY(-60px); }
}
/* Home: second full-screen block (About content) */
main:has(.home-slide) {
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}
.home-slide {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 100vh;
  padding: 5rem 0 4rem;
}
/* no animation on the home About content */
main:has(.home-slide) .page-container {
  animation: none;
  opacity: 1;
  transform: none;
}
/* ============================================================
   Studio look (inspired by barecreative): bold type,
   full-screen sections, scroll reveals, page transitions
   ============================================================ */

/* --- bold big-type look --- */
.hero-title { letter-spacing: -2.5px; }
.section-heading { letter-spacing: -0.8px; font-weight: 700; }
.page-title { letter-spacing: -2px; }

/* --- section reveals (tagged by JS as .sr) --- */
.sr { opacity: 0; transform: translateY(38px);
  transition: opacity .85s cubic-bezier(.16, 1, .3, 1), transform .85s cubic-bezier(.16, 1, .3, 1);
  will-change: opacity, transform; }
.sr.sr-in { opacity: 1; transform: none; }

/* --- full-screen blocks --- */
.fs-section { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }

/* --- page transition (SPA swaps <main>) --- */
main { transition: opacity .4s ease, transform .4s ease; }

@media (prefers-reduced-motion: reduce) {
  .sr { opacity: 1; transform: none; transition: none; }
  main { transition: none; }
}
/* locked background photo behind the "My Story" block (works on mobile too).
   JS clips this fixed layer to the visible part of .about-hero. */
.about-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("/assets/images/gallery/8f57db8629167480.webp") center / cover no-repeat;
  opacity: .17;
  pointer-events: none;
  display: none;
}
main:has(.home-slide) .home-slide .page-container { position: relative; z-index: 1; }
/* desktop only: show the framed hero photo at full strength.
   (phones keep the faded full-bleed photo so the text stays readable) */
@media (min-width: 992px) {
  main:has(.home-slide) .hero-visual img {
    opacity: 1 !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }
}
/* light mode: show the My Story background photo at full opacity */
[data-theme="light"] .about-bg {
  opacity: 1;
}
/* glassy info-box (frosted glass) */
.info-box {
  background: rgba(255, 255, 255, .07) !important;
  -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
  backdrop-filter: blur(18px) saturate(160%) !important;
  border: 1px solid rgba(255, 255, 255, .16) !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .35),
              inset 0 1px 0 rgba(255, 255, 255, .14) !important;
}
[data-theme="light"] .info-box {
  background: rgba(255, 255, 255, .55) !important;
  border-color: rgba(0, 0, 0, .08) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .12),
              inset 0 1px 0 rgba(255, 255, 255, .6) !important;
}
/* hide the about-photo block on the home My Story section */
main:has(.home-slide) .home-slide .about-photo {
  display: none !important;
}
/* on PC the text stays in the LEFT column; the right column stays empty */
@media (min-width: 992px) {
  main:has(.home-slide) .home-slide .about-hero {
    grid-template-columns: 1fr 1fr !important;
  }
}
/* mini slideshow of the latest gallery photos beside My Story */
.mini-slideshow {
  position: relative;
  width: 100%;
  max-width: 100%;
  justify-self: end;
  aspect-ratio: 4 / 5;
  border-radius: 22px;
  overflow: hidden;
  z-index: 3;
  background: rgba(255, 255, 255, .04);
  border: 1px solid transparent;     /* replaced by the fading gradient below */
  box-shadow: 0 24px 60px rgba(0, 0, 0, .38);
}
/* ~20px fade around the slideshow so its edges blend into the page */
.mini-slideshow {
  -webkit-mask-image:
    linear-gradient(to right,  rgba(0,0,0,0) 0%, rgba(0,0,0,.03) 8%, rgba(0,0,0,.1) 18%, rgba(0,0,0,.24) 28%, rgba(0,0,0,.45) 38%, rgba(0,0,0,.78) 47%, #000 55%, #000 55%, rgba(0,0,0,.78) 63%, rgba(0,0,0,.45) 72%, rgba(0,0,0,.24) 82%, rgba(0,0,0,.1) 92%, transparent 100%),
    linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,.03) 8%, rgba(0,0,0,.1) 18%, rgba(0,0,0,.24) 28%, rgba(0,0,0,.45) 38%, rgba(0,0,0,.78) 47%, #000 55%, #000 55%, rgba(0,0,0,.78) 63%, rgba(0,0,0,.45) 72%, rgba(0,0,0,.24) 82%, rgba(0,0,0,.1) 92%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right,  rgba(0,0,0,0) 0%, rgba(0,0,0,.03) 8%, rgba(0,0,0,.1) 18%, rgba(0,0,0,.24) 28%, rgba(0,0,0,.45) 38%, rgba(0,0,0,.78) 47%, #000 55%, #000 55%, rgba(0,0,0,.78) 63%, rgba(0,0,0,.45) 72%, rgba(0,0,0,.24) 82%, rgba(0,0,0,.1) 92%, transparent 100%),
    linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,.03) 8%, rgba(0,0,0,.1) 18%, rgba(0,0,0,.24) 28%, rgba(0,0,0,.45) 38%, rgba(0,0,0,.78) 47%, #000 55%, #000 55%, rgba(0,0,0,.78) 63%, rgba(0,0,0,.45) 72%, rgba(0,0,0,.24) 82%, rgba(0,0,0,.1) 92%, transparent 100%);
  mask-composite: intersect;
}
.mini-slideshow::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  padding: 1px;
  background: linear-gradient(180deg,
      rgba(255, 255, 255, .5) 0%,
      rgba(255, 255, 255, .18) 42%,
      rgba(255, 255, 255, 0) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}
[data-theme="light"] .mini-slideshow::after {
  background: linear-gradient(180deg,
      rgba(0, 0, 0, .35) 0%,
      rgba(0, 0, 0, .12) 42%,
      rgba(0, 0, 0, 0) 100%);
}
.mini-slideshow img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.2s ease, transform 6.5s ease;
}
.mini-slideshow img.on { opacity: 1; transform: scale(1); }
.mini-slideshow .dots {
  position: absolute; left: 50%; bottom: .7rem;
  transform: translateX(-50%);
  display: flex; gap: .35rem; z-index: 2;
}
.mini-slideshow .dots i {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  transition: background .3s ease, transform .3s ease;
}
.mini-slideshow .dots i.on { background: #fff; transform: scale(1.3); }

@media (max-width: 992px) {
  .mini-slideshow {
    max-width: 100%;
    aspect-ratio: 3 / 4;
    justify-self: center;
    align-self: start;
    margin: 1.2rem auto 0;
  }
  main:has(.home-slide) .home-slide .about-hero { overflow: visible !important; }

}
@media (prefers-reduced-motion: reduce) {
  .mini-slideshow img { transition: opacity .3s ease; transform: none; }
}
/* rotating hero subtitle (cross-fades between sets) */
.hero-subtitle { position: relative; display: inline-block; }
.hero-subtitle .sub-line {
  display: block;
  position: absolute;
  left: 0; right: 0; top: 0;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .7s ease, transform .7s ease;
  white-space: nowrap;
}
.hero-subtitle .sub-line.on { opacity: 1; transform: none; position: relative; }
@media (prefers-reduced-motion: reduce) {
  .hero-subtitle .sub-line { transition: none; }
}
/* hard scroll lock while the mobile menu is open */
body.nav-open { overflow: hidden !important; touch-action: none; overscroll-behavior: none; }
html.nav-open { overflow: hidden !important; }
/* close (x) button inside the mobile drawer */
.drawer-close { display: none; }
@media (max-width: 768px) {
  .drawer-close {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: calc(var(--nav-h, 72px) + .7rem); right: .8rem;
    width: 44px; height: 44px; border-radius: 12px;
    background: rgba(127,127,127,.14); border: none; color: inherit;
    cursor: pointer; z-index: 3;
  }
  .drawer-close svg { width: 22px; height: 22px; }
  .drawer-close:hover { background: rgba(127,127,127,.24); }
}
/* mobile drawer sits at the very top, ABOVE the navbar */
.nav-backdrop { z-index: 100001 !important; }
@media (max-width: 768px) {
  .nav-links { top: 0 !important; bottom: 0 !important; height: 100dvh !important; z-index: 100002 !important; }
}
/* close button removed from the menu drawer */
.drawer-close { display: none !important; }
/* FINAL gallery blur-up — the ORIGINAL soft one (blur 6px + tiny zoom) */
#uploaded-gallery .gal-card { opacity: 0; transform: translateY(6px);
  transition: opacity .45s ease, transform .45s ease; }
#uploaded-gallery .gal-card.gal-ready { opacity: 1; transform: none; }
#uploaded-gallery .project-img {
  opacity: 0; transform: scale(1.05); filter: blur(6px);
  transition: opacity .6s ease, transform .6s ease, filter .6s ease;
  will-change: opacity, transform, filter;
}
#uploaded-gallery .project-img.is-loaded { opacity: 1; transform: none; filter: blur(0); }
@media (prefers-reduced-motion: reduce) {
  #uploaded-gallery .gal-card, #uploaded-gallery .project-img { opacity: 1; transform: none; filter: none; transition: none; }
}
/* like (heart) button animates in with the photo (scroll-triggered) */
#uploaded-gallery .heart {
  opacity: 0;
  transform: scale(.6) translateY(4px);
  transition: opacity .35s ease, transform .45s cubic-bezier(.2, .9, .3, 1.5);
}
#uploaded-gallery .heart.ready { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  #uploaded-gallery .heart { opacity: 1; transform: none; transition: none; }
}
/* gallery image/card: no border */
#uploaded-gallery .project-card,
#uploaded-gallery .gal-card,
#uploaded-gallery .project-img-wrapper,
#uploaded-gallery .project-img {
  border: 0 !important;
  box-shadow: none !important;
}
/* like button animation (0.5s) */
#uploaded-gallery .heart {
  opacity: 0;
  transition: opacity 0s;
}
#uploaded-gallery .heart.ready { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  #uploaded-gallery .heart { transition: none; }
}
/* gallery: 1px border on the WRAPPER, photo zooms inside it */
#uploaded-gallery .project-img-wrapper {
  border: 1px solid var(--nav-border);
  border-radius: 20px;
  overflow: hidden;
  background: var(--card-bg);
}
[data-theme="light"] #uploaded-gallery .project-img-wrapper {
  border-color: rgba(0, 0, 0, .12);
}
#uploaded-gallery .project-img {
  border: 0 !important;
  border-radius: 0;
}
/* gallery photo inside the fixed frame: blur + zoom while loading */
#uploaded-gallery .project-img {
  opacity: 0;
  transform: scale(1.08);
  filter: blur(16px);
  transition: opacity .6s ease, transform .9s cubic-bezier(.2,.8,.2,1), filter .9s ease;
  will-change: opacity, transform, filter;
}
#uploaded-gallery .project-img.is-loaded {
  opacity: 1;
  transform: none;
  filter: blur(0);
}
@media (prefers-reduced-motion: reduce) {
  #uploaded-gallery .project-img { opacity: 1; transform: none; filter: none; transition: none; }
}
/* contact form temporarily unavailable — "still cooking" */
.contact-cooking {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .4rem;
  padding: 2.4rem 1.2rem;
}
.cooking-emoji {
  font-size: 3rem;
  line-height: 1;
  animation: cookBounce 1.4s ease-in-out infinite;
}
@keyframes cookBounce { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
.contact-cooking h3 { margin: .6rem 0 .4rem; font-size: 1.4rem; }
.contact-cooking p { color: var(--text-muted); max-width: 34ch; margin: 0; }
.contact-page .contact-card form#contactForm { display: none !important; }
@media (prefers-reduced-motion: reduce) { .cooking-emoji { animation: none; } }
