@import url('https://fonts.googleapis.com/css2?family=Chivo+Mono:ital,wght@0,100..900;1,100..900&family=Noto+Sans+Tangsa:wght@400..700&display=swap');

* {
    font-family: Noto Sans Tangsa;
}


header {
    position: sticky;
    top: 0;
    z-index: 100;
    animation: top 0.5s ease-in-out;
}

header nav {
    width: 100%;
    display: flex;
    flex-direction: row;
    background-color: #2a2a2a;
    font-weight: bold;
    border-radius: 5px;
    text-align: left;
    box-shadow: 0 2px 4px 0 #00000033;
}

#dropdownButton {
    display: none;
}

h3 {
    color: #f1f1f1;
    font-weight: bold;
    margin:5px;
    margin-left:10px;
}
a, h3 {
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}
a:hover h3{
    color: #6d8ba7;
}

.bold {
    font-weight: bold;
}

.inline {
    font-weight: bold;
    color: inherit;
}
.inline:hover {
    color: #6d8ba7;
    text-decoration: underline;
}

p {
    color: #f1f1f1;
}

li {
    color: #f1f1f1;
}

#icon{
    height: 13px;
}

header nav ul {
    display: flex;
    flex-direction: row;
    margin: auto;
    list-style-type: none;
    text-align: left;
    margin-left: 20px;
}

header li {
    margin: 0 10px;
}
header a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}
header a:hover {
    color: #6d8ba7;
}

#login-logout {
    display:none;
}

#log {
    height: 30px;
    width: auto;
    filter: brightness(0) invert(1);
    margin: auto;
    margin-right: 20px;
    padding-top: 5px;
    transition: filter 0.2s ease-in-out;
}

a #log:hover {
    filter: brightness(0) invert(0.5);
    transition: filter 0.2s ease-in-out;
}


body {
    background-color: #1a1a1a;
}

button {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 5% auto;
    width: 200px;
    height: 50px;
    border-radius: 10px;
    background-color: #1a1a1a;
    border: #555 solid 1px;
    outline: none;
    color: #f1f1f1;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border 0.2s ease-in-out;
}

button:hover {
    background-color: #6d8ba7;
    color: #1a1a1a;
    border: #6d8ba7 solid 1px;
}

h1 {
    color: #f1f1f1;
    text-align: center;
    font-size: 2.5em;
    margin-top: 50px;
}

section {
    display: flex;
    flex-direction: column;
    margin: 20px;
    padding: 10px;
    background-color: #333;
    border-radius: 5px;
}

article {
    display: flex;
    flex-direction: column;
    margin: 10px;
    padding: 5px;
    width: auto;
}

figure {
    display: flex;
    flex-direction: column;
    margin: 10px;
    padding: 10px;
    border-radius: 5px;
}

.collapsible{
    justify-content: space-between;
    align-items: center;
    width: auto;
    margin: 10px;
    padding: 5px;
    border: none;
    outline: none;
    background-color: #2a2a2a;
    color: #f1f1f1;
    border-radius: 5px;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}


.active, .collapsible:hover{
    background-color: #6d8ba7;
    color: #1a1a1a;
    border: none;
    outline: none;
}

.collapsible:after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid #f1f1f1; /* Right-facing arrow */
    margin-left: 5px;
}

.active:after {
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 8px solid #f1f1f1;
    margin-left: 5px;
}

.content{
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    margin: 0;
    background-color: #333;
    border-radius: 5px;
}
.content ul{
    list-style-type: none;
    padding-left: 20px;
    margin: 0;
}

.addButtons{
    display: flex;
    flex-direction: row;
    justify-content: center;
    background-color: transparent;
    align-items: center;
    width: auto;
    margin: 0 auto;
}

.addButtons button{
    margin: 10px;
}

#index {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    justify-content: space-between;
    align-items: center;
    width: 80%;
    margin: 0 auto;
    background-color: #1a1a1a;
    border-radius: 5px;
}

#navigateButton {
    height: 150px;
    width: 80%;
    background-color: #1a1a1a;
    border-radius: 10px;
    outline: none;
    border: none;
    color: #f1f1f1;
    font-size: 24px;
    font-weight: bold;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

#navigateButton:hover {
    background-color: #6d8ba7;
    color: #1a1a1a;
}

.aboutMe {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 80%;
    margin: 0 auto;
}

.aboutMe article {
    width: auto;
}
.experience {
    display: grid;
    grid-template-columns: 1fr;
    width: 80%;
    margin: 0 auto;
}
.experience article {
    background-color: #2a2a2a;
    border-radius: 5px;
}

.education {
    display: grid;
    grid-template-columns: 1fr;
    width: 80%;
    margin: 0 auto;
}
.education article {
    background-color: #2a2a2a;
    border-radius: 5px;
}
.education article ul{
    display: inline;
    padding-left: 20px;
    margin: 0;
}

.skills {
    display: grid;
    grid-template-columns: 1fr;
    width: 80%;
    margin: 0 auto;
}

.contact {
    display: grid;
    grid-template-columns: 1fr;
    width: 80%;
    margin: 0 auto;
}
.contact article {
    background-color: #2a2a2a;
    border-radius: 5px;
}
#contact-link{
    color: #f1f1f1;
    text-decoration: underline;
    transition: color 0.2s ease-in-out;
}
#contact-link:hover{
    color: #6d8ba7;
    text-decoration: underline;
}

figcaption {
    color: #f1f1f1;
    font-size: x-small;
}

.post {
    display: grid;
    grid-template-areas:
        "postTitle postTitle postDate"
        "postImage postText postText";
    grid-template-columns: 1fr 2fr 1fr;
    gap: 20px;
    margin: 20px;
    padding: 20px;
    background-color: #2a2a2a;
    border-radius: 8px;
    align-items: start;
}

.postTitle {
    grid-area: postTitle;
    color: #f1f1f1;
    font-size: 1.5rem;
    margin: 0;
}

.postDate {
    grid-area: postDate;
    color: #ccc;
    font-size: 0.9rem;
    text-align: right;
    align-self: center;
}

.postImage {
    grid-area: postImage;
}

.postImage img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    object-fit: cover;
    display: block;
}

.postText {
    grid-area: postText;
    color: #ddd;
    line-height: 1.5;
    margin: 0;
}

.post a {
    color: #f1f1f1;
    text-decoration: none;
}

.post a:hover {
    text-decoration: underline;
    color: #6d8ba7;
}

#viewPostSection {
    display: grid;
    grid-template-columns: 2fr 4fr 1fr;
    margin: 20px;
    gap: 20px;
    padding: 10px;
    background-color: #2a2a2a;
    border-radius: 5px;
  }

#title{
    border: #555 solid 1px;
}

#description{
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
    border: #555 solid 1px;
}
#viewPostSection a{
    cursor: pointer;
}
  
.dieshot {
    width: 40vw; /* Set appropriate size */
    height: 26.41vw; /* Set appropriate size */
    background-image: url('../images/Intel\ Core\ i7\ 6700\ CPU\ Die\ Shot\ Low-Res.jpg');
    background-size: cover;
    outline: solid 0px #6d8ba7;
    border-radius: 5px;
    transition: outline 0.05s ease-in-out;
}

.dieshot:hover {
    outline: 3px solid #6d8ba7;
    border-radius: 5px;
    transition: outline 0.1s ease-in-out;
}
#viewPostImageContainer{ /*This is the multi-image post block*/
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    border-radius: 4px;
}

.viewPostImage{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
    border-radius: 4px;
    border: 3px solid transparent;
    transition: border 0.1s ease-in-out;
}
.viewPostImage:hover{
    border: 3px solid #6d8ba7;
    border-radius: 4px;
    transition: border 0.1s ease-in-out;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    user-select: none;
    background-color: #6d8ba727;
  }

.prev:hover, .next:hover{
    background-color: #6d8ba7cc;
}
.prev {
    left: 3px;
    border-radius: 0 3px 3px 0;
}
.next {
    right: 3px;
    border-radius: 3px 0 0 3px;
  }

.dot{
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 10px 0 0 5px    ;
    background-color: #ffffff33;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.selected, .dot:hover {
    background-color: #6d8ba7;
  }

#viewPostSectionNoImage {
    display: grid;
    grid-template-columns: 4fr 1fr;
    margin: 20px;
    gap: 20px;
    padding: 10px;
    background-color: #2a2a2a;
    border-radius: 5px;
}

#date{
    color: #848ca5;
    text-align: right;
}

#error-message{
    color: #d40606;
    font-weight: bold;
}
.error {
    border: 1px solid #d40606;
  }



footer {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #1a1a1a;
    color: #f1f1f1;
    font-weight: bold;
    height: 100px;
}

form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 400px;
    margin: 0 auto;
    border-radius: 10px;
    background-color: #2a2a2a;
    padding: 20px;
}

#viewPostImage{
    max-width: 100%;
}

#editDeleteButtons{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 30%;
    flex-wrap: wrap;
    margin: 0 auto;

}

#deleteButton:hover{
    background-color: #d40606;
    color: #f1f1f1;
    border: #d40606 solid 1px;
}

#preview, #preview1, #preview2, #preview3{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 300px;
    height: auto;
    margin: 10px auto;
    border-radius: 10px;
    background-color: #b4cfe7;
    padding: 20px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    margin-bottom: 10px;
    height: 40px;
    border-radius: 5px;
    border: none;
    outline: none;
    border: 1px solid #1a1a1a;
    background-color: #333;
    color: #f1f1f1;
}

::placeholder {
    color: #aaa;
}

input[type="file"] {
    display: none;
}

label.file-upload {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 5% auto;
    width: 100px;
    height: 25px;
    border-radius: 5px;
    background-color: #b4cfe7;
    color: #333;
    font-size: 12px;
}

label.file-upload:hover {
    background-color: #6d8ba7;
}

label.file-upload input[type="file"] {
    display: none;
}

form textarea{
    width: 100%;
    margin-bottom: 10px;
    height: 100px;
    border-radius: 5px;
    border: none;
    outline: none;
    border: 1px solid #1a1a1a;
    background-color: #333;
    color: #f1f1f1;
}
input[type="date"]{
    width: 100%;
    margin-bottom: 10px;
    height: 40px;
    border-radius: 5px;
    background-color: #333;
    border: none;
    outline: none;
    border: 1px solid #1a1a1a;
    color: #f1f1f1;
}

input[type="submit"],
input[type="reset"] {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    background-color: #1a1a1a;
    color: #2a2a2a;
    font-size: 16px;
    cursor: pointer;
}

input[type="submit"]:hover {
    background-color: #6d8ba7;
}

.musicTable{
    width: 100%;
    margin: 0 auto;
    text-align: center;
    color: #f1f1f1;
    border-collapse: collapse;
    border-radius: 5px;
}

.musicTable th{
    background-color: #2a2a2a;
    padding: 10px;
    border-radius: 5px;
}


.musicTable td{
    border-radius: 5px;
}

.musicImage {
    width: 75px;
    height: 75px;
    border-radius: 5px;
    margin: 2px;
    position: relative;
}

.musicImage img {
    width: 70px;
    border-radius: 5px;
    position: relative;
    margin-top: 2.5px;
    z-index: 1;
}
.musicImage:hover img {
    filter: brightness(1.3);
    transition: filter 0.2s ease-in-out;
    cursor: pointer;
}

@property --angle{
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.musicImage::after, .musicImage::before {
    content: '';
    position: absolute;
    height: 100%;
    width: 100%;
    background-image: conic-gradient(from var(--angle), rgb(255, 46, 46), rgb(255, 179, 39), rgb(255, 255, 33), rgb(41, 202, 41), rgb(54, 124, 255), rgb(147, 52, 214), rgb(241, 64, 241), rgb(255, 46, 46)); 
    top: 50%;
    left: 50%;
    z-index: 0;
    translate: -50% -50%;
    border-radius: 5px;
    animation: 3s spin linear infinite;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.musicImage:hover::after {
    opacity: 0.3;
    transition: opacity 0.2s ease-in-out;
}

.musicImage:hover::before {
    opacity: 1;
    transition: opacity 0.2s ease-in-out;
}

.musicImage::before{
    filter: blur(20px);
}

@keyframes spin{
    from{
      --angle: 0deg;
    }
    to{
      --angle: 360deg;
    }
  }

.downloadButton{
    width: 30px;
    height: 30px;
    transition: filter 0.1s ease-in-out;
    cursor: pointer;
}

.downloadButton:hover{
    filter: brightness(0.9);
    transition: filter 0.1s ease-in-out;
}

.musicSection{
    display: grid;
    grid-template-columns: 1fr;
    width: 80%;
    margin: 0 auto;
    background-color: #333;
}

/* Experience page styles */
.experience article {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 5px;
    background-color: #2a2a2a;
    gap: 15px;
}

.experience-content {
    flex: 1;
    min-width: 0; /* Prevents flex item from overflowing */
}

.experience-buttons {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    flex-shrink: 0; /* Prevents buttons from shrinking */
}

.experience-buttons .editButton,
.experience-buttons .deleteButton {
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 1px solid;
    white-space: nowrap;
    min-width: auto;
}

.experience-buttons .editButton {
    background-color: #1a1a1a;
    color: #f1f1f1;
    border-color: #555;
}

.experience-buttons .editButton:hover {
    background-color: #6d8ba7;
    color: #1a1a1a;
    border-color: #6d8ba7;
}

.experience-buttons .deleteButton {
    background-color: #2a2a2a;
    color: #f1f1f1;
    border-color: #555;
}

.experience-buttons .deleteButton:hover {
    background-color: #6d8ba7;
    color: #1a1a1a;
    border-color: #6d8ba7;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .experience article {
        flex-direction: column;
        gap: 10px;
    }
    
    .experience-buttons {
        justify-content: flex-end;
        padding-top: 10px;
        border-top: 1px solid #ddd;
    }
}