* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'montserrat';
    background: #fff;
  }
  
header {
    background: #000;
    color: #fff;
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
  
header > section {
    display: flex;
    flex-direction: column;
}

.header-logo {
    display: inline-block;
    line-height: 0;
}
 
.header-logo img {
    height: 140px;
    width: auto;
    display: block;
}
  
nav ul {
    display: flex;
    gap: 1rem;
}

nav li {
    display: inline-block;
}

nav li details {
    display: inline-block; 
    position: relative;
}

nav li details summary,
nav li a,
nav li details a,
#home article a.button,
#blog article a.button,
#submit, 
footer > section > aside > a {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
}

nav li details summary,
nav li a,
nav li details a {
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

nav li details summary {
    list-style: none;
    display: inline-flex; 
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    margin: 0;
    width: auto;
    margin-bottom: 0.5rem;
}

nav li a {
    display: inline-block;
    padding: 0.6rem 1.5rem;
}

nav li details a {
    position: relative; 
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    display: block;
}

nav li details a + a {
    margin-top: 0.5rem; 
}

nav li a:hover,
nav li details summary:hover,
nav li details a:hover {
    background: #3a3a3a;
}

nav li details summary::after {
  content: "▼";
  font-size: 0.7rem;
}

nav li details[open] > summary::after {
  transform: rotate(180deg);
}

nav li details summary::-webkit-details-marker {
    display: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
} 

/*Home Page*/
#home,
#blog {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;background-color: #fff;
}

#home article,
#blog article {
    background: #fff;
    border: 3px solid;
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

#home article > section > h3,
.first-section h2,
.intro-section h2,
.download-section .download-btn,
#blog section h2 {
    background: linear-gradient(135deg, #b76ba3, #8b5a9f);
}

#home article > section > h3,
.first-section h2,
.intro-section h2,
#blog section h2 {
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-width: 300px;
}
  
#home article > section > h3 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
  
#home article > section > h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #000;
}
  
#home article > section > p,
#blog article > section > p {
    line-height: 1.6;
    color: #444;
    margin-bottom: 1.5rem;
    font-size: 0.8rem;
}
  
#home article > section > a,
#blog article > section > a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
  
#home article > section > a:hover,
#blog article > section > a:hover {
    color: #b668d8;
}
  
#home article > figure,
#blog article > figure {
    text-align: center;
}
  
#home article > figure > img,
#blog article > figure > img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

#home article:nth-of-type(1) > section {
    grid-column: 1;
    grid-row: 1;
}

#home article:nth-of-type(1) > figure {
    grid-column: 2;
    grid-row: 1;
}

#home article:nth-of-type(2) > figure {
    grid-column: 1;
    grid-row: 1;
}

#home article:nth-of-type(2) > section {
    grid-column: 2;
    grid-row: 1;
}
  
#home article:nth-of-type(2) {
    grid-template-columns: 1fr 1fr;
}
  
#home > a,
#blog > a {
    display: block;
    width: fit-content;
    margin: 3rem auto;
    padding: 0.8rem 2.5rem;
    background: #fff;
    color: #1a1a1a;
    text-decoration: none;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-weight: 600;
}
  
#home > a:hover,
#blog > a:hover {
    background: #f9f9f9;
}

#home article a.button,
#blog article a.button {
    color: #000;
    border: 1px solid;
    border-color: #cc95c0;
    border-radius: 5px;
    padding: 6px 14px;
    margin-bottom: 10px;
    font-size: 13px;
    cursor: pointer;
}

#home article a.button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(113, 46, 111, 0.5);
}

/* About Page */
.intro-section,
.first-section {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 40px;
}

.first-section h2,
.intro-section h2 {
    font-size: 40px;
    font-weight: 600;
}

.first-section article,
.intro-section article {
    border-radius: 12px;
}

.intro-section article p {
    margin-bottom: 20px;
}

.intro-section article p:last-child {
    margin-bottom: 0;
}

.skills-section h3 {
    font-size: 25px;
    font-weight: 600;
    color: #2d2d2d;
    margin-bottom: 20px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

.skills-grid article {
    border: 2px solid;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
}

.skills-grid article:hover {
    border-color: #cc95c0;
    box-shadow: 0 4px 12px rgba(183, 107, 163, 0.15);
    transform: translateY(-2px);
}

.skills-grid h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-weight: 600;
    color: #2d2d2d;
    font-size: 10px;
}

.skills-grid h4 span {
    font-size: 13px;
}

.skills-grid ul {
    list-style: none;
    color: #666;
    font-size: 14px;
    line-height: 2;
}

.download-section {
    text-align: center;
    margin-top: 60px;
}

/* Projects Grid */
.skills-section .skills-grid:last-of-type {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.skills-section .skills-grid:last-of-type article {
    border: 2px solid transparent;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: linear-gradient(#fff, #fff) padding-box,
                linear-gradient(135deg, #e8b4d8, #a8bfe8) border-box;
    transition: all 0.3s ease;
}

.skills-section .skills-grid:last-of-type article figure {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 30px 15px;
    min-height: 200px;
}

.skills-section .skills-grid:last-of-type article figure img {
    max-width: 100%;
    max-height: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.skills-section .skills-grid:last-of-type article a.button {
    display: block;
    width: calc(100% - 40px);
    margin: 0 20px 20px;
    padding: 10px 16px;
    background: none;
    color: #6b4a9b;
    border: none;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
    text-align: center;
    cursor: pointer;
    transition: color 0.2s ease;
}

.skills-section .skills-grid:last-of-type article a.button:hover {
    color: #b76ba3;
    transform: none;
    box-shadow: none;
}

.skills-section .skills-grid:last-of-type article:hover {
    box-shadow: 0 8px 24px rgba(183, 107, 163, 0.25);
    transform: translateY(-3px);
}

/* Blog Page */
#blog article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

#blog section h2 {
    font-size: 40px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
}

#blog article h3 {
    font-size: 30px;
    color: #000;
}

#blog article figure {
    width: 100%;
}

#blog article figure img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

#blog article:nth-of-type(1) > section {
    grid-column: 1;
    grid-row: 1;
}

#blog article:nth-of-type(1) > figure {
    grid-column: 2;
    grid-row: 1;
}

/* Second blog article: image left, text right */
#blog article:nth-of-type(2) > figure {
    grid-column: 1;
    grid-row: 1;
}

#blog article:nth-of-type(2) > section {
    grid-column: 2;
    grid-row: 1;
}

/* Third blog article: text left, image right */
#blog article:nth-of-type(3) > section {
    grid-column: 1;
    grid-row: 1;
}

#blog article:nth-of-type(3) > figure {
    grid-column: 2;
    grid-row: 1;
}

/* Fourth blog article: image left, text right */
#blog article:nth-of-type(4) > figure {
    grid-column: 1;
    grid-row: 1;
}

#blog article:nth-of-type(4) > section {
    grid-column: 2;
    grid-row: 1;
}

/* Fifth blog article: text left, image right */
#blog article:nth-of-type(5) > section {
    grid-column: 1;
    grid-row: 1;
}

#blog article:nth-of-type(5) > figure {
    grid-column: 2;
    grid-row: 1;
}

/* Blog intro section - two paragraphs side by side */
#blog > section > article > p:nth-of-type(1) {
    grid-column: 1;
    grid-row: 1;
}

#blog > section > article > p:nth-of-type(2) {
    grid-column: 2;
    grid-row: 1;
}

/* Contact Page */
#contact-main {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 2rem;
  grid-area: main;
}

#contact-main h2 {
    font-size: 2em;
    text-align: center;
    font-weight: bold;
    margin-bottom: 40px;
}

form {
	margin: 50px auto;
	padding: 25px 30px;
    width: 420px;
    display: block;
    position: relative;
    isolation: isolate;
    border-radius: 15px;
    outline-offset: -1px;
}

#home article,
#blog article,
.first-section article,
.intro-section article,
.skills-grid article,
.qualifications article,
.experience article,
form {
    border: var(--border-width, 3px) solid transparent;

    --gradient-glow:  #cc95c0, #dbd4b4, #7aa1d2;
    --glow-intensity: 1; 

    /* Gradient border effect */
    background:
        linear-gradient(#fff, #fff) padding-box,
        conic-gradient(from -90deg, var(--gradient-glow)) border-box;
}

/* Pseudo-elements for glow effect */
form::before,
form::after {
    content: '';
    position: absolute;
    border-radius: inherit;
}

/* Inner glow */
form::before {
    z-index: -1;
    background: var(--surface, #fff);
    inset: 0.5rem;
    scale: 1 1;
    transform-origin: center;
    filter: blur(var(--glow-size, 2rem));
}

/* Outer glow */
form::after {
    z-index: -2;
    inset: -1rem;
    background: conic-gradient(from -90deg, var(--gradient-glow)) border-box;
    filter: blur(var(--glow-size, 2rem));
    opacity: var(--glow-intensity, 0.125);
}

fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

fieldset h2 {
    margin-top: 0;
    font-size: 26px;
    color: #000;
    text-align: center;
}

.two {
    margin: 18px;
    position: relative;
}

.two label {
	display: inline-block;
    font-weight: bold;
    margin-bottom: 6px;
}

span.error {
    color: #D92525;
    font-size: 12px;
    display: block;
    margin-top: 5px;
    text-align: right;
}

label.error {
    color: #D92525;
}

.two input[type="text"],
.two input[type="email"],
.two input[type="subject"],
.two textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #c8c8c8;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

.two label:hover + .tooltip,
.two input:hover + .tooltip {
    visibility: visible;
}

.two textarea {
    height: 130px;
    resize: vertical;
}

.phone-field {
    position: relative;
}

.phone-field .tooltip {
    display: block;
    position: absolute;
    left: 25em;
    top: 0;
    width: 15em;  
    padding: 5px 8px;
    background: rgb(142, 88, 141);
    color: #fff;
    font-size: 12px;
    border-radius: 5px;
    visibility: hidden; 
}

.phone-field:hover .tooltip {
    visibility: visible;
}

.one {
    margin: 20px;
    text-align: center;
}

.one input[type="checkbox"] {
    margin-right: 6px;
}

#submit {
	width: 100px;
    height: 38px;
    color: #000;
    border: 1px solid;
    border-color: #cc95c0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    margin: 20px auto;
    transition: 0.2s;
}

#submit:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(113, 46, 111, 0.5);
}

section.two label.valid {
	color: #4e042c;
}

.checkmark {
	color: #4e042c;
	font-weight: bold;
	margin-left: 5px;
	display: none;
}

.checkmark.show {
	display: inline;
}

/* Footer */
footer {
    background: #000;
    color: #fff;
    padding: 3rem;
}
  
footer > section {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
  
footer h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}
  
footer > section > aside > a {
    display: inline-block;
    padding: 0.8rem 2rem;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    margin-bottom: 2rem;
}
  
footer > section > aside > a:hover {
    background: #3a3a3a;
}
  
footer > section > aside > nav {
    display: flex;
    flex-direction: row; 
    gap: 1rem;
}

footer > section > aside > nav:nth-of-type(2) {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

footer > section > aside > nav > a {
    color: #fff;
    text-decoration: none;
    background: none;  
    padding: 0;       
    border: none;      
    display: inline-block;
}

footer > section > aside > nav > a > i {
    font-size: 1.5rem;
}

footer > section > aside > nav > a:hover {
    color: #ccc;       
    background: none;  
}
  
footer > p {
    text-align: center;
    margin-top: 2rem;
    color: #888;
    font-size: 0.85rem;
}

footer > p > a:link,
footer > p > a:visited {
    color: #888;
    text-decoration: none;
    font-weight: bold;
}

footer > p > a:hover,
footer > p > a:active {
    color: #888;
    text-decoration: underline;
}

@media (max-width: 768px) {
    header {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 2.5rem 4rem;
    }

    header nav {
    align-self: center;
    margin-top: 1.5rem;  
    }

    header section {
        text-align: center;
    }
    
    h1 {
        font-size: 2.2rem;
    }

    nav {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    nav ul {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        width: 200px;
        align-items: center;
        margin: 0;
        padding: 0;
    }

    nav li {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    nav li a,
    nav li details summary {
        text-align: center;
    }

    nav li details a {
        text-align: left;
    }

    /* Main */
    main {
        max-width: 1000px;
        padding: 0 2.5rem;
    }
    
    article {
        padding: 3.5rem;
        gap: 2.5rem;
    }
    
    article > section > h2 {
        font-size: 2.2rem;
    }

    /* Home Page Article */
    #home article {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem;
    }
    
    #home article > section,
    #home article > figure,
    #blog article > section,
    #blog article > figure {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
    
    #home article > figure,
    #home article:nth-of-type(2) > figure {
        order: -1;
    }
    
    #home article > section {
        grid-row: 2;
    }

    #home article > figure > img,
    #blog article > figure > img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }
    
    #home article:nth-of-type(2) {
        grid-template-columns: 1fr;
    }
    
    /* Intro + First Section */
    .intro-section,
    .first-section {
        flex-direction: column;
        gap: 30px;
        margin-bottom: 20px;
    }

    .intro-section h2,
    .first-section h2 {
        font-size: 36px;
        min-width: auto;
        margin-top: 40px;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 20px;
    }

    .experience-wrapper {
        margin-top: 0;
        padding-top: 0;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    /* Website Developer Page */
    .skills-grid article {
        grid-column: 1;
    }
    
    .skills-grid article:nth-child(1) {
        grid-row: 1;
    }
    
    .skills-grid article:nth-child(2) {
        grid-row: 2;
    }
    
    .skills-grid article:nth-child(3) {
        grid-row: 3;
    }
    
    .skills-grid article:nth-child(4) {
        grid-row: 4;
    }
    
    .first-section article {
        padding: 25px;
    }
    
    .first-section p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .qualifications h2,
    .experience-wrapper h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .qualifications article,
    .experience article {
        padding: 20px;
        margin-bottom: 15px;
    }

    /* Geotechnical - Stack items */
    .content-wrapper > .qualifications,
    .content-wrapper > h2,
    .content-wrapper > .experience-wrapper {
        grid-column: 1;
    }
    
    .content-wrapper > .qualifications {
        grid-row: 1;
    }
    
    .content-wrapper > h2 {
        grid-row: 2;
    }
    
    .content-wrapper > .experience-wrapper {
        grid-row: 3;
    }

    .download-section {
        margin-bottom: 30px;
        text-align: center;
        margin: 40px 0;
    }

    /* Blog Page */
    #blog > section > article {
        display: block; 
        column-count: 2;
        column-gap: 2rem;
        text-align: left; 
    }

    #blog > section > article > p {
        margin-top: 0;
        margin-bottom: 1rem;
    }

    #blog > section > article > p:last-child {
        margin-bottom: 0;
    }

    #blog article {
        grid-template-columns: 1fr;
    }

    #blog article figure {
        order: -1;
    }

    #blog article section {
        order: 1;
    }
    
    form {
        width: 90%;
        max-width: 420px;
        padding: 20px;
    }
    
    .two {
        margin: 15px 0;
    }
    
    .phone-field .tooltip {
        position: absolute;
        left: 20em;
        top: 100%;
        margin-left: 0;
        margin-top: 2.5px;
        width: 18em;
        font-size: 10px;
    }

    .phone-field:hover .tooltip {
        visibility: visible;
    }
    
    /* Footer */
    footer {
        padding: 4rem 3rem;
    }
    
    footer > section {
        max-width: 1000px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    
    footer > section > aside {
        display: flex;
        flex-direction: column;
        align-items: flex-start; 
        width: 100%;
        margin-bottom: 2rem;
    }

    footer h2 {
        font-size: 2.8rem;
    }

    footer > section > aside > nav:first-of-type {
        align-self: flex-start;
        width: 100%;
    }
    
    footer > section > aside > nav:first-of-type ul {
        padding-left: 0;
        list-style: none;
        align-items: flex-start;
    }

    footer > section > aside > nav:first-of-type li {
        width: 100%;
        display: flex;
        justify-content: flex-start;
    }

    footer > section > aside > nav:first-of-type li details {
        width: 100%;
    }
    
    footer > section > aside > nav:first-of-type li details a {
        text-align: left;
        width: 100%;
    }

    footer > section > aside > nav:nth-of-type(2) {
        justify-content: flex-start;
        margin-top: 1rem;
    }

    footer > section:nth-of-type(2) iframe {
        width: 100%;
        height: 250px;
    }
}
  
@media (min-width: 769px) and (max-width: 1440px) {
    header {
        padding: 3rem 6rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    header > section > p {
        font-size: 1.05rem;
    }
    
    nav > a,
    nav > details > summary {
        padding: 0.6rem 1.5rem;
        font-size: 0.8rem;
        line-height: 1.2;
    }
    
    nav > details > a {
        padding: 0.4rem 1rem;
        font-size: 0.75rem;
    }

    main {
        max-width: 1200px;
        margin: 4rem auto;
        padding: 0 3rem;
    }
    
    article {
        padding: 4rem;
        gap: 3rem;
    }
    
    article > section > h2 {
        font-size: 2.5rem;
    }
    
    article > section > p {
        font-size: 1.05rem;
        line-height: 1.7;
    }
    
    footer {
        padding: 5rem 4rem;
    }
    
    footer > section {
        max-width: 1200px;
    }
    
    footer h2 {
        font-size: 3.2rem;
    }
    
    footer > section > aside > a {
        padding: 1rem 2.5rem;
        font-size: 1.05rem;
    }

    footer > section > aside > nav > a > i {
        font-size: 1.5rem;
    }

    footer > section:nth-of-type(2) iframe {
        width: 100%;
        height: 350px;
    }

}

@media (min-width: 1440px) {
    body {
        margin: 0 auto;
        font-size: 1.05rem;
    }

    #website .intro-section,
    #website .skills-section {
        padding: 3rem;
    }

    #website .intro-section article p {
        margin: 1rem;
    }

    #website .skills-grid {
        padding-left: 0;
        padding-right: 0;
    }

    #geotechnical .first-section,
    #geotechnical .qualifications-section,
    #geotechnical .experience-section,
    #geotechnical .skills-section {
        padding: 3rem;
    }

    #geotechnical .skills-section,
    #geotechnical .experience-section {
        margin-top: 2rem;
    }

    #geotechnical .first-section p {
        margin: 1rem;
    }
}