:root { /* variables chosen here for easier modification */
    /* colour palette (c = colour) */
    --c1: #fbfaf9; 
    --c2: #b3bfca;
    --c3: #1d69ab; 
    --c4: #000000;

    /* fonts (f = font) */
    --f1: "Xanh Mono", "Garamond", serif; /* serif with back up font */
    --f2: "Open Sans", "Arial", sans-serif; /* sans serif with back up font */

    --radius: 8px; /* for border radius */
}

body {
    background-color: var(--c1);
    
    font-size: 1.125rem; /* 18px */   
    font-family: var(--f2);
    line-height: 1.5; /* for good readability */
}

/* Headings --------------------------------------------------------- */

h1, h2, h3 {
    font-family: var(--f1); 
}

h1 {
    margin: 2rem 0rem; /* equal margin above and below */
    font-style: italic;
    font-size: 5rem;
}

h2 {
    margin: 2rem 0rem 1rem 0rem; /* greater margin above than below */
    font-size: 2rem;
}

h3 {
    margin: 1.5rem 0rem 0.7rem 0rem; /* greater margin above than below */
    font-size: 1.4rem;
}

/* Header + Nav --------------------------------------------------------- */

.header-design {
    background-color: var(--c1); /* in order for sticky nav to work nicely */
}

.logo, .nav-menu a {
    font-family: var(--f1);
    text-decoration: none;
}

.logo {
    font-style: italic;
    color: var(--c4);
    font-size: 1.5rem;
}

/* nav/page links */

.nav-menu a {
    font-size: 1.2rem;
    color: var(--c2);
}

.nav-menu a:hover {
    color: var(--c3); /* changes colour when hovered over */
}

.nav-menu a:not(.active)::before { /* non-active pages have the commented out sign // */
    content: "//";
}

.nav-menu a.active {
    color: var(--c3);
    margin: 5px;
}

/* in preparation for hamburger nav system */

#menu-toggle, .hamburger { 
    display: none; /* hide checkbox */
}

/* hamburger menu when on phone */

@media (max-width: 768px) { /* when on phone, hamburger layout */

    .header-design .container { /* vertical layout */
        flex-direction: column; /* have toggle below logo */
        align-items: flex-start;
    }

    .hamburger {
        display: flex;
        cursor: pointer; /* show it is clickable */
        color: var(--c2);
        font-size: 1.2rem;
        margin: 0rem;
    }

    .nav-menu {
        display: none; /* hide nav elements until toggle clicked */
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .nav-menu ul {
        flex-direction: column; /* show as a column */
        gap: 0.5rem;
    }
    
    #menu-toggle:checked ~ .nav-menu { /* show nav elements when toggle clicked */
        display: block;
    }
}


/* Hero section --------------------------------------------------------- */

.hero-section {
    width:100%; /* entire width */
    height: 75vh; /* 75% of vertical height */
    overflow: hidden; /* hides overflow from section into other sections */

    position: relative; /* to later add text above */

}

.hero-section img { 
    /* takes up entire hero section */
    width: 100%;
    height: 100%;

    object-fit: cover; /* stops distortion, rather crops image to fit area */
    object-position: center; /* fixes swirl of image to middle */
}

.hero-content {
    position: absolute; /* position on top of hero image */
    
    /* move content to (true) center */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* otherwise top left edge is at center */

    /* text */
    text-align: center;
    color:#fbfaf9;
}

/* First page bio  --------------------------------------------------------- */

.fibonacci-layout { /* to structure layout depending on golden ratio */
    display: flex;
    flex-direction: row;
    align-items: center;
    
    width: 100%;

    gap: 2rem;
    padding: 1rem;
    
}

.fibonacci-part1 {
    flex: 38.2%; /* smaller Fibonacci part (golden ratio) */
    max-width: 50vw;
}

.fibonacci-img {
    border-radius: var(--radius);
}

.fibonacci-part2 {
    max-width: 65ch;
    flex: 61.8%; /* larger Fibonacci part (golden ratio) */
}


@media (max-width: 768px) { /* on the phone */
    .fibonacci-layout {
        flex-direction: column; /* hamburger stacking on phone */
        align-items: center; 
    }
}


/* Contact form  + form feedback ---------------------------------------------------- */

.form-input, .form-textarea { /* so input spans the card */
    width: 100%;
}

.form-label {
    font-family: var(--f1);
}

.form-textarea {
    height: 8rem;
    resize: vertical; /* can only change size of box vertically */
}

.button-design {
    background-color: var(--c3); /* in accent colour */

    font-family: var(--f1);
    color: var(--c1);

    border: none;
    border-radius: var(--radius);

    padding: 0.2rem 0.7rem 0.2rem 0.7rem; 
}

.form-feedback-info {
    text-align: center;
}


/* Accordian / Dropdown menu  --------------------------------------------------------- */

.drop-down > summary {
    font-family: var(--f1);
    color: var(--c3)
}

summary {
    cursor: pointer; /* to show it is clickable */
}

details {
    margin: 0.2rem 0;
    padding: 0.2rem 0.5rem;

    border: 1px solid var(--c2);
    border-radius: var(--radius);
}


/* Badges ---------------------------------------------------------  */

.badge-design {
    background-color: var(--c2);
    
    font-family: var(--f1);
    font-size: 1rem;
    color: var(--c1);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); /* Bootstraps shadow-sm */

    padding: 0.5rem 1rem;
}

.badge-collection {
    display: flex;
    flex-wrap: wrap; /* so extra badges wrap down rather than leave page */
    gap: 0.5rem;
}


/* Study cards ----------------------------------------------------- */

.study-date {
    font-style: italic;
    font-family: var(--f1);
}

.study-card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); /* Bootstrap shadow-sm to apply it to multiple cards at same time */
    padding: 0.4rem 1rem;
    margin: 1rem auto;
    border-radius: var(--radius);
}

/* Footer --------------------------------------------------------- */

footer {
    font-family: var(--f1);
}

.footer-design {
    border-top: 1px solid var(--c2); /* border above */
}


/* Main – extras --------------------------------------------------------- */

main section:not(.fibonacci-layout){ /* all sections in main bar fibonacci where it will be wider */
    width: min(100%, 65ch); /* for readability 65 character wide (or 100%) */
    margin-inline: auto;
}

@media (max-width: 768px) { /* on the phone */
    main section {
        flex-direction: column; /* hamburger stacking on phone */
        align-items: center; 
    }
}

section:not(.hero-section) { /* above/below margins for all sections bar hero */
    margin: 1.25rem 0rem;
}

p a, li a, footer a {
    color: var(--c3);

    text-decoration: underline; /* to highlight it is a link */
    text-decoration-color: transparent;
    transition: text-decoration-color 0.2s ease; /* so link underlines show up in a transition, smoother */

}

footer a:hover, p a:hover, li a:hover {
    text-decoration-color: var(--c3); /* show underline when hovering over link */
}