/*
 * RICCARDO TORTORA - Personal Website
 * Inspired by Cavani Template
 *
 * Design: Fixed border frame, split layout, magic cursor
 * Colors: Light blue-gray background, dark text
 * Typography: Crimson Pro (headings) + Open Sans (body)
 */


/* ============================================
   BASE & RESET
   ============================================ */

html {
    overflow: hidden;
    padding: 0;
    margin: 0;
    height: 100%;
}

body {
    overflow: hidden;
    width: 100%;
    height: 100%;
    font-family: "Crimson Pro", serif;
    font-size: 16px;
    line-height: 1.7;
    font-weight: 400;
    background-color: #f6fbff;
    color: #7d7789;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

*, *::before, *::after {
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    font-family: "Crimson Pro", serif;
    color: #333;
    margin: 0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

svg {
    fill: currentcolor;
    width: 16px;
    height: 16px;
}


/* ============================================
   PRELOADER
   ============================================ */

#preloader {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
}

#preloader::before,
#preloader::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    height: 100%;
    z-index: -1;
    background-color: #000;
    transition: all 0.3s ease 0s;
}

#preloader::after {
    left: auto;
    right: 0;
}

.loader_logo {
    position: relative;
    z-index: 1;
    animation: logoFadeIn 0.8s ease-out forwards;
}

.loader_logo img {
    height: 80px;
    width: auto;
}

@keyframes logoFadeIn {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

/* Preloader hiding animation */
.preloaded .loader_logo {
    animation: logoFadeOut 0.4s ease-in forwards;
}

@keyframes logoFadeOut {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.9); }
}

.preloaded::before,
.preloaded::after {
    animation: preloadedzero 300ms ease-in-out 500ms forwards;
}

@keyframes preloadedzero {
    0% { width: 50%; }
    100% { width: 0%; }
}


/* ============================================
   MAIN WRAPPER
   ============================================ */

.rt_wrap {
    width: 100%;
    min-height: 100vh;
    position: relative;
}


/* ============================================
   FIXED BORDERS - Cavani signature style
   ============================================ */

.rt_border {
    position: fixed;
    background-color: #fff;
    z-index: 10;
}

.rt_border_top {
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
}

.rt_border_bottom {
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
}

.rt_border_left {
    top: 0;
    left: 0;
    bottom: 0;
    width: 70px;
}

.rt_border_right {
    top: 0;
    right: 0;
    bottom: 0;
    width: 70px;
}


/* ============================================
   HEADER
   ============================================ */

.rt_header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background-color: #fff;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 70px;
}

.logo_text {
    font-family: "Crimson Pro", serif;
    font-size: 24px;
    font-weight: 800;
    color: #333;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.logo_img {
    height: 60px;
    width: auto;
    object-fit: contain;
    padding-top: 10px;
}

.nav ul li a {
    font-family: "Crimson Pro", serif;
    font-weight: 500;
    color: #333;
    padding: 10px 20px;
    display: inline-block;
    position: relative;
}

.nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 20px;
    right: 20px;
    height: 2px;
    background-color: #333;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav ul li a:hover::after {
    transform: scaleX(1);
}


/* ============================================
   MAIN CONTENT AREA
   ============================================ */

.rt_main {
    position: fixed;
    top: 70px;
    bottom: 70px;
    left: 70px;
    right: 70px;
    display: flex;
    overflow: hidden;
}


/* ============================================
   LEFT PANEL - Decorative
   ============================================ */

.rt_left_panel {
    width: 40%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.photo_bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.photo_bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(0.85) contrast(1.05);
    animation: kenburns 20s ease-in-out infinite alternate;
}

@keyframes kenburns {
    0% { transform: scale(1); }
    100% { transform: scale(1.03); }
}

/* Subtle overlay for better integration */
.photo_bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(246, 251, 255, 0.1) 0%, rgba(0, 0, 0, 0.15) 100%);
    pointer-events: none;
}


/* ============================================
   RIGHT PANEL - Content
   ============================================ */

.rt_right_panel {
    width: 60%;
    height: 100%;
    display: flex;
    align-items: center;
    background-color: #f6fbff;
}

.content_inner {
    padding: 0 80px;
    width: 100%;
}


/* ============================================
   HERO SECTION
   ============================================ */

.rt_hero {
    margin-bottom: 100px;
}

.rt_hero .name {
    font-size: 58px;
    font-weight: 700;
    /*text-transform: uppercase;*/
    color: #333;
    line-height: 1.1;
    /* margin-bottom: 25px; */
    letter-spacing: -1px;
}

.rt_hero .line {
    display: inline-block;
    width: 70px;
    height: 2px;
    background-color: #333;
    /* margin-bottom: 25px; */
}

.rt_hero .role {
    font-size: 18px;
    font-weight: 300;
    color: #7d7789;
    letter-spacing: 2px;
    margin-bottom: 0 !important;
}

.rt_hero .role span {
    color: #333;
    font-weight: 500;
}

/* Mobile Avatar - Hidden on desktop */
.mobile_avatar {
    display: none;
}

.odcec {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.odcec_logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.odcec_text {
    font-size: 11px;
    color: #999;
    font-weight: 400;
    letter-spacing: 0.3px;
}


/* ============================================
   VENTURES GRID
   ============================================ */

.rt_ventures {
    width: 100%;
    padding-top: 40px;
    position: relative;
}

.rt_ventures::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 1px;
    background-color: rgba(51, 51, 51, 0.15);
}

.ventures_grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.venture_card {
    padding: 30px 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.venture_card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    bottom: -1px;
    background-color: #333;
    transform: translateY(calc(100% + 1px));
    transition: transform 0.3s ease;
    z-index: 0;
}

.venture_card:hover::before {
    transform: translateY(0);
}

.venture_card:hover {
    border-color: #333;
}

.venture_logo {
    max-width: 200px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    position: relative;
    z-index: 1;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.venture_card:hover .venture_logo {
    filter: brightness(0) invert(1);
}

.venture_label {
    font-size: 11px;
    color: #7d7789;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
    margin-top: 5px;
}

.venture_card:hover .venture_label {
    color: #aaa;
}


/* ============================================
   FOOTER
   ============================================ */

.rt_footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background-color: #fff;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 70px;
}

.rt_footer .copyright p {
    font-family: "Crimson Pro", serif;
    font-size: 13px;
    color: #333;
    margin: 0;
}

.rt_footer .social ul {
    display: flex;
    gap: 20px;
}

.rt_footer .social ul li a {
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.rt_footer .social ul li a:hover {
    background-color: #333;
    color: #fff;
}

.social_icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.rt_footer .social ul li a:hover .social_icon {
    opacity: 1;
}

.rt_footer .social ul li a:hover {
    background-color: transparent;
}


/* ============================================
   CONTACT MODAL
   ============================================ */

.contact_modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.contact_modal.active {
    opacity: 1;
    visibility: visible;
}

.modal_overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal_content {
    position: relative;
    background-color: #fff;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.contact_modal.active .modal_content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal_close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #333;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.3s ease;
}

.modal_close:hover {
    color: #999;
}

.modal_content h3 {
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
    font-weight: 400;
    letter-spacing: -0.5px;
}

.form_group {
    margin-bottom: 20px;
    position: relative;
}

.form_group input,
.form_group textarea {
    width: 100%;
    padding: 16px 0 8px;
    border: none;
    border-bottom: 1px solid #ddd;
    font-family: "Crimson Pro", serif;
    font-size: 16px;
    color: #333;
    background: transparent;
    transition: border-color 0.3s ease;
    border-radius: 0;
}

.form_group label {
    position: absolute;
    left: 0;
    top: 16px;
    font-family: "Crimson Pro", serif;
    font-size: 16px;
    color: #999;
    pointer-events: none;
    transition: all 0.25s ease;
}

/* Float label up when input is focused or has content */
.form_group input:focus ~ label,
.form_group input:not(:placeholder-shown) ~ label,
.form_group textarea:focus ~ label,
.form_group textarea:not(:placeholder-shown) ~ label {
    top: -2px;
    font-size: 11px;
    color: #333;
    letter-spacing: 0.5px;
}

.form_group input:focus,
.form_group textarea:focus {
    outline: none;
    border-bottom-color: #333;
}

.form_group textarea {
    resize: none;
}

.form_submit {
    width: 100%;
    padding: 14px;
    background-color: #333;
    color: #fff;
    border: none;
    font-family: "Crimson Pro", serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
    letter-spacing: 1px;
    transition: background-color 0.3s ease;
}

.form_submit:hover {
    background-color: #555;
}

/* Honeypot - hidden from humans, visible to bots */
.form_honey {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* Success message */
.form_success {
    display: none;
    text-align: center;
    padding: 30px 20px;
}

.form_success.active {
    display: block;
}

.form_success .success_icon {
    width: 60px;
    height: 60px;
    border: 2px solid #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: #333;
}

.form_success p {
    font-size: 20px;
    color: #333;
    font-weight: 500;
    margin: 0 0 8px 0;
}

.form_success span {
    font-size: 14px;
    color: #7d7789;
}

/* Hide form when success is shown */
.contact_modal.success #contactForm {
    display: none;
}

.contact_modal.success .modal_content h3 {
    display: none;
}


/* ============================================
   RESPONSIVE - Tablet
   ============================================ */

@media (max-width: 1200px) {
    .rt_border_top,
    .rt_border_bottom { height: 60px; }
    .rt_border_left,
    .rt_border_right { width: 60px; }

    .rt_header,
    .rt_footer {
        height: 60px;
        padding: 0 60px;
    }

    .rt_main {
        top: 60px;
        bottom: 60px;
        left: 60px;
        right: 60px;
    }

    .rt_hero .name {
        font-size: 48px;
    }

    .content_inner {
        padding: 0 50px;
    }

    .rt_left_panel { width: 35%; }
    .rt_right_panel { width: 65%; }
}


/* ============================================
   RESPONSIVE - Mobile
   ============================================ */

@media (max-width: 900px) {
    .mouse-cursor { display: none; }
    #preloader { display: none; }

    .rt_border { display: none; }

    .rt_header {
        padding: 0 24px;
        height: 60px;
    }

    .rt_footer {
        padding: 0 24px;
        height: auto;
        min-height: 50px;
        padding-top: 12px;
        padding-bottom: 12px;
        flex-direction: column;
        gap: 8px;
    }

    .rt_footer .copyright p {
        font-size: 11px;
    }

    .rt_footer .social ul {
        gap: 15px;
    }

    .rt_footer .social ul li a {
        width: 32px;
        height: 32px;
    }

    .rt_main {
        top: 60px;
        bottom: 0;
        left: 0;
        right: 0;
        flex-direction: column;
        overflow-y: auto;
    }

    .rt_left_panel {
        display: none;
    }

    .rt_right_panel {
        width: 100%;
        height: auto;
        min-height: 100%;
        align-items: flex-start;
        padding-top: 0;
        padding-bottom: 100px;
    }

    .content_inner {
        padding: 20px 24px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: calc(100vh - 140px);
    }

    .rt_hero {
        margin-bottom: 30px;
        text-align: center;
    }

    /* Mobile Avatar Styles */
    .mobile_avatar {
        display: block;
        width: 100px;
        height: 100px;
        margin: 0 auto 20px;
        position: relative;
    }

    .mobile_avatar::before {
        content: '';
        position: absolute;
        top: -4px;
        left: -4px;
        right: -4px;
        bottom: -4px;
        border: 1px solid rgba(51, 51, 51, 0.2);
        border-radius: 50%;
    }

    .mobile_avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        border-radius: 50%;
        filter: grayscale(100%) contrast(1.1);
    }

    .rt_hero .name {
        font-size: 32px;
        margin-bottom: 12px;
    }

    .rt_hero .line {
        margin: 0 auto 12px;
    }

    .odcec {
        justify-content: center;
    }

    .rt_hero .line {
        width: 50px;
        height: 2px;
        margin-bottom: 16px;
    }

    /* Ventures divider - centered on mobile */
    .rt_ventures {
        padding-top: 35px;
    }

    .rt_ventures::before {
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
    }

    /* Hide the line under name on mobile */
    .rt_hero .line {
        display: none;
    }

    .rt_hero .role {
        font-size: 14px;
        letter-spacing: 2.8px;
    }

    .odcec {
        margin-top: 12px;
    }

    .odcec_logo {
        width: 16px;
        height: 16px;
    }

    .odcec_text {
        font-size: 10px;
    }

    .ventures_grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .venture_card {
        padding: 20px 15px;
    }

    .venture_logo {
        max-width: 100%;
        max-height: 40px;
    }

    .logo_text {
        font-size: 20px;
    }
}

/* Small phones */
@media (max-width: 400px) {
    .mobile_avatar {
        width: 80px;
        height: 80px;
        margin-bottom: 16px;
    }

    .rt_hero .name {
        font-size: 28px;
    }

    .rt_hero .role {
        font-size: 12px;
        letter-spacing: 1.5px;
    }

    .ventures_grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .venture_card {
        padding: 12px 8px;
    }

    .venture_logo {
        max-height: 30px;
    }

    .content_inner {
        padding: 16px 20px;
    }

    .rt_hero {
        margin-bottom: 20px;
    }

    .rt_ventures {
        padding-top: 30px;
    }

    .rt_ventures::before {
        width: 30px;
    }
}


/* ============================================
   SMALL HEIGHT SCREENS
   ============================================ */

@media (max-height: 700px) {
    .rt_hero .name {
        font-size: 42px;
        margin-bottom: 15px;
    }

    .rt_hero .line {
        margin-bottom: 15px;
    }

    .rt_hero {
        margin-bottom: 30px;
    }

    .venture_card {
        padding: 20px 15px;
    }
}

/* Mobile landscape and very small height */
@media (max-width: 900px) and (max-height: 600px) {
    .mobile_avatar {
        width: 60px;
        height: 60px;
        margin-bottom: 12px;
    }

    .mobile_avatar::before {
        top: -3px;
        left: -3px;
        right: -3px;
        bottom: -3px;
    }

    .rt_hero .name {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .rt_hero .line {
        width: 40px;
        margin-bottom: 8px;
    }

    .rt_hero .role {
        font-size: 11px;
    }

    .rt_hero {
        margin-bottom: 16px;
    }

    .content_inner {
        padding: 12px 20px;
        min-height: calc(100vh - 120px);
    }

    .venture_card {
        padding: 10px 6px;
    }

    .venture_logo {
        max-height: 25px;
    }

    .ventures_grid {
        gap: 6px;
    }

    .odcec {
        margin-top: 6px;
    }

    .odcec_logo {
        width: 12px;
        height: 12px;
    }

    .odcec_text {
        font-size: 8px;
    }

    .rt_ventures {
        padding-top: 20px;
    }

    .rt_ventures::before {
        width: 25px;
    }
}


/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    #preloader {
        display: none;
    }
}

/* Focus states */
a:focus,
button:focus {
    outline: 2px solid #333;
    outline-offset: 3px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .venture_card {
        border-width: 2px;
    }

    .rt_hero .role {
        color: #333;
    }
}
