/* ============================================
   CYBERPUNK / DARK MODE RESUME STYLESHEET
   Author: Amirreza Amiri
   Theme: Dark / Neon Green & Cyan
   ============================================ */

/* CSS Variables */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-card-hover: #1a1a26;
    --neon-green: #00ff88;
    --neon-green-dim: rgba(0, 255, 136, 0.1);
    --neon-cyan: #00e5ff;
    --neon-cyan-dim: rgba(0, 229, 255, 0.1);
    --neon-purple: #b44aff;
    --text-primary: #e8e8f0;
    --text-secondary: #8888a0;
    --text-dim: #55556a;
    --border-color: rgba(255, 255, 255, 0.06);
    --border-neon: rgba(0, 255, 136, 0.3);
    --font-mono: 'Orbitron', monospace;
    --font-body: 'Vazirmatn', sans-serif;
    --glow-green: 0 0 20px rgba(0, 255, 136, 0.3), 0 0 60px rgba(0, 255, 136, 0.1);
    --glow-cyan: 0 0 20px rgba(0, 229, 255, 0.3), 0 0 60px rgba(0, 229, 255, 0.1);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--neon-green) var(--bg-primary);
}

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

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--neon-green); border-radius: 3px; }

/* Background Effects */
.bg-grid {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -2;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.bg-glow-1 {
    position: fixed;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: float1 15s ease-in-out infinite;
}

.bg-glow-2 {
    position: fixed;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: float2 18s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, 40px); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(40px, -30px); }
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 0;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(0, 255, 136, 0.06);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--neon-green);
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease-out;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--neon-green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-name {
    font-family: var(--font-mono);
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--neon-green) 0%, var(--neon-cyan) 50%, var(--neon-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    position: relative;
}

/* Glitch Effect */
.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch:hover::before {
    opacity: 0.8;
    color: var(--neon-cyan);
    animation: glitch1 0.3s infinite;
    -webkit-text-fill-color: initial;
    z-index: -1;
}

.glitch:hover::after {
    opacity: 0.8;
    color: var(--neon-purple);
    animation: glitch2 0.3s infinite;
    -webkit-text-fill-color: initial;
    z-index: -2;
}

@keyframes glitch1 {
    0% { transform: translate(0); }
    20% { transform: translate(-3px, 3px); }
    40% { transform: translate(-3px, -3px); }
    60% { transform: translate(3px, 3px); }
    80% { transform: translate(3px, -3px); }
    100% { transform: translate(0); }
}

@keyframes glitch2 {
    0% { transform: translate(0); }
    20% { transform: translate(3px, -3px); }
    40% { transform: translate(3px, 3px); }
    60% { transform: translate(-3px, -3px); }
    80% { transform: translate(-3px, 3px); }
    100% { transform: translate(0); }
}

.hero-title {
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 2.5vw, 1.15rem);
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 50px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.title-highlight {
    color: var(--neon-green);
    font-weight: 600;
}

.title-separator {
    color: var(--neon-cyan);
    font-family: var(--font-mono);
    font-weight: 300;
}

/* Terminal */
.hero-terminal {
    width: 100%;
    max-width: 650px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    text-align: left;
    direction: ltr;
    animation: fadeInUp 0.8s ease-out 0.6s both;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
    margin-right: auto;
    margin-left: 12px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.terminal-body {
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 2;
}

.prompt {
    color: var(--neon-green);
    font-weight: bold;
}

.terminal-output {
    color: var(--neon-cyan);
    padding-right: 20px;
    margin-bottom: 8px;
}

.cursor-blink {
    animation: blink 1s step-end infinite;
    color: var(--neon-green);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Scroll Indicator */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-decoration: none;
    animation: fadeInUp 0.8s ease-out 0.8s both;
    transition: color 0.3s;
}

.scroll-indicator:hover {
    color: var(--neon-green);
}

.scroll-indicator svg {
    width: 20px;
    height: 20px;
    animation: bounce 2s ease-in-out infinite;
}

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

/* Sections */
.section {
    padding: 80px 0;
    position: relative;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neon-green);
    border: 1px solid var(--border-neon);
    padding: 4px 12px;
    border-radius: 4px;
}

.section-title {
    font-family: var(--font-mono);
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 700;
    color: var(--text-primary);
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-neon), transparent);
}

/* About */
.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-green), var(--neon-cyan), var(--neon-purple));
}

.about-card:hover {
    border-color: var(--border-neon);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.05);
    transform: translateY(-2px);
}

.about-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    color: var(--neon-green);
}

.about-text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 2;
}

.about-text:last-child {
    margin-bottom: 0;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 36px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.project-card.featured {
    border-color: var(--border-neon);
}

.project-card:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.08);
    transform: translateY(-3px);
}

.project-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    background: rgba(0, 255, 136, 0.06);
    border: 1px solid rgba(0, 255, 136, 0.15);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: var(--neon-green);
    margin-bottom: 20px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--neon-green);
    animation: pulse 2s ease-in-out infinite;
}

.status-dot.active {
    background: var(--neon-cyan);
}

.project-year {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 12px;
}

.project-title {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neon-green);
    margin-bottom: 6px;
}

.project-subtitle {
    font-size: 0.85rem;
    color: var(--neon-cyan);
    margin-bottom: 16px;
    font-family: var(--font-mono);
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.9;
    margin-bottom: 20px;
}

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

.tag {
    padding: 5px 14px;
    background: rgba(0, 229, 255, 0.06);
    border: 1px solid rgba(0, 229, 255, 0.15);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--neon-cyan);
    font-family: var(--font-mono);
}

/* Project Visual */
.project-visual {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Hex Grid Visual */
.hex-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.hex {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 229, 255, 0.1));
    border: 1px solid rgba(0, 255, 136, 0.2);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: hexPulse 3s ease-in-out infinite;
}

.hex:nth-child(2) { animation-delay: 0.3s; }
.hex:nth-child(3) { animation-delay: 0.6s; }
.hex:nth-child(4) { animation-delay: 0.9s; }
.hex:nth-child(5) { animation-delay: 1.2s; }
.hex:nth-child(6) { animation-delay: 1.5s; }
.hex:nth-child(7) { animation-delay: 1.8s; }
.hex:nth-child(8) { animation-delay: 2.1s; }

@keyframes hexPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; background: linear-gradient(135deg, rgba(0, 255, 136, 0.3), rgba(0, 229, 255, 0.3)); }
}

/* Node Network Visual */
.node-network {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.node {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--neon-green);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    animation: nodeGlow 2s ease-in-out infinite;
}

.node-center {
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 18px; height: 18px;
    background: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.6);
}

.node-1 { top: 25%; left: 25%; animation-delay: 0.2s; }
.node-2 { top: 25%; left: 75%; animation-delay: 0.4s; }
.node-3 { top: 60%; left: 20%; animation-delay: 0.6s; }
.node-4 { top: 65%; left: 80%; animation-delay: 0.8s; }
.node-5 { top: 85%; left: 50%; animation-delay: 1s; }

.connections {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    color: var(--neon-green);
}

@keyframes nodeGlow {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Skills */
.skills-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.skill-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 24px;
    transition: all 0.3s ease;
}

.skill-item:hover {
    border-color: var(--border-neon);
    background: var(--bg-card-hover);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.skill-name {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.skill-level {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--neon-green);
}

.skill-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    width: var(--fill);
    background: linear-gradient(90deg, var(--neon-green), var(--neon-cyan));
    border-radius: 3px;
    transition: width 1.5s ease-out;
    position: relative;
}

.skill-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-300%); }
}

/* Education */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.edu-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.edu-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
    opacity: 0;
    transition: opacity 0.3s;
}

.edu-card:hover {
    border-color: rgba(0, 229, 255, 0.3);
    transform: translateY(-3px);
}

.edu-card:hover::after {
    opacity: 1;
}

.edu-icon {
    width: 44px;
    height: 44px;
    color: var(--neon-cyan);
    margin-bottom: 16px;
}

.edu-card h4 {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

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

.edu-location {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 12px;
    background: rgba(0, 229, 255, 0.06);
    border: 1px solid rgba(0, 229, 255, 0.15);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--neon-cyan);
}

.lang-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.lang-item:last-child {
    border-bottom: none;
}

.lang-item span:first-child {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.lang-level {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neon-green);
    padding: 3px 10px;
    background: rgba(0, 255, 136, 0.06);
    border-radius: 100px;
}

/* Contact */
.contact-content {
    text-align: center;
}

.contact-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 2;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.contact-link:hover {
    border-color: var(--neon-green);
    color: var(--neon-green);
    box-shadow: var(--glow-green);
    transform: translateY(-2px);
}

.contact-link svg {
    width: 18px;
    height: 18px;
}

/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    position: relative;
}

.footer-content p {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.footer-tech {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--neon-green);
    letter-spacing: 1px;
}

.footer-grid {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(180deg, transparent, rgba(0, 255, 136, 0.02));
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

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

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .about-card {
        padding: 28px 20px;
    }
    
    .project-card {
        padding: 28px 20px;
    }
    
    .hero-title {
        flex-direction: column;
        gap: 4px;
    }
    
    .title-separator {
        display: none;
    }
    
    .skills-container {
        gap: 16px;
    }
    
    .contact-links {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-link {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .education-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-terminal {
        max-width: 100%;
    }
    
    .terminal-body {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 2rem;
    }
    
    .section-header {
        gap: 10px;
    }
    
    .section-number {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
    
    .project-tags {
        gap: 6px;
    }
    
    .tag {
        font-size: 0.65rem;
        padding: 4px 10px;
    }
}

/* Selection */
::selection {
    background: rgba(0, 255, 136, 0.2);
    color: var(--neon-green);
}

/* Print Styles */
@media print {
    .bg-grid, .bg-glow-1, .bg-glow-2 {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .project-card, .about-card, .edu-card, .skill-item {
        break-inside: avoid;
        border: 1px solid #ddd;
    }
}
