/* 
   Main Stylesheet for Anower Zihad's Portfolio
   Theme: Backend/DevOps Engineer
*/

/* ===== Base Styles ===== */
:root {
    /* Color Scheme */
    --primary-bg: #0d1117;
    --secondary-bg: #161b22;
    --terminal-green: #4caf50;
    --docker-blue: #2496ed;
    --kubernetes-blue: #326ce5;
    --aws-orange: #ff9900;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --border-color: #30363d;
    --card-bg: #1c2128;
    --hover-bg: #21262d;
    
    /* Typography */
    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-mono);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--docker-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

ul {
    list-style-position: inside;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--terminal-green), var(--docker-blue));
    border-radius: 2px;
}

section {
    padding: 100px 0;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.primary-btn {
    background-color: var(--terminal-green);
    color: var(--card-bg);
    border: 2px outset var(--terminal-green);
}

.primary-btn:hover {
    background-color: #3d9140;
    color: var(--hover-bg);
    transform: translateY(-2px);
}

.secondary-btn {
    background-color: transparent;
    color: var(--text-primary);
    border: 5px outset var(--terminal-green);
    /* border-bottom-color: rgb(101, 174, 101);
    border-right-color: rgb(91, 146, 91); */
}

.secondary-btn:hover {
    background-color: var(--terminal-green);
    color: var(--hover-bg);
    transform: translateY(-2px);
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(13, 17, 23, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    transition: all 0.3s ease;
}

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

.logo {
    flex: 0 0 auto;
    text-align: left;
}

.ip-display {
    flex: 0 0 auto;
    text-align: right;
    margin-left: 30px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ip-display a {
    color: var(--terminal-green);
    font-weight: 600;
    text-decoration: none;
    padding: 0;
    border: none;
    border-radius: 0;
    background-color: transparent;
    transition: text-decoration-color 0.3s ease;
}

.ip-display a:hover {
    text-decoration: underline;
    text-decoration-color: var(--terminal-green);
    text-underline-offset: 4px;
}

.nav-menu {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.logo a {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--terminal-green);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-link {
    font-family: var(--font-mono);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--terminal-green);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--terminal-green);
}

.nav-link:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* ===== Hero Section ===== */
.hero {
    height: 95vh;
    display: flex;
    align-items: center;
    background-color: var(--primary-bg);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Multiple backgrounds: Gradient layers + Semi-transparent background image */
    background: 
        radial-gradient(circle at 10% 20%, rgba(50, 108, 229, 0.2) 0%, rgba(13, 17, 23, 0) 50%),
        radial-gradient(circle at 90% 80%, rgba(76, 175, 80, 0.2) 0%, rgba(13, 17, 23, 0) 50%),
        url('../images/bg-green.jpg');

    background-size: cover;  /* Ensure the image covers the section */
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.5; /* Lower opacity of the entire pseudo-element */
    
    z-index: 1;
}


.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.terminal {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.terminal-header {
    background-color: var(--secondary-bg);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.terminal-buttons {
    display: flex;
    margin-right: 15px;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.red {
    background-color: #ff5f56;
}

.yellow {
    background-color: #ffbd2e;
}

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

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.terminal-body {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 1rem;
    height: 200px;
}

.line {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.prompt {
    color: var(--terminal-green);
    margin-right: 10px;
}

.command {
    color: var(--text-primary);
}

.output {
    color: var(--text-secondary);
}

.typing-text {
    border-right: 2px solid var(--terminal-green);
    white-space: nowrap;
    overflow: hidden;
    animation: typing 3s steps(40, end), blink-caret 1.5s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--terminal-green) }
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background-color: var(--terminal-green);
    animation: blink 1s infinite;
}

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

.hero-buttons {
    display: flex;
    gap: 15px;
}

/* ===== About Section ===== */
.about {
    background-color: var(--secondary-bg);
}

.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.image-container {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    /* background-color: var(--card-bg); */
    color: var(--text-secondary);
    font-size: 5rem;
}

.about-text {
    flex: 2;
}

.education {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.education h3 {
    margin-bottom: 1rem;
    color: var(--terminal-green);
}

.education-item {
    margin-bottom: 1.5rem;
}

.education-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.date {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.9rem;
}

/* ===== Experience Section ===== */
.experience {
    background-color: var(--primary-bg);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    padding-left: 50px;
}

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--terminal-green);
    z-index: 1;
}

.timeline-content {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.timeline-content h3 {
    color: var(--terminal-green);
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.timeline-content ul {
    list-style-type: none;
    padding-left: 0;
}

.timeline-content ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
}

.timeline-content ul li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--terminal-green);
    font-family: var(--font-mono);
}

/* ===== Skills Section ===== */
.skills {
    background-color: var(--secondary-bg);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.skill-category {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-category h3 {
    color: var(--terminal-green);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.3rem;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc(33.333% - 10px);
}

.skill-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.skill-item span {
    font-size: 0.8rem;
    text-align: center;
    color: var(--text-secondary);
}

/* ===== Projects Section ===== */
.projects {
    background-color: var(--primary-bg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-header {
    padding: 20px;
    background-color: var(--secondary-bg);
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--border-color);
}

.project-icon {
    font-size: 2rem;
    color: var(--terminal-green);
}

.project-header h3 {
    margin-bottom: 0;
    color: var(--text-primary);
}

.project-body {
    padding: 20px;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.tech-tag {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--terminal-green);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

.project-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
}

.project-link {
    color: var(--docker-blue);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.project-link:hover {
    color: var(--kubernetes-blue);
}

/* ===== Contact Section ===== */
.contact {
    background-color: var(--secondary-bg);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

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

.contact-item h3 {
    margin-bottom: 5px;
    color: var(--text-primary);
}

.contact-item p {
    margin-bottom: 5px;
    color: var(--text-secondary);
}

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

.social-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--card-bg);
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--terminal-green);
    color: var(--primary-bg);
    transform: translateY(-3px);
}

.contact-form {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    resize: vertical;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--terminal-green);
}

/* ===== Footer ===== */
.footer {
    background-color: var(--primary-bg);
    padding: 50px 0 20px;
    border-top: 1px solid var(--border-color);
}

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

.footer-logo a {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--terminal-green);
    text-decoration: none;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--terminal-green);
}

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

.footer-social a {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: var(--terminal-green);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .ip-display {
        display: none;
    }
    
    .logo {
        flex: none;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background-color: var(--secondary-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 15px 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .timeline::before {
        left: 10px;
    }
    
    .timeline-dot {
        left: 1px;
    }
    
    .skill-item {
        width: calc(50% - 10px);
    }
}

/* Certificate Styles */
.certificate-image {
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.certificate-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.project-card .project-footer {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}
