/* 
   =============================================
   Cybersecurity Portfolio - CSS Blueprint
   =============================================
*/

:root {
    /* Color Palette - Dark & Cyberpunk/Hacker theme */
    --bg-base: #050505;
    --bg-alt: #0a0a0f;
    --bg-card: #121218;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --accent-green: #00ff88;  /* Matrix/Terminal Green */
    --accent-blue: #00b8ff;   /* Tech Blue */
    --accent-red: #ff3366;    /* Alert Red */
    --border-color: rgba(0, 255, 136, 0.2);
    
    /* Typography */
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4 {
    color: #fff;
    font-weight: 600;
}

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

a:hover {
    color: var(--accent-blue);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utilities */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-spacing {
    padding: 100px 0;
}

.alt-bg {
    background-color: var(--bg-alt);
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.highlight {
    color: var(--accent-green);
    font-family: var(--font-mono);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
}

.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-color);
    margin-left: 1rem;
}

.text-center {
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background-color: transparent;
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.1);
}

.btn-primary:hover {
    background-color: rgba(0, 255, 136, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    color: var(--accent-green);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-blue);
    border: 1px solid var(--accent-blue);
}

.btn-secondary:hover {
    background-color: rgba(0, 184, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 184, 255, 0.4);
    color: var(--accent-blue);
}

/* Glassmorphism Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    transition: var(--transition);
}

.glass-nav.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

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

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

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font-mono);
}

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

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    position: relative;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
}

.sys-msg {
    font-family: var(--font-mono);
    color: var(--accent-green);
    font-size: 1rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.glitch-text {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    color: #fff;
}

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

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

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

.typewriter {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    border-right: 2px solid var(--accent-green);
    white-space: nowrap;
    overflow: hidden;
    animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}

.hero-desc {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.cta-group {
    display: flex;
    gap: 1rem;
}

.hero-graphic {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--accent-green);
    position: relative;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
    /* Adding grid lines to radar */
    background: 
        linear-gradient(90deg, transparent 49%, var(--accent-green) 49%, var(--accent-green) 51%, transparent 51%),
        linear-gradient(0deg, transparent 49%, var(--accent-green) 49%, var(--accent-green) 51%, transparent 51%);
    background-size: 100% 100%;
    opacity: 0.5;
}

.radar::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 50%;
    background: conic-gradient(from 0deg, transparent 70%, rgba(0, 255, 136, 0.8) 100%);
    transform-origin: 0 0;
    animation: scan 4s linear infinite;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.terminal-box {
    background: #1e1e1e;
    border-radius: 6px;
    border: 1px solid #333;
    overflow: hidden;
    margin-top: 2rem;
    font-family: var(--font-mono);
}

.terminal-header {
    background: #2a2a2a;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

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

.terminal-body {
    padding: 1rem;
    color: #e0e0e0;
}

.terminal-body p {
    margin-bottom: 0.5rem;
    color: var(--accent-green);
    font-size: 0.9rem;
}

.image-wrapper {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

#profile-pic {
    width: 100%;
    height: auto;
    filter: grayscale(100%) contrast(1.2);
    transition: var(--transition);
}

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

.pulse-border::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border: 2px solid var(--accent-green);
    border-radius: 4px;
    transform: translate(15px, 15px);
    z-index: -1;
    transition: var(--transition);
}

.image-wrapper:hover.pulse-border::after {
    transform: translate(8px, 8px);
}

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

.skill-category {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--border-color);
    box-shadow: 0 10px 30px -15px rgba(0, 255, 136, 0.2);
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.skill-category h3 i {
    color: var(--accent-blue);
}

.skill-list li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    position: relative;
    padding-left: 1.5rem;
}

.skill-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-green);
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(0, 184, 255, 0.1);
    color: var(--accent-blue);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

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

.project-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    position: relative;
    transition: var(--transition);
    height: 100%;
}

.cyber-border {
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.folder-icon {
    font-size: 2.5rem;
    color: var(--accent-green);
}

.project-links a {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-left: 1rem;
}

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

.project-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: auto;
}

/* Certifications Section */
.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    margin-top: -2rem;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
}

.cert-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}

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

.cert-img-wrapper {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.cert-img {
    max-width: 100%;
    max-height: 100%;
    opacity: 0.8;
    transition: var(--transition);
}

.cert-card:hover .cert-img {
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(0, 184, 255, 0.4));
}

.cert-card h4 {
    margin-bottom: 0.5rem;
}

.cert-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.cert-verify {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

/* Experience Section - Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: rgba(255,255,255,0.1);
    top: 0;
    bottom: 0;
    left: 20px;
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 5px;
    width: 20px;
    height: 20px;
    background: var(--bg-base);
    border: 2px solid var(--accent-green);
    border-radius: 50%;
    z-index: 1;
}

.timeline-content {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}

.timeline-content h3 {
    color: #fff;
    margin-bottom: 0.2rem;
}

.timeline-content .company {
    color: var(--accent-blue);
    font-size: 0.95rem;
    font-family: var(--font-mono);
    margin-bottom: 1rem;
}

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

.timeline-content ul li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.timeline-content ul li::before {
    content: ">>";
    color: var(--accent-green);
    position: absolute;
    left: 0;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

/* Contact Section */
.contact-desc {
    max-width: 600px;
    margin: 0 auto 3rem auto;
    color: var(--text-secondary);
}

.cta-large {
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.social-links {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-primary);
    font-size: 1.2rem;
}

.social-links a:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--accent-green);
    color: var(--accent-green);
    transform: translateY(-3px);
}

.pgp-block {
    margin-top: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.pgp-block details {
    background: #1e1e1e;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #333;
}

.pgp-block summary {
    cursor: pointer;
    font-family: var(--font-mono);
    color: var(--accent-blue);
    outline: none;
}

.pgp-block pre {
    margin-top: 1rem;
    padding: 1rem;
    background: #121212;
    border-radius: 4px;
    font-size: 0.8rem;
    overflow-x: auto;
    color: var(--text-secondary);
}

/* Footer */
footer {
    padding: 2rem 0;
    text-align: center;
    background: var(--bg-base);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-small {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
    font-family: var(--font-mono);
}

/* Animations */
@keyframes glitch-anim {
    0% { clip: rect(4px, 9999px, 86px, 0); }
    20% { clip: rect(65px, 9999px, 126px, 0); }
    40% { clip: rect(54px, 9999px, 20px, 0); }
    60% { clip: rect(21px, 9999px, 60px, 0); }
    80% { clip: rect(98px, 9999px, 10px, 0); }
    100% { clip: rect(12px, 9999px, 85px, 0); }
}
@keyframes glitch-anim-2 {
    0% { clip: rect(14px, 9999px, 26px, 0); }
    20% { clip: rect(85px, 9999px, 16px, 0); }
    40% { clip: rect(14px, 9999px, 80px, 0); }
    60% { clip: rect(71px, 9999px, 10px, 0); }
    80% { clip: rect(8px, 9999px, 70px, 0); }
    100% { clip: rect(42px, 9999px, 15px, 0); }
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}
@keyframes blink-caret {
    from, from { border-color: transparent }
    50% { border-color: var(--accent-green); }
}

@keyframes scan {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media screen and (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .hero {
        flex-direction: column-reverse;
        justify-content: center;
        text-align: center;
        gap: 3rem;
        padding-top: 100px;
    }
    
    .cta-group {
        justify-content: center;
    }
    
    .typewriter {
        margin: 0 auto 1.5rem auto;
        display: inline-block;
    }
}

@media screen and (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(5, 5, 5, 0.95);
        flex-direction: column;
        padding: 2rem 0;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .hamburger {
        display: block;
    }

    .glitch-text {
        font-size: 2.5rem;
    }
    
    .timeline::after {
        left: 0;
    }
    
    .timeline-item {
        padding-left: 30px;
    }
    
    .timeline-dot {
        left: -9px;
    }
}

@media screen and (max-width: 480px) {
    .cta-group {
        flex-direction: column;
        width: 100%;
    }
    
    .cta-group .btn {
        width: 100%;
        text-align: center;
        padding: 1rem; /* Better touch targets for mobile */
    }
    
    .project-grid, .cert-grid, .skills-grid {
        grid-template-columns: 1fr; /* Force 1 column on small screens to prevent overflow */
    }
    
    .glitch-text {
        font-size: 2rem;
    }
    
    .typewriter {
        font-size: 1rem;
        white-space: normal; /* Fix horizontal scroll issue */
        border-right: none;
        animation: none; 
    }
    
    /* Make terminal box text wrap instead of overflowing */
    .terminal-body p {
        word-wrap: break-word;
        white-space: pre-wrap;
    }
    
    .hero-graphic {
        width: 250px;
        height: 250px;
    }
}
