/* Basic Reset & Fonts */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: #f9f9f9; /* Slightly off-white background color */
}

.container {
    max-width: 960px;
    margin: auto;
    padding: 0 20px;
}

h1, h2, h3 {
    margin-bottom: 1rem;
    font-weight: 700;
    color: #1a1a1a; /* Darker heading color */
}

h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0; /* Subtle line below section titles */
}

p {
    margin-bottom: 1rem;
}

a {
    color: rgb(55, 106, 183); /* Blue as highlight color */
    text-decoration: none;
    transition: color 0.3s ease; /* Smooth transition for hover */
}

a:hover {
    color: #334b65; /* Darker blue on hover */
}

ul {
    list-style: none;
    padding-left: 0; /* Remove default padding */
}

/* Header */
header {
    background: #ffffff; /* White background for header */
    padding: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Subtle shadow */
    position: sticky; /* Keep header fixed at the top */
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #eee;
}

header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

header h1 {
    margin-bottom: 0.25rem;
    font-size: 2rem;
}

header .subtitle {
    font-size: 1rem;
    color: #555;
    margin-bottom: 1rem;
    font-weight: 300;
}

header nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allow line break on smaller screens */
}

header nav ul li {
    margin: 0 15px;
}

header nav ul li a {
    font-weight: 400;
    color: #333;
    transition: color 0.3s ease;
}

header nav ul li a:hover {
    color: #3c5877;
}

/* Main Sections */
main section {
    padding: 4rem 0;
    border-bottom: 1px solid #eee; /* Subtle dividing line between sections */
}

main section:last-of-type {
    border-bottom: none;
}

.logo-icon {
  width: 150px;      /* Largura desejada */
  height: auto;      /* Mantém a proporção automaticamente */
  margin-bottom: 10px; /* Espaço entre o ícone e o título */
}

/* Hero Section */
.hero {
    background-color: #eef4ff; /* Subtle light blue background for highlight */
    text-align: center;
    padding: 3rem 0; /* Smaller padding for intro */
}

.hero h2 {
    font-size: 1.8rem;
    border-bottom: none;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.1rem;
    color: #444;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}


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

.skill-category h3 {
    font-size: 1.1rem;
    color: rgb(55, 106, 183); /* Category title with highlight color */
    margin-bottom: 0.8rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.3rem;
}

.skill-category ul li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    position: relative;
    padding-left: 15px; /* Space for the marker */
}

/* Subtle marker for list items */
.skill-category ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #5899de;
    font-size: 1.1rem;
    line-height: inherit;
}


/* Experience & Education Section */
.experience-item, .education-item {
    margin-bottom: 2rem;
}

.experience-item:last-child, .education-item:last-child {
    margin-bottom: 0;
}

.experience-item h3, .education-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.experience-item p em, .education-item p em {
    color: rgb(55, 106, 183);
    font-style: italic;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.8rem;
}

.experience-item ul li {
     margin-bottom: 0.4rem;
     position: relative;
     padding-left: 18px; /* Space for the marker */
     font-size: 0.95rem;
}

.experience-item ul li::before {
    content: '›'; /* Use a different marker */
    position: absolute;
    left: 0;
    color: rgb(55, 106, 183);
    font-weight: bold;
    top: -1px; /* Fine-tune vertical position */
}

/* Contact Section */
#contact {
    background-color: #f9f9f9; /* Slightly different background */
}

#contact p {
    margin-bottom: 1.5rem;
}

.contact-links li {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.contact-links span { /* For the phone number */
    color: #333;
}

/* Footer */
footer {
    color: #333;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 0;
    box-sizing: border-box;
    margin: 0;
}

footer p {
    margin: 0;
    padding: 0;
}

/* Fade-in Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px); /* Start slightly below */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Media Queries for Responsiveness (Basic Example) */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    header .subtitle {
        font-size: 0.9rem;
    }
    header nav ul li {
        margin: 5px 10px; /* Smaller spacing on mobile */
    }
    main section {
        padding: 3rem 0;
    }
    .skills-grid {
        grid-template-columns: 1fr; /* One column on mobile */
    }
}

@media (max-width: 480px) {
     header h1 {
        font-size: 1.6rem;
    }
     header .subtitle {
        font-size: 0.85rem;
    }
    header nav ul li {
        margin: 3px 8px;
    }
    h2 {
        font-size: 1.5rem;
    }
}

/* Transição suave no header em scroll */
header {
    transition: all 0.4s ease;
}

header h1 {
    transition: font-size 0.4s ease, margin 0.4s ease;
}

.logo-icon {
    transition: width 0.4s ease, opacity 0.4s ease;
}

header .subtitle,
header nav {
    transition: opacity 0.4s ease, max-height 0.4s ease;
}

/* Estado compactado (após scroll para baixo) */
header.compact .subtitle,
header.compact nav {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
}
/* alterei aqui */
header.compact .logo-icon { 
    display: none; 
}

header.compact h1 {
    font-size: 1.5rem; /* alterei aqui */
    margin-bottom: 0;  
}

/* Estilização do link no título para parecer texto normal */
#top-link {
    text-decoration: none;
    color: #33406f;
    cursor: pointer;
}

/* Styling for the Easter Egg Link Section */
.archive-section {
    margin: 30px 0; /* Add some space around the section */
    padding: 15px;
    border: 1px dashed #ccc; /* Optional: subtle border */
    background-color: #f9f9f9; /* Optional: slightly different background */
}

/* Style for the link element itself */
.secret-link {
    text-decoration: none; /* Remove underline from the link */
    cursor: pointer;
}

/* Style for the fake prompt box snippet */
.fake-prompt-snippet {
    background-color: #222; /* Dark background, less intense than pure black */
    color: #ddd; /* Light gray text */
    font-family: 'Consolas', 'Lucida Console', 'Courier New', monospace; /* Terminal font */
    padding: 8px 15px;
    border: 1px solid #555;
    display: inline-block; /* Make it fit content */
    font-size: 0.9em; /* Slightly smaller font */
    border-radius: 3px; /* Slightly rounded corners */
    transition: background-color 0.2s, color 0.2s; /* Smooth hover */
}

/* Hover effect for the prompt box */
.fake-prompt-snippet:hover {
     background-color: #274a97; /* A DOS-like green on hover */
     color: #ffffff; /* Black text on hover */
}

/* Ensure code tag inside inherits correctly */
.fake-prompt-snippet code {
  font-family: inherit;
  color: inherit;
}

/* Blinking cursor for the snippet */
.fake-prompt-snippet .blinking-cursor-snippet {
    background-color: #ddd; /* Match text color */
    color: #222; /* Match background color */
    /* Use 'blink-snippet' to avoid conflicts if main page uses 'blink' */
    animation: blink-snippet 1s step-end infinite;
    display: inline-block;
    width: 8px; /* Cursor width */
    height: 1em; /* Cursor height (match line height) */
    margin-left: 4px; /* Space before cursor */
    vertical-align: text-bottom; /* Align cursor better */
}

/* Blinking animation keyframes */
@keyframes blink-snippet {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* GitHub Repository Images */
.github-repos-section {
    margin-top: 3rem;
}

.github-repos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.github-repo-card {
    display: block;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 100%;
}

.github-repo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(55, 106, 183, 0.2);
}

.github-repo-card img {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
    display: block;
    transition: all 0.3s ease;
}

.github-repo-card:hover img {
    filter: brightness(1.05);
}

/* BioHub card - larger size without cropping */
#biohub .github-repo-card img {
    max-height: 350px;
    object-fit: contain; /* Changed to contain to avoid cropping */
    background-color: #f9f9f9;
}

/* Responsive adjustments for repo images */
@media (max-width: 768px) {
    .github-repos-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .github-repo-card img {
        max-height: 200px;
    }
}

@media (max-width: 480px) {
    .github-repos-section h3 {
        font-size: 1.3rem;
    }
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background-color: #fff;
    cursor: pointer;
    aspect-ratio: 1;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    z-index: 10;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

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

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.8rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
}

.gallery-caption p {
    margin: 0;
    font-size: 0.85rem;
    color: white;
    font-weight: 500;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* Modal/Lightbox Styles */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    animation: fadeIn 0.3s ease;
}

.gallery-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal-content {
    max-width: 85%;
    max-height: 85vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
    border-radius: 8px;
    display: block;
    margin: auto;
}

.gallery-modal-caption {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.1rem;
    text-align: center;
    background: rgba(0,0,0,0.8);
    padding: 12px 24px;
    border-radius: 8px;
    max-width: 80%;
    backdrop-filter: blur(10px);
}

.gallery-modal-close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: white;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    background: rgba(0,0,0,0.5);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.gallery-modal-close:hover {
    color: white;
    background: #376ab7;
    transform: rotate(90deg);
}

.gallery-modal-prev,
.gallery-modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    padding: 15px;
    transition: all 0.3s ease;
    user-select: none;
    z-index: 1001;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal-prev {
    left: 30px;
}

.gallery-modal-next {
    right: 30px;
}

.gallery-modal-prev:hover,
.gallery-modal-next:hover {
    color: white;
    background: #376ab7;
    transform: translateY(-50%) scale(1.1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Responsive adjustments for gallery */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.8rem;
    }
    
    .gallery-modal-content {
        max-width: 95%;
        max-height: 80vh;
    }
    
    .gallery-modal-prev,
    .gallery-modal-next {
        font-size: 30px;
        width: 45px;
        height: 45px;
        padding: 10px;
    }
    
    .gallery-modal-prev {
        left: 15px;
    }
    
    .gallery-modal-next {
        right: 15px;
    }
    
    .gallery-modal-close {
        top: 20px;
        right: 20px;
        font-size: 35px;
        width: 50px;
        height: 50px;
    }
    
    .gallery-modal-caption {
        font-size: 0.9rem;
        padding: 10px 18px;
        bottom: 30px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.6rem;
    }
    
    .gallery-caption p {
        font-size: 0.75rem;
    }
}