@import 'variables.css';

/* Prevent FOUC (Flash of Unstyled Content) */
html.theme-loading {
  visibility: hidden;
}

html.theme-loaded {
  visibility: visible;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--background);
  color: var(--text-secondary);
  font-family: var(--font-body);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Universal transitions for theme switching */
* {
  transition: background-color 0.3s ease, 
              color 0.3s ease, 
              border-color 0.3s ease,
              box-shadow 0.3s ease,
              fill 0.3s ease,
              stroke 0.3s ease;
}

/* Links */
a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Selection styles */
::selection {
  background-color: var(--accent);
  color: var(--background);
}

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

/* Scrollbar styles */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}

/* Section Styles */
.section-padding {
  padding: 100px 0;
}

.section-title {
  color: var(--text-primary);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--accent);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* Footer */
.footer {
  background-color: var(--background-secondary);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  border-top: 1px solid var(--border-color);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.social-link {
  color: var(--text-secondary);
  font-size: 1.5rem;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
  padding: 0.5rem;
  border-radius: 50%;
  background-color: var(--background-tertiary);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-link:hover {
  color: var(--accent);
  transform: translateY(-3px);
  background-color: var(--background);
  box-shadow: 0 5px 15px var(--shadow-light);
}

.copyright {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .section-padding {
    padding: 60px 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .social-links {
    gap: 1.5rem;
  }

  .social-link {
    font-size: 1.3rem;
    width: 45px;
    height: 45px;
  }
}
/* Refined footer layout */
.site-footer {
  background-color: var(--background-secondary);
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
  padding: 3rem 0 2rem;
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-brand-name {
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  color: var(--text-tertiary);
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 34ch;
  margin-bottom: 1rem;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-socials a {
  color: var(--text-tertiary);
  font-size: 1.15rem;
  line-height: 1;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-socials a:hover,
.footer-socials a:focus-visible {
  color: var(--text-primary);
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav a {
  color: var(--text-tertiary);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-tertiary);
  font-size: 0.78rem;
}

.footer-bottom p {
  margin: 0;
}

@media (min-width: 768px) {
  .footer-top {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
