:root{ 
  --text-color: #f0f0f0;
  --background-color:#141414; 
  --light-gray-background: #292929;
  --highlight-color: #c9a34d;  
  --highlight-color-dark: #B8860B;
}
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

a {
    text-decoration: none;
    color: var(--highlight-color-dark)
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--background-color);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background-color: var(--background-color);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}


.nav-logo span {
    font-size: 18px;
    font-weight: bold;
    /* color: #2c3e50; */
    color: var(--text-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--highlight-color)
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    /* background: #3498db; */
    background-color: var(--highlight-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    /* background: #333; */
    background-color: var(--text-color);
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: url(./hero_pic_bologna2.jpg) no-repeat center center;
    background-size: cover;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>'); */
    /* opacity: 0.1; */
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: bold;
    margin-bottom: 30px;
    line-height: 1.1;
    color: var(--highlight-color);
}

.hero-title .line {
    display: block;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s ease forwards;
}

.hero-title .line:nth-child(2) {
    animation-delay: 0.2s;
}

.hero-title .line:nth-child(3) {
    animation-delay: 0.4s;
}

.hero-quote {
    font-size: 1.2rem;
    font-style: italic;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.8s;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) rotate(45deg) translateY(0);
    }
    40% {
        transform: translateX(-50%) rotate(45deg) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) rotate(45deg) translateY(-5px);
    }
}

/* Sections */
.section {
    padding: 100px 0;
    color: var(--text-color);
    background-color: var(--background-color);
    border-top: 2px solid var(--highlight-color);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    color: var(--highlight-color);
}

.subsection-title {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 60px;
    font-weight: normal;
}

/* Chi Sono Section */
.chi-sono-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: start;
    margin-top: 60px;
}

.text-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
}

.quote-box {
    /* background: #292929; */
    background-color: var(--light-gray-background);
    padding: 30px;
    border-left: 4px solid var(--highlight-color);
    margin-top: 30px;
    font-style: italic;
}

.quote-box p {
    margin-bottom: 15px;
}

.image-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.photo-placeholder {
    text-align: center;
    color: #7f8c8d;
    font-weight: bold;
    transition: all 0.3s ease;
    overflow: hidden;
}

.caption {
    font-size: 0.9rem;
    color: #7f8c8d;
    text-align: center;
    font-style: italic;
    margin-top: 10px;
}

/* CV Section */
.cv-section {
    background-color: var(--background-color);
    color: var(--text-color);
}

.cv-timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.cv-timeline::before {
    content: '';
    position: absolute;
    left: 120px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--text-color);
}

.cv-item {
    display: flex;
    margin-bottom: 50px;
    position: relative;
}

.cv-item::before {
    content: '';
    position: absolute;
    left: 111px;
    top: 10px;
    width: 20px;
    height: 20px;
    background: var(--text-color);
    border-radius: 50%;
}

.cv-year {
    width: 100px;
    font-weight: bold;
    /* color: #3374b4; */
    color: var(--text-color);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.cv-content {
    margin-left: 50px;
    flex: 1;
}

.cv-content h4 {
    font-size: 1.3rem;
    /* color: #3374b4; */
    color: var(--highlight-color);
    margin-bottom: 10px;
}

.cv-content p {
    line-height: 1.6;
}

/* Portfolio Section */
.portfolio-subtitle {
    text-align: center;
    font-style: italic;
    margin-bottom: 60px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.portfolio-item {
    background-color: var(--light-gray-background);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.portfolio-image {
    height: 200px;
    background: #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

.image-placeholder {
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.portfolio-item:hover .image-placeholder {
    background: rgba(52, 152, 219, 0.1);
}

.portfolio-content {
    padding: 30px;
}

.portfolio-content h4 {
    font-size: 1.3rem;
    color: var(--highlight-color);
    margin-bottom: 15px;
}

.portfolio-content p {
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Servizi Section */
.servizi-section {
}

.servizi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.servizio-item {
    background-color: var(--light-gray-background);
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-top: 4px solid var(--highlight-color);
}

.servizio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.servizio-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.servizio-item h4 {
    font-size: 1.2rem;
    /* color: #2c3e50; */
    color: var(--highlight-color);
    margin-bottom: 15px;
    line-height: 1.3;
}

.servizio-item p {
    line-height: 1.6;
    /* color: #555; */
    font-size: 0.95rem;
}

/* Contatti Section */
.contatti-subtitle {
    text-align: center;
    font-size: 1.1rem;
    /* color: #555; */
    margin-bottom: 60px;
}

.contatti-content {
    max-width: 800px;
    margin: 0 auto;
}

.contatti-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    background-color: var(--light-gray-background);
    border-radius: 8px;
    border-left: 4px solid var(--highlight-color);
}

.info-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.info-text h4 {
    font-size: 1.2rem;
    color: var(--highlight-color);
    margin-bottom: 8px;
}

.info-text p {
    line-height: 1.5;
}

.contact-cta {
    text-align: center;
    padding: 40px;
    background: linear-gradient(to right, #DAA520, #8B4513);
    color: white;
    border-radius: 8px;
}

.contact-cta p {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Footer */
.footer {
    background-color: var(--light-gray-background);
    color: white;
    padding: 30px 0;
    text-align: center;
}

/* Animations */
.section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  img {
    max-width: 90vw;
  }


    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--background-color);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 50px;
        transition: left 0.3s ease;
        gap: 40px;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-quote {
        font-size: 1rem;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .subsection-title {
        font-size: 1.3rem;
    }

    .chi-sono-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .cv-timeline::before {
        left: 20px;
    }

    .cv-item::before {
        top: -21px;
        left: -21px;
    }

    .cv-item {
        flex-direction: column;
        margin-left: 50px;
        gap: 10px;
    }

    .cv-year {
        font-size: 1rem;
        width: auto;
    }

    .cv-content {
        margin-left: 0;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .servizi-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contatti-info {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .info-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .nav-container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-quote {
        font-size: 0.9rem;
    }

    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .portfolio-content,
    .servizio-item {
        padding: 20px;
    }

    .cv-item {
        margin-left: 30px;
    }

    .quote-box,
    .info-item {
        padding: 20px;
    }
}

/* Smooth transitions for all interactive elements */
* {
    transition: color 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}

/* Focus states for accessibility */
.nav-link:focus,
.hamburger:focus {
    outline: 2px solid var(--highlight-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .hamburger,
    .scroll-indicator {
        display: none;
    }
    
    .section {
        page-break-inside: avoid;
        padding: 20px 0;
    }
    
    .hero {
        height: auto;
        padding: 40px 0;
        background: none;
        color: #333;
    }
}