/* ============================================
   SAMIR MANGLAM HACKER PORTFOLIO
   Main Stylesheet
   ============================================ */

/* ---- CSS VARIABLES ---- */
:root {
    --primary: #00ff41;
    --primary-rgb: 0, 255, 65;
    --bg: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #0f0f0f;
    --text: #c0c0c0;
    --text-bright: #ffffff;
    --text-dim: #555555;
    --border: #1a1a1a;
    --danger: #ff0040;
    --warning: #ffaa00;
    --font-mono: 'Share Tech Mono', 'JetBrains Mono', 'Courier New', monospace;
    --font-code: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #111;
}

html::-webkit-scrollbar {
    width: 6px;
}
html::-webkit-scrollbar-track {
    background: #111;
}
html::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 0;
}

body {
    font-family: var(--font-mono);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect width='16' height='16' fill='none' stroke='%2300ff41' stroke-width='1'/%3E%3Cline x1='8' y1='3' x2='8' y2='13' stroke='%2300ff41' stroke-width='1'/%3E%3Cline x1='3' y1='8' x2='13' y2='8' stroke='%2300ff41' stroke-width='1'/%3E%3C/svg%3E") 8 8, crosshair;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}
a:hover {
    text-shadow: 0 0 10px var(--primary);
}

::selection {
    background: var(--primary);
    color: #000;
}

.hidden { display: none !important; }

/* ---- MATRIX CANVAS ---- */
.matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.06;
    pointer-events: none;
}

/* ---- SCANLINE OVERLAY ---- */
.scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 65, 0.015) 2px,
        rgba(0, 255, 65, 0.015) 4px
    );
}

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

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

.nav-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 20px var(--primary);
}

.logo-img {
    height: 36px;
    width: auto;
}

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

.nav-link {
    color: var(--text-dim);
    padding: 8px 14px;
    font-size: 0.85rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
    text-shadow: 0 0 10px var(--primary);
}

.nav-link .cmd-prefix {
    color: var(--primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.nav-link:hover .cmd-prefix,
.nav-link.active .cmd-prefix {
    opacity: 1;
}

.nav-terminal-btn {
    color: var(--primary);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 8px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.nav-terminal-btn:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.3);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---- SECTIONS ---- */
.section {
    min-height: 100vh;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
}

.section-container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
}

.cmd-prefix {
    color: var(--primary);
    font-size: 1.5rem;
}

.section-title {
    font-size: 2rem;
    color: var(--primary);
    text-transform: lowercase;
    letter-spacing: 2px;
}

/* ---- HERO SECTION ---- */
.hero-section {
    flex-direction: column;
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-tag {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin: 10px 0;
}

.hero-name {
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--primary);
    text-shadow: 0 0 30px rgba(var(--primary-rgb), 0.5);
    letter-spacing: 4px;
    margin: 10px 0;
}

.hero-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.2rem;
    color: var(--text);
    margin: 20px 0;
}

.typed-cursor {
    color: var(--primary);
    animation: blink 0.7s infinite;
}

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

.hero-cta {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

/* Buttons */
.btn-hacker {
    display: inline-flex;
    align-items: center;
    padding: 12px 30px;
    border: 1px solid var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn-hacker:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 30px rgba(var(--primary-rgb), 0.4);
    text-shadow: none;
}

.btn-hacker.btn-outline {
    background: transparent;
}

.btn-hacker.btn-outline:hover {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-dim);
    font-size: 0.75rem;
    animation: scrollBounce 2s infinite;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    transform: rotate(45deg);
    margin: 0 auto 10px;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ---- TERMINAL WINDOW STYLE ---- */
.terminal-window {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.terminal-bar {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #111;
    border-bottom: 1px solid var(--border);
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.terminal-bar-title {
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-left: 10px;
}

.terminal-content {
    padding: 20px;
    font-size: 0.9rem;
    line-height: 1.8;
}

.terminal-content .green { color: var(--primary); }
.terminal-content .blue { color: #5599ff; }
.terminal-content .key { color: var(--primary); font-weight: bold; }
.terminal-content .dim { color: var(--text-dim); }

.blink-cursor {
    animation: blink 0.7s infinite;
    color: var(--primary);
}

/* ---- SKILL BARS ---- */
.skill-item {
    margin-bottom: 15px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.85rem;
}

.skill-name {
    color: var(--primary);
}

.skill-percent {
    color: var(--text-dim);
}

.skill-bar {
    height: 8px;
    background: #111;
    border: 1px solid #222;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: var(--primary);
    box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.5);
    transition: width 1.5s ease-in-out;
}

/* ---- PROJECT CARDS ---- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all 0.4s ease;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 25px rgba(var(--primary-rgb), 0.15);
    transform: translateY(-5px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
}

.project-index {
    color: var(--primary);
}

.project-type {
    color: var(--text-dim);
    font-style: italic;
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .image-overlay {
    opacity: 1;
}

.project-video video {
    width: 100%;
    display: block;
}

.project-body {
    padding: 15px;
}

.project-title {
    color: var(--text-bright);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.project-desc {
    color: var(--text-dim);
    font-size: 0.85rem;
    line-height: 1.6;
}

.project-footer {
    padding: 12px 15px;
    border-top: 1px solid var(--border);
}

.project-link {
    color: var(--primary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-link:hover {
    text-shadow: 0 0 10px var(--primary);
}

/* ---- CONTACT FORM ---- */
.hacker-form {
    margin-top: 15px;
}

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

.form-label {
    display: block;
    color: var(--primary);
    margin-bottom: 5px;
    font-size: 0.85rem;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    background: #0a0a0a;
    border: 1px solid #222;
    color: var(--text-bright);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.2);
}

.form-input::placeholder {
    color: #333;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-submit {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 1rem;
    margin-top: 10px;
}

.form-response {
    margin-top: 15px;
    padding: 12px;
    font-size: 0.85rem;
}

.form-response.success {
    color: var(--primary);
    border: 1px solid var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

.form-response.error {
    color: var(--danger);
    border: 1px solid var(--danger);
    background: rgba(255, 0, 64, 0.05);
}

/* ---- FOOTER ---- */
.hacker-footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--border);
    padding: 30px 20px;
    text-align: center;
}

.footer-container {
    max-width: 800px;
    margin: 0 auto;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.3);
    transform: translateY(-3px);
}

.footer-text {
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.footer-ip {
    color: #333;
    font-size: 0.7rem;
}

/* ---- GLITCH TEXT EFFECT ---- */
.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    color: #ff0040;
    z-index: -1;
    animation: glitch-1 2s infinite linear alternate-reverse;
}

.glitch-text::after {
    color: #0ff;
    z-index: -2;
    animation: glitch-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-1 {
    0%, 95% { clip-path: inset(0 0 0 0); transform: translate(0); }
    96% { clip-path: inset(20% 0 60% 0); transform: translate(-3px, 1px); }
    97% { clip-path: inset(50% 0 20% 0); transform: translate(3px, -1px); }
    98% { clip-path: inset(10% 0 70% 0); transform: translate(-2px, 2px); }
    99% { clip-path: inset(40% 0 30% 0); transform: translate(2px, -2px); }
    100% { clip-path: inset(0 0 0 0); transform: translate(0); }
}

@keyframes glitch-2 {
    0%, 95% { clip-path: inset(0 0 0 0); transform: translate(0); }
    96% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); }
    97% { clip-path: inset(30% 0 40% 0); transform: translate(-2px, 1px); }
    98% { clip-path: inset(70% 0 5% 0); transform: translate(1px, 2px); }
    99% { clip-path: inset(15% 0 55% 0); transform: translate(-1px, -2px); }
    100% { clip-path: inset(0 0 0 0); transform: translate(0); }
}
