:root {
    --main-color: color(srgb 0.667 0.271 0.929);;
    --second-color: color(srgb 0.522 0.145 0.812);;
    --gap-default: 2em;
    --border-radius-default: 12px;
    --navbar-diff-exact: 55px;
    --bg-color: white;
    --text-color: black;
    --btn-bg: white;
    --btn-text: black;
}

.dark-mode {
    --bg-color: #33373d;
    --text-color: white;
    --btn-bg: #33373d;
    --btn-text: white;
}

@font-face {
    font-family: 'TeX Gyre Adventor';
    src: url('/fonts/TeXGyreAdventor-Regular.woff2') format('woff2'),
       url('/fonts/TeXGyreAdventor-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'TeX Gyre Adventor';
    src: url('/fonts/TeXGyreAdventor-Bold.woff2') format('woff2'),
       url('/fonts/TeXGyreAdventor-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'TeX Gyre Adventor';
    src: url('/fonts/TeXGyreAdventor-Italic.woff2') format('woff2'),
       url('/fonts/TeXGyreAdventor-Italic.woff') format('woff');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'TeX Gyre Adventor';
    src: url('/fonts/TeXGyreAdventor-BoldItalic.woff2') format('woff2'),
       url('/fonts/TeXGyreAdventor-BoldItalic.woff') format('woff');
    font-weight: bold;
    font-style: italic;
}

@view-transition {
    navigation: auto;
}

::view-transition-group(root) {
    animation-duration: 0.75s;
}


#toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 18px;
    background: var(--btn-bg);
    color: var(--btn-text);
    border-color: var(--btn-text);
    border: 1px solid #8884;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    font-size: 14px;
    user-select: none;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: Arial, sans-serif;
    margin: 0;
}

html, body {
    font-family: 'TeX Gyre Adventor', sans-serif;
    margin: 0;
    padding: 0;
    scrollbar-gutter: auto;
    overflow-y: auto;
}

header, footer {
    text-align: center;
}

html {
    scroll-behavior: smooth;
}

* {
    scrollbar-width: thin; 
    scrollbar-color: var(--second-color) white; 
}

article {
    content-visibility: auto;
}

:target {
    animation: highlight 2s ease-in-out;
}

@keyframes highlight {
    0% { 
        background-color: var(--main-color); 
    }
    100% { 
        background-color: transparent; 
    }
}

nav {
    font-family: 'TeX Gyre Adventor', sans-serif;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--main-color);
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 1.25em 0;
    z-index: 1000;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5em 1em;
    border-radius: var(--border-radius-default);
    transition: background-color 0.3s, color 0.3s;
}

nav a:hover {
    background-color: var(--second-color);
}

.menu-toggle {
    display: none;
}

.hamburger {
    display: none;
    font-size: 1.5em;
    cursor: pointer;
    color: white;
}

@media (max-width: 600px) {
    nav {
        flex-direction: column;
        justify-content: center;
        padding: 0.75em 0;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-height: 0;             
        overflow: hidden;          
        background-color: var(--main-color);
        transition: max-height 0.35s ease;  
        padding-top: 0.5em;
    }

    .nav-links a {
        opacity: 0;
        transition: opacity 0.35s ease 0.1s; 
        text-align: center;
        padding: 0.5em 0;
        margin: 0;
    }

    .menu-toggle:checked + .hamburger + .nav-links {
        max-height: 500px;  
    }

    .menu-toggle:checked + .hamburger + .nav-links a {
        opacity: 1;        
    }
}

hr {
    width: 90%;
}

#pfp {
    border: 1px black solid;
    width: clamp(100px, 15vw, 700px);
    height: clamp(100px, 15vw, 700px);
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.banner {
    margin-top: var(--navbar-diff-exact);
    position: relative;
    height: 50vh;
    background-image: url('/images/placeholder.jpeg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;  
    align-items: center;     
}

.banner {
    margin-top: var(--navbar-diff-exact);
    position: relative;
    height: 50vh;
    background-image: url("/images/banner/banner.webp");
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 600px) {
    .banner {
        background-image: url("/images/banner/banner_small.webp");
    }
}

.intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 0 auto; 
    padding: 0.25rem;            
}

#top {
    scroll-margin-top: 100px; 
}

#education, #projects, #certifications {
    scroll-margin-top: 72px; 
}

.linkgroup{
    display: flex;     
    flex-wrap: wrap;               
    justify-content: center;          
    align-items: center;              
    gap: var(--gap-default);   
    
    a:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 18px var(--second-color, #8525cf);
        background-color: var(--second-color, #8525cf);
        color: white;
    }

    a:active {
        transform: translateY(0); 
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    }
}

.linkbutton {
    text-align: center;
    display: inline-block;
    justify-content: center;
    align-items: center;
    width: 10rem; 
    padding: 0.5em; 
    background-color: white;
    text-decoration: none;
    border-radius: var(--border-radius-default);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    color: var(--second-color);

    &:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 18px var(--second-color, #8525cf);
        background-color: var(--second-color, #8525cf);
        color: white;
    }
}

.profsection {
    display: block;
    text-align: center;
    justify-content: center;
    align-items: center;
    margin: 15px;
    padding: 1em;

    h2 {
        margin-top: -10px;
        font-size: 1.5em;
    }
}

iframe {
    width: 100%;
    max-width: 600px;  
    height: 80vh;
    max-height: 800px;
    border: none;
}

.descgrid {
    display: flex;
    flex-direction: row;
    align-items: center; 
    justify-content: flex-start;
    gap: var(--gap-default); 
}

.descimg {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: var(--border-radius-default);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.aboutimg {
    width: 100%;
    max-width: 450px;
    min-width: 100px;
    height: auto;
    border-radius: var(--border-radius-default);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.desctext {
    text-align: left;
    flex: 1; 
    line-height: 1.6;
}

.desccontent {
    display: flex;
    flex-direction: column;
    gap: 10px; 
    flex: 1; 
    text-align: left;  
    width: 100%; 
}

.details-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-evenly; 
    margin-top: 10px; 
}


.details-container details {
    flex: 1 1 200px; 
    line-height: 1.5; 
}


@media (max-width: 600px) {
    .descgrid {
        flex-direction: column;  
        align-items: center;     
        text-align: center;      
    }

    .desctext {
        text-align: center; 
        width: 100%;      
    }

    .aboutimg, .descimg {
        width: 100%;
        min-width: 100px;
    }

    .descgrid picture {
        order: -1;  
    }


}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: var(--gap-default);
    padding: 0 20px;
    justify-items: center;                    
}

.module-card {
    display: flex;
    flex-direction: column;       
    align-items: center;      
    max-width: 450px;
    max-height: 450px;
    color: var(--text-color, black);
    background-color: var(--bg-color, white);
    text-decoration: none;        
    border-radius: var(--border-radius-default);
    padding: 1em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.25s, box-shadow 0.25s;

    img {
        width: 100%;
        height: auto;
        border-radius: var(--border-radius-default);
        margin-bottom: 15px;
        border: 1px solid black;
    }

    &:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 18px var(--second-color, #8525cf);
        background-color: var(--second-color, #8525cf);
        color: white;
    }

    &:active {
        transform: translateY(0);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        background-color: var(--second-color, #8525cf);
        color: white;
    }
}

.contactsection {
    text-align: center;
}

#contactform fieldset {
    display: flex;
    flex-direction: column;  
    align-items: center;
    text-align: center;
}

#contactform label {
    display: block;
    margin-bottom: 5px; 
    font-weight: bold; 
    margin: 10px;
    width: 100%;
}

#contactform input,
#contactform textarea,
#submitbutton {
    width: 100%;            
    max-width: 350px;       
    box-sizing: border-box; 
}

#submitbutton { 
    margin-top: 10px;   
    border: hidden;    
    font-family: 'TeX Gyre Adventor', sans-serif;
}


/* quote-generator{
    display: block;
    max-width: 80vw;
    max-height: 125px;
} */

#quotegen {
    border: 2px solid black;
    display: flex;
    flex-direction: column;    
    justify-content: space-between;
    padding: 20px;  
    align-items: center;        
    text-align: center;         
    margin: 20px auto;           
    max-width: 800px;  
    min-width: 300px;          
    width: 80%;                  
    border-radius: var(--border-radius-default);
    border-color: var(--text-color);

    blockquote {
        margin: 0 0 1.5rem 0;
        flex-grow: 1;
    }

    p {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
        word-wrap: break-word;
    }

    cite {
        display: block;
        font-style: italic;
        color: var(--text-color);
    }
}

#new-quote {
    border: hidden;
    text-align: center;
    display: inline-block;
    justify-content: center;
    align-items: center;
    width: 10rem; 
    padding: 0.5em; 
    background-color: white;
    text-decoration: none;
    border-radius: var(--border-radius-default);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    color: var(--second-color);
    font-family: 'TeX Gyre Adventor', sans-serif;

    &:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 18px var(--second-color, #8525cf);
        background-color: var(--second-color, #8525cf);
        color: white;
    }
}

#boy-scouts, #taekwondo, #badminton {
    scroll-margin-top: 120px; 
}