/* Hyperspace by HTML5 UP - Refined by Grok */

/* CSS Custom Properties (Variables) */
:root {
    --color-primary: #1a3c6d; /* Deep blue for navigation and accents */
    --color-secondary: #4a90e2; /* Lighter blue for potential secondary accents */
    --color-background: #e6f0fa; /* Pale blue background for sections */
    --color-text: #333; /* Dark gray for primary text */
    --color-text-light: #555; /* Lighter gray for secondary text */
    --color-heading: #1a3c6d; /* Deep blue for headings */
    --color-accent: #fff; /* White for buttons and highlights */
    --spacing-unit: 1.5em;
    --border-radius: 0.25em;
    --transition: all 0.3s ease;
    --font-family: Arial, Helvetica, sans-serif;
    --font-size-base: 16.5pt;
}

/* Reset and Base Styles */
*,
*:before,
*:after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
}

html {
    font-size: 100%;
}

body {
    background: var(--color-background); /* Pale blue background for the entire body */
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.75;
    -webkit-text-size-adjust: none;
}

body.is-preload *,
body.is-preload *:before,
body.is-preload *:after {
    animation: none !important;
    transition: none !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-heading); /* Deep blue headings */
    font-weight: bold;
    line-height: 1.5;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.75em; }
h2 { font-size: 1.75em; }
h3 { font-size: 1.1em; }

p {
    margin-bottom: 2em;
}

a {
    color: inherit;
    text-decoration: none;
    border-bottom: dotted 1px rgba(26, 60, 109, 0.35); /* Adjusted for deep blue */
    transition: var(--transition);
}

a:hover {
    border-bottom-color: transparent;
    color: var(--color-primary); /* Deep blue hover color */
}

/* Responsive Typography */
@media (max-width: 1680px) {
    body { font-size: 13pt; }
}

@media (max-width: 1280px) {
    body { font-size: 12pt; }
}

@media (max-width: 736px) {
    h1 { font-size: 2em; }
    h2 { font-size: 1.25em; }
    h3 { font-size: 1em; }
    body { font-size: 11pt; }
}

/* Button Styles */
.button {
    background: transparent;
    border: solid 1px rgba(26, 60, 109, 0.15); /* Adjusted for deep blue */
    border-radius: 3em;
    color: var(--color-heading);
    cursor: pointer;
    display: inline-block;
    font-size: 0.6em;
    font-weight: bold;
    height: calc(4.75em + 2px);
    line-height: 4.75em;
    padding: 0 3.75em;
    text-align: center;
    text-transform: uppercase;
    transition: var(--transition);
}

.button:hover {
    border-color: rgba(26, 60, 109, 0.55); /* Adjusted for deep blue */
}

.button.primary {
    background: var(--color-primary); /* Deep blue button background */
    color: #fff !important;
}

.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Wrapper */
.wrapper {
    position: relative;
    background: linear-gradient(135deg, #e6f0fa 0%, #d6e4f0 100%), radial-gradient(circle at 20% 20%, rgba(26, 60, 109, 0.03) 1px, transparent 1px);
    background-blend-mode: overlay;
    background-size: 20px 20px, 20px 20px;
    background-position: 0 0, 0 0;
}

.wrapper > .inner {
    padding: 5em;
    max-width: 75em;
    margin: 0 auto;
}

.wrapper.fullscreen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
}

.wrapper.style1 { background: var(--color-background); /* Pale blue for consistency */ }
.wrapper.style2 { background: var(--color-background); /* Pale blue for consistency */ }
.wrapper.style1-alt { background: var(--color-background); /* Pale blue for consistency */ }

@media (max-width: 1680px) {
    .wrapper > .inner { padding: 4em; }
}

@media (max-width: 1280px) {
    .wrapper > .inner { width: 100%; }
    .wrapper.fullscreen { min-height: calc(100vh - 2.5em); }
}

@media (max-width: 736px) {
    .wrapper > .inner { padding: 3em 2em 1em; }
    .wrapper.fullscreen { min-height: 0; padding: 2em 0; }
}

/* Fade Animations */
.wrapper.fade-up > .inner {
    transform: translateY(0);
    opacity: 1;
    transition: opacity 1s ease, transform 1s ease;
}

body.is-preload .wrapper.fade-up > .inner {
    transform: translateY(1em);
    opacity: 0;
}

/* Icons */
.icon {
    text-decoration: none;
    position: relative;
}

.icon:before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 400;
    font-style: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    line-height: inherit;
}

.icon.brands:before { font-family: 'Font Awesome 5 Brands'; }
.icon.solid:before { font-weight: 900; }

/* Intro Section */
#intro {
    position: relative; /* Ensure positioning context for overlay and video */
    overflow: hidden; /* Prevent video overflow */
}

#intro .inner {
    padding: 2rem;
    text-align: center;
    position: relative; /* Ensure content is above overlay */
    z-index: 2; /* Above overlay */
    background: rgba(255, 255, 255, 0.8); /* Semi-transparent white backdrop for content */
    border-radius: 20px; /* Rounded corners for the backdrop */
    max-width: 600px; /* Limit width for better readability */
    margin: 0 auto; /* Center the content */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure the video covers the section */
    z-index: 0; /* Behind overlay and content */
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Match video styling */
    z-index: 0; /* Same layer as video, fallback */
    display: none; /* Hidden by default, shown if video fails */
}

.background-video:invalid,
.background-video:unplayable {
    display: none; /* Hide video if it fails to load */
}

.background-image:valid {
    display: block; /* Show image if video is unplayable */
}

/* Overlay for the entire section */
#intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 60, 109, 0.5); /* Deep blue overlay with 50% opacity */
    z-index: 1; /* Above video, below content */
}

/* Content styles */
.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    display: block;
    border: 3px solid var(--color-primary); /* Deep blue border */
    position: relative;
}

.lighter-text {
    font-weight: 300;
    color: var(--color-text); /* Darker text for contrast */
    margin: 2px 0;
    position: relative;
}

.main-name {
    font-weight: 700;
    color: var(--color-heading); /* Deep blue */
    font-size: 3rem;
    margin: 2px 0;
    position: relative;
}

.typing {
    display: inline-block;
    white-space: nowrap;
    position: relative;
}

.kdu-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 5px 0;
    position: relative;
}

.kdu-info::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    background: repeating-linear-gradient(
        0deg,
        rgba(26, 60, 109, 0.2) 0px,
        rgba(26, 60, 109, 0.2) 1px,
        transparent 1px,
        transparent 10px
    ), repeating-linear-gradient(
        90deg,
        rgba(26, 60, 109, 0.2) 0px,
        rgba(26, 60, 109, 0.2) 1px,
        transparent 1px,
        transparent 10px
    );
    border-radius: 50%;
    filter: blur(4px);
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
    pointer-events: none;
}

.kdu-info:hover::before {
    opacity: 0.8;
    transform: translate(-50%, -50%) rotate(15deg);
}

.kdu-logo {
    width: 20px;
    height: auto;
    margin-right: 5px;
    opacity: 1;
    z-index: 2;
}

.kdu-name {
    font-size: 0.8rem;
    color: var(--color-text);
    opacity: 0.7;
    z-index: 2;
}

#intro .actions {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
    padding: 0;
    gap: 1rem;
    list-style: none; /* Remove default bullet points */
    position: relative;
}

#intro .actions li {
    position: relative;
}

#intro .actions li::before,
#intro .actions li::after {
    content: none; /* Remove any custom dots via pseudo-elements */
}

.social-links {
    margin-top: 1rem;
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 1.5rem; /* Space between icons */
}

.social-links li {
    display: inline-block;
}

.social-links a {
    font-size: 1rem; /* Icon size */
    color: #1a3c6d; /* Blue color */
    transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%; /* Optional if you want circular clickable areas */
}

.social-links a:hover {
    transform: scale(1.2); /* Pop-up effect */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Soft shadow */
    color: #0f2447; /* Darker blue on hover */
    background: rgba(26, 60, 109, 0.1); /* Optional light background on hover */
}

@media (max-width: 736px) {
    .social-links a {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
    }
}


/* About Me Section */
#about .inner {
    text-align: center;
    max-width: 800px;
    width: 100%;
}

#about p {
    color: var(--color-text-light);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

@media (max-width: 736px) {
    #about p {
        font-size: 1rem;
    }
}

/* Skills Section */
#one .inner {
    text-align: center;
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%; /* Ensure the section takes full height */
}

.skills-header {
    margin-bottom: 3rem; /* Space below the header */
}

.skills-buttons {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: 1rem 0;
}

.skill-btn {
    background: rgba(26, 60, 109, 0.1); /* Light deep blue background */
    border: none;
    padding: 0.5rem 1.5rem;
    color: var(--color-heading);
    cursor: pointer;
    border-radius: 20px;
    transition: var(--transition);
    font-size: 1rem;
}

.skill-btn.active {
    background: var(--color-primary); /* Deep blue */
    color: #fff;
}

.skills-grid {
    margin: 2rem 0; /* Increased margin to push content down */
    max-width: 800px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.skill-category {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1.5rem;
    justify-items: center;
}

.skill-category.active {
    display: grid;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skill-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 0.5rem;
    background: #fff;
    padding: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.skill-item span {
    font-size: 0.9rem;
    color: var(--color-text);
}

.skills-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0; /* Increased margin to push down */
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-heading); /* Deep blue */
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.github-btn {
    display: inline-flex;
    align-items: center;
    background: rgba(26, 60, 109, 0.1); /* Light deep blue background */
    color: var(--color-heading);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    text-decoration: none;
    transition: var(--transition);
    margin-top: 2rem; /* Push GitHub button down */
}

.github-btn .icon {
    margin-right: 0.5rem;
}

.github-btn:hover {
    background: var(--color-primary); /* Deep blue */
    color: #fff;
}

.skills-footer {
    margin-top:3rem; /* Pushes the footer to the bottom of the flex container */
}

@media (max-width: 736px) {
    .explore-my { font-size: 1.2rem; }
    .core-skills { font-size: 2rem; }
    .skill-btn { padding: 0.4rem 1rem; font-size: 0.9rem; }
    .skill-category { grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 1rem; }
    .skill-icon { width: 40px; height: 40px; }
    .skill-item span { font-size: 0.8rem; }
    .stat-number { font-size: 1.5rem; }
    .stat-label { font-size: 0.8rem; }
    .github-btn { padding: 0.4rem 1rem; font-size: 0.9rem; }
    .skills-header { margin-bottom: 1.5rem; }
    .skills-grid { margin: 1.5rem 0; }
    .skills-stats { gap: 1.5rem; margin: 1.5rem 0; }
    .github-btn { margin-top: 1.5rem; }
}

/* Projects Section */
#two .inner {
    text-align: center;
    max-width: 1200px;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%; /* Ensure the section takes full height */
}

.skills-header {
    margin-bottom: 2rem; /* Space below the header to push content down */
}

.skills-header .lighter-text {
    font-weight: 300;
    color: var(--color-text-light);
    margin: 0.5rem 0;
}

.skills-header .core-skills {
    font-weight: 700;
    color: var(--color-heading); /* Deep blue */
    font-size: 2.5rem;
    margin: 0.5rem 0;
}

.skills-header p:last-child {
    color: var(--color-text-light);
    max-width: 800px;
    margin: 0 auto 1rem;
    font-size: 1.1rem;
}

.projects-section {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.projects-scroll-container {
    position: relative;
    margin: 0 50px;
}

.project-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 2rem;
    padding: 1rem 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.project-grid::-webkit-scrollbar {
    display: none;
}

.project-card {
    flex: 0 0 250px;
    background: rgba(26, 60, 109, 0.1); /* Light deep blue background */
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.project-icon {
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.project-icon .icon {
    font-size: 2rem;
    color: var(--color-primary); /* Deep blue */
}

.project-card h3 {
    color: var(--color-heading); /* Deep blue */
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.project-card p {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.project-button {
    background: #fff;
    color: var(--color-primary); /* Deep blue */
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: inline-block;
}

.project-button:hover {
    background: var(--color-primary); /* Deep blue */
    color: #fff;
    transform: translateY(-2px);
}

.project-button.disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
}

.project-button.disabled:hover {
    background: #ccc;
    color: #666;
    transform: none;
}

.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: var(--color-primary); /* Deep blue */
    border: none; /* Deep blue border */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: var(--transition);
    z-index: 10;
}

.scroll-arrow:hover {
    border-color: var(--color-text-light);
    color: var(--color-text-light);
}

.left-arrow { left: 0; margin-left: -50px; }
.right-arrow { right: 0; margin-right: -50px; }

.scroll-arrows {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

@media (max-width: 736px) {
    .projects-scroll-container { margin: 0 30px; }
    .project-card { flex: 0 0 200px; }
    .project-icon { width: 60px; height: 60px; }
    .project-icon .icon { font-size: 1.5rem; }
    .project-card h3 { font-size: 1.1rem; }
    .project-card p { font-size: 0.85rem; }
    .project-button { padding: 0.4rem 1.2rem; font-size: 0.85rem; }
    .scroll-arrow { width: 30px; height: 30px; font-size: 1rem; }
    .left-arrow { margin-left: -40px; }
    .right-arrow { margin-right: -40px; }
    .skills-header { margin-bottom: 1.5rem; }
    .skills-header .core-skills { font-size: 2rem; }
    .skills-header p { font-size: 1rem; }
    .skills-header .lighter-text { font-size: 1rem; }
}

/* Certifications Section */
#three .inner {
    text-align: center;
    max-width: 1200px;
    width: 100%;
    position: relative;
}

#three h2 { color: var(--color-heading); /* Deep blue */ }
#three p { color: var(--color-text-light); max-width: 800px; margin: 0 auto 2rem; }

.certifications-section {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.certifications-section h3 {
    color: var(--color-heading); /* Deep blue */
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.badges-scroll-container,
.certificates-scroll-container {
    position: relative;
    width: 100%;
    margin: 0 40px;
    padding: 1rem 0;
}

.badges-grid,
.certificates-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 2rem;
    padding: 1rem 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: flex-start; /* Avoid issues when content is wider */
    max-width: 80%; /* Control width */
    max-height: 200px; /* Control height */
    margin: 0 auto; /* Center horizontally */
}


.badges-grid::-webkit-scrollbar,
.certificates-grid::-webkit-scrollbar {
    display: none;
}

.badge-item {
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    flex: 0 0 auto;
    transition: var(--transition);

}

.badge-item:hover {
    transform: translateY(-5px);
}

.badge-icon {
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.badge-icon .icon {
    font-size: 2rem;
    color: var(--color-primary); /* Deep blue */
}

.badge-label {
    color: var(--color-text);
    font-size: 1rem;
    text-align: center;
    max-width: 150px;
    border-bottom: 1px solid var(--color-primary); /* Deep blue */
}

.certificate-item {
    color: var(--color-text);
    font-size: 1rem;
    text-decoration: none;
    flex: 0 0 auto;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    background: rgba(26, 60, 109, 0.1); /* Light deep blue background */
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.certificate-item:hover {
    color: var(--color-text-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

@media (max-width: 736px) {
    .badges-scroll-container,
    .certificates-scroll-container { margin: 0 30px; padding: 0.5rem 0; }
    .certifications-section { gap: 2rem; }
    .certifications-section h3 { font-size: 1.25rem; }
    .badge-icon { width: 60px; height: 60px; }
    .badge-icon .icon { font-size: 1.5rem; }
    .badge-label { font-size: 0.9rem; max-width: 120px; }
    .certificate-item { font-size: 0.9rem; padding: 0.4rem 0.8rem; }
    .scroll-arrow { width: 30px; height: 30px; font-size: 1rem; }
    .badges-left-arrow,
    .certificates-left-arrow { margin-left: -30px; }
    .badges-right-arrow,
    .certificates-right-arrow { margin-right: -30px; }
}

/* Scroll Container Styling */
.badges-scroll-container,
.certificates-scroll-container {
    display: flex;
    align-items: center;
    position: relative;
    margin: 2rem 0;
    overflow: hidden;
}

/* Grid Layout */
.badges-grid,
.certificates-grid {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 1rem 0;
}

/* Scroll Arrows */
.scroll-arrow {
    background-color: none;
    border: none;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.badges-left-arrow, .certificates-left-arrow { left: 0; }
.badges-right-arrow, .certificates-right-arrow { right: 0; }

/* Item Styling */
.badge-item img,
.certificate-item img {
    height: 100px;
    width: auto;
    
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.badge-item img:hover,
.certificate-item img:hover {
    transform: scale(1.05);
}

/* Hide Scrollbar */
.badges-grid::-webkit-scrollbar,
.certificates-grid::-webkit-scrollbar {
    display: none;
}

.badges-grid,
.certificates-grid {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}


/* Contact Me Section */
#contact .inner {
    text-align: center;
    max-width: 800px;
    width: 100%;
}

#contact p {
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.contact-form .fields {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-form .field {
    flex: 1 1 100%;
}

.contact-form .field label {
    color: var(--color-heading); /* Deep blue */
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.contact-form .field input,
.contact-form .field textarea {
    width: 100%;
    background: rgba(26, 60, 109, 0.1); /* Light deep blue background */
    border: 1px solid rgba(26, 60, 109, 0.3); /* Adjusted for deep blue */
    border-radius: 5px;
    padding: 0.75rem;
    color: var(--color-text);
    font-size: 1rem;
    transition: var(--transition);
}

.contact-form .field input:focus,
.contact-form .field textarea:focus {
    border-color: var(--color-primary); /* Deep blue */
    background: rgba(26, 60, 109, 0.2); /* Lighter deep blue */
    outline: none;
}

.contact-form .field textarea {
    resize: vertical;
    min-height: 120px;
}

#contact .actions {
    justify-content: center;
}

#contact .social-links {
    margin-top: 2rem;
}

@media (max-width: 736px) {
    .contact-form .fields {
        gap: 1rem;
    }
    .contact-form .field input,
    .contact-form .field textarea {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    .contact-form .field textarea {
        min-height: 100px;
    }
}

/* Sidebar */
#sidebar {
    background: var(--color-primary); /* Deep blue background */
    padding: 2.5em;
    position: fixed;
    top: 0;
    left: 0;
    width: 18em;
    height: 100vh;
    overflow-y: auto;
    text-align: right;
    z-index: 10000;
}

#sidebar .inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
}

#sidebar nav ul {
    list-style: none;
    padding: 0;
}

#sidebar nav a {
    color: #fff; /* White text for contrast on deep blue */
    display: block;
    font-size: 0.6em;
    font-weight: bold;
    letter-spacing: 0.25em;
    padding: 1.35em 0;
    text-transform: uppercase;
    transition: var(--transition);
    position: relative; /* For the underline animation */
    text-align: right; /* Align text to the right */
}

#sidebar nav a:hover {
    color: rgba(255, 255, 255, 0.75); /* Lighter white on hover */
}

#sidebar nav a.active {
    color: #fff; /* White for active link */
}

#sidebar nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0; /* Align underline to the right */
    width: 100%; /* Full width of the link */
    height: 2px; /* Thickness of the underline */
    background: #fff; /* White underline */
    transition: var(--transition); /* Smooth animation */
}

#sidebar + #wrapper {
    margin-left: 18em;
}

@media (max-width: 1280px) {
    #sidebar {
        position: static;
        width: 100%;
        height: 3.5em;
        padding: 0;
        text-align: center;
    }
    #sidebar .inner {
        flex-direction: row;
        align-items: stretch;
        height: 3.5em;
    }
    #sidebar nav ul {
        display: flex;
        height: 100%;
        margin: 0;
    }
    #sidebar nav li {
        margin: 0 0 0 2em;
    }
    #sidebar nav a {
        text-align: center; /* Center text on smaller screens */
        padding: 0 1em;
    }
    #sidebar nav a.active::after {
        bottom: 0; /* Adjust for horizontal layout */
        left: 0; /* Align underline to the left for centered text */
        right: auto;
        width: 100%;
    }
    #sidebar + #wrapper {
        margin-left: 0;
        padding-top: 3.5em;
    }
}

@media (max-width: 736px) {
    #sidebar { display: none; }
    #sidebar + #wrapper { padding-top: 0; }
}

/* Footer */
#footer .inner {
    text-align: center;
    padding: 2em;
}

#footer .menu {
    font-size: 0.8em;
    color: rgba(0, 0, 0, 0.15); /* Adjusted for pale blue background */
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 1em;
}