/*
Theme Name: LD Resume
Theme URI: https://example.com/
Author: Your Name
Author URI: https://example.com/
Description: Minimal, quiet, glassmorphism-inspired resume/portfolio block theme with light/dark mode.
Version: 1.6.2
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: ld-resume
*/

/* Light/Dark mode hooks */
:root {
  color-scheme: light dark;
  /* Default to dark mode colors (fallback before JS runs) */
  --wp--preset--color--bg: #1a1a1a;
  --wp--preset--color--surface: rgba(30, 35, 42, 0.85);
  --wp--preset--color--surface-soft: rgba(30, 35, 42, 0.65);
  --wp--preset--color--text: #e5e7eb;
  --wp--preset--color--muted: #9ca3af;
  --wp--preset--color--border: rgba(75, 85, 99, 0.4);
  --wp--preset--color--accent: #ffffff;
  --wp--preset--color--accent-soft: #d1d5db;
}

/* Respect system preference when no manual choice stored */
@media (prefers-color-scheme: light) {
  :root:not([data-color-mode]) {
    --wp--preset--color--bg: #ffffff;
    --wp--preset--color--surface: rgba(255, 255, 255, 0.9);
    --wp--preset--color--surface-soft: rgba(255, 255, 255, 0.7);
    --wp--preset--color--text: #171717;
    --wp--preset--color--muted: #737373;
    --wp--preset--color--border: rgba(115, 115, 115, 0.2);
    --wp--preset--color--accent: #171717;
    --wp--preset--color--accent-soft: #525252;
  }
}

:root[data-color-mode="light"] {
  --wp--preset--color--bg: #ffffff;
  --wp--preset--color--surface: rgba(255, 255, 255, 0.9);
  --wp--preset--color--surface-soft: rgba(255, 255, 255, 0.7);
  --wp--preset--color--text: #171717;
  --wp--preset--color--muted: #737373;
  --wp--preset--color--border: rgba(115, 115, 115, 0.2);
  --wp--preset--color--accent: #171717;
  --wp--preset--color--accent-soft: #525252;
}

:root[data-color-mode="dark"] {
  --wp--preset--color--bg: #1a1a1a;
  --wp--preset--color--surface: rgba(30, 35, 42, 0.85);
  --wp--preset--color--surface-soft: rgba(30, 35, 42, 0.65);
  --wp--preset--color--text: #e5e7eb;
  --wp--preset--color--muted: #9ca3af;
  --wp--preset--color--border: rgba(75, 85, 99, 0.4);
  --wp--preset--color--accent: #ffffff;
  --wp--preset--color--accent-soft: #d1d5db;
}

/* Remove background from all wp-block-group elements */
.wp-block-group {
  background-color: transparent !important;
}

/* Header styling - solid background, no border radius, constrained width */
.wp-site-blocks > header .wp-block-group.alignfull {
  background-color: #666666 !important;
  border-radius: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

/* Constrain header content to 1200px */
.wp-site-blocks > header .wp-block-group.alignfull {
  padding-left: calc((100% - 1200px) / 2) !important;
  padding-right: calc((100% - 1200px) / 2) !important;
}

/* On smaller screens, use regular padding */
@media (max-width: 1260px) {
  .wp-site-blocks > header .wp-block-group.alignfull {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}

/*.wp-site-blocks > header .wp-block-group.alignfull * {
  border-radius: 0 !important;
}*/

:root[data-color-mode="light"] .wp-site-blocks > header .wp-block-group.alignfull {
  background-color: #d4d4d4 !important;
}

/* Remove top margin from body to eliminate gap */
body {
  margin: 0;
  padding: 0;
}

/* Hero section with animated mountain background */
.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 500px;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -5%;
  left: -5%;
  width: 115%;
  height: 115%;
  background-image: url('/wp-content/themes/ld-resume/assets/images/hero-mountains.svg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
  animation: heroMountainMove 30s ease-in-out infinite;
}

@keyframes heroMountainMove {
  0% {
    transform: translateX(0) scale(1);
  }
  50% {
    transform: translateX(-5%) scale(1.05);
  }
  100% {
    transform: translateX(0) scale(1);
  }
}

.hero-section > * {
  position: relative;
  z-index: 1;
}

/* Light mode - slightly lighter opacity */
:root[data-color-mode="light"] .hero-section::before {
  opacity: 0.35;
}

/* Skills Slider Section */
.skills-slider-section {
  overflow: hidden;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1), transparent);
}

.skills-slider-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}

.skills-slider-row {
  position: relative;
  overflow: hidden;
  padding: 0.5rem 0;
  display: flex;
  justify-content: center;
  mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
}

.skills-slider-row .skills-slider-track {
  display: inline-flex;
  gap: 1rem;
  animation: scroll-left 60s linear infinite;
  will-change: transform;
}

.skills-slider-row-reverse .skills-slider-track {
  animation: scroll-right 65s linear infinite;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-33.333%);
  }
}

@keyframes scroll-right {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(33.333%);
  }
}

.skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background-color: rgba(30, 35, 42, 0.7);
  color: var(--wp--preset--color--text);
  border: 1px solid rgba(75, 85, 99, 0.4);
  border-radius: 9999px;
  font-size: 0.875rem;
  white-space: nowrap;
  cursor: default;
}

/* Light mode badge styles */
:root[data-color-mode="light"] .skill-badge {
  background-color: rgba(255, 255, 255, 0.8);
  color: var(--wp--preset--color--text);
  border-color: rgba(115, 115, 115, 0.3);
}

/* Project cards - equal height columns (only for cards with surface background) */
.wp-block-columns:has(.wp-block-group.has-surface-background-color) {
  align-items: stretch;
}

.wp-block-columns:has(.wp-block-group.has-surface-background-color) > .wp-block-column {
  display: flex;
}

/* Project cards - dark grey background (only in columns layout) */
.wp-block-columns .wp-block-group.has-surface-background-color {
  background-color: #242424 !important;
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Light mode - lighter card background */
:root[data-color-mode="light"] .wp-block-columns .wp-block-group.has-surface-background-color {
  background-color: #f5f5f5 !important;
}

/* Project card images - fill top of card with consistent height */
.wp-block-columns .wp-block-group.has-surface-background-color > .wp-block-image {
  margin: 0;
  flex-shrink: 0;
}

.wp-block-columns .wp-block-group.has-surface-background-color > .wp-block-image img {
  display: block;
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 0;
}

/* Card content area grows to fill remaining space */
.wp-block-columns .wp-block-group.has-surface-background-color > .wp-block-group {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* WordPress color classes - ensure they work properly */
.has-accent-soft-color {
  color: var(--wp--preset--color--accent-soft) !important;
}

.has-accent-color {
  color: var(--wp--preset--color--accent) !important;
}

.has-muted-color {
  color: var(--wp--preset--color--muted) !important;
}

/* Note: .has-text-color is a WordPress utility class that indicates an element has a color set,
   but it shouldn't apply a specific color - the specific color class does that */

/* Experience Section - Scroll Snap Container */
.experience-section {
  position: relative;
  background-image: url('/wp-content/themes/ld-resume/assets/images/experience-bg-dark.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  scroll-margin-top: 0;
}

/* Light mode - use light SVG background with higher visibility */
:root[data-color-mode="light"] .experience-section {
  background-image: url('/wp-content/themes/ld-resume/assets/images/experience-bg-light.svg');
}

/* Sticky section heading */
/*.experience-section > .wp-block-heading {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 2rem !important;
}
*/
/* Experience Card Styling - Advanced Modern Layout with Stacking */
.experience-section .career-card {
  position: sticky;
  top: 80px;
  padding: 0 !important;
  margin-bottom: 2rem;
  min-height: 570px;
  background-color: var(--wp--preset--color--bg) !important;
  border: none;
  border-radius: 0 8px 8px 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  z-index: 1;
  transform-origin: top center;
  will-change: transform;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  color: var(--wp--preset--color--text);
  overflow: hidden;
}


/* Active state when card is in focus */
.experience-section .career-card.is-active {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Light mode shadow adjustments */
:root[data-color-mode="light"] .experience-section .career-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

:root[data-color-mode="light"] .experience-section .career-card.is-active {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* Stacking effect - each card has higher z-index */
.experience-section .career-card:nth-child(2) {
  z-index: 2;
}

.experience-section .career-card:nth-child(3) {
  z-index: 3;
}

.experience-section .career-card:nth-child(4) {
  z-index: 4;
}

.experience-section .career-card:nth-child(5) {
  z-index: 5;
}

.experience-section .career-card:nth-child(6) {
  z-index: 6;
}

/* Animated accent line on left */
.experience-section .career-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 0;
  background: linear-gradient(to bottom, var(--wp--preset--color--accent), transparent);
  transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.experience-section .career-card:hover::before,
.experience-section .career-card.is-hovered::before {
  height: 100%;
}


/* Heading section - minimalist with icon */
.experience-section .career-card > .wp-block-heading {
  position: relative;
  padding: 2rem 2rem 1rem 5rem;
  margin: 0 !important;
  font-weight: 500;
  letter-spacing: -0.02em;
  z-index: 1;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.experience-section .career-card:hover > .wp-block-heading,
.experience-section .career-card.is-hovered > .wp-block-heading {
  transform: translateX(8px);
}

/* Geometric icon - modern minimal approach */
.experience-section .career-card > .wp-block-heading::before {
  content: '';
  position: absolute;
  left: 2rem;
  top: 2rem;
  width: 24px;
  height: 24px;
  border: 2px solid var(--wp--preset--color--text);
  border-radius: 4px;
  opacity: 0.3;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.experience-section .career-card:hover > .wp-block-heading::before,
.experience-section .career-card.is-hovered > .wp-block-heading::before {
  opacity: 1;
  transform: rotate(45deg);
  border-color: var(--wp--preset--color--accent);
}

/* Subtle divider line */
.experience-section .career-card > .wp-block-heading::after {
  content: '';
  position: absolute;
  left: 5rem;
  bottom: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(to right, var(--wp--preset--color--border), transparent);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

.experience-section .career-card:hover > .wp-block-heading::after,
.experience-section .career-card.is-hovered > .wp-block-heading::after {
  width: calc(100% - 7rem);
}

/* Content area with staggered animation */
.experience-section .career-card > *:not(.wp-block-heading) {
  padding-left: 5rem;
  padding-right: 2rem;
  z-index: 1;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.05s, opacity 0.4s ease 0.05s;
}

.experience-section .career-card:hover > *:not(.wp-block-heading),
.experience-section .career-card.is-hovered > *:not(.wp-block-heading) {
  transform: translateX(8px);
}

.experience-section .career-card > p:first-of-type {
  padding-top: 0.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.experience-section .career-card > p:last-of-type,
.experience-section .career-card > ul:last-child {
  padding-bottom: 2rem;
}

/* Advanced list styling with micro-interactions */
.experience-section .career-card ul {
  list-style: none;
  padding-left: 5rem;
  padding-right: 2rem;
  margin-top: 1.25rem;
  z-index: 1;
  position: relative;
}

.experience-section .career-card ul li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.875rem;
  color: var(--wp--preset--color--muted);
  line-height: 1.7;
  transition: all 0.3s ease;
}

.experience-section .career-card ul li:hover {
  color: var(--wp--preset--color--text);
  transform: translateX(4px);
}

/* Animated bullet point */
.experience-section .career-card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  background: var(--wp--preset--color--text);
  opacity: 0.3;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.experience-section .career-card ul li:hover::before {
  opacity: 1;
  transform: scale(1.5);
  background: var(--wp--preset--color--accent);
}

/* Connecting line between bullets */
.experience-section .career-card ul li::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.65em;
  width: 1px;
  height: calc(100% + 0.875rem);
  background: var(--wp--preset--color--border);
  opacity: 0.2;
  transition: opacity 0.3s ease;
}

.experience-section .career-card ul li:last-child::after {
  display: none;
}

.experience-section .career-card:hover ul li::after {
  opacity: 0.4;
}

/* Light mode adjustments */
:root[data-color-mode="light"] .experience-section .career-card::after {
  background: linear-gradient(135deg, rgba(0,0,0,0.01) 0%, rgba(0,0,0,0.02) 100%);
}

/* Accessible focus outlines */
:where(a, button, [role="button"]):focus-visible {
  outline: 2px solid var(--wp--preset--color--accent);
  outline-offset: 2px;
}

/* Apply background and text colors from theme variables */
html,
body {
  background-color: var(--wp--preset--color--bg);
  color: var(--wp--preset--color--text);
}

/* Ensure main site wrapper doesn't overwrite the background */
body > .wp-site-blocks {
  background-color: transparent;
}

/* Theme toggle button styling */
.ld-theme-toggle .wp-block-button__link {
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.5rem 0.75rem;
  min-width: 2.5rem;
  text-align: center;
  color: #e5e7eb !important;
  background-color: rgba(15, 23, 42, 0.85) !important;
  filter: grayscale(1);
}