/* Light and dark theme styles. */
.theme-toggle { position: fixed; right: 18px; bottom: 18px; z-index: 900; display: inline-flex; align-items: center; gap: 9px; padding: 10px 14px; border: 1px solid #9dd7c8; border-radius: 24px; background: #173c40; color: #f1f7f6; font: 600 14px Roboto, sans-serif; cursor: pointer; box-shadow: 0 3px 14px #0002; }
.theme-toggle:focus-visible { outline: 3px solid #9dd7c8; outline-offset: 4px; }
.footer-day { display: none; }
html[data-theme="light"] .footer-day { display: inline; }
html[data-theme="light"] .footer-night { display: none; }
html[data-theme="light"] .theme-toggle { background: #f1f7f6; color: #173c40; border-color: #173c40; }
html[data-theme="light"] .slider_area .single_slider.slider_bg_1,
html[data-theme="light"] .footer,
html[data-theme="light"] .footer::before,
html[data-theme="light"] .header-area .main-header-area.sticky,
html[data-theme="light"] .slicknav_menu .slicknav_nav { background-color: #ccdfd8; }
html[data-theme="light"] .slider_area .single_slider .slider_text h3.personal-intro,
html[data-theme="light"] .slider_area .single_slider .slider_text h3.personal-intro > span,
html[data-theme="light"] .slider_area .single_slider .slider_text h3.personal-intro .intro-location,
html[data-theme="light"] .header-area .main-header-area .main-menu ul li a,
html[data-theme="light"] .slicknav_menu .slicknav_nav a,
html[data-theme="light"] .footer .copy-right_text .copy_right,
html[data-theme="light"] .footer .copy-right_text .copy_right a,
html[data-theme="light"] .footer-social-link,
html[data-theme="light"] .header-social-link,
html[data-theme="light"] .footer-scene,
html[data-theme="light"] .intro-down-link { color: #173c40; }
html[data-theme="light"] .more-about-link,
html[data-theme="light"] .header-area .main-header-area .Appointment .book_btn a { color: #173c40; border-color: #173c40; }
html[data-theme="light"] .more-about-link:hover,
html[data-theme="light"] .header-area .main-header-area .Appointment .book_btn a:hover { color: #f1f7f6; background: #173c40; }
html[data-theme="light"] .slicknav_menu .slicknav_icon-bar { background: #173c40; }
/* Temporary recoloring of raster logos; replacement assets can follow later. */
html[data-theme="light"] .sea-glass-header-logo,
html[data-theme="light"] .footer .copy-right_text img { filter: brightness(0) saturate(100%) invert(19%) sepia(14%) saturate(1475%) hue-rotate(138deg) brightness(91%) contrast(92%); }
@media (max-width: 767px) { .theme-toggle { right: 12px; bottom: 12px; padding: 9px 12px; } }

/* Match both sets of social links in each theme. */
html[data-theme="dark"] .header-area .main-header-area .main-menu ul li a.header-social-link,
html[data-theme="dark"] .slicknav_menu .slicknav_nav a.header-social-link,
html[data-theme="dark"] .footer-social-link { color: #9dd7c8; }
html[data-theme="light"] .header-area .main-header-area .main-menu ul li a.header-social-link,
html[data-theme="light"] .slicknav_menu .slicknav_nav a.header-social-link,
html[data-theme="light"] .footer-social-link { color: #173c40; }
/* Neutral charcoal separates the middle content from the deep teal ends. */
html[data-theme="dark"] body,
html[data-theme="dark"] .sample-text-area,
html[data-theme="dark"] .portfolio-section { background: #292929; color: #d2dfdf; }
html[data-theme="dark"] #about-me,
html[data-theme="dark"] .portfolio-heading,
html[data-theme="dark"] .about-introduction .about-lead,
html[data-theme="dark"] .about-background-label,
html[data-theme="dark"] .single_gallery .gallery_heading h4,
html[data-theme="dark"] .single_gallery .gallery_heading h4 a { color: #f1f7f6; }
html[data-theme="dark"] .sample-text-area p,
html[data-theme="dark"] .single_gallery p,
html[data-theme="dark"] .about-background { color: #c0cecf; }
html[data-theme="dark"] .about-contact a,
html[data-theme="dark"] .single_gallery .gallery_heading a,
html[data-theme="dark"] .single_gallery .archive-link { color: #9dd7c8; }
html[data-theme="dark"] .about-introduction,
html[data-theme="dark"] .portfolio-divider { border-color: #9dd7c8; }
html[data-theme="dark"] .logo-switch button { background: transparent; color: #9dd7c8; border-color: #9dd7c8; }
html[data-theme="dark"] .logo-switch button[aria-pressed="true"],
html[data-theme="dark"] .logo-switch button:hover { background: #9dd7c8; color: #173c40; }

/* Opposite-theme controls and a visible light-mode portrait frame. */
html[data-theme="dark"] .theme-toggle { background: #f1f7f6; color: #173c40; border-color: #f1f7f6; }
html[data-theme="light"] .theme-toggle { background: #173c40; color: #f1f7f6; border-color: #173c40; }
html[data-theme="light"] .slider_area .single_slider .my_img img.framed-portrait { box-shadow: 0 0 0 4px #173c40, 0 0 0 5px #173c4030, 0 2px 2px 5px #0001; }

/*  matching softly rounded portrait and project frames. */
:root { --preview-photo-frame: #fff; }
html[data-theme="light"] { --preview-photo-frame: #173c40; }
.slider_area .single_slider .my_img img.framed-portrait,
html[data-theme="light"] .slider_area .single_slider .my_img img.framed-portrait {
  border-radius: 10px;
  box-shadow: 0 0 0 4px var(--preview-photo-frame), 0 0 0 5px rgba(0,0,0,.1), 0 2px 2px 5px rgba(0,0,0,.05);
}
.single_gallery .thumb > a {
  display: block;
  width: fit-content;
  max-width: 100%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 0 4px var(--preview-photo-frame), 0 0 0 5px rgba(0,0,0,.1), 0 2px 2px 5px rgba(0,0,0,.05);
}
.single_gallery .thumb > a img { border-radius: 10px; }

/* Give project captions breathing room below the image frames. */
.single_gallery .gallery_heading { padding-top: 22px; }

html[data-theme="dark"] .footer-day-clouds { display: none; }

/* Keep the phone toggle compact; retain its accessible name. */
@media (max-width: 767px) {
  .theme-toggle .theme-toggle-label { display: none; }
  .theme-toggle { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
}

/* Separate the location from the name in the light intro. */
html[data-theme="light"] .slider_area .single_slider .slider_text h3.personal-intro .intro-location { color: #426e67; }

/*  rotate the blades around their local hub; tower stays still. */

/*  allow the raised cloud to extend into the expanded sky. */
.footer .footer-scene { overflow-x: clip; overflow-y: visible; }

/* Give the smaller turbine its own pace and starting angle. */

/* Footer: smooth theme colors without changing illustration animations. */
@media (prefers-reduced-motion: no-preference) {
  body,
  .slider_area .single_slider,
  .sample-text-area,
  .portfolio-section,
  .footer,
  .footer::before,
  .slicknav_menu .slicknav_nav,
  .slicknav_menu .slicknav_icon-bar,
  .slider_text h3.personal-intro,
  .slider_text h3.personal-intro > span,
  .slider_text h3.personal-intro .intro-location,
  .text-heading,
  .about-introduction,
  .about-introduction p,
  .about-background,
  .about-background-label,
  .about-contact,
  .about-contact a,
  .about-disclaimer,
  .portfolio-divider,
  .single_gallery .gallery_heading,
  .single_gallery .gallery_heading h4,
  .single_gallery .gallery_heading a,
  .single_gallery .gallery_heading p,
  .logo-switch button,
  .more-about-link,
  .header-area .main-header-area .Appointment .book_btn a,
  .header-social-link,
  .footer-social-link,
  .intro-down-link,
  .footer-scene,
  .copy_right,
  .copy_right a,
  .theme-toggle {
    transition: background-color 400ms ease, color 400ms ease, border-color 400ms ease;
  }
  .framed-portrait,
  .single_gallery .thumb > a { transition: box-shadow 400ms ease; }
  .sea-glass-header-logo,
  .footer .copy-right_text img { transition: filter 400ms ease; }
  .header-social-link,
  .footer-social-link { transition: background-color 400ms ease, color 400ms ease, border-color 400ms ease, transform 220ms ease; }
}

/* Footer: show both celestial objects while they traverse the shared arc. */
.celestial-orbit { transform-origin: 0 0; }
html[data-theme] .celestial-orbit.is-travelling .celestial-art { display: inline; }


/* Footer: retain sky layers long enough for their departure and arrival. */
html[data-theme] .sky-transition .sky-stars,
html[data-theme] .sky-transition .footer-day-clouds { display: inline; }

/* Footer: the moving crescent occludes stars while matching the sky. */
.celestial-moon path { fill: #173c40; }
html[data-theme="light"] .celestial-moon path { fill: #ccdfd8; }
@media (prefers-reduced-motion: no-preference) {
  .celestial-moon path { transition: fill 400ms ease; }
}

/* Preview proportion exploration: expose more sky above the footer scene. */
.footer { margin-top: -40px; padding-top: 120px; }

/* Footer: fit the complete composition on phones only. */
@media (max-width: 767px) {
  .footer .footer-scene-art { width: 100%; max-width: none; height: auto; margin: 0; }
}

/* Match About’s vertical accent to the section divider. */
.about-introduction { border-left-width: 4px; }

/* Interactive footer car. */
.footer-scene { --car-surface: #173c40; }
html[data-theme="light"] .footer-scene { --car-surface: #ccdfd8; }
#car-travel:focus-visible { outline: none; filter: drop-shadow(0 0 3px currentColor); }
html[data-theme="light"] #headlight-beam { visibility: hidden; opacity: 0 !important; }
@media (prefers-reduced-motion: reduce) {
  #headlight-beam { transition: none !important; }
}

/* Noninteractive vector header logo with the primary button outline. */
.header-logo-frame { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 4px 12px; border: 2px solid #9dd7c8; border-radius: 8px; vertical-align: middle; }
.header-area .main-header-area .logo .header-logo-frame img.sea-glass-header-logo { height: 36px; width: auto; max-width: 100%; }
html[data-theme="light"] .header-logo-frame { border-color: #173c40; }

/* Keep the About and Projects section headings equally sized. */
#about-me.text-heading,
.portfolio-heading.text-heading { font-size: 28px; }

/* Match the car surface fade to the footer's theme transition. */
@media (prefers-reduced-motion: no-preference) {
  #car-travel [fill="var(--car-surface)"] { transition: fill 400ms ease; }
}

/* Compact the space above the footer illustration on phones and tablets. */
@media (max-width: 991px) {
  .footer { padding-top: 0; }
  .footer .footer-scene { padding-top: 8px; }
}
/* Keep the tablet baseline aligned with the reduced scene padding. */
@media (min-width: 768px) and (max-width: 991px) {
  .footer .footer-scene::after { top: calc(8px + (min(50cqw, 720px) * 250 / 1200)); }
}
