/* ======================================================
   VARIABLES & BASE
====================================================== */
:root {
    --bg-main: #f7f8fa;
    --bg-glass: rgba(255,255,255,0.55);
    --border-glass: rgba(0,0,0,0.08);

    --primary: #111;
    --secondary: #555;
    --accent: #3f51b5;
    --accent-soft: rgba(63,81,181,0.15);

    --success: #4caf50;

    --font-main: 'Rajdhani', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-main), serif;
    color: var(--primary);
    line-height: 1.6;
}

/* ======================================================
   WRAPPER & BACKGROUND
====================================================== */
.portfolio-wrapper {
    position: relative;
    max-width: 1200px;
    margin: auto;
    padding: 20px 10px 10px;
}

.stars-container {
    position: absolute;
    inset: 0;
    z-index: -3;
}

.star {
    position: absolute;
    background: #aaa;
    border-radius: 50%;
    opacity: 0.25;
    animation: twinkle 2.5s infinite alternate;
}

@keyframes twinkle {
    from { opacity: 0.1; }
    to { opacity: 0.25; }
}

.glow-orb {
    position: absolute;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    filter: blur(25px);
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    opacity: 0.25;
    z-index: -2;
    animation: floatOrb 30s infinite alternate ease-in-out;
}

#orb-1 { top: 10%; left: 5%; }
#orb-2 { bottom: 15%; right: 10%; }

@keyframes floatOrb {
    50% { transform: translate(15px, -20px); }
}

/* ======================================================
   HERO
====================================================== */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    margin-bottom: 60px;
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.hero-subtitle {
    font-family: var(--font-code), serif;
    font-size: 0.95rem;
    color: var(--secondary);
    min-height: 1.2em;
}

/* ======================================================
   AVATAR – rond propre, taille x2, sans effet parasite
====================================================== */
.hero-avatar {
    display: flex;
    justify-content: center;
}

/* Anneau + texte */
.avatar-ring {
    width: 450px;
    height: 450px;
    position: relative;
}

/* IMAGE RONDE, STABLE */
.avatar-content img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    image-rendering: auto;

    position: absolute;
    inset: 50%;
    transform: translate(-50%, -50%);

    border: none;
    box-shadow: none;
    transition: none;
}

/* AUCUN HOVER */
.avatar-content img:hover {
    transform: translate(-50%, -50%);
}

/* Texte circulaire */
.rotating-text {
    position: absolute;
    inset: 0;
    font-size: 9px;
    letter-spacing: 2px;
    fill: var(--secondary);
    animation: rotate 28s linear infinite;
    pointer-events: none;
}

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

/* ======================================================
   GLASS WINDOWS
====================================================== */
.window-glass,
.skills-vertical-section,
.card {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
}

/* ======================================================
   TERMINAL
====================================================== */
.terminal {
    background: #0f0f14;
    color: #eee;
    border-radius: 14px;
    padding: 32px;
    font-family: var(--font-code), serif;
    font-size: 13px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.window-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #aaa;
}

.filename {
    font-size: 12px;
}

.dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.red { background: #ef5350; }
.yellow { background: #ffca28; }
.green { background: #66bb6a; }

.t-key { color: #81c784; }
.t-func { color: #64b5f6; }
.t-var { color: #90caf9; }
.t-comment { color: #999; }

/* ======================================================
   BUTTONS
====================================================== */
.btn-neon,
.card-buttons .btn {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-neon:hover,
.card-buttons .btn:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(63,81,181,0.3);
}

.btn-cv {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    transition: 0.25s ease;
    text-decoration: none;
}

.btn-cv:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

/* ======================================================
   SKILLS VERTICALES
====================================================== */
.skills-vertical-section {
    margin: 80px 0;
    padding: 40px 32px;
    border-radius: 20px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.08);
}

.skills-vertical-title {
    text-align: center;
    font-family: var(--font-code), serif;
    font-size: 1rem;
    margin-bottom: 36px;
    color: var(--secondary);
}

.skills-vertical {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    gap: 28px;
}

.skill-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
}

.skill-years {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--accent);
}

.skill-bar-vertical {
    width: 36px;
    height: 130px;
    background: rgba(0,0,0,0.08);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.skill-fill-vertical {
    width: 100%;
    height: 0;
    background: linear-gradient(
        to top,
        var(--accent),
        var(--success)
    );
    border-radius: 8px;
    animation: fillVertical 1.4s ease forwards;
}

@keyframes fillVertical {
    to { height: var(--level); }
}

.skill-name-vertical {
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

/* ======================================================
   PROJECTS
====================================================== */
.projects {
    padding: 100px 0 40px;
}

.projects h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 60px;
}

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

.card {
    padding: 28px;
    border-radius: 20px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    transform-style: preserve-3d;
}

.card img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 16px;
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.card p {
    font-size: 0.95rem;
    color: var(--secondary);
}

/* ======================================================
   SCROLL REVEAL
====================================================== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ======================================================
   TIMELINE CHRONOLOGIQUE
====================================================== */

.timeline {
    position: relative;
    padding: 50px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.timeline h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2rem;
    font-weight: bold;
}

/* Trait central */
.timeline::before {
    content: '';
    position: absolute;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: calc(100% - 140px);
    background-color: #ff6f00;
    z-index: 1;
}

/* ======================================================
   ITEM
====================================================== */

.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 40px;
    box-sizing: border-box;
}

.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.right {
    left: 50%;
    text-align: left;
}

/* ======================================================
   CONTENU
====================================================== */

.timeline-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 2;
}

/* Flèches */
.timeline-item.left .timeline-content::after {
    content: '';
    position: absolute;
    top: 26px;
    right: -10px;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 10px solid #403f3f;
}

.timeline-item.right .timeline-content::after {
    content: '';
    position: absolute;
    top: 26px;
    left: -10px;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid #403f3f;
}

.timeline-date {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ff6f00;
    letter-spacing: 0.5px;
}

/* ======================================================
   RESPONSIVE
====================================================== */

@media screen and (max-width: 768px) {

    .timeline::before {
        left: 20px;
        transform: none;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 70px;
        padding-right: 20px;
        text-align: left !important;
        margin-bottom: 40px;
    }

    .timeline-content::after {
        left: -10px !important;
        right: auto !important;
        border-left: 10px solid #fff !important;
        border-right: none !important;
    }

    .timeline-date {
        position: static;
        margin-top: 6px;
        transform: none;
        text-align: left;
        color: #555;
    }
}
