/*
Theme Name: SISR Terminal
Theme URI: https://hrousseau.fr
Author: Rousseau
Description: Thème portfolio one-page style terminal/hacker pour étudiant BTS SIO option SISR. Modifiez les infos directement dans front-page.php (nom, compétences, projets, contact).
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sisr-terminal
*/

/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
    --bg: #05070a;
    --bg-panel: #0a0f0d;
    --bg-panel-alt: #0d1410;
    --border: #1c2b22;
    --green: #39ff88;
    --green-dim: #1fae5a;
    --green-soft: rgba(57, 255, 136, 0.12);
    --text: #c9f7d8;
    --text-dim: #6f8c7a;
    --amber: #ffb454;
    --red: #ff5f56;
    --yellow: #ffbd2e;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background-color: var(--bg);
    background-image:
        linear-gradient(rgba(57,255,136,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(57,255,136,0.035) 1px, transparent 1px);
    background-size: 34px 34px;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 16px;
    line-height: 1.6;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { font-family: var(--font-mono); font-weight: 700; margin: 0 0 1rem; }

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

section { padding: 90px 0; border-bottom: 1px dashed var(--border); }
section:last-of-type { border-bottom: none; }

.section-title {
    font-size: 1.6rem;
    color: var(--green);
    margin-bottom: 8px;
}
.section-title::before { content: "## "; color: var(--text-dim); }

.section-subtitle {
    color: var(--text-dim);
    margin-bottom: 40px;
    font-size: 0.95rem;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--green-dim); border-radius: 5px; }

/* ==========================================================================
   2. TERMINAL WINDOW COMPONENT
   ========================================================================== */
.terminal-window {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(57,255,136,0.03);
    overflow: hidden;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-panel-alt);
    border-bottom: 1px solid var(--border);
}
.terminal-dot { width: 11px; height: 11px; border-radius: 50%; }
.terminal-dot.red { background: var(--red); }
.terminal-dot.yellow { background: var(--yellow); }
.terminal-dot.green { background: var(--green-dim); }
.terminal-bar-title {
    margin-left: 10px;
    color: var(--text-dim);
    font-size: 0.8rem;
}

.terminal-body { padding: 24px 28px; }

.prompt { color: var(--green); }
.prompt::before { content: "$ "; color: var(--text-dim); }

.cursor {
    display: inline-block;
    width: 9px;
    height: 1.1em;
    background: var(--green);
    margin-left: 4px;
    vertical-align: text-bottom;
    animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ==========================================================================
   3. HEADER / NAV
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(5, 7, 10, 0.85);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo {
    color: var(--green);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
}
.logo .dim { color: var(--text-dim); }

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 28px;
    margin: 0; padding: 0;
}
.main-nav a {
    color: var(--text);
    font-size: 0.9rem;
}
.main-nav a::before { content: "~/"; color: var(--text-dim); }
.main-nav a:hover { color: var(--green); text-decoration: none; }

.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--green); font-family: var(--font-mono); padding: 8px 12px; border-radius: 4px; cursor: pointer; }

@media (max-width: 760px) {
    .nav-toggle { display: block; }
    .main-nav {
        position: fixed;
        top: 64px; left: 0; right: 0;
        background: var(--bg-panel);
        border-bottom: 1px solid var(--border);
        display: none;
        padding: 12px 24px 24px;
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: 16px; }
}

/* ==========================================================================
   4. HERO
   ========================================================================== */
.hero { padding: 170px 0 100px; border-bottom: 1px dashed var(--border); }
.hero .terminal-window { max-width: 720px; }
.hero-greeting { color: var(--text-dim); }
.hero-name { color: var(--green); font-size: 1.4rem; margin: 6px 0 2px; }
.hero-role { color: var(--amber); margin-bottom: 18px; }
.hero-typed { min-height: 1.6em; color: var(--text); }
.hero-tags { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
    border: 1px solid var(--green-dim);
    color: var(--green);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--green-soft);
}
.hero-cta { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
    font-family: var(--font-mono);
    display: inline-block;
    padding: 12px 22px;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid var(--green-dim);
    cursor: pointer;
}
.btn-primary { background: var(--green); color: #04150b; font-weight: 700; }
.btn-primary:hover { background: #55ff9c; text-decoration: none; }
.btn-ghost { color: var(--green); background: transparent; }
.btn-ghost:hover { background: var(--green-soft); text-decoration: none; }

/* ==========================================================================
   5. ABOUT
   ========================================================================== */
.about-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: start; }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } }
.about-text p { margin: 0 0 14px; color: var(--text); }
.about-text .comment { color: var(--text-dim); }
.about-facts { list-style: none; margin: 0; padding: 0; }
.about-facts li {
    display: flex; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px dashed var(--border);
    font-size: 0.9rem;
}
.about-facts span:first-child { color: var(--text-dim); }
.about-facts span:last-child { color: var(--green); }

/* ==========================================================================
   6. SKILLS
   ========================================================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
@media (max-width: 700px) { .skills-grid { grid-template-columns: 1fr; } }

.skill-pkg {
    border: 1px solid var(--border);
    background: var(--bg-panel);
    border-radius: 6px;
    padding: 16px 18px;
}
.skill-pkg-head {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 10px;
}
.skill-pkg-name { color: var(--green); font-size: 0.95rem; }
.skill-pkg-name::before { content: "pkg: "; color: var(--text-dim); }
.skill-pkg-level { color: var(--text-dim); font-size: 0.8rem; }

.progress-bar {
    height: 8px;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--green-dim), var(--green));
}

.skills-category {
    color: var(--text-dim);
    font-size: 0.8rem;
    margin: 36px 0 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.skills-category:first-child { margin-top: 0; }

/* ==========================================================================
   7. PROJECTS
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
}
.project-card {
    border: 1px solid var(--border);
    background: var(--bg-panel);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.project-card:hover { border-color: var(--green-dim); transform: translateY(-3px); }
.project-thumb {
    height: 150px;
    background: var(--bg-panel-alt);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-dim);
    font-size: 0.8rem;
    border-bottom: 1px solid var(--border);
}
.project-body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; }
.project-name { color: var(--green); font-size: 1rem; margin-bottom: 6px; }
.project-name::before { content: "> "; color: var(--text-dim); }
.project-desc { color: var(--text); font-size: 0.88rem; flex: 1; margin-bottom: 14px; }
.project-stack { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.project-stack span {
    font-size: 0.7rem; color: var(--amber);
    border: 1px solid rgba(255,180,84,0.3);
    padding: 2px 8px; border-radius: 3px;
}
.project-links a { font-size: 0.82rem; margin-right: 16px; }

/* ==========================================================================
   8. CONTACT
   ========================================================================== */
.contact-window { max-width: 640px; }
.contact-line { margin-bottom: 10px; }
.contact-line .cmd { color: var(--text-dim); }
.contact-line .out { color: var(--text); }
.contact-line a.out { color: var(--green); }
.contact-list { list-style: none; padding: 0; margin: 22px 0 0; }
.contact-list li { margin-bottom: 10px; }
.contact-list a {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--text);
    font-size: 0.92rem;
}
.contact-list a:hover { color: var(--green); }

/* ==========================================================================
   9. FOOTER
   ========================================================================== */
.site-footer {
    padding: 30px 0;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
}
.site-footer .prompt::before { content: ""; }

/* ==========================================================================
   10. BLOG FALLBACK (index.php / page.php / single.php)
   ========================================================================== */
.page-content { padding: 150px 0 100px; }
.entry-title { color: var(--green); font-size: 1.6rem; }
.entry-meta { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 24px; }
.entry-content { color: var(--text); }
.entry-content a { text-decoration: underline; }
.post-item { margin-bottom: 50px; padding-bottom: 50px; border-bottom: 1px dashed var(--border); }
