/* General Styles */
:root {
    /* Cyber hex mesh pattern (clean, readable): blue hex lines + faint green nodes */
    --site-pattern:
        /* faint green nodes */
        radial-gradient(circle at 10px 14px, rgba(57,255,20,0.22) 1px, transparent 1.6px) 0 0/24px 42px,
        radial-gradient(circle at 22px 35px, rgba(57,255,20,0.14) 1px, transparent 1.6px) 0 0/24px 42px,
        /* hex mesh lines (60° and -60°) */
        linear-gradient(60deg, rgba(59,130,246,0.16) 1px, transparent 1px) 0 0/24px 42px,
        linear-gradient(-60deg, rgba(59,130,246,0.16) 1px, transparent 1px) 0 0/24px 42px;
}

body {
    font-family: 'Share Tech Mono', monospace;
    background-color: #071521; /* deep navy for blue theme */
    color: #e6f4ff; /* softer, readable text color */
    margin: 0;
    padding: 0;
    line-height: 1.6;
    position: relative;
}

/* Non-overlapping site pattern: fixed behind everything */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: var(--site-pattern);
    opacity: 0.22; /* subtle by default */
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
}

h1, h2, h3 {
    color: #39ff14; /* neon green */
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.65), 0 0 16px rgba(57, 255, 20, 0.35);
}

a {
    color: #39ff14;
    text-decoration: none;
}

/* Navigation Bar */
.navbar {
    background: #0b1426; /* blue-tinted dark */
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #39ff14;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar .nav-links {
    list-style: none;
    display: flex;
}

.navbar .nav-links li {
    margin-left: 20px;
}

.navbar .nav-links a:hover {
    text-decoration: underline;
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.7), 0 0 18px rgba(57, 255, 20, 0.45);
}

/* Sections */
section {
    padding: 4rem 0;
}

/* Home Section */
.home-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Hero background: overlay + image (pattern is on body only) */
    background:
        linear-gradient(180deg, rgba(12, 25, 64, 0.60), rgba(3, 10, 30, 0.75)),
        url('cyber-hacker-wallpaper-with-complex-digital-code-patterns_198067-1179154.jpg') center/cover no-repeat;
}

.home-content h1 {
    font-size: 3rem;
    animation: floatY 6s ease-in-out infinite, neonPulse 3.5s ease-in-out infinite;
}

.typing-text {
    font-size: 1.5rem;
    min-height: 1.5em; /* Prevents layout shift */
    position: relative;
}

.typing-text::after {
    content: '|';
    margin-left: 6px;
    color: #39ff14;
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.7);
    animation: caretBlink 1s steps(1, end) infinite;
}

/* About Section */
.about-section {
    background: #0b1426; /* blue-tinted dark */
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.skill-card {
    background: #0f1b33;
    padding: 1.1rem; /* smaller card */
    border: 1px solid #39ff14;
    border-radius: 5px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 18px rgba(57, 255, 20, 0.55), 0 0 30px rgba(57, 255, 20, 0.25);
}

/* Card icons (SVG) */
.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; /* slightly smaller */
    height: 40px;
    margin-bottom: 0.75rem;
}

.card-icon svg {
    width: 100%;
    height: 100%;
    stroke: #39ff14;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 8px rgba(57, 255, 20, 0.6));
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(20px);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 600ms ease, transform 600ms ease;
    transition-delay: var(--delay, 0ms);
}

/* Contact icons hover effect */
.contact-link:hover .social-icon {
    transform: scale(1.1);
    transition: transform 200ms ease;
}

/* Keyframes */
@keyframes caretBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes neonPulse {
    0%, 100% { text-shadow: 0 0 6px rgba(57,255,20,0.45), 0 0 14px rgba(57,255,20,0.25); }
    50% { text-shadow: 0 0 12px rgba(57,255,20,0.9), 0 0 24px rgba(57,255,20,0.45); }
}

/* Reduce motion preferences */
@media (prefers-reduced-motion: reduce) {
    .home-content h1 { animation: none; }
    .typing-text::after { animation: none; }
    .reveal { opacity: 1; transform: none; }
    .reveal.visible { transition: none; }
}

/* Projects Section */
.projects-section {
    background: #0b1426;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: #0f1b33;
    padding: 1.5rem;
    border: 1px solid #39ff14;
    border-radius: 5px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 18px rgba(57, 255, 20, 0.55), 0 0 28px rgba(57, 255, 20, 0.25);
}

.project-card a {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #39ff14;
    color: #041016;
    border-radius: 5px;
    transition: background 0.3s, color 0.3s;
}

.project-card a:hover {
    background: #071521;
    color: #39ff14;
    border: 1px solid #39ff14;
}

/* Contact Section */
.contact-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.contact-link {
    padding: 0.7rem 1.5rem;
    border: 1px solid #39ff14;
    border-radius: 5px;
    transition: background 0.3s, color 0.3s;
}

.contact-link:hover {
    background: #39ff14;
    color: #041016;
}

.social-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: middle;
    stroke: #39ff14;
    fill: none;
    stroke-width: 1.6;
    filter: drop-shadow(0 0 6px rgba(57, 255, 20, 0.6));
}

/* Footer */
footer {
    background: #0b1426;
    color: #a8b3c7;
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid #39ff14;
}

footer .container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

footer a {
    color: #39ff14;
    margin-left: 0;
}

footer a:hover {
    text-decoration: underline;
}

.footer-links {
    display: flex;
    gap: 12px;
}

.social-icon--footer {
    width: 22px;
    height: 22px;
}

.dev-by {
    color: #a8b3c7;
    font-size: 0.9rem;
}

.dev-by a {
    color: #39ff14;
    text-decoration: none;
}

.dev-by a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        width: 90%;
    }

    .navbar .container {
        flex-direction: column;
    }

    .navbar .nav-links {
        margin-top: 1rem;
        padding: 0;
    }
    
    .home-content h1 {
        font-size: 2.5rem;
    }

    .typing-text {
        font-size: 1.2rem;
    }

    footer .container {
        flex-direction: column;
    }

    footer p {
        margin-bottom: 0.5rem;
    }
}
