body { 
    overscroll-behavior: none; 
}

#topbar {
    padding-top: env(safe-area-inset-top);
    position:absolute;
    top:0%;
    left:50%;
    transform:translateX(-50%);
    width:min(100%, 1700px);
    height:min(100%, 40px);
    padding:0 clamp(10px, 5vw, 100px);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:clamp(10px, 3vw, 32px);
    backdrop-filter:blur(15px);
    background-color:rgba(206, 243, 198, 0.5);
    color:#D22405;
    font-family:'Noto Serif', serif;
    box-sizing:border-box;
}

.topbar-item {
    margin:0;
    background-color:rgba(255,255,255,0.5);
    padding:
        clamp(3px,1vw,4px)
        clamp(8px,2vw,12px);
    border-radius:16px;
    white-space:nowrap;
    font-size:clamp(0.75rem,2vw,1rem);
}

@media(max-width:600px){
    #topbar{
        top:2%;
        gap:8px;
        padding:0 10px;
    }

    .topbar-item{
        font-size:0.7rem;
        padding:3px 8px;
    }

    .decoration{
        display:none;
    }
}

.closebutton {
    color:rgb(137,8,8);
    cursor:pointer;
    margin-left:auto;
    height: 32px;
    width: 40px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius: 8px;
    transition: background-color .15s ease;
}

.closebutton:hover{
   font-weight: bold;
}
    

.window {
    width: min(492px, 95vw);
    max-height: min(90dvh, var(--vvh, 100vh) * 0.9);
    background-color: rgba(255,255,255,0.25);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 10px;
    overflow: hidden;
    position: absolute;
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    display: flex;
    flex-direction: column;
}

.windowheader {
    background-color:rgba(250, 200, 100, 0.25);
    backdrop-filter: blur(10px);
    padding: 0 8px;
    height: 35px;
    width: 100%;
    user-select: none;
    cursor: grab;
    display: flex;
    align-items: center;
    position: relative; 
}

.windowcontent {
    background-color: rgba(255, 255, 255, 0.5);
    padding: clamp(16px, 3vw, 30px);
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow-y: auto;
}

.headertext {
    color:#D22405;
    font-family: 'Noto Serif', serif;
    font-size: clamp(1rem,2vw,1.2rem);
    margin: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 90px); /* keeps long titles from overlapping the close button on narrow windows */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.scroll-container {        
  overflow-y: auto;     
  border: 1px solid #ccc;
}

.crochetPics {
    width:100%;
    max-width:180px;
    height:auto;
    border-radius:10px;
    margin-right: 2%;
    margin-bottom: 5%;
}

.desktop-apps {
    position: fixed;
    top: calc(50% + 130px);
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(4, 64px);
    gap: 20px;
    z-index: 1;
}

.desktop-icon {
    text-align:center;
    padding: 8px 4px;
    border-radius: 12px;
    transition: background-color .15s ease;
}

.desktop-icon:hover,
.desktop-icon:focus-within {
    background: rgba(255,255,255,0.3);
    outline: 2px solid #fff;
}

.app {
    cursor: pointer;
    width:50px;
    height:43px;
    background-color: #F8E2E2;
    padding: 5px;
    border-radius: 15px;
    transition: transform .12s ease;
}

.app:active {
    transform: translate(2px, 2px);
}

.app-label {
    margin:0;
    color:white;
    text-align: center;
    font-size:clamp(0.75rem,2vw,1rem);
}

.link {
  color: #AE341C;
  cursor: pointer;
  text-decoration: none;
  font-weight: bold;
}

.link:hover {
  text-decoration: underline;
}

.project-card{
    width:100%;
    max-width:208px;
    background: #D60A46;
    border-radius: 15px;
    color:rgb(248, 228, 209);
    overflow: hidden;
    transition: .3s;
    margin-bottom: 3%;
}

.project-image{
    width:100%;
    aspect-ratio:16/6;
    height:auto;
    object-fit:cover;
}

.project-content{
    padding:10px;
}

.project-title{
    margin-bottom:6px;
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    line-height: 1.15;
}

.project-description{
    line-height: 1.3;
    font-family: 'Noto Serif', serif;
    font-size: clamp(0.7rem, 1.8vw, 0.85rem);
}

.project-title-link{
    color: inherit;
    text-decoration: none;
}

.project-title-link:hover{
    text-decoration: underline;
}

.hardware-hero-img{
    width:100%;
    max-height:280px;
    object-fit:cover;
    border-radius:10px;
    margin-bottom:20px;
}

.hardware-spec-list{
    padding-left:20px;
    color:#AE341C;
    font-family:'Noto Serif', serif;
    font-size: medium;
    line-height:1.6;
}

.fa-brands{
    font-size: 25px;
    color: #D60A46;
    transition:.25s;
}

.fa-brands:hover{
    color: #AE341C;
    transform:scale(1.15);
}

*{
    box-sizing:border-box;
}

img{
    max-width:100%;
    height:auto;
}

@media(max-width:600px){
    .desktop-apps{
        top: calc(50% + 160px);
        grid-template-columns: repeat(4, 56px);
        gap: 12px;
    }

    .app{
        width:44px;
    }
}

.field-row {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.field-row label {
    color: #AE341C;
    font-family: 'Noto Serif', serif;
    font-size: clamp(0.85rem, 2vw, 1rem);
}

.field-row input,
.field-row textarea {
    font-family: 'Noto Serif', serif;
    font-size: clamp(0.85rem, 2vw, 1rem);
    padding: 8px 10px;
    border: 1px solid #D60A46;
    border-radius: 8px;
    background-color: rgba(255,255,255,0.7);
    color: #AE341C;
    box-sizing: border-box;
    width: 100%;
}

.field-row textarea {
    resize: vertical;
    min-height: 90px;
}

.field-row input:focus,
.field-row textarea:focus {
    outline: none;
    border-color: #AE341C;
    box-shadow: 0 0 0 2px rgba(214,10,70,0.2);
}

.contact-form {
    display: flex;
    flex-direction: column;
    max-width: 420px;
    margin: 0 auto;
}

.contact-submit {
    cursor: pointer;
    background-color: #D60A46;
    color: rgb(248, 228, 209);
    font-family: 'Noto Serif', serif;
    font-weight: bold;
    font-size: clamp(0.85rem, 2vw, 1rem);
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    transition: .25s;
}

.contact-submit:hover {
    background-color: #AE341C;
    transform: translateY(-2px);
}

.subhead{
    color: #D60A46;                                                                                                                                                                                      
    font-family: 'Noto Serif', serif;
    margin-bottom: clamp(8px, 2vw, 10px);
}

.window-lg{
    width: min(800px, 95vw);
    max-height: 90vh;
    overflow-y: auto;
}

#speakerContainer {
    position: fixed;
    bottom: clamp(12px, 3vw, 20px);
    right: clamp(12px, 3vw, 20px);
    z-index: 9999;
}

#speakerIcon {
    font-size: clamp(24px, 5vw, 30px);
    color: #D60A46;
    cursor: pointer;
    transition: .25s;
    background: #F8E2E2;
    padding: clamp(8px, 2vw, 10px);
    border-radius: 12px;
}

#speakerIcon:hover{
    transform:scale(1.15);
    color:#AE341C;
}

#soundTip {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    width: min(260px, 80vw);
    padding: clamp(10px, 2vw, 12px);
    border-radius: 12px;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(8px);
    color: #D60A46;
    font-family: 'Noto Serif', serif;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    line-height: 1.4;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s;
}

