/*
Style Sheet for guillemaud.me
Author: Thomas GUILLEMAUD
Email: guillemaud.thomas@gmail.me
Website: https://guillemaud.me
*/

/* Theme Variables */
:root {
    --background-color: #1e1e2f;
    --container-background: #2c2c3a;
    --text-color: #e0e0e0;
    --link-color: #8ab4f8;
    --footer-text-color: #a1a1b5;
}

[data-theme="light"] {
    --background-color: #ffffff;
    --container-background: #f0f0f0;
    --text-color: #000000;
    --link-color: #1a0dab;
    --footer-text-color: #555555;
}

/* Base Styles & Typography */
html {
    font-size: 62.5%;
    height: 100%;
}

body {
    margin: 0;
    padding: 2% 0;
    font-size: 1.6rem;
    line-height: 1.8;
    font-weight: 300;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
}

/* Container */
.container {
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    margin: 2% auto;
    padding: 2%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--container-background);
    position: relative;
}

/* Theme Toggle Button */
#theme-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
}

#theme-icon {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: var(--link-color);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Animation for Theme Icon */
.sun-icon .sun,
.sun-icon .sun-rays {
    opacity: 1;
    transform: rotate(0deg);
    transition: opacity 0.3s ease, transform 0.5s ease;
}

.sun-icon .moon {
    opacity: 0;
    transform: rotate(45deg);
    transition: opacity 0.3s ease, transform 0.5s ease;
}

.moon-icon .sun,
.moon-icon .sun-rays {
    opacity: 0;
    transform: rotate(-45deg);
    transition: opacity 0.3s ease, transform 0.5s ease;
}

.moon-icon .moon {
    opacity: 1;
    transform: rotate(0deg);
    transition: opacity 0.3s ease, transform 0.5s ease;
}

/* Headings */
h1,
h2 {
    color: var(--text-color);
    text-transform: uppercase;
    text-align: center;
}

h1 {
    font-size: 4rem;
    line-height: 1.2;
    letter-spacing: -0.1rem;
    margin-top: 2%;
    margin-bottom: 20px;
}

h2 {
    margin-top: 0;
    font-size: 2rem;
    line-height: 1.1;
    letter-spacing: -0.08rem;
    margin-bottom: 20px;
}

/* Paragraphs */
p {
    margin-top: 0;
    margin-bottom: 1.5em;
    color: var(--text-color);
}

/* Links */
a {
    color: var(--link-color);
    position: relative;
    text-decoration: none;
    font-weight: 500;
    padding: 0.2rem 0.4rem;
    transition: color 0.3s ease;
}

a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background: var(--link-color);
    transition: transform 0.3s ease;
    transform: scaleX(0);
    transform-origin: right;
}

a:hover {
    color: var(--text-color);
    background-color: rgba(138, 180, 248, 0.2);
    border-radius: 4px;
}

a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Avatar */
.image-cropper {
    position: relative;
    width: 100px;
    height: 100px;
    overflow: hidden;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 2px solid var(--link-color);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-cropper:hover {
    border-color: #b6d4ff;
    box-shadow: 0 0 8px 4px rgba(138, 180, 248, 0.5);
}

.image-cropper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Centering Header Content */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Footer Section */
footer {
    margin-top: 40px;
    text-align: center;
    width: 100%;
    color: var(--footer-text-color);
}

/* Responsive Design */
@media (max-width: 600px) {
    body {
        padding: 5%;
    }
    h1 {
        font-size: 3rem;
    }
    h2 {
        font-size: 1.8rem;
    }
}
