
:root {
    --bg-color: #050505;
    --text-color: #00ff00;
    --highlight-color: #00ffff;
    --box-bg: #111111;
    --border-color: #333333;
    --font-main: 'Share Tech Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

/* CRT Effects */
.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: 9999;
    pointer-events: none;
}

.scanline {
    width: 100%;
    height: 100px;
    z-index: 9998;
    position: absolute;
    pointer-events: none;
    background: linear-gradient(0deg, rgba(0,0,0,0) 0%, rgba(255,255,255,0.2) 10%, rgba(0,0,0,0.1) 100%);
    opacity: 0.1;
    animation: scanline 6s linear infinite;
}

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

a {
    color: var(--highlight-color);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    word-break: break-word;
}

a:hover {
    color: var(--text-color);
    text-shadow: 0 0 8px var(--text-color);
}

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

.terminal-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 10;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--text-color);
    padding-bottom: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
    flex-shrink: 0;
}

.blink {
    animation: blinker 1s step-start infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

nav a {
    font-size: 0.9rem;
    padding: 5px;
}

.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    border-left: 3px solid var(--text-color);
    padding-left: 10px;
    word-break: break-word;
}

.content-box {
    background-color: var(--box-bg);
    border: 1px solid var(--border-color);
    padding: 20px;
    box-shadow: 4px 4px 0px rgba(0, 255, 0, 0.2);
    overflow-x: auto;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 40px 0;
}

.glitch {
    font-size: 3rem;
    position: relative;
    display: inline-block;
    color: var(--text-color);
    word-break: break-word;
}

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

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(42px, 9999px, 44px, 0); }
    20% { clip: rect(12px, 9999px, 59px, 0); }
    40% { clip: rect(48px, 9999px, 29px, 0); }
    60% { clip: rect(42px, 9999px, 73px, 0); }
    80% { clip: rect(63px, 9999px, 27px, 0); }
    100% { clip: rect(34px, 9999px, 41px, 0); }
}

.subtitle {
    font-size: 1.1rem;
    margin-top: 10px;
    margin-bottom: 20px;
    word-break: break-word;
}

.social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.social-links a {
    font-size: 1.5rem;
    display: inline-block;
}

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

.skill-item {
    word-break: break-all;
}

/* Timeline */
.timeline-item {
    margin-bottom: 25px;
    border-left: 1px dashed var(--border-color);
    padding-left: 15px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 5px;
    width: 10px;
    height: 10px;
    background-color: var(--text-color);
}

.date {
    font-size: 0.8rem;
    color: var(--highlight-color);
    margin-bottom: 5px;
}

/* Certs */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.cert-card {
    border: 1px dashed var(--border-color);
    padding: 15px;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

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

/* Platforms */
.platforms-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.platform {
    border: 1px solid var(--border-color);
    padding: 15px;
    text-align: center;
}

/* Contact List */
.contact-list {
    list-style: none;
    margin-top: 15px;
}

.contact-list li {
    margin-bottom: 10px;
    word-break: break-all;
}

footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.copyright {
    font-size: 0.8rem;
    color: #666;
    margin-top: 10px;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .terminal-container {
        padding: 10px;
    }
    
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    nav {
        justify-content: flex-start;
        width: 100%;
    }
    
    .glitch {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .content-box {
        padding: 15px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .skill-item {
        font-size: 0.85rem;
    }
}

/* Color Themes */
body.theme-red {
    --text-color: #ff3333;
    --highlight-color: #ffaaaa;
}
body.theme-red .content-box { box-shadow: 4px 4px 0px rgba(255, 51, 51, 0.2); }
body.theme-red .glitch::before { text-shadow: -1px 0 cyan; }
body.theme-red .glitch::after { text-shadow: -1px 0 yellow; }

body.theme-yellow {
    --text-color: #ffff00;
    --highlight-color: #ffffaa;
}
body.theme-yellow .content-box { box-shadow: 4px 4px 0px rgba(255, 255, 0, 0.2); }
body.theme-yellow .glitch::before { text-shadow: -1px 0 red; }
body.theme-yellow .glitch::after { text-shadow: -1px 0 blue; }

body.theme-blue {
    --text-color: #33ccff;
    --highlight-color: #aaffff;
}
body.theme-blue .content-box { box-shadow: 4px 4px 0px rgba(51, 204, 255, 0.2); }
body.theme-blue .glitch::before { text-shadow: -1px 0 red; }
body.theme-blue .glitch::after { text-shadow: -1px 0 yellow; }

body.theme-purple {
    --text-color: #ff00ff;
    --highlight-color: #ffaaff;
}
body.theme-purple .content-box { box-shadow: 4px 4px 0px rgba(255, 0, 255, 0.2); }
body.theme-purple .glitch::before { text-shadow: -1px 0 cyan; }
body.theme-purple .glitch::after { text-shadow: -1px 0 yellow; }

body.theme-orange {
    --text-color: #ff9900;
    --highlight-color: #ffcc88;
}
body.theme-orange .content-box { box-shadow: 4px 4px 0px rgba(255, 153, 0, 0.2); }
body.theme-orange .glitch::before { text-shadow: -1px 0 blue; }
body.theme-orange .glitch::after { text-shadow: -1px 0 green; }

body.theme-cyan {
    --text-color: #00ffff;
    --highlight-color: #aaffff;
}
body.theme-cyan .content-box { box-shadow: 4px 4px 0px rgba(0, 255, 255, 0.2); }
body.theme-cyan .glitch::before { text-shadow: -1px 0 red; }
body.theme-cyan .glitch::after { text-shadow: -1px 0 magenta; }
#hacker-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #050505;
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #00ff00;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.2rem;
    transition: opacity 0.5s ease;
}
.loader-content {
    text-align: left;
    width: 80%;
    max-width: 600px;
    line-height: 1.8;
}

/* Profile Section */
.profile-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 40px auto;
    text-align: left;
    max-width: 800px;
}

.profile-image.mac-window {
    width: 250px;
    height: 300px;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4);
    border-radius: 8px;
    background-color: var(--box-bg);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.mac-header {
    height: 25px;
    background-color: #222;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 6px;
    border-bottom: 1px solid var(--border-color);
}

.mac-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.mac-btn.close { background-color: #ff5f56; }
.mac-btn.minimize { background-color: #ffbd2e; }
.mac-btn.maximize { background-color: #27c93f; }

.image-glitch {
    flex-grow: 1;
    width: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #000;
    animation: identity-swap 10s infinite;
}

@keyframes identity-swap {
    0%, 45% {
        /* Anonymous / Hacker placeholder */
        background-image: url('https://upload.wikimedia.org/wikipedia/commons/a/a6/Anonymous_emblem.svg'); 
        filter: grayscale(100%) invert(1) brightness(200%);
    }
    46%, 48% {
        /* Glitch transition */
        background-image: url('./../images/myphoto.jpg');
        filter: hue-rotate(90deg) contrast(300%) saturate(200%);
        transform: scale(1.1) translateX(5px);
    }
    50%, 95% {
        /* Real Photo */
        background-image: url('./../images/myphoto.jpg'); 
        filter: none;
        transform: none;
    }
    96%, 98% {
        /* Glitch transition back */
        background-image: url('https://upload.wikimedia.org/wikipedia/commons/a/a6/Anonymous_emblem.svg');
        filter: invert(1) hue-rotate(180deg) saturate(300%);
        transform: scale(1.1) translateX(-5px);
    }
    100% {
        background-image: url('https://upload.wikimedia.org/wikipedia/commons/a/a6/Anonymous_emblem.svg'); 
        filter: grayscale(100%) invert(1) brightness(200%);
    }
}

.profile-about {
    max-width: 450px;
}

.profile-about h3 {
    color: var(--highlight-color);
    margin-bottom: 10px;
    font-size: 1.4rem;
}

@media (max-width: 600px) {
    .profile-container {
        flex-direction: column;
        text-align: center;
    }
}

/* Detailed Skills Section */
.skill-category {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
}
.skill-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.skill-category h3 {
    color: var(--highlight-color);
    font-size: 1.2rem;
    margin-bottom: 8px;
}
.skill-desc {
    font-size: 0.95rem;
    margin-bottom: 12px;
    opacity: 0.9;
}
.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tool-tag {
    background-color: rgba(0, 255, 0, 0.1);
    border: 1px solid var(--text-color);
    padding: 3px 8px;
    font-size: 0.8rem;
    border-radius: 3px;
    color: var(--text-color);
    transition: all 0.2s ease;
}
.tool-tag:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}

body.theme-yellow .tool-tag { background-color: rgba(255, 255, 0, 0.1); }
body.theme-blue .tool-tag { background-color: rgba(51, 204, 255, 0.1); }
body.theme-red .tool-tag { background-color: rgba(255, 51, 51, 0.1); }
body.theme-purple .tool-tag { background-color: rgba(255, 0, 255, 0.1); }
body.theme-orange .tool-tag { background-color: rgba(255, 153, 0, 0.1); }
body.theme-cyan .tool-tag { background-color: rgba(0, 255, 255, 0.1); }

/* Blogs Section */
.blogs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    overflow: hidden;
    text-decoration: none !important;
}

.blog-card:hover {
    border-color: var(--text-color);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
    transform: translateY(-5px);
}

.blog-image {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--border-color);
    transition: filter 0.3s ease;
}

.blog-card:hover .blog-image {
    filter: none;
}


.blog-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-content h3 {
    color: var(--highlight-color);
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.blog-card:hover .blog-content h3 {
    color: var(--text-color);
    text-shadow: 0 0 8px var(--text-color);
}

.blog-content .date {
    margin-top: auto;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Timeline Logos */
.timeline-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 5px;
}

.company-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background-color: #fff;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.1);
}

body.theme-blue .company-logo { box-shadow: 0 0 10px rgba(51, 204, 255, 0.1); }
body.theme-red .company-logo { box-shadow: 0 0 10px rgba(255, 51, 51, 0.1); }
body.theme-purple .company-logo { box-shadow: 0 0 10px rgba(255, 0, 255, 0.1); }
body.theme-yellow .company-logo { box-shadow: 0 0 10px rgba(255, 255, 0, 0.1); }
body.theme-cyan .company-logo { box-shadow: 0 0 10px rgba(0, 255, 255, 0.1); }
body.theme-orange .company-logo { box-shadow: 0 0 10px rgba(255, 153, 0, 0.1); }

@media (max-width: 600px) {
    .timeline-header {
        align-items: flex-start;
    }
    .company-logo {
        width: 40px;
        height: 40px;
        margin-top: 4px;
    }
}
