/*
* Modern Stylesheet — Madalin Cazan Portfolio
* Ultra-Modern Premium Dark Theme cu Glassmorphism & Gradients
*/

/* ====== Variables ====== */
:root {
    --bg-primary: #050505;
    --bg-secondary: #0a0a0c;
    --bg-card: #111114;
    --border: #222225;
    --border-hover: rgba(139, 92, 246, 0.4);
    
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    /* Modern Accent Colors (Blue to Purple) */
    --accent: #3b82f6;
    --accent-bright: #60a5fa;
    --accent-purple: #8b5cf6;
    --accent-glow: rgba(59, 130, 246, 0.2);
    --accent-glow-strong: rgba(139, 92, 246, 0.4);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--accent), var(--accent-purple));
    --gradient-text: linear-gradient(to right, #60a5fa, #a78bfa);

    /* Legacy names (pentru a pastra compatibilitatea cu restul paginilor) */
    --primary-color: var(--bg-primary);
    --secondary-color: var(--accent);
    --accent-color: var(--accent-bright);
    --light-color: var(--text-primary);
    --dark-color: var(--bg-primary);
    --gray-color: var(--text-secondary);

    --header-height: 75px;
    --font-sans: 'Poppins', sans-serif;
    --transition-speed: 0.4s;
    --box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
    --border-radius: 16px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-sans);
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

/* Custom Scrollbar Modern */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

section {
    padding: 100px 0;
}

a {
    text-decoration: none;
    color: var(--accent);
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--accent-bright);
}

img {
    max-width: 100%;
    height: auto;
    border-radius: calc(var(--border-radius) - 4px);
}

/* ====== Typography ====== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1.2rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* ====== Buttons (Redesigned) ====== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    border-radius: 30px; /* Modern Pill Shape */
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff !important;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px var(--accent-glow-strong);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--text-secondary);
    transform: translateY(-3px);
}

/* ====== Header & Navigation (Glassmorphism) ====== */
.main-header {
    background-color: rgba(5, 5, 5, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    border-bottom: 1px solid transparent;
    z-index: 1000;
    transition: all 0.3s;
}

.main-header.scrolled {
    border-bottom: 1px solid var(--border);
    background-color: rgba(5, 5, 5, 0.8);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s;
}

.logo:hover {
    border-color: var(--accent-purple);
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 0 15px var(--accent-glow);
}

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

.header-nav a {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.95rem;
    position: relative;
    padding: 5px 0;
}

.header-nav a:hover,
.header-nav a.active {
    color: var(--text-primary);
}

/* Indicator animat pentru meniu */
.header-nav a::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: var(--accent-bright);
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px var(--accent-bright);
}

.header-nav a:hover::after,
.header-nav a.active::after {
    transform: translateX(-50%) scale(1);
}

.header-social {
    display: flex;
    gap: 12px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--bg-card);
    color: var(--text-secondary);
    border-radius: 50%; /* Circular social links */
    font-size: 1.1rem;
    border: 1px solid var(--border);
}

.social-links a:hover {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
    transform: translateY(-3px) rotate(8deg);
    box-shadow: 0 5px 15px var(--accent-glow);
}

.mobile-nav-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* ====== Hero Section ====== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

/* Ambient Background Glow */
.hero::before {
    content: '';
    position: absolute;
    top: -10%; left: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0; right: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    width: 100%;
    z-index: 1;
}

.hero-text {
    flex: 1;
    max-width: 650px;
}

.hero-greeting {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
}

.hero h1 {
    font-size: 4.2rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    line-height: 1.1;
}

.hero-role {
    font-size: 1.3rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 25px;
}

.hero-bio {
    font-size: 1.05rem;
    max-width: 550px;
    line-height: 1.8;
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.hero-meta {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.hero-meta span, .hero-meta a {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-meta i {
    color: var(--accent-purple);
}

.hero-image {
    flex-shrink: 0;
    position: relative;
}

.hero-avatar-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    padding: 6px;
    background: var(--gradient-primary);
    box-shadow: 0 0 40px var(--accent-glow-strong);
}

/* Efect de rotatie pentru border-ul avatarului */
.hero-avatar-wrapper::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: conic-gradient(transparent, var(--accent), var(--accent-purple), transparent 30%);
    animation: rotate 4s linear infinite;
    z-index: -1;
}

.hero-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-primary);
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

/* ====== Section Titles ====== */
.section-title {
    text-align: center;
    margin-bottom: 70px;
}

.section-title h2 {
    display: inline-block;
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 4px;
}

/* ====== About Section ====== */
.about {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.about-text h3 {
    color: var(--text-primary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.skill-tag {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.skill-tag:hover {
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--accent-bright);
    border-color: var(--accent-purple);
    transform: translateY(-2px);
}

.hobbies li {
    padding-left: 35px;
    position: relative;
    margin-bottom: 15px;
}

.hobbies li i {
    position: absolute;
    left: 0;
    top: 5px;
    color: var(--accent);
}

/* ====== Experience Section ====== */
.experience-container {
    display: flex;
    gap: 60px;
}

.experience-column {
    flex: 1;
}

.column-title {
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.column-title i {
    color: var(--accent-purple);
}

.exp-timeline {
    border-left: 1px solid var(--border);
    padding-left: 30px;
}

.exp-item {
    position: relative;
    margin-bottom: 45px;
}

.exp-dot {
    position: absolute;
    left: -36px;
    top: 5px;
    width: 13px;
    height: 13px;
    background: var(--gradient-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-glow-strong);
}

.exp-date {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.exp-content h4 {
    margin-bottom: 5px;
}

.exp-place {
    color: var(--accent-bright);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* ====== Projects Section ====== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px var(--accent-glow);
}

.project-img {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0;
}

.project-card:hover .project-img img {
    transform: scale(1.08);
}

.project-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.project-tag {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    border: 1px solid var(--border);
}

.project-links {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 20px;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

.project-link:hover i {
    transform: translateX(3px);
}
.project-link i {
    transition: transform 0.3s;
}

/* ====== Contact Section ====== */
.contact {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--bg-card);
    padding: 50px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    text-align: center;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--accent-bright);
}

/* ====== Footer ====== */
.main-footer {
    background-color: var(--bg-primary);
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ====== Responsive ====== */
@media (max-width: 991px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        margin-top: 40px;
    }
    .hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .experience-container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; }
    
    .mobile-nav-toggle { display: block; }
    
    .header-nav {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: rgba(5,5,5,0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .header-nav.active { right: 0; }
    .header-nav ul { flex-direction: column; align-items: center; gap: 30px; }
    .header-nav a { font-size: 1.2rem; }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}
