@font-face {
    font-family: "Ultra";
    src: url("Ultra-Regular.ttf") format("truetype");
    font-weight: 400;
    font-display: swap;
}

html, body { margin: 0; padding: 0; }

body {
    background-color:  #FAFAFA;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-rows: auto auto 1fr;
    grid-template-columns: minmax(0, 1fr);
}

header {
    text-align: center;
    padding: 50px 30px;
    color: #1f4964;
}

header h1 {
    font-size: 60px;
    font-family: "Ultra", Georgia, serif;
    font-weight: 400;
    margin: 0;
}

header h2 {
    font-size: 40px;
    font-weight: bold;
    margin: 10px 0 0 0;
}

header h3 {
    font-size: 25px;
    font-weight: bold;
    margin: 10px 0 0 0;
}

/* index page */

.nav {
    grid-row: 2;
    display: flex;
    background-color: #88BBD6;
    gap: 10px;
    padding: 10px;
}

.nav a {
    flex: 1;
    text-align: center;
    display: grid;
    place-items: center;
    padding: 12px;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    color: #FAFAFA;
    background-color: #B31C30;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav a:hover {
    background-color: #FAFAFA;
    color: #B31C30;
}

.split {
    flex: 1;
    display: flex;
    background-color: #88BBD6; 
}

.left, .right {
    flex: 1;
    padding: 40px;
    box-sizing: border-box;
    min-height: 0;
}

.left {
    background-color: #FAFAFA;
    display: flex;
    align-items: center;
    border-radius: 5px;
    justify-content: center;
}

.left img {
    max-width: 80%;
    height: auto;
    object-fit: cover;
    border-radius: 50%;    
}
  
.right {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;  
    color: #FAFAFA;
}

.right h2 {
    margin-top: 0;
    font-size: 36px;
    letter-spacing: 4px;
}

.right ul {
    font-size: 18px;
    line-height: 1.6;
}

.welcome {
    grid-row: 4;
    background-color: #99D3DF;
    padding: 10px;
    text-align: center;
}

.welcome p {
    color: #FAFAFA;
    font-weight: bolder;
    letter-spacing: 4px;
    font-size: 24px;
}

/* technical portfolio page */

.currentprojects {
    display:flex;
    justify-content: space-between;
    flex-direction: row;
    gap: 32px;
    background-color: #99D3DF;
    padding: 20px;
}

.currentprojectstext h2 {
    font-size: 40px;
    font-weight: bold;
    margin: 10px 0 0 0;
    color:#FAFAFA;
    flex: 2;   
    padding-right: 20px;
    letter-spacing: 4px;
}

.currentprojectstext h3 {
    font-size: 28px;
    font-weight: bold;
    margin: 10px 0 0 0;
    color:#FAFAFA;
    flex: 2;   
    padding-right: 20px;
}

.currentprojectstext ul {
    color:#FAFAFA;
    flex: 2;   
    padding-right: 20px;
    text-align: left;
}

.currentprojectsimg img {
    width: 50px;   
    height: auto;
}

.previousprojects {
    display:flex;
    justify-content: space-between;
    flex-direction: column;
    gap: 32px;
    background-color:#FAFAFA;
    padding: 20px;
}

.previousprojects h2 {
    font-size: 40px;
    font-weight: bold;
    margin: 10px 0 0 0;
    color:#88BBD6;
    flex: 2;   
    padding-right: 20px;
    letter-spacing: 4px;
}

.previousprojects h3 {
    font-size: 28px;
    font-weight: bold;
    margin: 10px 0 0 0;
    color:#88BBD6;
    flex: 2;   
    padding-right: 20px;
}

.previousprojects ul {
    color: #88BBD6;
    flex: 2;   
    padding-right: 20px;
    text-align: left;
}

.previousprojects .project {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.projectimg img {
    width: 50%;   
    height: auto;
}


/* qualifications page */

.resumesection {
    background-color: #88BBD6;
    display: flex;
}

.resumeleft, .resumeright {
    flex: 1;
    padding: 40px;
    box-sizing: border-box;
    border-radius: 5px;
}

.resumeleft {
    background-color:#FAFAFA;
    text-align: center;

}
  
.resumeright {
    background-color:#99D3DF; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start;  
    color:#FAFAFA;
}

.resumelink a {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #88BBD6; 
    color: #FAFAFA;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.3s;
}
  
.resumelink a:hover {
    background-color: #99D3DF;
    color: #333;
}

.main {
    background-color: #88BBD6;
    padding: 40px;
    color:#FAFAFA;
}

.main h2 {
    font-size: 40px;
    font-weight: bold;
    margin: 10px 0 0 0;
    color:#FAFAFA;
    letter-spacing: 4px;
}

.relevantcoursework {
    background-color: #88BBD6;
    padding: 40px;
    color:#FAFAFA;
}

.relevantcoursework h2 {
    font-size: 40px;
    font-weight: bold;
    color:#FAFAFA;
    letter-spacing: 4px;
}

.coursework {
    background-color: #88BBD6;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    align-items: flex-start;
    color:#FAFAFA;
}

.courseworkleft, .courseworkright {
    flex: 1 1 0;         
    min-width: 0;               
    padding: 40px;
    box-sizing: border-box;
    border-radius: 5px;
}

/* service page */
.previousservice {
    display:flex;
    justify-content: space-between;
    flex-direction: row;
    gap: 32px;
    background-color:#FAFAFA;
    padding: 20px;
}

.previousservice h2 {
    font-size: 40px;
    font-weight: bold;
    margin: 10px 0 0 0;
    color:#99D3DF;
    flex: 2;   
    padding-right: 20px;
    letter-spacing: 4px;
}

.previousservice ul {
    color:#99D3DF;
    flex: 2;   
    padding-right: 20px;
    text-align: left;
}

.futureservice {
    display:flex;
    justify-content: space-between;
    flex-direction: row;
    gap: 32px;
    background-color: #88BBD6;
    padding: 20px;
}

.futureservice h2 {
    font-size: 40px;
    font-weight: bold;
    margin: 10px 0 0 0;
    color:#FAFAFA;
    flex: 2;   
    padding-right: 20px;
    letter-spacing: 4px;
}

.futureservice ul {
    color:#FAFAFA;
    flex: 2;   
    padding-right: 20px;
    text-align: left;
}

button#toggleBtn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1000;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #f2f2f2;
    cursor: pointer;
  }


.nav a[aria-current="page"] {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.resumeleft iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.error-page {
    text-align: center;
    padding: 0 20px 40px;
}

.error-page a {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 5px;
    background: #B31C30;
    color: #FAFAFA;
    font-weight: bold;
}

@media (max-width: 900px) {
    header { padding: 64px 16px 24px; }
    header h1 { font-size: clamp(1.75rem, 6vw, 3rem); }
    header h2 { font-size: 1.5rem; }
    header h3 { font-size: 1.125rem; overflow-wrap: anywhere; }

    .nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .split { flex-direction: column-reverse; }

    .currentprojects,
    .previousprojects .project,
    .resumesection,
    .coursework,
    .previousservice,
    .futureservice {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .left, .right, .resumeleft, .resumeright, .main,
    .relevantcoursework, .courseworkleft, .courseworkright {
        padding: 20px;
    }

    main h2,
    .right h2 {
        font-size: 1.6rem;
        overflow-wrap: anywhere;
    }
}
