@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

:root {
    --bg-color: #000;
    --text-color: #e0e0e0;
    --accent-color: #d29546;
    --separator-color: #333;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    color: var(--text-color);
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: -2;
}

.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url('img/bg_content.png');
    background-size: contain;
    background-position: left bottom;
    background-repeat: no-repeat;
    /* opacity: 0.03; <-- This is unreliable */
}

.background-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    opacity: 0.85;
}

.vcard {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 10vh clamp(1rem, 6vw, 2.5rem) 0;
}

.flip-card {
    background: transparent;
    width: 100%;
    max-width: 480px;
    perspective: 1200px;
    min-width: 0;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    min-height: 340px;
    transition: transform 0.8s cubic-bezier(.86,0,.07,1);
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    min-height: 340px;
    backface-visibility: hidden;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s, visibility 0.3s;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.flip-card.flipped .flip-card-front {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.flip-card:not(.flipped) .flip-card-back {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.flip-card.flipped .flip-card-back {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.flip-card-front i.fa-solid {
    margin-right: 0.5em;
}

.contact-form button[type="submit"] i.fa-solid {
    margin-right: 0.5em;
}

.contact-form button.back-to-front i.fa-solid {
    margin-right: 0.2em;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.4em;
    width: 90%;
    max-width: 350px;
    margin: 0 auto;
    color: #fff;
}
.contact-form label {
    font-size: clamp(0.85rem, 2vw, 1rem);
    margin-bottom: 0.05em;
    text-align: left;
}
.contact-form input,
.contact-form textarea {
    padding: 0.35em 0.6em;
    border-radius: 5px;
    border: none;
    font-size: 0.97em;
    background: #181818;
    color: #fff;
    resize: none;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: 2px solid var(--accent-color);
}
.contact-form button[type="submit"] {
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 0.45em 1em;
    font-size: 0.97em;
    font-weight: 600;
    margin-top: 0.3em;
    cursor: pointer;
    transition: background 0.2s;
}
.contact-form button[type="submit"]:hover {
    background: #b07d36;
}
.contact-form button.back-to-front {
    background: none;
    color: #fff;
    border: none;
    margin-top: 0.1em;
    font-size: 0.92em;
    cursor: pointer;
    text-decoration: underline;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.contact-form button.back-to-front:hover {
    opacity: 1;
}

.content-wrapper {
    text-align: center;
    max-width: 480px;
    min-width: 0;
    width: 100%;
    margin: 0 auto;
}

.name {
    font-size: clamp(1.1rem, 6vw, 2.5rem);
    font-weight: 600;
    margin: 0 0 clamp(0.2rem, 1vw, 0.5rem) 0;
    color: var(--text-color);
    word-break: break-word;
}

.title {
    font-size: clamp(0.9rem, 3vw, 1.2rem);
    font-weight: 300;
    margin: 0 0 clamp(1rem, 2vw, 1.5rem) 0;
    color: var(--text-color);
    opacity: 0.8;
}

.separator {
    width: clamp(40px, 20vw, 80px);
    height: 2px;
    background-color: var(--accent-color);
    margin: 0 auto clamp(1rem, 2vw, 1.5rem) auto;
    border-radius: 1px;
}

.contact-info p {
    margin: clamp(0.3rem, 1vw, 0.7rem) 0;
    font-size: clamp(0.8rem, 2.5vw, 1.1rem);
    word-break: break-word;
}

.contact-info a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 400;
    font-size: inherit;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    word-break: break-all;
}

.contact-info a:hover {
    color: var(--accent-color);
    text-shadow: 0 0 5px var(--accent-color);
}

/* @keyframes fadeIn is handled by AOS */

@media (max-width: 600px) {
    .flip-card-inner, .flip-card-front, .flip-card-back {
        min-height: 420px;
    }
    .contact-form {
        max-width: 98vw;
    }
    .content-wrapper {
        max-width: 98vw;
        padding: 0 2vw;
    }
    .vcard {
        padding: 10vh clamp(0.5rem, 2vw, 1.5rem) 0;
    }
}

.flip-card-back {
    transform: rotateY(180deg);
    z-index: 3;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.25);
    border-radius: 18px;
}
.flip-card-back > .contact-form {
    /* transform: rotateY(180deg); */
    width: 100%;
} 