/* ===============================================
   SINAN MOHAMMED — Hacker Terminal Portfolio
   =============================================== */

:root {
    --bg: #050505;
    --bg2: #0a0a0a;
    --text: #00ff00;
    /* Neon Green */
    --text-dim: #00aa00;
    --accent: #ff003c;
    /* Red for errors/highlights */
    --border: #00ff00;
    --font-h: 'Share Tech Mono', monospace;
    --font-b: 'Fira Code', monospace;
    --t: all 0.2s ease-out;
}

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

html {
    scroll-behavior: smooth;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-h);
    font-weight: 400;
    text-transform: uppercase;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

/* ── CRT OVERLAY ── */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.6;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 255, 0, 0.03) 51%);
    background-size: 100% 4px;
    z-index: 1000;
    pointer-events: none;
    animation: scanline 10s linear infinite;
}

@keyframes scanline {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 100vh;
    }
}

/* ── WEBGL CANVAS ── */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ── LAYOUT ── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
    position: relative;
    z-index: 2;
}

/* ── SECTION HEADER ── */
.section-header {
    text-align: left;
    margin-bottom: 50px;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 10px;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--text);
    display: inline-block;
}

.cursor-blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* ── NAVBAR ── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 900;
    padding: 20px 0;
    background: rgba(5, 5, 5, 0.9);
    border-bottom: 1px solid var(--border);
    transition: var(--t);
}

.navbar.scrolled {
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0, 255, 0, 0.1);
}

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

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
}

.nav-menu {
    display: flex;
    gap: 24px;
}

.nav-link {
    font-size: 0.95rem;
    color: var(--text-dim);
}

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

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
}

.bar {
    width: 30px;
    height: 2px;
    background: var(--text);
}

/* ── HERO ── */
.hero {
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
    padding-top: 80px;
}

.hero-content {
    width: 100%;
}

.hero-badge {
    display: inline-block;
    border: 1px solid var(--text);
    padding: 6px 12px;
    font-size: 0.85rem;
    color: var(--text);
    margin-bottom: 30px;
    background: rgba(0, 255, 0, 0.1);
}

.terminal-text {
    margin-bottom: 40px;
}

.greeting {
    color: var(--text-dim);
    margin-bottom: 10px;
}

.hero .name {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    color: var(--text);
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.hero .title {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 20px;
    text-transform: none;
}

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

.typing-container {
    border-left: 2px solid var(--accent);
    padding-left: 15px;
    margin-bottom: 40px;
}

.hero .description {
    color: var(--text-dim);
    font-size: 0.95rem;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    font-family: var(--font-b);
    font-size: 0.9rem;
    cursor: pointer;
    background: transparent;
    transition: var(--t);
    text-transform: uppercase;
}

.btn-primary {
    border: 1px solid var(--text);
    color: var(--bg);
    background: var(--text);
    font-weight: 700;
}

.btn-primary:hover {
    background: transparent;
    color: var(--text);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4);
}

.btn-outline {
    border: 1px dashed var(--text);
    color: var(--text);
}

.btn-outline:hover {
    background: rgba(0, 255, 0, 0.1);
    border-style: solid;
}

.hero-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

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

.stat-label {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
    animation: bounce 1.5s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translate(-50%, 0);
    }

    50% {
        transform: translate(-50%, 10px);
    }
}

/* ── TERMINAL CARDS ── */
.card-terminal {
    background: rgba(0, 20, 0, 0.4);
    border: 1px solid var(--border);
    position: relative;
    margin-bottom: 20px;
}

.terminal-header {
    background: var(--text);
    color: var(--bg);
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    gap: 10px;
    align-items: center;
}

.terminal-body {
    padding: 20px;
}

/* ── ABOUT ── */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
}

.about-text h3 {
    color: var(--accent);
    margin-bottom: 15px;
    text-transform: none;
}

.about-text p {
    color: var(--text-dim);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.education-card .terminal-body {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.education-card .icon {
    font-size: 2rem;
    color: var(--text);
}

.edu-details h4 {
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 5px;
}

.edu-details p {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.career-objective h4 {
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.code-card .dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--bg);
}

.code-card .red {
    background: #ff003c;
}

.code-card .yellow {
    background: #ffcc00;
}

.code-card .green {
    background: #00ff00;
}

.code-filename {
    margin-left: auto;
    color: var(--bg);
    font-family: var(--font-b);
}

.code-content {
    padding: 20px;
    background: rgba(0, 5, 0, 0.8);
}

.code-content pre {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.keyword {
    color: var(--text);
    font-weight: 700;
}

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

.key {
    color: var(--text);
}

/* Reveal animations */
.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: 0.5s;
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: 0.5s;
}

.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.5s;
}

.reveal-left.is-visible,
.reveal-right.is-visible,
.reveal-up.is-visible {
    opacity: 1;
    transform: none;
}

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

.skill-icon-wrap {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 15px;
}

.skill-category h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.skill-item {
    margin-bottom: 15px;
}

.skill-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 5px;
    color: var(--text-dim);
}

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

.ascii-progress {
    font-family: monospace;
    letter-spacing: 2px;
    color: var(--text);
    font-size: 0.9rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    border: 1px dotted var(--text-dim);
    padding: 4px 8px;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.skill-tag:hover {
    background: var(--text);
    color: var(--bg);
    border: 1px solid var(--text);
}

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

.service-card .terminal-body {
    text-align: center;
}

.service-card .icon-box {
    font-size: 2.5rem;
    color: var(--text);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--accent);
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 20px;
}

.service-arrow {
    font-size: 0.8rem;
    border-top: 1px dashed var(--border);
    padding-top: 10px;
    cursor: pointer;
}

.service-card:hover .service-arrow {
    background: var(--text);
    color: var(--bg);
}

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

.project-card .project-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
    position: relative;
    background: repeating-linear-gradient(0deg, #001100, #001100 2px, #000 2px, #000 4px);
}

.project-image i {
    font-size: 4rem;
    color: var(--text);
    z-index: 2;
    text-shadow: 0 0 20px var(--text);
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--accent);
}

.project-info p {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 15px;
}

.project-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.project-tag {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid var(--text);
    padding: 2px 6px;
    font-size: 0.7rem;
}

.project-url {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 10px;
    word-break: break-all;
}

.url-prompt {
    color: var(--accent);
    font-weight: bold;
    margin-right: 5px;
}

.project-url a {
    color: var(--text-dim);
}

.project-url a:hover {
    color: var(--text);
    text-decoration: underline;
}

.btn-link {
    font-size: 0.85rem;
    color: var(--text);
}

.btn-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* ── CONTACT ── */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
}

.contact-intro {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 30px;
}

.contact-item .terminal-body {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--accent);
}

.contact-item h4 {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 5px;
}

.contact-item p {
    font-size: 0.95rem;
}

.social-row {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.social-btn {
    border: 1px solid var(--border);
    padding: 10px 15px;
    color: var(--text);
    transition: 0.2s;
}

.social-btn:hover {
    background: var(--text);
    color: var(--bg);
}

.contact-form .form-body {
    padding: 30px;
}

.contact-form h3 {
    margin-bottom: 25px;
    color: var(--accent);
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--text-dim);
    color: var(--text);
    font-family: var(--font-b);
    font-size: 0.9rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--text);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
}

.contact-form button {
    width: 100%;
    border: none;
    padding: 15px;
}

/* ── FOOTER ── */
footer {
    padding: 20px 0;
    border-top: 1px dashed var(--border);
    background: var(--bg);
    text-align: center;
}

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

.footer-content p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: var(--text-dim);
    font-size: 1.1rem;
}

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

.cert-card {
    text-align: center;
    transition: var(--t);
}

.cert-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(255, 0, 60, 0.2);
}

.cert-icon {
    font-size: 3rem;
    color: var(--text);
    padding: 30px 0;
    border-bottom: 1px dashed var(--border);
    background: rgba(0, 20, 0, 0.3);
}

.cert-card:hover .cert-icon {
    color: var(--accent);
}

.cert-info {
    padding: 20px;
}

.cert-info h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 10px;
}

.cert-info p {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 20px;
}

/* ── MOBILE ── */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        right: -100%;
        top: 0;
        width: 80%;
        height: 100vh;
        background: var(--bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.3s;
        border-left: 2px solid var(--border);
    }

    .nav-menu.active {
        right: 0;
    }

    .about-grid,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 10px;
    }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
    border-left: 1px solid var(--border);
}

::-webkit-scrollbar-thumb {
    background: var(--text);
}

::selection {
    background: var(--text);
    color: var(--bg);
}