/* 
 * MAIN STYLESHEET
 * Theme: Dark Hacker / Cyberpunk
 */

:root {
    --bg-color: #050505;
    --bg-secondary: #0a0a0a;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --accent-color: #00ff41;
    /* Terminal Green */
    --accent-dim: rgba(0, 255, 65, 0.2);
    --alert-color: #ff3333;
    --font-mono: 'Space Mono', 'Fira Code', monospace;
    --font-sans: 'Inter', sans-serif;
    --transition: all 0.3s ease;
    --container-width: 1100px;
    --glow-color: rgba(0, 255, 65, 0.5);
}

/* Noise Overlay */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 150;
    opacity: 0.03;
    pointer-events: none;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
}

/* Vertical Scanline Sweep */
.scanline-sweep {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color);
    opacity: 0.1;
    z-index: 200;
    pointer-events: none;
    animation: sweep 8s linear infinite;
}

@keyframes sweep {
    0% {
        transform: translateY(-100vh);
    }

    100% {
        transform: translateY(100vh);
    }
}

/* Scroll Fade-In Effects */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.container.narrow {
    max-width: 600px;
}

.section {
    padding: 100px 0;
}

.highlight {
    color: var(--accent-color);
}

.green-text {
    color: var(--accent-color);
}

/* Background Effects */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15;
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            transparent 50%,
            rgba(0, 255, 65, 0.02) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 100;
}

/* Typography */
h1,
h2,
h3,
h4,
.nav-item,
.btn,
.terminal-prefix {
    font-family: var(--font-mono);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

.section-title.center {
    display: block;
    /* Ensure it takes full width/displays as block if needed for centering */
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
    /* Shrink to fit text so the underline is correct width */
}

.section-title.center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Header & Nav */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    z-index: 99;
    border-bottom: 1px solid var(--accent-dim);
    display: flex;
    justify-content: space-between;
    /* This might not work well without a container, adjusting below */
}

/* Navbar adjustment to use container padding via internal logic or explicit container */
.navbar {
    padding: 15px 40px;
    align-items: center;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--accent-color);
    cursor: pointer;
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-item {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.nav-item:hover {
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--accent-dim);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-top: 60px;
}

.terminal-prefix {
    color: var(--accent-color);
    margin-bottom: 10px;
    font-size: 1rem;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 10px;
    color: #fff;
}

.role-title {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 400;
}

.role-title .accent {
    color: var(--accent-color);
}

.tagline {
    max-width: 500px;
    margin-bottom: 40px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Buttons */
.cta-group {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 12px 30px;
    border: 1px solid var(--accent-color);
    background: transparent;
    color: var(--accent-color);
    font-size: 0.95rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.primary-btn {
    background: var(--accent-dismiss);
    /* Typo adjustment: solid background usually for primary */
    background: rgba(0, 255, 65, 0.1);
}

.primary-btn:hover {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 20px var(--accent-dim);
}

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

.secondary-btn:hover {
    border-color: #fff;
    color: #fff;
}

/* About Section */
.reverse-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
}

.terminal-box {
    background: #0f0f0f;
    border: 1px solid #333;
    border-radius: 6px;
    overflow: hidden;
    font-family: var(--font-mono);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    background: #1a1a1a;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #333;
}

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

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.terminal-header .title {
    margin-left: 10px;
    font-size: 0.8rem;
    color: #888;
}

.terminal-body {
    padding: 20px;
    font-size: 0.9rem;
    color: #ccc;
}

.code-value {
    color: var(--accent-color);
}

.bio-text {
    margin-top: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-frame {
    position: relative;
    padding: 10px;
    border: 1px solid #333;
}

.profile-pic {
    max-width: 100%;
    filter: grayscale(100%) contrast(1.2);
    /* display: block; */
    /* Replaced by flex container but good to keep */
    display: block;
    height: auto;
    width: 300px;
}

.image-frame:hover .profile-pic {
    filter: grayscale(0%);
}

.corner {
    position: absolute;
    width: 15px;
    height: 15px;
    border-color: var(--accent-color);
    border-style: solid;
}

.t-l {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.t-r {
    top: -1px;
    right: -1px;
    border-width: 2px 2px 0 0;
}

.b-l {
    bottom: -1px;
    left: -1px;
    border-width: 0 0 2px 2px;
}

.b-r {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
}

.skill-card {
    background: #0f0f0f;
    border: 1px solid #222;
    padding: 25px;
    transition: var(--transition);
}

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

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.card-header i {
    font-size: 1.5rem;
}

.skill-list li {
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.prompt {
    color: var(--accent-color);
    margin-right: 10px;
}

/* Experience */
.timeline {
    border-left: 2px solid #333;
    padding-left: 30px;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -36px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: var(--bg-color);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
}

.timeline-date {
    font-family: var(--font-mono);
    color: var(--accent-color);
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.timeline-content h4 {
    color: #888;
    margin-bottom: 10px;
    font-weight: 400;
}

.timeline-content p {
    color: var(--text-secondary);
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    border: 1px solid #222;
    background: #0f0f0f;
    transition: var(--transition);
}

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

.project-image {
    height: 200px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #222;
}

.img-placeholder i {
    font-size: 3rem;
    color: #333;
}

.project-info {
    padding: 25px;
}

.project-category {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-color);
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.project-info h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.tech-stack {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tech-stack span {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--accent-color);
    border: 1px solid var(--accent-dim);
    padding: 2px 8px;
    border-radius: 4px;
}

.project-links {
    margin-top: 20px;
    display: flex;
    gap: 20px;
}

.project-links a {
    font-size: 0.9rem;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

/* Contact */
.contact-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.contact-form {
    background: #0f0f0f;
    padding: 30px;
    border: 1px solid #222;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-family: var(--font-mono);
    margin-bottom: 8px;
    color: #888;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: #050505;
    border: 1px solid #333;
    padding: 12px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    outline: none;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.1);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
}

.social-icon {
    font-size: 1.5rem;
    color: var(--text-secondary);
    width: 50px;
    height: 50px;
    border: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.social-icon:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 0 15px var(--accent-dim);
}

/* Footer */
footer {
    padding: 40px 0;
    text-align: center;
    font-family: var(--font-mono);
    color: #666;
    font-size: 0.8rem;
    border-top: 1px solid #1a1a1a;
}

/* Neon border glow animation */
@keyframes neon-glow {

    0%,
    100% {
        box-shadow: 0 0 5px var(--accent-dim);
        border-color: #222;
    }

    50% {
        box-shadow: 0 0 15px var(--accent-dim);
        border-color: var(--accent-color);
    }
}

.skill-card,
.project-card,
.terminal-box {
    animation: neon-glow 6s infinite ease-in-out;
}

.skill-card:nth-child(2) {
    animation-delay: 1.5s;
}

.skill-card:nth-child(3) {
    animation-delay: 3s;
}

.skill-card:nth-child(4) {
    animation-delay: 4.5s;
}

.project-card:nth-child(even) {
    animation-delay: 2s;
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
    }

    .nav-links {
        display: none;
        /* Hide for now, or could make persistent simplified links */
    }

    /* Show simple horizontal scroll or simplified links if needed, but per report they were 'hidden' */
    /* Let's keep them hidden but add a note or minimal nav if possible later if user asks. 
       For now, let's fix the layout breakage first. */

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .role-title {
        font-size: 1.1rem;
        word-break: break-word;
    }

    .cta-group {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .reverse-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-image {
        order: -1;
        margin-bottom: 30px;
    }

    .about-image img {
        width: 200px;
    }

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

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

    .contact-form {
        padding: 20px;
    }

    .timeline::before {
        left: 20px;
    }
}

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

    .logo {
        font-size: 1.2rem;
    }
}