/* Cyber color scheme */
:root {
    --primary-color: #0a192f;
    --secondary-color: #64ffda;
    --accent-color: #ff3e3e;
    --background-color: #0a192f;
    --card-color: rgba(16, 32, 51, 0.9);
    --text-color: #8892b0;
    --neon-glow: 0 0 7px rgba(100, 255, 218, 0.3),
                0 0 10px rgba(100, 255, 218, 0.2),
                0 0 21px rgba(100, 255, 218, 0.1);
    --cyber-green: #64ffda;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    position: relative;
    overflow-x: hidden;
}

.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15;
}

/* Navigation */
nav {
    background-color: rgba(10, 25, 47, 0.95);
    padding: 1rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--cyber-green);
    box-shadow: var(--neon-glow);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
    padding: 5px 10px;
}

nav ul li a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--cyber-green);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s;
    box-shadow: var(--neon-glow);
}

nav ul li a:hover {
    color: var(--cyber-green);
    text-shadow: var(--neon-glow);
}

nav ul li a:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

nav ul li a.active {
    color: var(--cyber-green);
    text-shadow: var(--neon-glow);
}

nav ul li a.active::before {
    transform: scaleX(1);
}

/* Header */
header {
    text-align: center;
    padding: 8rem 2rem 4rem;
    background: rgba(10, 25, 47, 0.9);
    color: var(--cyber-green);
    position: relative;
    border-bottom: 2px solid var(--cyber-green);
    box-shadow: var(--neon-glow);
}

.glitch {
    position: relative;
    text-shadow: 0.05em 0 0 #00fffc, -0.03em -0.04em 0 #fc00ff,
                0.025em 0.04em 0 #fffc00;
    animation: glitch 725ms infinite;
}

.glitch span {
    position: absolute;
    top: 0;
    left: 0;
}

.cyber-text {
    color: var(--cyber-green);
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: pulse 2s infinite;
}

/* Terminal styles */
.terminals-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 2rem auto;
    max-width: 1200px;
    padding: 0 1rem;
}

.terminal {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.terminal:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.4);
}

.terminal-header {
    background: #2d2d2d;
    padding: 10px;
    display: flex;
    align-items: center;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
    position: relative;
    transition: all 0.3s;
}

.terminal-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transition: transform 0.2s;
}

.close { 
    background-color: #ff5f56; 
}

.close::after {
    background-color: rgba(255, 95, 86, 0.3);
}

.minimize { 
    background-color: #ffbd2e; 
}

.minimize::after {
    background-color: rgba(255, 189, 46, 0.3);
}

.maximize { 
    background-color: #27c93f; 
}

.maximize::after {
    background-color: rgba(39, 201, 63, 0.3);
}

.terminal-button:hover::after {
    transform: translate(-50%, -50%) scale(1.5);
}

.terminal-title {
    color: #fff;
    font-size: 0.9rem;
    margin-left: 10px;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.terminal-content {
    padding: 20px;
    min-height: 200px;
}

.terminal-line {
    font-family: 'Courier New', monospace;
    color: var(--cyber-green);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 10px;
}

.terminal-output {
    color: #fff;
    margin-left: 20px;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.cursor {
    width: 10px;
    height: 20px;
    background-color: var(--cyber-green);
    animation: blink 1s infinite;
}

@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 #00fffc, -0.03em -0.04em 0 #fc00ff,
                   0.025em 0.04em 0 #fffc00;
    }
    15% {
        text-shadow: 0.05em 0 0 #00fffc, -0.03em -0.04em 0 #fc00ff,
                   0.025em 0.04em 0 #fffc00;
    }
    16% {
        text-shadow: -0.05em -0.025em 0 #00fffc, 0.025em 0.035em 0 #fc00ff,
                   -0.05em -0.05em 0 #fffc00;
    }
    49% {
        text-shadow: -0.05em -0.025em 0 #00fffc, 0.025em 0.035em 0 #fc00ff,
                   -0.05em -0.05em 0 #fffc00;
    }
    50% {
        text-shadow: 0.05em 0.035em 0 #00fffc, 0.03em 0 0 #fc00ff,
                   0 -0.04em 0 #fffc00;
    }
    99% {
        text-shadow: 0.05em 0.035em 0 #00fffc, 0.03em 0 0 #fc00ff,
                   0 -0.04em 0 #fffc00;
    }
    100% {
        text-shadow: -0.05em 0 0 #00fffc, -0.025em -0.04em 0 #fc00ff,
                   -0.04em -0.025em 0 #fffc00;
    }
}

@keyframes pulse {
    0% {
        text-shadow: var(--neon-glow);
    }
    50% {
        text-shadow: none;
    }
    100% {
        text-shadow: var(--neon-glow);
    }
}

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

header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Main content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    margin-bottom: 3rem;
    transition: all 0.3s;
    position: relative;
}

@keyframes sectionGlitch {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-5px, 5px);
    }
    40% {
        transform: translate(-5px, -5px);
    }
    60% {
        transform: translate(5px, 5px);
    }
    80% {
        transform: translate(5px, -5px);
    }
    100% {
        transform: translate(0);
    }
}

.section-glitch {
    animation: sectionGlitch 0.5s ease;
}

.section-glitch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--cyber-green);
    mix-blend-mode: overlay;
    opacity: 0;
    animation: glitchFlash 0.5s ease;
}

@keyframes glitchFlash {
    0% { opacity: 0; }
    10% { opacity: 0.2; }
    20% { opacity: 0; }
    30% { opacity: 0.3; }
    40% { opacity: 0; }
    50% { opacity: 0.15; }
    60% { opacity: 0; }
    100% { opacity: 0; }
}

h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--secondary-color);
}

.card {
    background-color: var(--card-color);
    padding: 2rem;
    border-radius: 5px;
    border: 1px solid var(--cyber-green);
    box-shadow: var(--neon-glow);
    margin-bottom: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.4);
}

/* Biodata section */
.biodata-card, .company-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.profile-images, .company-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-profile-img, .main-company-img {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    border: 2px solid var(--cyber-green);
    border-radius: 10px;
    box-shadow: var(--neon-glow);
}

.profile-img, .company-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.additional-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.add-img-container {
    position: relative;
    height: 150px;
    overflow: hidden;
    border: 1px solid var(--cyber-green);
    border-radius: 5px;
    box-shadow: var(--neon-glow);
}

.add-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.main-profile-img:hover .img-overlay,
.main-company-img:hover .img-overlay,
.add-img-container:hover .img-overlay {
    opacity: 1;
}

.main-profile-img:hover img,
.main-company-img:hover img,
.add-img-container:hover img {
    transform: scale(1.1);
}

.biodata-info, .company-info {
    display: grid;
    gap: 1rem;
    align-content: start;
}

/* Portfolio grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.portfolio-item {
    background-color: var(--background-color);
    padding: 1.5rem;
    border-radius: 8px;
    transition: transform 0.3s;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

/* Timeline */
.timeline {
    margin-top: 2rem;
}

.timeline-item {
    padding: 1.5rem;
    border-left: 3px solid var(--secondary-color);
    margin-left: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 24px;
    width: 13px;
    height: 13px;
    background-color: var(--secondary-color);
    border-radius: 50%;
}

/* Gallery */
.gallery {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.gallery-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.gallery-item {
    position: relative;
    background-color: var(--card-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
}

.image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.overlay-content {
    text-align: center;
    color: var(--cyber-green);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.overlay-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    text-shadow: var(--neon-glow);
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .image-overlay {
    opacity: 1;
}

.gallery-item:hover .overlay-content {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .gallery-row {
        grid-template-columns: 1fr;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--primary-color);
    color: white;
}

.contact-section {
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.social-button {
    display: inline-block;
    text-decoration: none;
    position: relative;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    overflow: hidden;
    transition: all 0.3s;
}

/* WhatsApp Button */
.whatsapp-button {
    background: rgba(37, 211, 102, 0.1);
    border: 2px solid #25d366;
    color: #25d366;
    box-shadow: 0 0 10px rgba(37, 211, 102, 0.3);
}

.whatsapp-button:hover {
    background: rgba(37, 211, 102, 0.2);
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.5);
}

/* GitHub Button */
.github-button {
    background: rgba(110, 84, 148, 0.1);
    border: 2px solid #6e5494;
    color: #6e5494;
    box-shadow: 0 0 10px rgba(110, 84, 148, 0.3);
}

.github-button:hover {
    background: rgba(110, 84, 148, 0.2);
    box-shadow: 0 0 20px rgba(110, 84, 148, 0.5);
}

/* Instagram Button */
.instagram-button {
    background: rgba(225, 48, 108, 0.1);
    border: 2px solid #E1306C;
    color: #E1306C;
    box-shadow: 0 0 10px rgba(225, 48, 108, 0.3);
}

.instagram-button:hover {
    background: rgba(225, 48, 108, 0.2);
    box-shadow: 0 0 20px rgba(225, 48, 108, 0.5);
}

/* Email Button */
.email-button {
    background: rgba(66, 133, 244, 0.1);
    border: 2px solid #4285f4;
    color: #4285f4;
    box-shadow: 0 0 10px rgba(66, 133, 244, 0.3);
}

.email-button:hover {
    background: rgba(66, 133, 244, 0.2);
    box-shadow: 0 0 20px rgba(66, 133, 244, 0.5);
}

.button-content {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.social-icon {
    font-size: 1.2rem;
}

.button-text {
    font-size: 0.9rem;
}

.button-glitch {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    transform: translateX(-100%);
    transition: transform 0.3s;
}

.whatsapp-button .button-glitch {
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(37, 211, 102, 0.4) 40%,
        rgba(37, 211, 102, 0.6) 50%, 
        rgba(37, 211, 102, 0.4) 60%,
        transparent 70%
    );
}

.github-button .button-glitch {
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(110, 84, 148, 0.4) 40%,
        rgba(110, 84, 148, 0.6) 50%, 
        rgba(110, 84, 148, 0.4) 60%,
        transparent 70%
    );
}

.instagram-button .button-glitch {
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(225, 48, 108, 0.4) 40%,
        rgba(225, 48, 108, 0.6) 50%, 
        rgba(225, 48, 108, 0.4) 60%,
        transparent 70%
    );
}

.email-button .button-glitch {
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(66, 133, 244, 0.4) 40%,
        rgba(66, 133, 244, 0.6) 50%, 
        rgba(66, 133, 244, 0.4) 60%,
        transparent 70%
    );
}

.social-button:hover {
    transform: translateY(-2px);
    color: white;
}

.whatsapp-button:hover .button-glitch {
    transform: translateX(100%);
}

@media (max-width: 768px) {
    .biodata-card, .company-card {
        grid-template-columns: 1fr;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul li {
        margin: 0.5rem 0;
    }
    
    header {
        padding: 6rem 1rem 3rem;
    }
    
    .portfolio-grid,
    .gallery {
        grid-template-columns: 1fr;
    }
}
