:root {
  /* Light theme */
  --bg: #FFFFFF;          /* Pure white background */
  --surface: #F8F8FF;     /* Light lavender-white for cards, containers */
  --text: #1A0F66;        /* Darker royal blue-purple for main body text */
  --text-muted: #3F2A99;  /* Deeper purple for secondary text */
  --brand: #4A32E0;       /* Vibrant royal purple for links, buttons, highlights */
  --brand-hover: #3A27D4; /* Darker purple for hover/active states */
  --support: #8A70E6;     /* Lighter, vibrant purple accent for badges, highlights */
  --hairline: #D0C0E0;    /* Lighter lavender-gray for borders, dividers */
  --gradient: linear-gradient(120deg,#5B42F5 0%, #8A70E6 50%,#3A27D4 100%);
}

[data-theme="dark"] {
  /* Dark theme */
  --bg: #0A0718;          /* Deeper midnight purple background */
  --surface: #1E0F4D;     /* Rich, almost black purple for cards, containers */
  --text: #F0E8FF;        /* Brighter lavender for main body text */
  --text-muted: #C0B0DD;  /* Lighter lavender-gray for secondary text */
  --brand: #5B42F5;       /* Vibrant royal purple for links, buttons, highlights */
  --brand-hover: #3A27D4; /* Slightly darker purple for hover/active states */
  --support: #4C2EAA;     /* Deeper purple accent for badges, highlights */
  --hairline: #2A1A50;    /* Darker purple-gray for borders, dividers */
  --gradient: linear-gradient( 120deg, #3A27D4 0%,#4C2EAA 50%,#1E0F4D 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'poppins', sans-serif;
}

body {    
    background-color: var(--bg);
    color: var(--text);        
}

li {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--brand);    
    font-size: 1rem;
}

a:hover {
    color: var(--brand-hover);    
}

/* HEADER */
header {
    position: sticky;
    position: -webkit-sticky; 
    top: 0;
    z-index: 1000;
    padding: 0 2rem;            
    background: var(--gradient);
    border-bottom: 1px solid var(--hairline);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);    
}

.navbar-container {    
    width: 100%;
    height: 60px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;    
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;  
    color: #fff;
    text-shadow: 0 1px 0 rgba(0,0,0,.15);    
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale;  
    text-rendering: optimizeLegibility;  
}

.logo:hover {
    scale: 1.05;
}

.logo:active {
    scale: 0.95;
}

header .links a { color: #fff; }
header .links a:hover { color: var(--brand); }

.navbar-container .links {
    display: flex;
    gap: 4rem;
    margin-left: 18rem;    
}

.navbar-container .toggle-btn {
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    margin-left: 1rem;    
}

.action-btn {
    background-color: var(--brand);
    color: #fff;
    padding: 0.5rem 1rem;
    border: none;
    outline: none;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: scale 0.2s ease;
    margin-left: auto;
}

.action-btn:hover {
    scale: 1.05;
    background-color: var(--brand-hover);
    color: #fff;    
}

.action-btn:active {
    scale: 0.95;
}

.theme-toggle {
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 1rem;
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.theme-toggle:hover {
    scale: 1.3;        
    transition: scale 0.2s ease, color 0.2s ease;
}

.theme-toggle:active {
    scale: .95;
    color: #fff;
    transition: scale 0.1s ease, color 0.1s ease;
}

/* DROPDOWN MENU */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 60px;
    height: 0;
    right: 2rem;
    width: 300px;

    background-color: var(--surface);
    border: 1px solid var(--hairline);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);

    border-radius: 10px;
    overflow: hidden;
    transition: height 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dropdown-menu.open {
    height: auto;
}

.dropdown-menu li {
    padding: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-menu li:last-child {
    display: none;
}

.dropdown-menu .action-btn {
    width: auto;
    display: flex;
    justify-content: center;
    margin: 1rem auto;
}

/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
    .navbar-container .links,
    .navbar-container .action-btn {
        display: none;
    }
    
    .navbar-container .logo { margin-right: auto; }

    .navbar-container .toggle-btn {
        display: block;
        
    } 

    .dropdown-menu {
        display: block;
    }

    .theme-toggle {
        display: block;
        color: #fff; 
    }
}

@media (max-width: 576px) {
    .dropdown-menu {
        left: 2rem;
        width: unset;

    }
}

/* ABOUT SECTION */
.about-section {
    position: relative;
    overflow: hidden;
    background: var(--gradient);
    color: #fff;

    height: 85vh;    
    display: flex;
    justify-content: center;
    align-items: center;   
    gap: 50px;    
    padding-top: 60px;
    margin-top: -60px;    
}

.about-content { 
    display: grid;
    grid-template-columns: minmax(200px, 1fr) minmax(300px, 1.2fr);
    align-items: center;
    gap: 20px;
    max-width: 1300px;
    padding: 0 16px;
}

.logo a span, .about-content h1 span {
    color: var(--brand);
}

.about-content h1 {    
    display: block;          
    font-size: 8rem;
    font-weight: 900;
    line-height: 0.9;             
}

.about-content p {
    font-size: 1.2rem;
    line-height: 1.6;    
}

.about-content a {
    color: #fff;
}

.projects-btn {
    display: inline-flex;
    font-weight: bold; 
    color: #fff;
    border: 2px solid #fff;
    border-radius: 30px;   
    padding: 12px 18px;
    justify-self: start;
}

.projects-btn:hover {
    background-color: var(--brand-hover);
    cursor: pointer;
    border: 2px solid var(--brand-hover);
    transition: all 0.3s ease;
}

.section-divider {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;                    
  width: 100%;
  height: 220px;                   
  display: block;
  pointer-events: none;
  fill: var(--bg);            
}

/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 14px;        
    }

    .about-content h1 {              
    font-size: 4rem;    
    line-height: 1;             
    }

    .about-content p {
    font-size: 0.1;
    line-height: 1.6;    
    }    
}

@media (max-width: 600px) {
  .section-divider { height: 72px; }

  .projects-btn { justify-self: center; }
}

/* PROJECTS SECTION */
.projects-section {
    position: relative;
    height: auto;     
    padding: 4rem 2rem 2rem 2rem;  
    overflow: hidden;     
}

.projects-inner { 
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;   
}
/* Left Column  */
.projects-copy {
    flex: 1 1 50%;  
    min-width: 280px;  
}

.projects-copy h2 {
    font-size: clamp(1.2rem, 2vw + 0.5rem, 2rem);
    line-height: 1.1;
    font-weight: 800;
}

.projects-copy p {
  font-size: clamp(1rem, 0.5vw + 0.9rem, 1.25rem);
  font-family: Quicksand, sans-serif;
  line-height: 1.9;
  max-width: 60ch;
  padding-top: 12px; 
  margin: 0; 
}

/* Right Column */
.projects-art {    
    display: grid;
    place-items: center;
    flex: 1 1 50%;
    min-width: 420px;
    position: relative;                 
}

.projects-art::before {
    content: "";
    position: absolute;    
    top: 50%;
    width: 280px;
    height: 280px;
    background: var(--support);                
    border-radius: 50% / 40%;
    transform: translateY(-50%) rotate(-8deg);
    filter: brightness(1) contrast(1.05);
    z-index: 0;                         
    }

.projects-art img,
.projects-art svg {
    display: block;
    width: 100%;
    max-width: 280px;                   
    height: auto;
    position: relative;
    left: 20px;
    z-index: 1;                         
}

.past-projects-h2 {
    text-align: center;
    padding-top: 72px;    
}

.projects-grid {    
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem; 
    margin-top: 2rem;   
}

.project-card {
    background-color: var(--surface);
    border: 1px solid var(--hairline);
    overflow: hidden;
    border-radius: 10px;    
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    padding: 1rem;
}

.project-card p {
    font-family: Quicksand, sans-serif;
}

.project-card img {    
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: block;  
}

.project-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    padding: 0;    
}

.project-overlay {
    position: absolute;
    inset: 0;  
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    
}

.project-image-container:hover .project-overlay {
  opacity: 1;
}

.project-links-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding-top: 1rem;    
}

.project-links-container a {
    font-family: Quicksand, sans-serif;
    background-color: var(--brand);
    color: #fff;
    padding: 0.5rem 1rem;
    border: none;
    outline: none;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: scale 0.2s ease;
}

.project-links-container a:hover {
    scale: 1.05;
    background-color: var(--brand-hover);
    color: #fff;  
}

/* RESPONSIVE DESIGN */
@media (max-width: 900px) {
  .projects-inner { 
    flex-direction: column; 
    text-align: left;                 
  }
  .projects-art::before {
    right: -20%;
    width: 480px; height: 380px;
  }
}

@media (max-width: 520px) {
  .projects-section { padding: 4.5rem 1.25rem; }
  .projects-art::before { display: none; }     
}@media (max-width: 900px) {
  .projects-inner { 
    flex-direction: column; 
    text-align: left;                 
  }
  .projects-art::before {
    left: 2%;
    width: 370px; height: 300px;    
  }
}

/* CONTACT SECTION */
.contact-section {
    position: relative;
    padding: 4rem 2rem 2rem 2rem;  
    overflow: hidden;        
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;    
    width: 25rem;
    min-height: 520px;
    max-width: 720px;       
    background-image: linear-gradient(to bottom, #3e2ea95b, #3e2ea9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(8px);    
    box-sizing: border-box;    
    border-radius: 10px;
    padding: 1.5rem 2.5rem;
    margin: 0 12.5% 0 auto;

}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #1e90ff; 
    box-shadow: 0 0 8px rgba(30, 144, 255, 0.5); 
}

.contact-form input:valid,
.contact-form textarea:valid {
    border-color: #32cd32; 
    box-shadow: 0 0 8px rgba(50, 205, 50, 0.5); 
    animation: validPulse 0.8s ease-in-out; 
}

.contact-form input:invalid:not(:focus),
.contact-form textarea:invalid:not(:focus) {
    border-color: #e57373; 
    box-shadow: 0 0 8px rgba(229, 115, 115, 0.4); 
}

@keyframes validPulse {
    0% { box-shadow: 0 0 8px rgba(50, 205, 50, 0.5); }
    50% { box-shadow: 0 0 12px rgba(50, 205, 50, 0.7); }
    100% { box-shadow: 0 0 8px rgba(50, 205, 50, 0.5); }
}

.contact-form h1 {    
    color: #fff;
    text-shadow: 0 1px 0 rgba(0,0,0,.15);
    text-align: center;     
}

.contact-form label {
    font-weight: 800;
    color: #fff;           
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 2px solid #7e6cf6;  
    background: transparent;
    color: #fff;
    outline: none;
    font-family: quicksand, sans-serif;
}

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

.contact-form button {
    width: 100%;
    padding: 1rem 1.25rem;
    border: none;
    border-radius: 14px;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
    font-size: 1.25rem;
    cursor: pointer;
}

.contact-form button:hover { 
    background: var(--brand-hover);
    scale: 1.05;
}

.contact-form button:active {
    scale: 0.95;
}

.wave-divider {
    --wave-colour: #5B42F5;

    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 420px;         
    overflow: hidden;
    line-height: 0;
    z-index: -1;
}
.wave-divider svg {
    position: absolute;
    top: 0;                
    left: 0;
    width: 100%;
    height: 272px;         
    transform: rotate(180deg); 
}

.wave-divider::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100% - 272px);  
    background: var(--wave-colour);
}

.wave-divider .shape-fill { fill: var(--wave-colour); }

/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
    .contact-form {
        width: 100%;
        margin: 0 auto;
        min-height: auto;
        max-width: 100%;   
        margin-top: 36px;    
    }
}

@media (max-width: 768px) {
  .wave-divider {
    height: 40vh;
  }  
}

/* FOOTER */
footer {
    background-color: #5B42F5;
    color: #fff;
    text-align: center;
    padding-bottom: .75rem;
}

.footer-nav a {
    color: #C0B0DD;
    gap: 1.5rem;
    padding: 0 1rem;
    font-family: quicksand, sans-serif;
}

.footer-nav a:hover {
    color: #fff;
}

.footer-nav a:active {
    scale: .95;
}