/* CSS Reset */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
    display: block;
}

audio,
canvas,
video {
    display: inline-block;
}

audio:not([controls]) {
    display: none;
    height: 0;
}

[hidden] {
    display: none;
}

:root {
    --base-color: #656565;
}

html {
    font-family: sans-serif;
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
}

a:focus {
    outline: thin dotted;
}

a:active,
a:hover {
    outline: 0;
}

h1 {
    font-size: 2em;
    margin: 0.67em 0;
}

abbr[title] {
    border-bottom: 1px dotted;
}

b,
strong {
    font-weight: bold;
}

dfn {
    font-style: italic;
}

hr {
    -moz-box-sizing: content-box;
    box-sizing: content-box;
    height: 0;
}

mark {
    background: #ff0;
    color: #000;
}

code,
kbd,
pre,
samp {
    font-family: monospace, serif;
    font-size: 1em;
}

pre {
    white-space: pre-wrap;
}

q {
    quotes: "\201C" "\201D" "\2018" "\2019";
}

small {
    font-size: 80%;
}

sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sup {
    top: -0.5em;
}

sub {
    bottom: -0.25em;
}

img {
    border: 0;
}

svg:not(:root) {
    overflow: hidden;
}

figure {
    margin: 0;
}

fieldset {
    border: 1px solid #c0c0c0;
    margin: 0 2px;
    padding: 0.35em 0.625em 0.75em;
}

legend {
    border: 0;
    padding: 0;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    margin: 0;
}

button,
input {
    line-height: normal;
}

button,
select {
    text-transform: none;
}

button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
    -webkit-appearance: button;
    cursor: pointer;
}

button[disabled],
html input[disabled] {
    cursor: default;
}

input[type="checkbox"],
input[type="radio"] {
    box-sizing: border-box;
    padding: 0;
}

input[type="search"] {
    -webkit-appearance: textfield;
    -moz-box-sizing: content-box;
    -webkit-box-sizing: content-box;
    box-sizing: content-box;
}

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}

button::-moz-focus-inner,
input::-moz-focus-inner {
    border: 0;
    padding: 0;
}

textarea {
    overflow: auto;
    vertical-align: top;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

body {
    background-color: var(--base-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 20px;
    justify-content: center;
}

nav ul li {
    display: inline;
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-weight: bold;
}

footer {
    text-align: center;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    width: 100%;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.2);
}

/* Main content layout */
main {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    text-align: center;
}

/* Style for the projects grid centered in the screen */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 40px;
    padding: 20px;
    max-width: 900px;
    perspective: 1000px;
    /* Ensure perspective for the 3D effect */
}

/* Style for each project tile */
.project-tile {
    position: relative;
    padding: 20px;
    color: white;
    height: 200px;
    /* Adjust height */
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform-style: preserve-3d;
    /* Preserve 3D effect */
    transition: transform 0.1s ease-out;
    /* Smooth transition for mouse movement */
    will-change: transform;
}

.project-tile::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.project-content {
    z-index: 2;
}

.project-tile h3 {
    margin-bottom: 5px;
    font-size: 1.5em;
}

.project-tile p {
    font-size: 1em;
}

.project-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

.icon {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.icon img {
    width: 40px;
    height: 40px;
}

.about-container {
    background: #fff;
    border-radius: 5px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin: 20px;
    max-width: 800px;
}

.portrait-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.portrait {
    width: 200px;
    height: auto;
    border-radius: 50%;
    display: block;
    margin: 0;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    cursor: grab;

}

.name {
    margin-top: 20px;
    color: black;
    font-size: 1.5em;
    text-align: center;
}

.content {
    font-size: 1em;
    margin: 0;
}


.contact-container {
    position: absolute;
    /* For dragging */
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    /* Padding for content */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    /* Shadow for depth */
    cursor: grab;
}

.contact-container h2,
.contact-container p {
    margin: 0;
}


.box {
    width: 300px;
    height: 300px;
    background: crimson;
    color: white;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
}

.box:hover::after,
.box:hover::before {
    transform: scale(1, 1);
}

.box::after,
.box::before {
    content: '';
    position: absolute;
    top: 0;
    /* Start from the top */
    right: 0;
    /* Align to the right */
    bottom: 0;
    /* Align to the bottom */
    left: 0;
    /* Align to the left */
    transition: all 0.5s;
}

/* Create the vertical lines */
.box::after {
    border-right: 1px solid yellow;
    /* Right border */
    border-left: 1px solid yellow;
    /* Left border */
    transform: scale(1, 0);
    /* Start hidden */
}

/* Create the horizontal lines */
.box::before {
    border-top: 1px solid yellow;
    /* Top border */
    border-bottom: 1px solid yellow;
    /* Bottom border */
    transform: scale(0, 1);
    /* Start hidden */
}

.box:hover::after {
    transform: scale(1, 1);
    /* Show the vertical borders */
}

.box:hover::before {
    transform: scale(1, 1);
    /* Show the horizontal borders */
}

.box:hover::after {
    transition: all 0.5s ease 0s;
    /* No delay */
}

.box:hover::before {
    transition: all 0.5s ease 0.2s;
    /* Slight delay for top/bottom */
}

.button2 {
    background-color: white;
    color: black;
    border: 2px solid black;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;

}

.button3 {
    background-color: rgb(3, 221, 255);
    color: black;
    border: 2px solid black;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;

}

.button4 {
    background-color: rgb(66, 66, 66);
    color: rgb(255, 255, 255);
    border: 2px solid rgb(0, 0, 0);
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;

}

.buttonV {
    background-color: rgb(34, 0, 255);
    color: rgb(255, 255, 255);
    border: 2px solid rgb(0, 0, 0);
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;

}

.buttonC {
    background-color: rgb(225, 218, 8);
    color: rgb(0, 0, 0);
    border: 2px solid rgb(0, 0, 0);
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;

}

.buttonF {
    background-color: #5abaff;
    color: rgb(0, 0, 0);
    border: 2px solid rgb(0, 0, 0);
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;

}

.button9 {
    background-color: #08f840;
    color: rgb(0, 0, 0);
    border: 2px solid rgb(0, 0, 0);
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
}

.buttonQ {
    background-color: rgb(41, 201, 139);
    color: rgb(0, 0, 0);
    border: 2px solid rgb(0, 0, 0);
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;

}

.buttonO {
    background-color: rgb(253, 8, 200);
    color: rgb(255, 255, 255);
    border: 2px solid rgb(0, 0, 0);
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;

}

.buttonP {
    background-color: #ff6200;
    color: #FFFFFF;
    border: 2px solid #000000;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
}

.buttonR {
    background-color: #ff0000;
    color: #FFFFFF;
    border: 2px solid #000000;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
}

.buttonGreen {
    background-color: #04581c;
    color: #FFFFFF;
    border: 2px solid #000000;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
}

/* Fade-in from top to bottom */
.fade-in {
    opacity: 0;
    transform: translateY(-10px);
    /* Start slightly above the view */
    animation: fadeInEffect 1s ease-out forwards;
}


@keyframes fadeInEffect {
    to {
        opacity: 1;
        transform: translateY(0);

    }
}

.background {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    margin: 0;
}

.bg-page1 {
    background-color: #0026be;
}

.bg-page2 {
    background-color: #abb918;
}

.bg-page3 {
    background-color: #07f7ff;
}

.bg-page4 {
    background-color: #d408a1;
}

.bg-page5 {
    background-color: #03c989;
}

.bg-page6 {
    background-color: #ff6200;
}

.bg-page7 {
    background-color: #a80000;
}

.bg-page8 {
    background-color: #023a12;
}

.views-container {
    margin-left: auto;
    padding-right: 10px;
}

#views img {
    width: 140px;
    height: auto;
}

.gradient {
    background: linear-gradient(to bottom, #06d8e7, #039f41);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}