/* Ultra-Minimalistic Portfolio CSS */
/* Inspired by marianabukvic.co, andydonohoe.com, and switch.co.nz */

/* SF Pro Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* Note: Using Inter as fallback since SF Pro requires system access or Apple Developer license */
/* SF Pro will load automatically on Apple devices through -apple-system */

/* CSS Variables for Dark Mode */
:root {
  --bg-color: #fff;
  --text-color: #000;
  --card-bg: transparent;
  --border-color: #e0e0e0;
  --navbar-bg: rgba(255, 255, 255, 0.95);
  --shadow-color: rgba(0, 0, 0, 0.15);
  --logo-src: url('../context/logo/logo_full_alpha_black.png');
}

[data-theme="dark"] {
  --bg-color: #000;
  --text-color: #fff;
  --card-bg: transparent;
  --border-color: #333;
  --navbar-bg: rgba(0, 0, 0, 0.95);
  --shadow-color: rgba(255, 255, 255, 0.15);
  --logo-src: url('../context/logo/logo_full_alpha_white_.png');
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--bg-color);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  padding-top: 80px;
}

/* Typography System */
h1 {
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  font-size: clamp(4rem, 15vmin, 20rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.05em;
  text-align: left;
}

.hero-home h1 {
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  font-size: clamp(8rem, 25vmin, 35rem);
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.08em;
  text-align: left;
  animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
  transform: translateY(40px);
}

h2 {
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  font-size: clamp(2rem, 6vmin, 6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-align: left;
}

h3 {
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  font-size: clamp(1.4rem, 3vmin, 3rem);
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
}

h4 {
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  font-size: clamp(1.2rem, 2vmin, 2rem);
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  margin-bottom: 0.75rem;
}

p {
  font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  text-align: left;
  font-weight: 400;
}

.lead-text {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.6;
}

.small-text {
  font-size: 0.875rem;
  font-weight: 400;
  opacity: 0.7;
}

.bold {
  font-weight: 600;
}

.heavy {
  font-weight: 700;
}

.ultra-bold {
  font-weight: 800;
}

strong {
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  font-weight: 600;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

a:hover {
  opacity: 0.7;
  transform: translateX(2px);
}

/* Animated underlines for links */
a:not(.nav-menu a):not(.logo a):not(.form-button):not(.social-link-card a)::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

a:not(.nav-menu a):not(.logo a):not(.form-button):not(.social-link-card a):hover::after {
  width: 100%;
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Animation Classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 800ms cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* Layout Containers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.content-narrow {
  max-width: 800px;
  margin: 0;
  padding-left: 2rem;
}

.content-minimal {
  max-width: 600px;
  margin: 0;
  padding-left: 2rem;
}

/* Spacing System */
.section {
  padding: 4rem 0;
}

.section-large {
  padding: 8rem 0;
}

.section-small {
  padding: 2rem 0;
}

.section-first {
  padding-top: 1rem;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--navbar-bg);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  transition: background-color 0.3s ease;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 2rem;
}

.navbar-left {
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 2rem;
  width: auto;
  transition: opacity 0.3s ease;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
  background: none;
  border: 2px solid var(--text-color);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 1rem;
  transition: all 0.3s ease;
  font-size: 18px;
}

.dark-mode-toggle:hover {
  background: var(--text-color);
  color: var(--bg-color);
  transform: scale(1.05);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 40px;
  height: 40px;
  background: none;
  border: 2px solid var(--text-color);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
  background: var(--text-color);
}

.mobile-menu-toggle:hover .hamburger-line {
  background: var(--bg-color);
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background: var(--text-color);
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Hybrid Navigation Wrapper */
.nav-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

/* Simple Navigation Menu */
.nav-menu {
  display: flex;
  flex-direction: row;
  list-style: none;
  gap: clamp(0.5rem, 1.2vw, 1.5rem);
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  align-items: center;
  margin: 0;
  padding: 0;
  transition: all 0.3s ease;
}

.nav-item {
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.nav-item a {
  transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  position: relative;
  text-decoration: none;
  color: var(--text-color);
}

.nav-item a:hover {
  opacity: 0.6;
  transform: scale(1.05);
}


/* Hero Section */
.hero {
  min-height: auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  padding: 2rem 2rem 0 2rem;
  animation: slideInLeft 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-home {
  height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  padding: 0 2rem;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 90%;
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin-bottom: 2rem;
  animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.hero p {
  font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 3rem;
  opacity: 0.8;
  animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
  max-width: 600px;
}

.hero-home p {
  font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.6;
  opacity: 0;
  animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
  max-width: 800px;
  margin-top: 3rem;
}

.hero-name-container {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.hero-logo {
  height: clamp(10rem, 20vmin, 28rem);
  width: auto;
  opacity: 0;
  animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

/* Grid Systems */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Card Components */
.card {
  background: transparent;
  border: none;
  padding: 2rem;
  transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: translateY(0);
  /* Remove conflicting CSS animation - let GSAP handle animations */
}

/* Series Card - Always visible, no animations whatsoever */
.series-card {
  background: transparent;
  border: none;
  padding: 2rem;
  opacity: 1 !important;
  transform: translateY(0) !important;
  animation: none !important;
  transition: none !important;
  visibility: visible !important;
  display: block !important;
}

.series-card:hover {
  transform: translateY(-8px) translateX(4px);
  opacity: 1;
  box-shadow: 0 10px 25px var(--shadow-color);
  transition: all 0.3s ease;
}

.series-card h2 {
  margin-bottom: 1rem;
  opacity: 1 !important;
  transform: translateY(0) !important;
  animation: none !important;
  visibility: visible !important;
  display: inline-flex !important;
}
.series-card:hover h2 {
  transform: translateX(6px);
  transition: all 0.3s ease;
}

/* Force override any other animations on series elements */
.series-card *,
.series-card a,
.series-card h2,
.series-card img {
  opacity: 1 !important;
  transform: translateY(0) !important;
  animation: none !important;
  visibility: visible !important;
}

.card:hover {
  transform: translateY(-8px) translateX(4px);
  opacity: 1;
  box-shadow: 0 10px 25px var(--shadow-color);
}

.card h3 {
  margin-bottom: 1rem;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover h3 {
  transform: translateX(6px);
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #f8f8f8;
  transition: all 500ms cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  animation: scaleIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  cursor: pointer;
  border-radius: 4px;
}

.gallery-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 600ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.gallery-item:hover::before {
  left: 100%;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover {
  transform: scale(1.04) translateY(-8px);
  box-shadow: 0 25px 50px var(--shadow-color);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

/* Enhanced gallery animations for momentum effect */
.gallery-item.animate-in {
  animation: gallerySlideIn 1.2s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes gallerySlideIn {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(60px) rotateX(10deg);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.95) translateY(20px) rotateX(5deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0) rotateX(0deg);
  }
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 600px;
  margin: 0;
  padding-left: 2rem;
}

.timeline-item {
  position: relative;
  padding: 2rem 0;
  border-left: 1px solid var(--border-color);
  padding-left: 3rem;
  margin-left: 1rem;
  opacity: 0;
  transform: translateX(-30px);
  animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:hover {
  transform: translateX(6px);
  border-left-color: var(--text-color);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 2rem;
  width: 9px;
  height: 9px;
  background: var(--text-color);
  border-radius: 50%;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:hover::before {
  transform: scale(1.3);
  box-shadow: 0 0 0 4px var(--shadow-color);
}

.timeline-date {
  font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0.6;
  margin-bottom: 0.5rem;
  transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:hover .timeline-date {
  opacity: 1;
}

/* Forms */
.form {
  max-width: 500px;
  margin: 0;
  padding-left: 2rem;
}

.form-group {
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.form-label {
  font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input,
.form-textarea {
  font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  width: 100%;
  padding: 0.75rem 0;
  border: none;
  border-bottom: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 400;
  transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-bottom-color: var(--text-color);
  transform: translateX(4px);
}

.form-input:focus + .form-label,
.form-textarea:focus + .form-label {
  transform: translateX(4px);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-button {
  font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  background: var(--text-color);
  color: var(--bg-color);
  border: none;
  padding: 1rem 3rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.form-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-button:hover {
  transform: translateY(-2px) translateX(2px);
  box-shadow: 0 8px 25px var(--shadow-color);
}

.form-button:hover::before {
  left: 100%;
}

/* CTA Sections */
.cta {
  text-align: left;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #000, transparent);
  animation: slideInRight 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.cta h2 {
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

.cta p {
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
  max-width: 600px;
}

/* Footer */
.footer {
  font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
  transition: border-color 0.3s ease;
}

/* Special footer positioning for homepage only */
body.homepage .footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin-top: 0;
  padding: 1rem 0;
  background: var(--bg-color);
}

.footer p {
  font-weight: 500;
  opacity: 0.6;
  margin-bottom: 0;
}

/* Social Links Styling */
.social-link-card {
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  padding: 1.5rem !important;
  margin-bottom: 1rem !important;
  overflow: visible !important;
}

.social-link-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 25px var(--shadow-color);
}

.social-link-card a {
  transition: all 300ms ease;
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
  gap: 1.5rem !important;
}

.social-link-card svg {
  flex-shrink: 0;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}

.social-link-card:hover svg {
  transform: scale(1.1);
}

/* Dark mode visibility fix for black logos */
[data-theme="dark"] .social-link-card svg path[fill="#000"] {
  fill: #fff;
  stroke: #000;
  stroke-width: 1;
}

[data-theme="dark"] .social-link-card svg path[fill="#333333"] {
  fill: #ccc;
}

.social-link-card h3 {
  margin-bottom: 0.25rem !important;
  font-size: 1.2rem !important;
  font-weight: 600 !important;
}

.social-link-card p {
  margin: 0 !important;
  font-size: 0.95rem !important;
  opacity: 0.7;
}

/* Technical Skills Styling */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.skill-category {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.skill-category::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transform: scaleX(0);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-category:hover::before {
  transform: scaleX(1);
}

.skill-category:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px var(--shadow-color);
  border-color: var(--text-color);
}

.skill-category h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-color);
  transition: color 0.3s ease;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  background: var(--text-color);
  color: var(--bg-color);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 300ms ease;
  border: 1px solid transparent;
  text-decoration: none;
  display: inline-block;
}

.skill-tag:hover {
  background: var(--bg-color);
  color: var(--text-color);
  border-color: var(--text-color);
  transform: translateY(-1px);
  text-decoration: none;
}


/* Interactive Gallery Styling */
.interactive-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
}

.gallery-item.magnetic {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  aspect-ratio: 4/3;
}

.gallery-item.magnetic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item.magnetic:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px var(--shadow-color);
}

.gallery-item.magnetic:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(0,0,0,0.7), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}

.gallery-item.magnetic:hover .gallery-overlay {
  opacity: 1;
}

.photo-number {
  color: white;
  font-weight: 600;
  font-size: 1.2rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Slide-Up Fullscreen Lightbox System */
.slideup-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 999999;
  display: none;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.slideup-lightbox-content {
  position: relative;
  width: 90vw;
  height: 90vh;
  max-width: 1200px;
  max-height: 800px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  overflow: hidden;
}

.slideup-lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
  display: block;
}

.slideup-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  transition: all 0.3s ease;
  z-index: 1000001;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(10px);
}

.slideup-lightbox-close:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.slideup-lightbox-close svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
}

.slideup-lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  background: rgba(0, 0, 0, 0.8);
  padding: 10px 20px;
  border-radius: 30px;
  backdrop-filter: blur(12px);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.slideup-lightbox-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 18px;
  background: rgba(0, 0, 0, 0.8);
  padding: 15px 25px;
  border-radius: 30px;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dark mode adjustments */
[data-theme="dark"] .slideup-lightbox-close {
  background: rgba(0, 0, 0, 0.9);
  color: white;
}

[data-theme="dark"] .slideup-lightbox-close:hover {
  background: rgba(0, 0, 0, 1);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .slideup-lightbox-content {
    width: 95vw;
    height: 85vh;
  }
  
  .slideup-lightbox-close {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
  }
  
  .slideup-lightbox-close svg {
    width: 18px;
    height: 18px;
  }
  
  .slideup-lightbox-counter {
    bottom: 15px;
    font-size: 14px;
    padding: 8px 16px;
  }
  
  .slideup-lightbox-loading {
    font-size: 16px;
    padding: 12px 20px;
  }
}

@media (max-width: 480px) {
  .slideup-lightbox-content {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
  
  .slideup-lightbox-image {
    border-radius: 0;
  }
  
  .slideup-lightbox-close {
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
  }
  
  .slideup-lightbox-close svg {
    width: 16px;
    height: 16px;
  }
  
  .slideup-lightbox-counter {
    bottom: 30px;
    font-size: 13px;
    padding: 6px 14px;
  }
}

/* Publications Styling */
.publication-item {
  border-left: 3px solid var(--border-color);
  padding-left: 1.5rem;
  margin-bottom: 2rem;
  transition: border-color 0.3s ease;
}

.publication-item:hover {
  border-left-color: var(--text-color);
}

.publication-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.publication-authors {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  opacity: 0.8;
}

.publication-journal {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  opacity: 0.7;
  font-style: italic;
}

.publication-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.publication-link:hover {
  background: var(--text-color);
  color: var(--bg-color);
  transform: translateY(-1px);
}

.publication-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.publication-link:hover svg {
  transform: scale(1.1);
}

/* Utility Classes */
.text-center { 
  text-align: center !important;
  margin-left: auto;
  margin-right: auto;
}
.text-right { text-align: right; }
.text-left { text-align: left; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mb-4 { margin-bottom: 4rem; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mt-4 { margin-top: 4rem; }

.opacity-60 { 
  opacity: 0.6;
  transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
.opacity-80 { 
  opacity: 0.8;
  transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Special Animations */
.parallax-element {
  transition: transform 100ms ease-out;
}

.floating {
  animation: float 6s ease-in-out infinite;
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Responsive Design */

/* Tablet Styles */
/* Simple Responsive Navigation */
/* Mobile: Hamburger menu */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    gap: 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-menu .nav-item {
    font-size: 1.2rem;
    text-align: center;
  }
}

/* Desktop: Horizontal navigation */
@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none;
  }
  
  .nav-menu {
    position: static;
    display: flex;
    flex-direction: row;
    background: transparent;
    border: none;
    padding: 0;
    gap: clamp(0.5rem, 1.2vw, 1.5rem);
    transform: none;
    opacity: 1;
    visibility: visible;
    z-index: auto;
    box-shadow: none;
  }
  
  .nav-menu .nav-item {
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    text-align: left;
  }
}
  
  .hero-home h1 {
    font-size: clamp(6rem, 20vmin, 25rem);
  }
  
  .hero-name-container {
    gap: 1.5rem;
  }
  
  .hero-logo {
    height: clamp(8rem, 16vmin, 20rem);
  }
  
  .hero h1 {
    font-size: clamp(3rem, 12vmin, 15rem);
  }
  
  .container {
    padding: 0 2rem;
  }
  
  .content-narrow,
  .content-minimal {
    padding-left: 2rem;
  }
  
  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }
}

/* Mobile Styles */
@media (max-width: 768px) {
  .navbar {
    padding: 0.75rem 0;
  }
  
  body {
    padding-top: 70px;
  }
  
  .navbar-container {
    padding: 0 1.5rem;
    align-items: center;
  }
  
  .nav-menu {
    gap: clamp(1.2rem, 3.5vw, 3rem);
    padding-bottom: 0.25rem;
    margin-bottom: -0.25rem;
  }
  
  .nav-menu li {
    font-size: clamp(1.1rem, 2.3vw, 1.8rem);
    font-weight: 700;
  }
  
  .hero-home h1 {
    font-size: clamp(4rem, 15vmin, 18rem);
    line-height: 0.85;
  }
  
  .hero-name-container {
    gap: 1rem;
  }
  
  .hero-logo {
    height: clamp(5rem, 12vmin, 14rem);
  }
  
  .hero h1 {
    font-size: clamp(2.5rem, 10vmin, 12rem);
  }
  
  .hero-home p {
    font-size: 1.2rem;
    line-height: 1.5;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  h2 {
    font-size: clamp(1.5rem, 5vmin, 4rem);
  }
  
  h3 {
    font-size: clamp(1.2rem, 2.5vmin, 2.5rem);
  }
  
  .container {
    padding: 0 1.5rem;
  }
  
  .content-narrow,
  .content-minimal {
    padding-left: 1.5rem;
  }
  
  .section {
    padding: 2.5rem 0;
  }
  
  .section-first {
    padding-top: 0.5rem;
  }
  
  .section-large {
    padding: 4rem 0;
  }
  
  .hero {
    padding: 2rem 1.5rem 0 1.5rem;
    min-height: auto;
  }
  
  .hero-home {
    padding: 0 1.5rem;
    min-height: 90vh;
  }
  
  .timeline-item {
    padding-left: 2rem;
    margin-left: 0.75rem;
  }
  
  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
  }
  
  .interactive-gallery {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }
  
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .form {
    padding-left: 1.5rem;
  }
  
  .cta {
    padding: 3rem 1.5rem;
  }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
  .navbar {
    padding: 0.5rem 0;
  }
  
  body {
    padding-top: 60px;
  }
  
  .navbar-container {
    padding: 0 1rem;
    align-items: center;
  }
  
  .logo {
    font-size: 1.1rem;
  }
  
  .nav-menu {
    gap: clamp(0.8rem, 2.5vw, 1.5rem);
  }
  
  .nav-menu li {
    font-size: clamp(0.9rem, 2vw, 1.3rem);
    font-weight: 600;
  }
  
  .hero-home h1 {
    font-size: clamp(3rem, 12vmin, 14rem);
    line-height: 0.8;
    letter-spacing: -0.06em;
  }
  
  .hero-name-container {
    gap: 0.75rem;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .hero-logo {
    height: clamp(4rem, 10vmin, 12rem);
    order: -1;
  }
  
  .hero h1 {
    font-size: clamp(2rem, 8vmin, 8rem);
  }
  
  .hero-home p {
    font-size: 1.1rem;
    line-height: 1.4;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  h2 {
    font-size: clamp(1.3rem, 4vmin, 3rem);
  }
  
  h3 {
    font-size: clamp(1.1rem, 2.2vmin, 2rem);
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .content-narrow,
  .content-minimal {
    padding-left: 1rem;
  }
  
  .hero {
    padding: 5rem 1rem 0 1rem;
    min-height: 25vh;
  }
  
  .hero-home {
    padding: 0 1rem;
  }
  
  .timeline-item {
    padding-left: 1.5rem;
    margin-left: 0.5rem;
  }
  
  .gallery {
    grid-template-columns: 1fr;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .interactive-gallery {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .lightbox-nav {
    display: none;
  }
  
  .lightbox-close {
    top: -40px;
    font-size: 1.5rem;
  }
  
  .form {
    padding-left: 1rem;
  }
  
  .cta {
    padding: 2.5rem 1rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .form-button {
    padding: 0.875rem 2rem;
    font-size: 0.9rem;
  }
}

/* Landscape Mobile Styles */
@media (max-width: 768px) and (orientation: landscape) {
  .hero,
  .hero-home {
    min-height: 100vh;
  }
  
  .hero-home h1 {
    font-size: clamp(3.5rem, 12vmin, 16rem);
  }
  
  .section {
    padding: 2rem 0;
  }
}

/* Large Desktop - optimize for readability */
@media (min-width: 1025px) and (max-width: 1439px) {
  .nav-menu {
    gap: clamp(1rem, 1.5vw, 2rem);
  }
  
  .nav-menu li {
    font-size: clamp(0.95rem, 1.1vw, 1.2rem);
  }
}

/* Ultra-wide screens - controlled scaling */
@media (min-width: 1440px) {
  .nav-menu {
    gap: clamp(1.5rem, 2vw, 3rem);
    max-width: 800px;
  }
  
  .nav-menu li {
    font-size: clamp(1rem, 1.2vw, 1.3rem);
  }
  
  .container {
    max-width: 1400px;
  }
}