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

:root {
    --primary: #0a0a0a;
    --secondary: #1a1a1a;
    --tertiary: #2a2a2a;
    --accent: #00ff41;
    --accent-dim: rgba(0, 255, 65, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --border: #333333;
    --border-light: #555555;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-accent: 0 0 30px rgba(0, 255, 65, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: var(--primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Cursor */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform 0.1s ease;
}

.cursor-follower {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.15s ease;
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    z-index: 1000;
}

.progress-bar {
    height: 100%;
    background: var(--accent);
    width: 0;
    transition: width 0.3s ease;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.nav.scrolled {
    background: rgba(10, 10, 10, 0.98);
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    position: relative;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
    z-index: 2;
}

.logo-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: var(--accent-dim);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
    z-index: -1;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-link.active::after,
.nav-link:hover::after {
    width: 100%;
}

/* Home Section */
.home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.home-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 65, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.floating-element {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 1px solid rgba(0, 255, 65, 0.1);
    border-radius: 50%;
    animation: float 10s infinite ease-in-out;
}

.floating-element:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.floating-element:nth-child(2) { top: 60%; right: 20%; animation-delay: 2s; }
.floating-element:nth-child(3) { bottom: 30%; left: 60%; animation-delay: 4s; }
.floating-element:nth-child(4) { top: 40%; right: 40%; animation-delay: 6s; }

.home-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.intro-tag {
    display: inline-block;
    background: var(--accent-dim);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 2rem;
    animation: slideUp 0.8s ease 0.2s both;
}

.home-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    line-height: 0.9;
    margin-bottom: 2rem;
    overflow: hidden;
}

.title-line {
    display: block;
    transform: translateY(100%);
    animation: slideUp 0.8s ease both;
}

.title-line:nth-child(2) {
    animation-delay: 0.1s;
}

.home-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
    line-height: 1.6;
    animation: slideUp 0.8s ease 0.4s both;
}

.home-actions {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 4rem;
    animation: slideUp 0.8s ease 0.6s both;
}

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    color: var(--primary);
    border-color: var(--accent);
}

.btn-primary .btn-bg {
    background: var(--accent);
}

.btn-secondary {
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-secondary .btn-bg {
    background: var(--text-primary);
}

.btn-bg {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    transition: var(--transition);
    z-index: -1;
}

.btn:hover .btn-bg {
    left: 0;
}

.btn:hover {
    transform: translateY(-2px);
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 500px;
    animation: slideUp 0.8s ease 0.8s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.scroll-line {
    width: 2px;
    height: 60px;
    background: var(--accent);
    animation: scrollLine 2s ease-in-out infinite;
}

.scroll-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.2em;
}

/* Section Styles */
.section {
    padding: 8rem 0;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 4rem;
}

.section-number {
    font-size: 4rem;
    font-weight: 700;
    color: var(--accent-dim);
    line-height: 1;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* About Section */
.about {
    background: var(--secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-lead {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.7;
}

.skills-grid {
    display: grid;
    gap: 3rem;
}

.skill-category h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-item {
    background: var(--tertiary);
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.skill-item:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.profile-container {
    position: sticky;
    top: 2rem;
}

.profile-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 65, 0.1));
    opacity: 0;
    transition: var(--transition);
}

.profile-image:hover .image-overlay {
    opacity: 1;
}

.profile-info {
    background: var(--tertiary);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

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

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

.info-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.info-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Work Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-light);
    box-shadow: var(--shadow);
}

.project-card.featured {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--secondary), var(--tertiary));
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.project-tag {
    background: var(--accent-dim);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.featured-tag {
    background: var(--accent);
    color: var(--primary);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--accent);
}

.project-link.confidential {
    color: #ff6b6b;
    cursor: pointer;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tech-tag {
    background: var(--tertiary);
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.tech-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Experience Section */
.experience {
    background: var(--secondary);
}

.experience-timeline {
    position: relative;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 4rem;
}

.timeline-dot {
    position: absolute;
    left: -9px;
    top: 1rem;
    width: 18px;
    height: 18px;
    background: var(--secondary);
    border: 3px solid var(--border);
    border-radius: 50%;
    transition: var(--transition);
}

.timeline-item.active .timeline-dot {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: var(--shadow-accent);
}

.timeline-period {
    display: inline-block;
    background: var(--accent-dim);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.timeline-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.timeline-company {
    margin-bottom: 1.5rem;
}

.company-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
}

.company-full,
.company-location {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.timeline-description p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.achievement-list {
    list-style: none;
    margin-bottom: 2rem;
}

.achievement-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}

.achievement-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.timeline-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tech-badge {
    background: var(--tertiary);
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    border: 1px solid var(--border);
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.contact-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 3rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
}

.contact-method:hover {
    border-color: var(--accent);
    transform: translateX(8px);
}

.method-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.method-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
}

.method-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    display: block;
    margin-top: 0.2rem;
}

/* Contact Form */
.contact-form {
    background: var(--secondary);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-input {
    width: 100%;
    padding: 1rem 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-bottom-color: var(--accent);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
    padding-top: 1.5rem;
}

.form-label {
    position: absolute;
    top: 1rem;
    left: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition);
    pointer-events: none;
}

.form-input:focus + .form-label,
.form-input:valid + .form-label {
    top: -0.5rem;
    font-size: 0.8rem;
    color: var(--accent);
}

.form-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.form-input:focus ~ .form-line {
    width: 100%;
}

.form-submit {
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
}

/* Footer */
.footer {
    background: var(--secondary);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
}

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

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.social-link:hover {
    color: var(--accent);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--secondary);
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    max-width: 500px;
    text-align: center;
    animation: modalSlide 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--accent);
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.modal-content h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.modal-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes gridMove {
    from { transform: translate(0, 0); }
    to { transform: translate(50px, 50px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes scrollLine {
    0%, 100% { height: 60px; }
    50% { height: 30px; }
}

@keyframes modalSlide {
    from { transform: translate(-50%, -60%); opacity: 0; }
    to { transform: translate(-50%, -50%); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--secondary);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow);
        padding: 2rem 0;
        border-top: 1px solid var(--border);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        gap: 4px;
    }
    
    .nav-toggle span {
        width: 25px;
        height: 2px;
        background: var(--text-primary);
        transition: var(--transition);
    }
    
    .home-title {
        font-size: clamp(2.5rem, 6vw, 4rem);
    }
    
    .home-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .home-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: left;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-number {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .home-content {
        padding: 0 1rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card {
        padding: 1.5rem;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 2rem;
    }
}
