:root {
  --background: #f4f6fb;
  --foreground: #222;
  --primary: #1976d2;
  --accent: #1565c0;
  --card-bg: #fff;
  --card-border: #e0e0e0;
  --banner-bg: #2563eb;
  --banner-fg: #fff;
  --input-bg: #fff;
  --input-fg: #222;
  --input-border: #bdbdbd;
  --footer-bg: #222;
  --footer-fg: #fff;
}
[data-theme="dark"] {
  --background: #181a20;
  --foreground: #f4f6fb;
  --primary: #90caf9;
  --accent: #42a5f5;
  --card-bg: #23272f;
  --card-border: #333a47;
  --banner-bg: #111827;
  --banner-fg: #90caf9;
  --input-bg: #23272f;
  --input-fg: #f4f6fb;
  --input-border: #444b5a;
  --footer-bg: #23272f;
  --footer-fg: #90caf9;
}

p, h1, h2, h3, h4, h5, h6, button {
    font-family: "Roboto", serif;
}

body {
    background: var(--background);
    color: var(--foreground);
    background-color: var(--background);
    background-size: cover;
    width: auto; 
    overflow-x: hidden;
    font-family: "Roboto", serif;
    margin: 0px;
}

.nav-bar {
    width: 100%;
    display: inline-block;
    background-color: #1C539F;
    font-family: "Roboto", serif;
    font-weight: 700 !important;
    padding-top: 10px;
}

.nav-content .logo-touch-target {
    display: inline-flex;
    height: 60%;
    width: 350px;
}

.nav-content .nav-logo {
    height: 60px;
    margin: auto;
}

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

.nav-logo img {
    width: 200px;
}

.nav-content nav {
    display: block;
    width: 100%;
    text-align: right;
    padding-top: 0px;
    padding-right: 0px;
}

.profile {
    background-color: #1d539f !important;
    text-align: center;
    height: auto;
    margin-bottom: 0px;
    padding-bottom: 30px;
    padding-top: 30px;
}

.profile h1 {
        font-size: 50px;
        font-weight: 700;
        color: white;
        margin-bottom: 0.5em;
        margin-top: 0;
}

.profile h2.subtitle {
    margin-bottom: 0.5em;
    color: #fff;
}

.profile .welcome {
    margin-bottom: 0.5em;
    color: #e0e7ff;
}

.profile img {
        border-radius: 50%;
        max-width: 100%;
        max-height: 100%;
        margin-left: auto;
        margin-right: auto;
        display: block;        
        padding: 20px;
}

.profile .profile-picture {
    margin-bottom: 30px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner {
    padding: 20px 0px 50px 0px;
    height: 150px;
    background-color: #1d539f;
}

.banner .logo {
    max-width:180px;
    max-height:60px;
    width: auto;
    height: auto;
}

.banner .title {
    color: white;
    font-size: 50px;
    font-weight: 700;
}

.work-experience {
    max-width: 700px;
    margin: 2rem auto;
    padding: 1rem;
    background: #f4f4f4;
    border-radius: 8px;
}
.job {
    margin-bottom: 1.5rem;
}
.job h3 {
    margin-bottom: 0.2rem;
}
.job .job-dates {
    margin: 0 0 0.5rem 0;
    color: #666;
}

.about-me {
    max-width: 600px;
    margin: 2.5rem auto 2.5rem auto;
    padding: 1.5rem 1.5rem 1.5rem 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    font-size: 1.1rem;
}

.hobbies-list {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin: 2rem 0;
}
.hobby-card {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 1rem;
    max-width: 300px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.hobby-img {
    width: 100%;
    max-width: 250px;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.navbar {
    background: #222;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.navbar ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 0;
    padding: 0;
}
.navbar li {
    display: inline;
}
.navbar a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.2s;
}
.navbar a:hover, .navbar a:focus {
    background: #444;
}

.main-container {
    margin-top: 0;
}

.education-section {
    max-width: 700px;
    margin: 2rem auto;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
}
.education-list {
    list-style: none;
    padding: 0;
}
.education-item {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}
.education-year {
    color: #666;
    font-size: 0.95rem;
}
.education-item ul {
    margin-top: 0.5rem;
    margin-bottom: 0;
    padding-left: 1.2rem;
}

#map {
    height: 500px;
    width: 100%;
    max-width: 900px;
    margin: 2rem auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.map-section {
    max-width: 950px;
    margin: 2rem auto;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Fade-in animation for sections */
.fade-in { opacity: 0; transform: translateY(30px); animation: fadeInUp 0.8s forwards; }
.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }
.fade-in:nth-child(5) { animation-delay: 0.5s; }
@keyframes fadeInUp {
  to { opacity: 1; transform: none; }
}

/* Counter card hover effect */
.counter-card { transition: box-shadow 0.2s; }
.counter-card:hover { box-shadow: 0 4px 24px rgba(24,119,242,0.15); }

/* Footer styles */
.site-footer {
  width: 100%;
  background: var(--footer-bg);
  color: var(--footer-fg);
  padding: 18px 0 12px 0;
  text-align: center;
  font-size: 1rem;
  margin-top: 40px;
  letter-spacing: 0.02em;
}
.site-footer .footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.site-footer .footer-links a {
  color: #90caf9;
  text-decoration: none;
  margin: 0 4px;
  transition: color 0.2s;
}
.site-footer .footer-links a:hover {
  color: #42a5f5;
  text-decoration: underline;
}
.flash-messages {
  max-width: 420px;
  margin: 18px auto 0 auto;
  text-align: center;
}
.flash {
  padding: 10px 18px;
  border-radius: 6px;
  margin-bottom: 10px;
  font-weight: 500;
  font-size: 1.05rem;
  display: inline-block;
}
.flash-success {
  background: #e8f5e9;
  color: #388e3c;
  border: 1px solid #a5d6a7;
}
.flash-error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}
@media (max-width: 600px) {
  .site-footer {
    font-size: 0.95rem;
    padding: 14px 0 8px 0;
  }
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

.btn, button, input[type="submit"] {
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.btn:hover, button:hover, input[type="submit"]:hover {
  background: #1565c0;
  color: #fff;
  box-shadow: 0 2px 12px rgba(21,101,192,0.12);
}
a {
  transition: color 0.2s;
}
a:hover {
  color: #1976d2;
  text-decoration: underline;
}

/* --- DARK MODE OVERRIDES FOR META-MLH THEME --- */
[data-theme="dark"] .meta-mlh-banner {
  background: linear-gradient(90deg, #23272f 0%, #2563eb 60%, #FFD700 100%);
  color: #FFD700;
  border-bottom: 2px solid var(--card-border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
[data-theme="dark"] .meta-mlh-banner img {
  background: transparent;
  filter: none;
}
[data-theme="dark"] .meta-mlh-banner .banner-text {
  color: #FFD700;
}

[data-theme="dark"] .profile, [data-theme="dark"] .about-me, [data-theme="dark"] .news-section, [data-theme="dark"] .contact-form, [data-theme="dark"] .card, [data-theme="dark"] .hobby-card, [data-theme="dark"] .education-section, [data-theme="dark"] .map-section {
  background: #23272f !important;
  color: #f4f6fb !important;
  border: 1px solid #333a47 !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}
[data-theme="dark"] .profile h1, [data-theme="dark"] .profile h2.subtitle, [data-theme="dark"] .news-section h2, [data-theme="dark"] .contact-form label {
  color: #90caf9 !important;
}
[data-theme="dark"] .news-section ul, [data-theme="dark"] .news-section li, [data-theme="dark"] .news-section a {
  color: #e3eafc !important;
}
[data-theme="dark"] .news-section a:hover {
  color: #FFD700 !important;
}
[data-theme="dark"] input, [data-theme="dark"] textarea {
  background: #181a20 !important;
  color: #f4f6fb !important;
  border: 1px solid #444b5a !important;
}
[data-theme="dark"] input:focus, [data-theme="dark"] textarea:focus {
  outline: 2px solid #90caf9 !important;
}
[data-theme="dark"] .site-footer {
  background: #181a20 !important;
  color: #90caf9 !important;
}
[data-theme="dark"] .site-footer .footer-links a {
  color: #90caf9 !important;
}
[data-theme="dark"] .site-footer .footer-links a:hover {
  color: #FFD700 !important;
}

/* Light mode: make meta-mlh-banner background transparent */
.meta-mlh-banner {
  background: linear-gradient(90deg, transparent 0%, #1877F2 60%, #FFD700 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.5rem 0;
  font-weight: bold;
  font-size: 1.2rem;
  border-bottom: 2px solid #222;
}
.meta-mlh-banner img {
  background: transparent;
  border-radius: 8px;
  padding: 2px 6px;
}

/* Dark mode: fix contact card and background */
[data-theme="dark"] body {
  background: #181a20 !important;
}

/* Banner: blend SVG logos into banner in both modes */
.meta-mlh-banner img {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 8px;
  padding: 2px 6px;
}

#darkModeToggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  font-size: 1rem;
  padding: 8px 20px;
  border-radius: 6px;
  background: #1976d2 !important; /* Constant blue background, matches button */
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.08);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
#darkModeToggle:hover, #darkModeToggle:focus {
  background: #1565c0 !important; /* Constant hover color, matches button hover */
  color: #fff;
  box-shadow: 0 4px 16px rgba(21,101,192,0.15);
}