@font-face {
    font-family: 'absans';
    src: url('absans-main/fonts/Absans-Regular.woff2') format('woff2'),
         url('absans-main/fonts/Absans-Regular.woff') format('woff');
}

html {
    font-size: 100%; 
}

img {
    border-radius: 15%;
    display: block;
}


.social-icon:hover {
  filter: invert(50%);
}

body {
    font-family: 'Inter', 'absans', sans-serif;
    color: black;
    margin: 0;
    padding: 0;
    overflow: hidden; 
    height: 100vh;
    width: 100vw;
    background: white;
}

body::-webkit-scrollbar {
  display: none;
}


#main-nav:has(a:hover) a:not(:hover) {
    filter: blur(4px);
    opacity: 0.5;
}

#main-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
    cursor: pointer;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
    position: fixed;
}

#root a {
    text-decoration: none;
    color: inherit;
    transition: filter 0.3s ease-out, opacity 0.3s ease-out;
    pointer-events: auto;
}

#root a:hover,
.panel a:hover {
    color: #575656;
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    background-color: transparent;
    transition: filter 0.3s ease-out;
}

.flex-container {
    display: flex;
    flex-direction: row; 
    position: relative;
    z-index: 1;
    background-color: transparent;
    height: 100vh;
    color: black;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 1rem;
    padding-left: 1rem;
    padding-right: 2rem;
    pointer-events: none;
}

#box1,
#box2 {
    background-color: transparent;
    padding: 0rem;
    z-index: 2;
    pointer-events: auto;
}

#box1 {
    font-size: 2rem;
    text-align: left;            
}

#box1 a {
    text-decoration: none;
    color: inherit;
    position: fixed; 
}

#box2 {
    font-size: 5rem;
    font-weight: lighter;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    position: relative;
}

summary { list-style: none; list-style-type: none; }
summary::-webkit-details-marker { display: none; }
ul { list-style-type: none; }


.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.panel {
    position: absolute;
    top: 0;
    right: 0;
    background-color: transparent; 
    backdrop-filter: blur(4px);
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top:0% !important;
    width: 50vw; 
    font-weight: lighter;
    display: flex;
    flex-direction: column;
    gap: 1.5rem; 
    align-items: flex-start; 
    text-align: left;
    
    max-height: 90vh; 
    overflow: hidden; 

    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    transition: transform 0.5s ease-in-out, 
                opacity 0.5s ease-in-out, 
                visibility 0.5s ease-in-out;
}

.panel.hidden {
    transform: translateX(100%);
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}


.panel.is-visible {
    opacity: 1;
}

.panel-back-button {
    padding-top: 0% !important;
    font-size: 5rem;
    font-weight: lighter;
    color: black;
    cursor: pointer;
    align-self: flex-end;
    flex-shrink: 0; 
}

.panel-back-button:hover {
    color: #575656;
}

/* --- THIS IS THE FIX --- */
.panel-content-scrollable {
    overflow-y: auto;
    overflow-x: hidden;
    flex-grow: 1;
    min-height: 0;
    width: 100%;
    padding-bottom: 2rem;
    
    padding-right: 1rem;
    box-sizing: border-box;
}

#project-panel .panel-project-item {
    margin-bottom: 1.5rem; 
    
}

#contact-panel .panel-content-scrollable {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; 
    padding-top: 1rem;
}


.descriptor-container {
    display: flex;
    flex-direction: row;
    gap: 5px;
    margin-bottom: .5rem;
}

.panel-descriptor {
    gap: .5px;
}

.project-descriptor p {
    padding: .3rem;
    border: 1px solid black;
    font-size: .8rem !important;

}

.panel-project-item {
    width: 95%;
    border: 2px solid black !important;
    padding: 1rem;
    min-width: 0;
    box-sizing: border-box;
}


#panel-about-item {
    display: flex;
    flex-direction: column;
    overflow-y: auto;

}
#about-panel {
    position: fixed;
}
#project-panel {
    position: fixed;
}
#contact-panel {
    position: fixed;
}

.panel-about-item a{
    text-decoration: underline !important;
}


#socials a img {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

#socials {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
}

.about-flex-container {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    width: 100%;
}

.about-left-col {
    flex-shrink: 0; 
    display: flex;
    flex-direction: column;
    gap: 1rem; 
    align-items: center;
}

.about-right-col {
    flex-grow: 1;
    min-width: 0;
}

.panel-about-item p{
    font-size: 1.2rem;
    color: black;
    margin: 0;
    line-height: 1.5;
    font-weight: lighter;
    overflow-wrap: break-word;
    display: block;
}

.about-right-col .panel-about-item {
    margin: 0;
}

.panel-project-item h3 {
    font-size: 2rem;
    margin: 0 0 0 0;
    color: black;
    font-weight: lighter;
    overflow-wrap: break-word;
    word-break: break-word;
}


.panel-project-item p {
    font-size: 1.2rem;
    color: black;
    margin: 0;
    line-height: 1.5;
    font-weight: lighter;
    overflow-wrap: break-word;
    word-break: break-word;

}

.panel-project-item a {
     color: rgba(255, 255, 255, 0.2);
}

#contact-panel a {
    text-decoration: none;
    
}

#contact-panel p {
    font-size: 1.5rem;
    margin: 0;
    line-height: 1rem;
}

#contact-link {
    text-decoration: underline !important;
}

.copyable-email {
    cursor: pointer !important;
    user-select: none;
    transition: color 0.2s ease;
    line-height: 0rem;
}

.copyable-email:hover {
    color: #575656;
}

.copy-text {
    font-size: 1rem;
    opacity:0.6;
    display: block;
    font-weight: 300;
    line-height: 0rem !important;

}

#contact-panel form {
    display: flex;
    flex-direction: column;
    gap: 1rem; 
    align-self: stretch !important;
    width: 100%;
}


.form-row{
    display: flex;
    height: 2.2rem;
    border: 1px solid #555;
    width:100%;
    box-sizing: border-box;
}

#contact-panel input[type="email"],
#contact-panel textarea {
    background-color: transparent;
    -webkit-backdrop-filter: blur(4px); 
    backdrop-filter: blur(4px);
    color: black; 
    padding: 1rem;
    font-family: 'absans', sans-serif;
    font-size: 1.5rem;
    box-sizing: border-box;

}

.form-row input[type="email"] {
    flex-grow: 1; 
    border: none; 
    width: 100%;
    box-sizing: border-box;
    outline: none; 
}
#contact-panel textarea {
    width: 100%;
    min-height: 150px;
    resize: vertical;
    border: 1px solid #555; 
    padding-top: 0rem !important;
    box-sizing: border-box; 
}

.form-row button[type="submit"] {
    background-color: #ccc;
    color: #000;
    border: none;
    border-left: 1px solid black;
    padding: 0 1.5rem;
    font-size: 1.5rem;
    font-family: 'absans';
    cursor: pointer; 
    transition: background-color 0.2s; 
    box-sizing: border-box;
}


.form-row:focus-within {
    border-color: #000;
    outline:#000;
}


@media (max-width: 768px) {
    flex-container {
    flex-direction: column; 
    justify-content: flex-start;
    gap: 2rem; 
    padding: 1rem
  }
  #box1 {
    font-size: 1.5rem;
  }

  #box2 {
    font-size: 3rem;
    align-items: flex-start;
    text-align: left;
    position: static; 
  }

  .panel {
    width: 90vw;
    position: relative; 
    background-color: transparent !important;
    overflow: hidden;
  }

  .panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: -1;
}


  .panel-back-button {
      font-size: 3rem; 
  }
  .about-flex-container {
    flex-direction: column;
    gap: 1rem;
  }

  .panel-content-scrollable {
    overflow-y: auto !important;
    flex-grow: 1;
    min-height: 0;
    width: 100%;
    padding-bottom: 2rem;
    padding-right: 1rem;
    box-sizing: border-box;
}

#main-nav {
    /* Ensure the whole nav container has a defined width and sits inside the screen */
    width: auto;
    right: 1rem;
    top: 1rem;
    align-items: flex-end; /* Keep aligning text right */
  }

}