/* ========================================
   Overlake.bio - Consolidated Styles
   Combines: overlake-common.css, static-background.css, water-enhancements.css
   ======================================== */

/* ========================================
   1. BACKGROUND
   ======================================== */

body {
  background: url("../asset/water-6901805_1920.jpg") no-repeat center center fixed;
  background-size: cover;
  background-attachment: fixed;
  background-blend-mode: multiply;
  background-color: #202b38; /* match your CSS theme color */
  animation: fadeIn 0.8s ease-out;
}

/* Particles.js container */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  animation: particlesFadeIn 6.1s ease-out forwards;
}

/* ========================================
   2. LOGO STYLES
   ======================================== */

.overlake-logo {
  text-align: right;
  line-height: 0.85;
  margin: 2rem 0;
  font-family: inherit; /* Uses water.css system fonts */
}

.overlake-main {
  font-size: 3em;
  font-weight: 200;
  color: var(--text-bright, #212529);
  letter-spacing: -0.01em;
  margin-bottom: 5px;
}

.overlake-lake {
  color: var(--links, #0076d1);
  font-weight: 300;
  text-shadow: 0 0 12px rgba(65, 173, 255, 0.15);
}

.overlake-bio {
  font-size: 1.4em;
  color: var(--links, #0076d1);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-shadow: 0 0 10px rgba(65, 173, 255, 0.12);
}

/* Dark mode compatibility */
@media (prefers-color-scheme: dark) {
  .overlake-main {
    color: var(--text-bright, #ffffff);
  }
  .overlake-lake {
    color: var(--links, #7dc4e4);
  }
  .overlake-bio {
    color: var(--links, #7dc4e4);
  }
}

/* Responsive sizing */
@media (max-width: 768px) {
  .overlake-main {
    font-size: 2.2em;
  }
  .overlake-bio {
    font-size: 1.1em;
  }
}

/* Header integration */
header .overlake-logo {
  margin: 1rem 0;
}

header .overlake-main {
  font-size: 2.5em;
}

header .overlake-bio {
  font-size: 1.2em;
}

/* Inline version for navigation or small spaces */
.overlake-inline {
  display: inline-block;
  font-size: 1.5em;
  font-weight: 300;
  color: var(--text-bright, #212529);
  text-decoration: none;
}

@media (hover: hover) {
  .overlake-inline:hover {
    color: var(--links, #0076d1);
    text-decoration: none;
  }
}

.overlake-inline .lake {
  color: var(--links, #0076d1);
  font-weight: 400;
}

/* Footer version */
footer .overlake-logo {
  text-align: center;
  margin: 2rem auto;
}

footer .overlake-main {
  font-size: 2em;
}

footer .overlake-bio {
  font-size: 1em;
}

/* ========================================
   3. UTILITY CLASSES
   ======================================== */

/* Justified text alignment */
.justified-text {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
  word-break: normal;
}

/* Section tag separator and label in headings */
.section-sep {
  color: var(--links);
}

.section-tag {
  font-size: 0.75em;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Indented paragraphs */
.indented {
  margin-left: 2em;
}

.disclaimer-note {
  padding-left: 2.5em;
}

.disclaimer-icon {
  display: inline-block;
  width: 2.5em;
  margin-left: -2.5em;
  text-align: center;
}

.citation-widget {
  margin-top: 0.4rem;
}

.citation-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.citation-row .citation-text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.citation-row .citation-widget {
  flex: 0 0 200px;
  margin-top: 0;
}

.citation-row .citation-widget img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.citation-widget-right {
  text-align: right;
}

/* Full-width responsive figure */
.figure-full-width {
  width: 100%;
  margin: 0;
}

.figure-full-width img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
}

/* ========================================
   4. ANIMATIONS
   ======================================== */

/* Subtle fade-in animation for page content */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Opacity-only fade for the particles background */
@keyframes particlesFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Enhanced selection with shimmer */
@keyframes selectionShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}


/* Elegant focus ring pulse */
@keyframes focusPulse {
  from { box-shadow: 0 0 0 2px var(--links), 0 0 20px rgba(65, 173, 255, 0.3); }
  to { box-shadow: 0 0 0 2px var(--links), 0 0 25px rgba(65, 173, 255, 0.4); }
}

/* ========================================
   5. LINKS & NAVIGATION
   ======================================== */

/* Enhanced link hover effects */
a {
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

@media (hover: hover) {
  a:hover {
    text-shadow: 0 0 8px rgba(65, 173, 255, 0.3);
    color: #60b7ff;
  }
}

/* Navigation buttons */
.button-nav {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin: 25px 0;
  flex-wrap: wrap;
}

.button-nav .nav-button {
  flex: 1;
  text-align: center;
  min-width: 0;
  white-space: nowrap;
}

.nav-button {
  padding: 8px 16px;
  background: rgba(32, 43, 56, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(65, 173, 255, 0.15);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  /* Ensure nav-button text is visible */
  color: var(--text-main) !important;
  -webkit-text-fill-color: var(--text-main) !important;
}

@media (hover: hover) {
  .nav-button:hover {
    background: var(--links);
    color: var(--background-body) !important;
    -webkit-text-fill-color: var(--background-body) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(65, 173, 255, 0.2);
  }
}

/* Classy cursor interaction for buttons */
.nav-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  transition: width 0.6s ease, height 0.6s ease;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

@media (hover: hover) {
  .nav-button:hover::before {
    width: 200px;
    height: 200px;
  }
}

/* Active page indicator */
.nav-button[aria-current="page"] {
  color: var(--links) !important;
  -webkit-text-fill-color: var(--links) !important;
  border-bottom: 2px solid var(--links);
  background: rgba(32, 43, 56, 0.6);
}

/* ========================================
   6. HEADINGS & TEXT
   ======================================== */

h1, h2 {
  color: var(--links);
}


/* Subtle glow effects for important elements */
h1 {
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* Remove list bullets */
ul, ol {
  list-style: none;
  padding-left: 2em;
}

/* Enhanced navigation feel (for both ul and ol) */
ul li, ol li {
  transition: transform 0.2s ease;
}

@media (hover: hover) {
  ul li:hover, ol li:hover {
    transform: translateX(3px);
  }
}

/* ========================================
   7. FORMS & BUTTONS
   ======================================== */

/* Enhanced button interactions */
button, input[type="submit"], input[type="button"], input[type="reset"] {
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  /* Ensure button text is visible */
  color: var(--form-text) !important;
  -webkit-text-fill-color: var(--form-text) !important;
}

@media (hover: hover) {
  button:hover {
    box-shadow: 0 4px 15px rgba(65, 173, 255, 0.2);
    transform: translateY(-1px);
  }
}

button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(65, 173, 255, 0.1);
}

/* Ripple effect for buttons */
button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

button:active::after {
  width: 200px;
  height: 200px;
}

/* Classy cursor interaction for buttons */
button::before, summary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  transition: width 0.6s ease, height 0.6s ease;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

@media (hover: hover) {
  button:hover::before, summary:hover::before {
    width: 200px;
    height: 200px;
  }
}

/* Elegant form focus effects */
input:focus, textarea:focus, select:focus {
  transform: scale(1.02);
  box-shadow:
    0 0 0 2px var(--focus),
    0 4px 15px rgba(0, 150, 191, 0.1);
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
}

/* ========================================
   8. CONTENT BLOCKS
   ======================================== */

/* Smooth section reveals with hover depth - arty feel */
section {
  opacity: 0.95;
  transition: opacity 0.3s ease, box-shadow 0.3s ease;
  border-radius: 8px;
  padding: 1rem;
  margin: 0 -1rem;
  position: relative;
}

@media (hover: hover) {
  section:hover {
    opacity: 1;
    box-shadow:
      0 4px 12px rgba(65, 173, 255, 0.08),
      0 1px 4px rgba(0, 0, 0, 0.08);
  }
}



/* ========================================
   9. TABLES & IMAGES
   ======================================== */

/* Elegant table hover effects */
tbody tr {
  transition: background-color 0.2s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: perspective(1000px) rotateX(0deg);
}

@media (hover: hover) {
  tbody tr:hover {
    background-color: rgba(65, 173, 255, 0.05);
    transform: perspective(1000px) rotateX(2deg) scale(1.001);
    z-index: 1;
    position: relative;
  }
}

/* Smooth image hover effects */
img {
  transition: transform 0.3s ease, filter 0.3s ease;
  border-radius: 4px;
}

@media (hover: hover) {
  img:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
  }
}

/* ========================================
   10. DETAILS & SUMMARY
   ======================================== */

/* Enhanced details/summary */
details {
  transition: all 0.3s ease, border-radius 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

details[open] {
  transform: scale(1.005);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border-radius: 20px 8px 20px 8px;
}

summary {
  transition: color 0.2s ease;
  position: relative;
  overflow: hidden;
}

@media (hover: hover) {
  summary:hover {
    color: var(--links);
  }
}

/* ========================================
   11. FOOTER
   ======================================== */

/* Subtle footer enhancement */
footer {
  transition: border-color 0.3s ease;
}

@media (hover: hover) {
  footer:hover {
    border-color: var(--links);
  }
}

/* ========================================
   12. GLOBAL ENHANCEMENTS
   ======================================== */

/* Smooth page transitions */
html {
  scroll-behavior: smooth;
}

/* Enhanced selection with shimmer */
::selection {
  background: linear-gradient(45deg, var(--selection), var(--links), var(--selection));
  background-size: 300% 300%;
  animation: selectionShimmer 2s ease-in-out infinite;
  text-shadow: none;
}

/* Enhanced scrollbar */
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--scrollbar-thumb), var(--links));
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--links), var(--scrollbar-thumb-hover));
}

/* Elegant focus ring */
*:focus-visible {
  outline: 2px solid transparent;
  box-shadow:
    0 0 0 2px var(--links),
    0 0 20px rgba(65, 173, 255, 0.3);
  animation: focusPulse 1s ease-in-out infinite alternate;
}

/* Elegant loading state */
body.loading * {
  opacity: 0.7;
  pointer-events: none;
}

/* ========================================
   13. RESPONSIVE DESIGN
   ======================================== */

/* Mobile-friendly touch enhancements */
@media (max-width: 600px) {
  .nav-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .button-nav {
    flex-direction: column;
  }

  .button-nav .nav-button {
    flex: none;
    width: 100%;
  }

  section {
    margin: 0;
  }

  .justified-text {
    text-align: left;
    hyphens: none;
    -webkit-hyphens: none;
  }

  .overlake-inline {
    font-size: 1.1em;
  }

  .indented {
    margin-left: 0.5em;
  }

  .citation-row {
    flex-direction: column;
    gap: 0.65rem;
  }

  .citation-row .citation-widget {
    flex-basis: auto;
    width: min(240px, 100%);
    align-self: flex-end;
  }

}

/* ========================================
   14. ACCESSIBILITY
   ======================================== */

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  #particles-js {
    display: none;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
