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

:root {
    --primary-color: #4ade80;
    --primary-color-strong: #22c55e;
    --accent-color: #38bdf8;
    --accent-color-strong: #0ea5e9;
    --highlight-color: #a78bfa;
    --bg-dark: #0f1115;
    --bg-darker: #0a0c10;
    --bg-light: #181b22;
    --bg-card: #15181f;
    --text-primary: #e6e8eb;
    --text-secondary: #a8aeb8;
    --text-muted: #6b7280;
    --border-color: #262a33;
    --border-color-strong: #353a45;
    --glow-primary: 0 0 18px rgba(74, 222, 128, 0.18);
    --glow-accent: 0 0 18px rgba(56, 189, 248, 0.18);
}

body {
    font-family: 'Share Tech Mono', monospace;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 15% 85%, rgba(74, 222, 128, 0.06) 0%, transparent 55%),
        radial-gradient(circle at 85% 15%, rgba(56, 189, 248, 0.05) 0%, transparent 55%),
        linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    z-index: -2;
}

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

/* Header */
.header {
    background: rgba(15, 17, 21, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 1.6rem;
    color: var(--primary-color);
}

.logo h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.25s ease;
}

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

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
}

.hero .container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    position: relative;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.glitch {
    position: relative;
    animation: subtleShift 6s ease-in-out infinite;
}

@keyframes subtleShift {
    0%, 100% { transform: translate(0); }
    50% { transform: translate(1px, -1px); }
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
}

.hero-description {
    margin-bottom: 2.5rem;
}

.hero-description p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 0.75rem;
}

.hero-location {
    color: var(--text-muted) !important;
    font-size: 0.95rem !important;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 6px;
    font-family: 'Share Tech Mono', monospace;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary-color-strong);
    color: var(--bg-darker);
    border-color: var(--primary-color-strong);
}

.btn-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--glow-primary);
}

.btn-secondary {
    background: transparent;
    border-color: var(--border-color-strong);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-outline:hover {
    background: var(--accent-color);
    color: var(--bg-darker);
    transform: translateY(-1px);
    box-shadow: var(--glow-accent);
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.circuit-board {
    position: relative;
    width: 280px;
    height: 280px;
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    box-shadow: var(--glow-primary);
    animation: circuitPulse 5s ease-in-out infinite;
    opacity: 0.85;
}

.circuit-line {
    position: absolute;
    background: var(--primary-color);
}

.circuit-line:nth-child(1) {
    width: 2px;
    height: 100px;
    top: 50px;
    left: 50px;
    animation: circuitFlow 3s ease-in-out infinite;
}

.circuit-line:nth-child(2) {
    width: 100px;
    height: 2px;
    top: 100px;
    left: 50px;
    animation: circuitFlow 3s ease-in-out infinite 0.5s;
}

.circuit-line:nth-child(3) {
    width: 2px;
    height: 80px;
    top: 120px;
    left: 200px;
    animation: circuitFlow 3s ease-in-out infinite 1s;
}

.node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: nodePulse 2.5s ease-in-out infinite;
}

.node:nth-child(4) { top: 50px; left: 50px; }
.node:nth-child(5) { top: 100px; left: 150px; animation-delay: 0.5s; }
.node:nth-child(6) { top: 120px; left: 200px; animation-delay: 1s; }

@keyframes circuitPulse {
    0%, 100% { box-shadow: var(--glow-primary); }
    50% { box-shadow: 0 0 30px rgba(74, 222, 128, 0.3); }
}

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

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

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

/* Projects Section */
.projects-section {
    background: var(--bg-darker);
    position: relative;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.75rem;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.project-card.featured {
    border-color: var(--primary-color-strong);
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(34, 197, 94, 0.04) 100%);
}

.project-card.featured::before {
    content: 'Featured';
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--primary-color-strong);
    color: var(--bg-darker);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.project-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.project-header i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 0.85rem;
}

.project-header h3 {
    color: var(--text-primary);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
}

.project-card p {
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    flex-grow: 1;
}

.project-card p strong {
    color: var(--text-primary);
}

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

.project-link {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.project-link:hover {
    background: var(--primary-color);
    color: var(--bg-darker);
    border-color: var(--primary-color);
}

.project-link i {
    margin-right: 0.4rem;
}

/* About Section */
.about-section {
    background: var(--bg-dark);
}

.about-text {
    max-width: 820px;
    margin: 0 auto 3rem;
}

.about-text p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.philosophy-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.75rem;
    text-align: center;
    transition: all 0.25s ease;
}

.philosophy-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

.philosophy-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.philosophy-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
}

.philosophy-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.92rem;
}

/* Contact Section */
.contact-section {
    background: var(--bg-darker);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: start;
}

.contact-info h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.contact-info > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

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

.contact-method {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--text-secondary);
}

.contact-method i {
    color: var(--accent-color);
    font-size: 1.1rem;
    width: 20px;
}

.contact-method a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-method a:hover {
    color: var(--primary-color);
}

.contact-form {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

/* Footer */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0 1.5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.footer-logo i {
    font-size: 1.3rem;
    color: var(--primary-color);
}

.footer-links {
    display: flex;
    gap: 1.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary-color);
}

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

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 900px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h2 {
        font-size: 2.75rem;
    }

    .hero-visual {
        order: -1;
        margin-bottom: 1rem;
    }

    .cta-buttons {
        justify-content: center;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav {
        gap: 1.25rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    .logo h1 {
        font-size: 1.05rem;
    }

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

    .circuit-board {
        width: 240px;
        height: 240px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-content h2 {
        font-size: 2.1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .philosophy-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .nav {
        gap: 0.85rem;
    }
}