body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    margin: 0 auto;
    padding: 2rem;
    max-width: 800px;
    background: linear-gradient(135deg, #f0f4ff, #e3f2fd);
}

body.dark-mode {
    background: linear-gradient(135deg, #2d2d2d, #1a1a1a);
    color: #fff;
}

body.dark-mode a {
    color: #bbdefb;
}

.site-header {
    text-align: center;
    margin-bottom: 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

body.dark-mode .site-header {
    background: rgba(45, 45, 45, 0.9);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 0.5rem;
}

.site-nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 1rem;
}
.site-nav button {
background: none;
  border: 1px solid currentColor;
  padding: 1rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
}

/* Ensure dark mode nav buttons use a white border and text */
body.dark-mode .site-nav button {
    color: #fff;
    border-color: #fff;
}

/* Provide a contrasting hover state for navigation buttons */
.site-nav button:hover {
    background-color: #000;
    color: #fff;
}

/* Adjust hover colors when dark mode is active */
body.dark-mode .site-nav button:hover {
    background-color: #fff;
    color: #000;
}

section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
}

section:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.6);
}

section:nth-of-type(even) {
    background-color: rgba(230, 240, 255, 0.6);
}

body.dark-mode section:nth-of-type(odd) {
    background-color: rgba(50, 50, 50, 0.6);
}

body.dark-mode section:nth-of-type(even) {
    background-color: rgba(70, 70, 70, 0.6);
}

h1, h2 {
    margin-bottom: 0.5rem;
}

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

.card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

body.dark-mode .card {
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.card:hover {
    transform: scale(1.02);
}

.extra-details {
    display: none;
}
#overlay .extra-details {
    display: block;
    margin-top: 0.5rem;
}

 
.resume-section {
    margin-bottom: 2rem;
}

.home-intro {
    text-align: center;
    margin-top: 2rem;
}

.resume-title {
    text-align: center;
}


 
.links {
    margin-top: 1rem;
    text-align: center;
}
.links a {
    margin: 0 0.5rem;
}

#mode-toggle {
    background: none;
  border: 1px solid currentColor;
  padding: 1rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
}

/* White border and text for the mode toggle in dark mode */
body.dark-mode #mode-toggle {
    color: #fff;
    border-color: #fff;
}

/* Hover style for the dark mode toggle */
#mode-toggle:hover {
    background-color: #000;
    color: #fff;
}

body.dark-mode #mode-toggle:hover {
    background-color: #fff;
    color: #000;
}

#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

#overlay.active {
    display: flex;
}

#overlay .overlay-content {
    background: #fff;
    max-width: 600px;
    width: 90%;
    max-height: 90%;
    overflow-y: auto;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

#overlay .actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

#overlay .actions button {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
}

#overlay .actions button:hover {
    background: #0056b3;
}

body.dark-mode #overlay .overlay-content {
    background: #333;
    color: #fff;
}

.link-cards {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
}

.link-cards .card {
    position: relative;
    flex: 0 0 auto;
    text-align: center;
    text-decoration: none;
    color: inherit;
}

.link-cards .card span {
    position: absolute;
    top: 0.25rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    width: calc(100% - 1rem);
}

.link-cards img {
    width: 100px;
    height: 100px;
    margin-top: 1.5rem;
}

/* Ensure the project card label displays centered above its QR code */
#projects .card {
    text-align: center;
}
#projects .card span {
    display: block;
    margin-bottom: 0.5rem;
}

/* Responsive styles */
@media (max-width: 800px) {
    .menu-toggle {
        display: block;
    }
    .site-nav {
        display: none;
    }
    .site-nav.open {
        display: block;
    }
    .site-nav ul {
        flex-direction: column;
        align-items: center;
    }
    .site-nav button {
        width: 100%;
    }
}
