/*
Theme Name: Mio Tema Personalizzato
Author: Simone Capodivento
Description: Portfolio Hacker-Scientific Emerald Style
Version: 2.0
*/

:root {
    --emerald-100: #d1fae5;
    --emerald-200: #a7f3d0;
    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;
    --emerald-600: #059669;
    --cyan-400: #48DBF1;
    --cyan-600: #0891b2;
    --bg-dark: #0a0f0a;
    --gray-900: #111827;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Share Tech Mono', monospace;
    background-color: var(--bg-dark);
    color: var(--emerald-100);
    overflow-x: hidden;
    letter-spacing: 1px;
    line-height: 1.6;
}

/* ── BACKGROUNDS ── */
.scientific-background {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: linear-gradient(to bottom, #2D3436, #000000);
}

.scientific-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 20% 30%, rgba(72,219,251,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(29,209,161,0.1) 0%, transparent 50%);
    pointer-events: none;
}

#scene-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
}

/* ── TYPOGRAPHY ── */
.scientific-text {
    text-shadow: 0 0 10px rgba(72,219,251,0.5);
    animation: glow 2s ease-in-out infinite alternate;
    letter-spacing: 3px;
    text-transform: uppercase;
}

@keyframes glow {
    from { text-shadow: 0 0 5px rgba(72,219,251,0.5); }
    to   { text-shadow: 0 0 15px rgba(29,209,161,0.8); }
}

.tech-highlight {
    color: var(--cyan-400);
    font-weight: 600;
}

/* ── HEADER ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(10,15,10,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #064e3b;
}

.site-header .logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-header .logo img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 2px solid var(--emerald-400);
    object-fit: cover;
}

.site-header .logo h1 {
    font-size: 1.3rem;
    color: var(--emerald-100);
}

.site-header nav ul {
    display: flex;
    list-style: none;
    gap: 24px;
}

.site-header nav a {
    color: var(--emerald-200);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 2px;
    transition: color 0.3s;
}

.site-header nav a:hover { color: var(--emerald-400); }

/* ── HERO ── */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px 60px;
}

#hero h2 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin-bottom: 20px;
}

#hero p {
    font-size: 1rem;
    letter-spacing: 3px;
    max-width: 600px;
    margin: 8px auto;
    color: var(--emerald-200);
}

.cv-btn {
    display: inline-block;
    margin-top: 32px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--emerald-600), var(--cyan-600));
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    border: 1px solid var(--emerald-400);
    transition: all 0.3s;
    letter-spacing: 1px;
}

.cv-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52,211,153,0.35);
}

.scroll-hint {
    margin-top: 48px;
    animation: bounce 2s infinite;
    color: var(--emerald-400);
    opacity: 0.7;
    font-size: 1.5rem;
    text-decoration: none;
}

.scroll-hint:hover { opacity: 1; }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-12px); }
}

/* ── INTRO BOX ── */
.intro-section {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.intro-box {
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(8px);
    border: 1px solid #065f46;
    border-radius: 10px;
    padding: 28px 32px;
    max-width: 700px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
}

.intro-box img {
    border-radius: 4px;
    flex-shrink: 0;
}

.intro-box p {
    font-size: 0.9rem;
    color: var(--emerald-200);
}

/* ── SECTIONS ── */
.section-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    text-align: center;
    margin-bottom: 48px;
}

/* ── PROJECTS GRID ── */
#projects, .notes-section {
    padding: 60px 40px;
    max-width: 1300px;
    margin: 0 auto;
}

.notes-section {
    background: rgba(17,24,39,0.15);
    backdrop-filter: blur(6px);
    max-width: 100%;
    padding: 60px 40px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

/* ── CARDS ── */
.project-card, .pdf-card {
    background: rgba(17,24,39,0.3);
    border: 1px solid #064e3b;
    border-radius: 12px;
    padding: 24px;
    backdrop-filter: blur(8px);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
    position: relative;
    overflow: hidden;
}

.project-card:hover, .pdf-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 16px 36px rgba(29,209,161,0.3);
    border-color: var(--emerald-400);
}

.card-title {
    font-size: 1.15rem;
    color: var(--cyan-400);
    margin-bottom: 10px;
    font-weight: 600;
}

.card-desc {
    font-size: 0.85rem;
    color: var(--emerald-200);
    margin-bottom: 16px;
    line-height: 1.7;
}

.card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card-img:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 28px rgba(29,209,161,0.25);
}

/* ── PDF CARDS ── */
.pdf-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.pdf-icon {
    font-size: 3rem;
    color: var(--emerald-400);
    margin: 16px 0;
}

.pdf-btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--emerald-600), var(--cyan-600));
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s;
    margin-top: 8px;
    border: none;
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 1px;
}

.pdf-btn:hover {
    background: linear-gradient(135deg, #10b981, #06b6d4);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52,211,153,0.35);
}

.pdf-btn-row {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 8px;
}

.pdf-btn-row .pdf-btn { flex: 1; }

/* ── ABOUT SECTION ── */
.about-section {
    padding: 60px 40px;
    max-width: 800px;
    margin: 0 auto;
}

.about-card {
    background: rgba(6,78,59,0.15);
    border: 1px solid #065f46;
    border-radius: 12px;
    padding: 32px;
    backdrop-filter: blur(8px);
    text-align: center;
}

.accordion-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 14px 18px;
    background: rgba(6,78,59,0.35);
    border: 1px solid #065f46;
    border-radius: 6px;
    color: var(--emerald-100);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.accordion-btn:hover, .accordion-btn.active {
    background: rgba(6,78,59,0.6);
}

.accordion-btn .acc-tag {
    font-size: 0.75rem;
    color: var(--cyan-400);
}

.accordion-panel {
    display: none;
    padding: 12px 18px;
    background: rgba(6,78,59,0.2);
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--emerald-200);
    text-align: left;
}

/* ── CONTACT ── */
#contact {
    padding: 60px 40px;
    text-align: center;
    background: rgba(17,24,39,0.15);
    backdrop-filter: blur(6px);
}

#contact h2 { margin-bottom: 12px; }
#contact p  { color: var(--emerald-200); margin-bottom: 28px; }

.social-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.social-links a {
    color: var(--emerald-200);
    font-size: 1.8rem;
    transition: color 0.3s, transform 0.3s;
    text-decoration: none;
}

.social-links a:hover {
    color: var(--emerald-400);
    transform: scale(1.15);
}

/* ── FOOTER ── */
.site-footer {
    padding: 36px 40px;
    text-align: center;
    border-top: 1px solid #064e3b;
    background: rgba(0,0,0,0.3);
    font-size: 0.8rem;
    color: var(--emerald-400);
}

/* ── COUNTER ── */
.counter {
    position: fixed;
    bottom: 12px;
    left: 12px;
    font-size: 0.8rem;
    opacity: 0.6;
    z-index: 999;
    background: rgba(45,52,54,0.7);
    padding: 5px 12px;
    border-radius: 4px;
    backdrop-filter: blur(5px);
    color: var(--cyan-400);
    transition: opacity 0.3s;
}

.counter:hover { opacity: 1; }

/* ── PARTICLES ── */
.particle {
    position: absolute;
    background: rgba(72,219,251,0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    will-change: transform, opacity;
}

@media (max-height: 700px) { .particle { display: none; } }

/* ── WORDPRESS POSTS ── */
.wp-posts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }

.wp-post-card {
    background: rgba(17,24,39,0.35);
    border: 1px solid #064e3b;
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(8px);
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.wp-post-card:hover {
    border-color: var(--emerald-400);
    transform: translateY(-5px);
    box-shadow: 0 14px 32px rgba(29,209,161,0.25);
}

.wp-post-card img { width: 100%; height: 200px; object-fit: cover; opacity: 0.85; }

.wp-post-body { padding: 24px; }
.wp-post-body h3 { color: var(--emerald-400); font-size: 1.2rem; margin-bottom: 10px; }
.wp-post-body p  { font-size: 0.85rem; color: var(--emerald-200); line-height: 1.7; }

.wp-post-link {
    display: inline-block;
    margin-top: 14px;
    color: var(--cyan-400);
    font-weight: bold;
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.wp-post-link:hover { color: var(--emerald-400); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .site-header { padding: 16px 20px; }
    .site-header nav ul { gap: 14px; }
    #projects, .notes-section, .about-section, #contact { padding: 40px 20px; }
    .intro-box { flex-direction: column; text-align: center; }
}
