
/* Root CSS variables */
:root {
    --back-color: #0A192F;
    --light-color: cornsilk;
    --highlight-color: #666;
    --grad-y-color: rgb(225, 0, 255);
    --grad-g-color: rgb(127, 0, 255);
    --grad-o-color: rgb(255, 215, 0);
    --background-rgb: 10 25 47;
    --gold-rgb: 255 215 0;
    --primary-rgb: var(--gold-rgb);
}

/* Base styles for html and body */
html, body {
    min-height: 100vh;
    width: 100%;
    margin: 0rem;
    font-family: 'Space Mono', monospace;
}

/* Styling for the body element */
body {
    display: flex;
    flex-direction: column;
    place-items: center;
    background-color: var(--back-color);
    min-height: 100vh;
    overflow: auto;
}

/* Footer styles */
.footer {
    margin-top: auto;
    width: 100%;
    text-align: left;
    margin-left: clamp(1rem, 5vw, 12rem);
    position: fixed;
    bottom: 0;
}

/* Styling for h1 elements */
h1 {
    font-size: clamp(2rem, 6vw, 8rem);
    color: var(--light-color);
    padding: 0 clamp(1rem, 3vw, 4rem);
    top: 0;
    transition: background-color 300ms, color 300ms;
    letter-spacing: 0.2ch;
    z-index: 10;
}

/* Hover effect for h1 elements */
h1:hover {
    background-color: var(--light-color);
    color: var(--back-color);
}

/* Styling for highlighted text */
.highlight {
    color: var(--highlight-color);
}

/* Styling for h2 elements */
main > article h2 {
    font-size: clamp(1rem, 3vw, 4rem);
    background-color: var(--light-color);
    color: var(--highlight-color);
    display: block; /* Change from inline-block to block if needed */
    margin: 0 auto; /* Ensure it's centered by applying margin auto */
    align-items: center;
    padding: 0 clamp(0.3rem, 1vw, 1.3rem);
    text-align: center; 
    transform: rotate(-4deg);
    transition: transform 1500ms ease-in-out;
    width: fit-content; /* Makes the background only as wide as the content */
    margin-left: auto;
    margin-right: auto;
    z-index: 2;
}

/* Container for links */
#links {
    display: inline-flex;
}

.link {
    cursor: pointer;
    text-decoration: none;
    color: var(--light-color);
}

/* Styling for meta-link elements */
.meta-link {
    align-items: center;
    backdrop-filter: blur(3px);
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    bottom: 10px;
    box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: inline-flex;
    gap: 5px;
    left: 10px;
    margin: 20px;
    padding: 10px 20px;
    text-decoration: none;
    transition: background-color 400ms, border-color 400ms;
    z-index: 1000;
}

/* Hover effect for meta-link elements */
.meta-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Styling for icons and text inside meta-link */
.meta-link > i, .meta-link > span {
    height: 20px;
    line-height: 20px;
}

/* Styling for text inside meta-link */
.meta-link > span {
    color: var(--highlight-color);
    font-weight: 500;
    transition: color 2000ms ease-in-out;
}

/* Styling for text inside meta-link */
.meta-link > span:hover {
    color: var(--light-color);
}

/* Styling for icons inside meta-link */
.meta-link > i {
    color: var(--light-color);
    display: flex;
}

/* Keyframes for rotating animation */
@keyframes rotate {
    from {
        rotate: 0deg;
    }
    50% {
        scale: 1 1.6;
    }
    to {
        rotate: 360deg;
    }
}

/* Styling for the blob element */
#blob {
    height: 40%;
    aspect-ratio: 1;
    position: fixed;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    border-radius: 50%;
    background: linear-gradient(to right, var(--grad-g-color), var(--grad-y-color));
    animation: rotate 12s infinite;
    transition: left 2s ease, top 1s ease;
    opacity: 0.6;
    z-index: -1;
}

/* Styling for the blur effect */
#blur {
    height: 100vh;
    width: 100vw;
    top: 0;
    left: 0;
    position: fixed;
    backdrop-filter: blur(12vmax);
    -webkit-backdrop-filter: blur(12vmax);
}

/* Styling for the profile photo */
.screen {
    width: 360px;
    display: flex;
    border: 3px solid rgb(var(--primary-rgb) / 80%);
    aspect-ratio: 10 / 12;
    border-radius: 1rem;
    background-color: rgb(var(--primary-rgb) / 15%);
    margin: auto;
    overflow: hidden;
    position: relative;
    z-index: 10;
}
  
.screen:after,
.screen:before {
    content: "";
    height: 5px;
    position: absolute;
    z-index: 4;
    left: 50%;
    translate: -50% 0%;
    background-color: var(--grad-o-color);
}
  
.screen:before {
    width: 15%;
    top: 0rem;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
}
  
.screen:after {
    width: 25%;
    bottom: 0rem;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

@keyframes pan-overlay {
    from {
      background-position: 0% 0%;
    }
    
    to {
      background-position: 0% -100%;
    }
}

.screen-overlay {    
    background: linear-gradient(
      rgb(var(--primary-rgb) / 0.15),
      rgb(var(--primary-rgb) / 0.15) 3px,
      transparent 3px,
      transparent 9px
    );
    background-size: 100% 9px;
    height: 100%;
    width: 100%;
    animation: pan-overlay 22s infinite linear;
    position: absolute;
    z-index: 2;
    left: 0px;
    top: 0px;
}

@keyframes pan-image {  
    0% {
      background-position: 36% 42%;
      background-size: 200%;
    }
    
    20% {
      background-position: 30% 35%;
      background-size: 200%;
    }
    
    20.0001% { /* -- View 2 -- */
      background-position: 60% 85%;
      background-size: 500%;
    }
    
    40% {
      background-position: 49% 81%;
      background-size: 500%;
    }
    
    40.0001% { /* -- View 3 -- */
      background-position: 80% 42%;
      background-size: 300%;
    }
    
    60% {
      background-position: 84% 33%;
      background-size: 300%;
    }
    
    60.0001% { /* -- View 4 -- */
      background-position: 0% 0%;
      background-size: 300%;
    }
    
    80% {
      background-position: 15% 4%;
      background-size: 300%;
    }
    
    80.0001% { /* -- View 5 -- */
      background-position: 80% 10%;
      background-size: 300%;
    }
    
    100% {
      background-position: 72% 14%;
      background-size: 300%;
    }
}

.screen > .screen-image {
    background-image: url("/assets/images/redcarpetsquare.jpg");
    height: 100%;
    width: 100%;
    position: absolute;
    z-index: 1;
    left: 0px;
    top: 0px;
    background-size: 300%;
    background-position: 0% 0%;
    filter: sepia(100%) hue-rotate(160deg);
    opacity: 0.6;
    animation: pan-image 15s linear infinite;
}

.screen > .screen-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex-grow: 1;
    gap: 4rem;
    position: relative;
    z-index: 3;
    margin: 1rem;
    padding-bottom: 6rem;
    border: 1px solid rgb(var(--primary-rgb) / 50%);
    border-radius: 0.6rem;
}

.screen > .screen-content > .screen-icon {
    color: var(--light-color);
    font-size: 4rem;
    text-shadow: 0px 0px 0.5rem var(--light-color);
}

@keyframes float {
    0%, 100% {
        transform: translateY(20px);
    }
    50% {
        transform: translateY(-2px);
    }
}

.screen {
    animation: float 12s ease-in-out infinite;
}

header {
    display: flex;
    position: static;
}

/* Styling for the main */
main {
    align-items: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    width: 100%;
    max-height: 100vh;
}
  
/* Articles as pages */
main > article {
    position: absolute;
    opacity: 0;
    filter: blur(20px);
    transition: opacity 1s ease-in-out, filter 0.6s ease;
    visibility: hidden;
}

main > article > .article-section {
    color: var(--light-color);
    display: flex;
    flex-direction: column;
    font-size: clamp(1rem, 1.5vw, 2rem);
    height: auto;
    padding: 2rem;
}

main > article > .article-section > p {
    margin-left: 20%;
}

.article-active {
    opacity: 1;
    filter: blur(0);
    visibility: visible;
}

/* Styling for the menu */
#menu {  
    position:fixed;
    top: 0;
    left: 0;
    z-index: 1;
}

#menu-items {
    margin-left: clamp(1rem, 5vw, 12rem);
    margin-top: clamp(3rem, 15vw, 20rem);
    position: relative;
    transition: opacity 1500ms ease;
    z-index: 2;
}

#menu[data-active-index="0"] > #menu-background-pattern {
    background-position: 0% -20%;
}

#menu[data-active-index="1"] > #menu-background-pattern {
    background-position: 0% -40%;
}

#menu[data-active-index="2"] > #menu-background-pattern {
    background-position: 0% -60%;
}

#menu[data-active-index="3"] > #menu-background-pattern {
    background-position: 0% -80%;
}

#menu[data-active-index="4"] > #menu-background-pattern {
    background-position: 0% -100%;
}
  
#menu-background-pattern {
    background-image: radial-gradient(
        rgba(255, 255, 255, 0.1) 5%, 
        transparent 9%
    );
    background-position: 0% 0%;
    background-size: 7vmin 7vmin;
    height: 100vh;
    left: 0px;
    pointer-events: none;
    position: absolute;
    top: 0px;
    transition: opacity 800ms ease, 
        background-size 800ms ease,
        background-position 800ms ease;
    width: 100vw;
    z-index: 1;
}
  
#menu-items:hover ~ #menu-background-pattern {
    background-size: 11vmin 11vmin;
    opacity: 0.5;
}
  
#menu-items:hover > .menu-item {
    opacity: 0.3;
}
  
#menu-items:hover > .menu-item:hover {
    opacity: 1; 
    font-size: clamp(1.8rem, 3vw, 3rem);
    padding: clamp(0.09rem, 0.15vw, 0.3rem) 0rem;
}

.menu-item {
    color: var(--light-color);
    cursor: pointer;
    display: block;
    font-size: clamp(1.5rem, 2vw, 2rem);
    opacity: 0.1;
    padding: clamp(0.08rem, 0.1vw, 0.2rem) 0rem;
    text-decoration: none;
    transition: opacity 400ms ease-in-out, font-size 800ms ease-in-out;
}

/* Styling for the form */
form {
    display: flex;
    align-items: center;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 1vh;
    padding: 2vh;
}

/* Styling for input fields and textarea */
form input[type="text"],
form input[type="email"],
form textarea {
    width: 100%;
    max-width: 500px;
    margin:auto;
    padding: 0.5rem;
    border: 1px solid var(--light-color);
    border-radius: 5px;
    background-color: var(--back-color);
    color: var(--light-color);
    font-size: 1rem;
}

/* Styling for the submit button */
form button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    background-color: var(--back-color);
    color: var(--light-color);
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 400ms ease-in-out;
}

/* Hover effect for the submit button */
form button:hover {
    background-color: var(--grad-y-color);
    color: var(--back-color);
}

/* Styling for labels */
form label {
    color: var(--light-color);
    font-size: 1rem;
}

/* Styling for Portfolio */
.portfolio {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4vh;
    padding: 4vh;
    margin-left: 20%;
    margin-right: 10%;
}

.card {
    background: var(--light-color);
    border-radius: 10px;
    overflow: hidden;
    margin: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7);
}

.card-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    top:0;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit:cover; 
    top: 0;
}

.tags {
    position: absolute;
    bottom: 0px;
    left: 0;
    right: 0;
    text-align: center;
}

.tag {
    display: inline-block;
    background: var(--light-color);
    color: var(--back-color);
    padding: 5px 10px;
    margin: auto;
    font-size: 0.7em;
    font-weight: 900;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.card-text {
    font-size: 1rem;
    color: var(--back-color);
    padding: 15px;
}

.skill-style {
    color: var(--grad-y-color);
    font-size: 2rem;
}

.upskill-style {
    color: var(--grad-g-color);
    font-size: 1.5rem;
}

/* Additional styles for responsiveness */
@media(max-width: 768px) {
    .screen {
        transform: scale(0.6);
        margin-bottom: 0rem;
    }
    h2 {
        transform: rotate(0deg);
    }
    .portfolio {
        grid-template-columns: 1fr;
        margin-left: 5%;
        margin-right: 5%;
    }
    #menu, .navigation, #hamburger-btn {
        display: none;
    }
    main article {
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        margin: 0 auto;
        width: 90%;
        display: block;
        filter: none;
        margin-bottom: 20px;
        margin-top: 10px;
        opacity: 1;
        visibility: visible;
        position: relative;
    }
    main > article > .article-section > p {
        margin-left: auto;
        margin-right: auto;
        padding: 0 1rem;
    }
}
