:root {
    /* Light Mode Colors */
    --background-color-light: #77a361;
    --text-color-light: #0e0e0e;
    --accent-color-light: #527141;
    --secondary-text-light: #7f8c8d;
    --border-color-light: rgba(0, 0, 0, 0.2);
    --card-background-light: #a4c195;
    --shadow-light-light: rgba(0, 0, 0, 0.3);
    --document-color-light: #d0dfc8;

    /* Dark Mode Colors */
    --background-color-dark: #77a361;
    --text-color-dark: #e0e0e0;
    --accent-color-dark: #a4c195;
    --secondary-text-dark: #b0b0b0;
    --border-color-dark: #333;
    --card-background-dark: #527141;
    --shadow-light-dark: rgba(255, 255, 255, 0.1);
    --document-color-dark: #2c3e2c;

    /* Default to Light Mode */
    --background-color: var(--background-color-light);
    --text-color: var(--text-color-light);
    --accent-color: var(--accent-color-light);
    --secondary-text: var(--secondary-text-light);
    --border-color: var(--border-color-light);
    --card-background: var(--card-background-light);
    --shadow-light: var(--shadow-light-light);
    --document-color: var(--document-color-light);
}

/* Dark Mode Styles */
body.dark-mode {
    --background-color: var(--background-color-dark);
    --text-color: var(--text-color-dark);
    --accent-color: var(--accent-color-dark);
    --secondary-text: var(--secondary-text-dark);
    --border-color: var(--border-color-dark);
    --card-background: var(--card-background-dark);
    --shadow-light: var(--shadow-light-dark);
    --document-color: var(--document-color-dark);
}

/** {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* transition: background-color 0.3s, color 0.3s; 
}*/

body {
  background-color: var(--document-color);
  scroll-behavior: smooth;
  color: var(--text-color);
  min-height: 100vh;
  padding: 20px;
}

.sticky-nav {
    position: sticky;
    top: 0;
    backdrop-filter: blur(10px);
    background-color: color-mix(in srgb, var(--card-background) 80%, transparent);
    z-index: 100;
    padding: 15px 30px;
    border-bottom: 1px solid var(--border-color); 
    box-shadow: 0 2px 4px var(--shadow-light); 
    transition: transform 0.3s ease;
    border-radius: 12px;
    text-align: right;
    margin-bottom: 40px;
}

.sticky-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 30px;
}

.sticky-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.sticky-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: var(--card-background);
    transition: all 0.3s ease;
}

.sticky-nav a:hover::after {
    width: 100%;
    left: 0;
}

.sticky-nav a:hover {
    color: var(--accent-color);
    transform: scale(1.05);
}

.nav-container {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left a {
  font-size: 20px;
  text-decoration: none;
  color: var(--text-color);
}

.nav-right {
  display: flex;
  gap: 25px;
  list-style: none;
}

.nav-right a {
  text-decoration: none;
  font-size: 14px;
  color: var(--text-color);
  font-weight: 500;
}

/* Main Content */
.container {
    max-width: 1400px;
    margin: 0 auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2fr, 1fr);
    gap: 20px;
    height: 700px;
}

.item {
    background: var(--card-background);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow-light);
}

/* Hero Section - Top Left */
.hero {
    grid-column: 1;
    grid-row: 1;
    background: var(--card-background);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px 40px;
}

hero h1 {
  font-size: 48px;
}

.decorative-flower {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    opacity: 0.2;
}

.hero h1 {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0;
}

.hero .line1 {
    font-weight: 700;
}

.hero .line2 {
    font-weight: 700;
}

.hero .line3 {
    font-style: italic;
    font-weight: 300;
}

.hero .line4 {
    font-weight: 700;
}

/* Profile Photo - Top Center (smaller) */
.profile {
    grid-column: 2;
    grid-row: 1;
    padding: 0;
    overflow: hidden;
    background: var(--card-background);
}

.profile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Projects Section - Top Right spanning 2 rows */
.projects {
    grid-column: 3;
    grid-row: 1 / 3;
    background: var(--card-background);
    padding: 30px;
}

.project-card {
    background: var(--card-background);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 15px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

.project-card.with-image img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.project-title {
    padding: 15px 20px;
    font-weight: 600;
    font-size: 17px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.arrow {
    font-size: 20px;
}

/* About Section - Bottom Left */
.about {
    grid-column: 1;
    grid-row: 2;
    background: var(--card-background);
    padding: 40px;
}

.decorative-star {
    width: 35px;
    height: 35px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.about p {
    line-height: 1.8;
    color: var(--text-color);
    font-size: 16px;
}

/* Contact Section - Bottom Center */
.contact {
    grid-column: 2;
    grid-row: 2;
    background: var(--background-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.contact-label {
    font-size: 12px;
    margin-bottom: 10px;
    opacity: 0.8;
}

.contact h2 {
    font-size: 36px;
    font-weight: 600;
}

.arrow-icon {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 24px;
}

/* Social Links Section - Would be separate if you add another row */
.social-section {
    grid-column: 2;
    grid-row: 3;
    background: var(--card-background);
    display: flex;
    align-items: center;
    padding: 30px 40px;
}

.social-links {
    display: flex;
    gap: 40px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    justify-content: space-around;
}

.social-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.social-links a:hover {
    opacity: 0.7;
    color: var(--accent-color);
    transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        height: auto;
    }

    .hero, .profile, .projects, .about, .contact {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
        height: auto;
    }

    .nav-right {
        gap: 15px;
    }

    .nav-right a {
        font-size: 12px;
    }

    .hero h1 {
        font-size: 28px;
    }
  }


.project-title a, .arrow-icon a, .contact-me a {
    color: var(--text-color);
    text-decoration: none;
}

.project-title a:hover, .arrow-icon a:hover, .contact-me a:hover {
    color: var(--accent-color);
    transform: scale(1.05);
}

.semester a {
    color: var(--text-color);
}

.semester a:hover {
    color: var(--accent-color);
    transform: scale(1.05);
}

.semesters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.semester, details {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px var(--shadow-light);
    transition: all 0.4s ease;
    will-change: transform, box-shadow;
}

.semester:hover {
    transform: translateY(-10px) rotate(1deg);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.semester h3, h4 {
    margin-bottom: 10px;
    color: var(--accent-color);
}

.header, text {
    margin-left: 10%;
    margin-right: 10%;
}


.theme-toggle {
  position: fixed;
  top: 80px;
  right: 55px;
  z-index: 1000;
}


.theme-toggle-icon:hover {
    transform: scale(1.15) rotate(10deg);
}

.theme-switch-input {
    display: none;
}

.theme-toggle-icon {
    cursor: pointer;
    border-radius: 50%;
    padding: 10px;
    display: inline-block;
}

.theme-switch-icon {
    font-size: 1.5rem;
}

body.dark-mode .theme-toggle-icon {
    filter: brightness(1.2);
}

@media (max-width: 768px) {
  .nav-container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .theme-toggle {
        top: 10px;
        right: 10px;
    }
}

summary {
    list-style: none; 
}

summary {
    background-color: var(--card-background);
    padding: 10px;
    cursor: pointer;
    font-weight: bold;
}

details p {
    padding: 15px;
    border: 1px solid var(--border-color);
    border-top: none;
}

summary::before {
    content: "+"; /* Plus icon for collapsed state */
    margin-right: 5px;
}

details[open] summary::before {
    content: "-"; /* Minus icon for expanded state */
}

.contact-form-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 40px;
    background: var(--card-background);
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.contact-form-container h2 {
    margin-top: 0;
    margin-bottom: 30px;
    color: var(--text-color);
    font-size: 28px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-color);
    background: var(--document-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(164, 193, 149, 0.1);
}

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

.submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: var(--background-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .contact-form-container {
        margin: 20px;
        padding: 30px 20px;
    }

    .contact-form-container h2 {
        font-size: 24px;
    }
}

/* page fade-in on load */
body {
  animation: pageFadeIn 0.35s ease forwards;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* page fade-out on navigate away */
body.fade-out {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}