/* Modern Portfolio - Version 4.0 */

* {
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --accent-primary: #4f46e5;
    --accent-secondary: #7c3aed;
    --accent-tertiary: #06b6d4;
    --border-color: rgba(255, 255, 255, 0.1);
    --glow-primary: rgba(79, 70, 229, 0.4);
    --glow-secondary: rgba(6, 182, 212, 0.3);
}

html {
    scroll-behavior: smooth;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.3) 0%, transparent 70%);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.25) 0%, transparent 70%);
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.2) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(50px, -50px) scale(1.1);
    }
    50% {
        transform: translate(-30px, 30px) scale(0.9);
    }
    75% {
        transform: translate(-50px, -20px) scale(1.05);
    }
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
header {
    margin-bottom: 80px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: transform 0.2s;
}

.logo:hover {
    transform: translateX(5px);
}

.logo-icon {
    font-size: 20px;
    color: var(--accent-primary);
}

.logo-text {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s, transform 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: var(--border-color);
}

.nav-link-highlight {
    color: var(--accent-primary) !important;
    font-weight: 600 !important;
}

.nav-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.nav-link-icon:hover {
    background: rgba(79, 70, 229, 0.2);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Fade In Animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section */
.hero {
    margin-bottom: 80px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 100px;
    font-size: 13px;
    color: var(--accent-primary);
    margin-bottom: 30px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #27c93f;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(39, 201, 63, 0.4);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 0 8px rgba(39, 201, 63, 0);
    }
}

.hero h1 {
    font-size: clamp(36px, 8vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 24px 0;
    letter-spacing: -0.02em;
}

.accent {
    color: var(--accent-primary);
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: clamp(16px, 2vw, 18px);
    color: var(--text-secondary);
    margin: 0 0 40px 0;
    max-width: 600px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 60px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--glow-primary);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: clamp(32px, 5vw, 42px);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Tech Stack */
.tech-stack {
    margin-bottom: 80px;
    text-align: center;
}

.tech-stack-title {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.tech-stack-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.tech-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: default;
}

.tech-icon svg {
    width: 32px;
    height: 32px;
}

.tech-icon:hover {
    background: rgba(79, 70, 229, 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.2);
}

/* Terminal Section */
.terminal-section {
    margin-bottom: 100px;
}

.terminal {
    background: var(--bg-tertiary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
}

.terminal-header {
    background: #2d2d2d;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.terminal-buttons .btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.terminal-buttons .btn.close { background: #ff5f56; }
.terminal-buttons .btn.minimize { background: #ffbd2e; }
.terminal-buttons .btn.maximize { background: #27c93f; }

.terminal-title {
    color: var(--text-muted);
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
}

.terminal-body {
    padding: 30px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
}

.line, .output {
    opacity: 0;
    transition: opacity 0.3s;
    margin-bottom: 12px;
}

.prompt {
    color: #27c93f;
    margin-right: 8px;
}

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

.output {
    color: var(--text-secondary);
    margin-left: 0;
}

.json-output {
    color: var(--accent-tertiary);
    font-size: 13px;
}

.typing::after {
    content: '▊';
    animation: blink 1s infinite;
    color: var(--accent-primary);
}

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

/* Expertise Section */
.expertise {
    margin-bottom: 100px;
}

.expertise h2, .work h2, .solutions h2 {
    font-size: clamp(28px, 5vw, 36px);
    font-weight: 700;
    margin-bottom: 50px;
    color: var(--text-primary);
}

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

.expert {
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.expert:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(79, 70, 229, 0.15);
}

.expert-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 70, 229, 0.15);
    border-radius: 12px;
    color: var(--accent-primary);
    margin-bottom: 20px;
}

.expert-icon svg {
    width: 24px;
    height: 24px;
}

.expert h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.level {
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 14px;
}

.skill-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
    transition: width 1s ease;
}

.expert p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

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

.tag {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Work Experience / Timeline */
.work {
    margin-bottom: 100px;
}

.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
}

.timeline-item {
    position: relative;
    padding-bottom: 40px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -45px;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--accent-primary);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 4px var(--glow-primary);
}

.timeline-content {
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.timeline-date {
    font-size: 13px;
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 8px;
}

.timeline-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--text-primary);
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* Solutions / Projects */
.solutions {
    margin-bottom: 100px;
}

.solutions-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.solution {
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.solution:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
    transform: translateX(10px);
    box-shadow: 0 15px 40px rgba(79, 70, 229, 0.15);
}

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

.solution-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.solution h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--text-primary);
}

.solution-link {
    font-size: 13px;
    color: var(--accent-primary);
}

.solution p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

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

.solution-tags span {
    padding: 4px 12px;
    background: rgba(79, 70, 229, 0.15);
    border-radius: 100px;
    font-size: 12px;
    color: var(--accent-primary);
}

/* Contact Section */
.contact {
    text-align: center;
    padding: 80px 0;
}

.contact-content h2 {
    font-size: clamp(28px, 5vw, 36px);
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.contact-content p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

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

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
}

.contact-btn.primary {
    background: var(--accent-primary);
    color: #ffffff;
    box-shadow: 0 4px 20px var(--glow-primary);
}

.contact-btn.primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--glow-primary);
}

.contact-btn.outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.contact-btn.outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Footer */
footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

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

.footer-logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    gap: 12px;
}

.footer-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.footer-links a:hover {
    background: rgba(79, 70, 229, 0.2);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.footer-copy {
    font-size: 13px;
    color: var(--text-muted);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px 16px;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
    max-width: 300px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 20px;
        padding: 40px;
        transition: right 0.3s ease;
        border-left: 1px solid var(--border-color);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-divider {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
    }

    .tech-stack-icons {
        gap: 12px;
    }

    .tech-icon {
        width: 50px;
        height: 50px;
    }

    .tech-icon svg {
        width: 24px;
        height: 24px;
    }

    .expertise-grid {
        grid-template-columns: 1fr;
    }

    .timeline {
        padding-left: 24px;
    }

    .timeline-dot {
        left: -31px;
        width: 10px;
        height: 10px;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .terminal-body {
        padding: 20px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 32px;
    }

    .expertise h2, .work h2, .solutions h2, .contact-content h2 {
        font-size: 24px;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .contact-btn {
        width: 100%;
        max-width: 280px;
    }
}
