:root {
    /* Nature-themed color palette */
    --pale-orange: #fcebd6;
    --bright-orange: #e87c3e;
    --deep-orange: #c45c1a;
    --dark-green: #2a4b38;
    --leaf-green: #3f684e;
    --earth-brown: #6b4c3a;
    --light-brown: #8d6e63;
    
    --bg-light: #faf7f2;
    --text-light: #3e2723;
    --nav-bg-light: #2a4b38;
    --nav-text-light: #faf7f2;

    --bg-dark: #1e2520;
    --text-dark: #fcebd6;
    --nav-bg-dark: #161c18;
    --nav-text-dark: #e8c6a5;
}

body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Light mode styles */
body.light-mode {
    background-color: var(--bg-light);
    color: var(--text-light);
}

body.light-mode h2, body.light-mode h3 {
    color: var(--deep-orange);
}

body.light-mode nav {
    background-color: #4a3728;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body.light-mode nav ul div li:hover {
    background-color: var(--bright-orange);
}

body.dark-mode nav ul div li:hover {
    background-color: var(--deep-orange);
}

body.light-mode nav ul li a,
body.light-mode nav ul li.theme-toggle button {
    color: var(--nav-text-light);
}

body.light-mode main p a {
    color: var(--bright-orange);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid var(--pale-orange);
}

body.light-mode main p a:hover {
    color: var(--deep-orange);
    border-bottom: 2px solid var(--bright-orange);
}

/* Dark mode styles */
body.dark-mode {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

body.dark-mode h2, body.dark-mode h3 {
    color: var(--pale-orange);
}

body.dark-mode nav {
    background-color: #1a1410;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode nav ul div li:hover {
    background-color: var(--dark-green);
}

body.dark-mode nav ul li a,
body.dark-mode nav ul li.theme-toggle button {
    color: var(--nav-text-dark);
}

body.dark-mode main p a {
    color: var(--bright-orange);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

body.dark-mode main p a:hover {
    color: white;
    border-bottom: 2px solid var(--bright-orange);
}

/* Navigation bar styling */
nav {
    padding: 15px 0;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.4s ease;
}

nav ul {
    list-style: none;
    padding: 0 20px;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-left, .nav-right {
    display: flex;
    gap: 10px;
}

nav ul li {
    padding: 8px 20px;
    border-radius: 8px;
    transition: background-color 0.3s, transform 0.2s;
}

nav ul li:hover {
    transform: translateY(-2px);
}

nav ul li a {
    text-decoration: none;
    font-size: 1.1em;
    letter-spacing: 0.5px;
}

nav ul li.theme-toggle button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 500;
    font-family: inherit;
    letter-spacing: 0.5px;
}

/* Header styling */
header {
    background-image: url("Header_sign_img.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: rgba(74, 55, 40, 0.75); /* Pale dark brown overlay */
    background-blend-mode: multiply;
    height: 65vh;
    min-height: 450px;
    color: var(--pale-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    flex-direction: column;
    text-align: center;
}

header h1 {
    font-size: clamp(2.5em, 6vw, 5em);
    margin: 0;
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

header h2 {
    font-size: clamp(1.2em, 3vw, 2em);
    margin: 15px 0 0 0;
    opacity: 0.95;
    text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 300;
}

.playwrite-co {
  font-family: "Playwrite CO", cursive;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
}

.roboto-regular {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-style: normal;
}

/* Main Content */
main {
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 25px;
    line-height: 1.8;
    font-size: 1.15em;
}

main section {
    margin-bottom: 70px;
}

main h2 {
    font-size: 2.2em;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
}

main h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 60px;
    background-color: var(--bright-orange);
    border-radius: 2px;
}

body.dark-mode main h2::after {
    background-color: var(--bright-orange);
}

main p {
    margin-bottom: 20px;
    text-align: justify;
}

/* Media Containers */
.iframe-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 40px;
    margin-bottom: 40px;
}

.iframe-wrapper {
    position: relative;
    width: 100%;
    max-width: 950px;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    border: 4px solid #4a3728;
}

body.dark-mode .iframe-wrapper {
    border-color: #6b5344;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

.iframe-wrapper iframe,
.iframe-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

/* Content Layouts */
.content-with-image {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    align-items: center;
}

.text-content {
    flex: 1;
    min-width: 300px;
}

.image-content {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
}

.image-content .iframe-container {
    margin: 0;
}

.image-content .iframe-wrapper {
    padding-top: 100%; /* Make it slightly more square for side images */
    border-radius: 20px;
    border: 4px solid #4a3728;
    transition: transform 0.3s ease;
}

body.dark-mode .image-content .iframe-wrapper {
    border-color: #6b5344;
}

.image-content .iframe-wrapper:hover {
    transform: scale(1.02);
}

img#map-image {
    display: block;
    max-width: 100%;
    border-radius: 16px;
    margin: 40px auto;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    border: 4px solid #4a3728;
}

body.dark-mode img#map-image {
    border-color: #6b5344;
}

/* Student Project Section */
.student-project .image-wrapper {
    display: flex;
    align-items: flex-start;
    margin: 40px 0;
    gap: 40px;
}

.student-project img {
    max-width: 100%;
    width: clamp(350px, 45%, 600px);
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    border: 3px solid #4a3728;
}

body.dark-mode .student-project img {
    border-color: #6b5344;
}

.student-project .text-wrap {
    flex: 1;
}

@media (max-width: 768px) {
    .content-with-image {
        flex-direction: column;
        gap: 30px;
    }
    
    .student-project .image-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .student-project img {
        width: 100%;
    }
    
    nav ul {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-left, .nav-right {
        flex-direction: column;
        width: 100%;
        text-align: center;
        gap: 5px;
    }
    
    nav {
        padding: 10px 0;
    }
}