/* === DAN ALBRECHT'S UNIVERSAL STYLESHEET === */

/* --- 1. General Styling & Variables --- */
:root {
    --bg-color: #111827; /* Dark Blue/Gray */
    --card-color: #1F2937; /* Lighter Dark Blue/Gray */
    --primary-text: #F9FAFB; /* Off-white */
    --secondary-text: #9CA3AF; /* Gray */
    --accent-color: #38BDF8; /* Sky Blue */
    --accent-hover: #7DD3FC;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--primary-text);
    line-height: 1.7;
}
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 2rem;
}
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--primary-text);
    margin-bottom: 1rem;
}
h1 { font-size: 3rem; }
h2 { font-size: 2.2rem; border-bottom: 2px solid var(--accent-color); padding-bottom: 0.5rem; display: inline-block; }
p { color: var(--secondary-text); margin-bottom: 1rem; }
section {
    border-bottom: 1px solid var(--card-color);
}

/* --- 2. Button Styles --- */
.btn {
    display: inline-block;
    text-decoration: none;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    margin-top: 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    margin: 0 0.5rem;
}
.btn:hover {
    transform: translateY(-2px);
}
.btn-primary {
    background-color: var(--accent-color);
    color: var(--bg-color);
    border-color: var(--accent-color);
}
.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
}
.btn-secondary {
    background-color: transparent;
    color: var(--accent-color);
    border-color: var(--accent-color);
}
.btn-secondary:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

/* --- 3. Navigation & Footer --- */
.main-nav {
    background-color: rgba(31, 41, 55, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-color);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}
.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}
.nav-brand {
    color: var(--primary-text);
    font-weight: 600;
    text-decoration: none;
    font-size: 1.2rem;
}
.header-logo {
    height: 60px;
    width: auto;
    display: block;
}
.main-nav ul { list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0; align-items: center; }
.main-nav a { color: var(--secondary-text); text-decoration: none; transition: color 0.3s ease; }
.main-nav a:hover { color: var(--accent-color); }

footer {
    text-align: center;
    background-color: var(--card-color);
    border-top: 1px solid #374151;
}
footer .container {
    padding: 4rem 2rem;
    border-bottom: none;
}
.social-links a { color: var(--primary-text); font-size: 2rem; margin: 0 1rem; transition: color 0.3s ease; }
.social-links a:hover { color: var(--accent-color); }
.footer-bottom {
    padding: 1.5rem 2rem;
    background-color: var(--bg-color);
    text-align: center;
    font-size: 0.9rem;
}
.footer-bottom a, .footer-bottom p {
    color: var(--secondary-text);
    text-decoration: none;
}
.footer-disclaimer {
    margin-bottom: 1rem !important;
    font-size: 0.8rem;
}
.footer-bottom a:hover {
    color: var(--accent-color);
}
.newsletter-container {
    background-color: var(--bg-color);
    padding: 3rem 0;
    border-bottom: 1px solid var(--card-color);
}
.newsletter-container h3 {
    text-align: center;
    color: var(--primary-text);
    font-size: 1.8rem;
}
.newsletter-container p {
    text-align: center;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.audio-player-container {
    margin: 2rem 0 3rem 0; /* Top, Right, Bottom, Left */
    padding: 1.5rem;
    background-color: var(--card-color);
    border-radius: 8px;
}

/* --- 4. Homepage Specific Styles --- */
.hero {
    background: linear-gradient(rgba(17, 24, 39, 0.8), rgba(17, 24, 39, 0.8)), url('../images/Dan-Fishing.jpeg') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 2rem;
    padding-top: 60px;
}
.hero h1 { font-size: 4rem; }
.hero .subtitle { font-size: 1.5rem; font-weight: 300; margin-bottom: 1.5rem; color: var(--secondary-text); }
.hero .typed-text { color: var(--accent-color); font-weight: 600; border-right: 2px solid var(--accent-color); animation: blink 0.7s infinite; }
.highlights-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.highlight-card { background-color: var(--card-color); padding: 2rem; border-radius: 8px; border-left: 5px solid var(--accent-color); transition: transform 0.3s ease; }
.highlight-card:hover { transform: translateY(-10px); }
.highlight-card h3 { color: var(--accent-color); }
.expertise-container { display: flex; gap: 3rem; margin-top: 2rem; flex-wrap: wrap; }
.expertise-column { flex: 1; min-width: 300px; }
.expertise-column ul { list-style: none; margin: 0; padding: 0; }
.expertise-column li { background-color: var(--card-color); padding: 0.5rem 1rem; margin-bottom: 0.5rem; border-radius: 5px; }
#hobbies h2 { text-align: center; border-bottom: none; margin-bottom: 2rem; }
.hobbies-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
a.hobby-card-link { text-decoration: none; color: inherit; }
.hobby-card { background: var(--card-color); padding: 2rem; border-radius: 8px; text-align: center; transition: transform 0.3s ease; height: 100%; }
.hobby-card:hover { transform: translateY(-10px); }
.hobby-icon { font-size: 3rem; color: var(--accent-color); margin-bottom: 1rem; }
.hobby-card h3 { color: var(--primary-text); margin-bottom: 0.5rem; }
.hobby-card p { font-size: 0.9rem; }
.latest-posts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
#latest-articles .post-card { margin: 0; }

/* --- 5. Interactive Timeline Styles --- */
.timeline-container { position: relative; max-width: 800px; margin: 2rem auto; }
.timeline-container::after { content: ''; position: absolute; width: 4px; background-color: var(--card-color); top: 0; bottom: 0; left: 50%; margin-left: -2px; }
.timeline-item { padding: 10px 40px; position: relative; background-color: inherit; width: 50%; }
.timeline-item::after { content: ''; position: absolute; width: 20px; height: 20px; right: -10px; background-color: var(--bg-color); border: 4px solid var(--accent-color); top: 25px; border-radius: 50%; z-index: 1; }
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-item:nth-child(even)::after { left: -10px; }
.timeline-content { padding: 20px 30px; background-color: var(--card-color); position: relative; border-radius: 8px; transition: transform 0.3s ease; }
.timeline-content:hover { transform: scale(1.03); }
.timeline-logo { max-height: 40px; width: auto; margin-bottom: 1rem; }
.timeline-date { font-size: 0.9rem; color: var(--accent-color); font-weight: 600; display: block; margin-bottom: 0.5rem; }
.timeline-content p { font-size: 0.9rem; margin-bottom: 0; }

/* --- 6. Other Page Styles (Resume, Blog, Contact, etc.) --- */
.page-header, .hobby-header, .resume-header { text-align: center; padding: 4rem 2rem; margin-top: 60px; }
.page-header h1, .hobby-header h1, .resume-header h1 { font-size: 3.5rem; }
.page-header p, .hobby-header p, .resume-header p { color: var(--secondary-text); font-size: 1.2rem; }
.post-card { background: var(--card-color); padding: 2rem; margin: 2rem 0; border-radius: 8px; border-left: 5px solid var(--accent-color); }
.post-card h2 a, .post-card h3 a { text-decoration: none; color: var(--primary-text); }
.post-meta { color: var(--secondary-text); margin-bottom: 1rem; font-size: 0.9rem; }
.read-more { display: inline-block; margin-top: 1rem; color: var(--accent-color); text-decoration: none; font-weight: 600; }
.read-more:hover { text-decoration: underline; }
.post-header { text-align: center; margin: 2rem 0 4rem 0; }
.post-title { font-size: 3rem; margin-bottom: 1rem; }
.post-content p { margin-bottom: 1.5rem; font-size: 1.1rem; }
.post-content h3 { font-size: 1.5rem; margin-top: 2.5rem; color: var(--accent-color); }
.post-content ul { padding-left: 20px; color: var(--secondary-text); }
.post-content li { margin-bottom: 0.5rem; }
.back-link { display: block; text-align: center; margin-top: 4rem; color: var(--accent-color); text-decoration: none; }
.main-carousel { margin: 2rem 0; }
.carousel-cell { width: 66%; height: 400px; margin-right: 15px; border-radius: 8px; overflow: hidden; cursor: pointer; }
.carousel-cell img { width: 100%; height: 100%; object-fit: cover; }
.flickity-button { background: rgba(255, 255, 255, 0.1); }
.flickity-button:hover { background: rgba(255, 255, 255, 0.2); }
.disclaimer-box { background-color: var(--card-color); border-left: 5px solid var(--accent-color); padding: 1.5rem; margin: 2rem 0; border-radius: 5px; font-size: 0.9rem; }
.disclaimer-box p { margin: 0; color: var(--secondary-text); }
.disclaimer-box i { margin-right: 10px; color: var(--accent-color); }
.table-container { overflow-x: auto; margin: 2rem 0; border: 1px solid var(--card-color); border-radius: 8px; }
table.styled-table { width: 100%; border-collapse: collapse; min-width: 600px; }
table.styled-table th, table.styled-table td { padding: 1rem; text-align: left; color: var(--secondary-text); border-bottom: 1px solid var(--card-color); }
table.styled-table tbody tr:last-child td { border-bottom: none; }
table.styled-table th { background-color: var(--card-color); color: var(--primary-text); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; }
table.styled-table .align-center { text-align: center; }
.category-tag { background-color: var(--accent-color); color: var(--bg-color); padding: 0.2rem 0.6rem; border-radius: 5px; font-size: 0.8rem; font-weight: 600; }
.filter-container { text-align: center; margin-bottom: 2rem; }
.filter-btn { display: inline-block; background: none; border: 1px solid var(--card-color); color: var(--secondary-text); padding: 0.5rem 1rem; margin: 0.2rem; border-radius: 20px; text-decoration: none; font-size: 0.9rem; transition: all 0.3s ease; }
.filter-btn:hover { background-color: var(--card-color); color: var(--primary-text); }
.filter-btn.active { background-color: var(--accent-color); border-color: var(--accent-color); color: var(--bg-color); font-weight: 600; }
.contact-form { max-width: 700px; margin: 2rem auto; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--secondary-text); }
.form-group input, .form-group textarea { width: 100%; padding: 0.8rem; border-radius: 5px; border: 1px solid #374151; background-color: var(--card-color); color: var(--primary-text); font-size: 1rem; font-family: 'Poppins', sans-serif; }
.response-page { text-align: center; padding: 6rem 2rem; margin-top: 60px; }
.response-page i { font-size: 4rem; margin-bottom: 2rem; }
.response-page h1 { border-bottom: none; }
.response-page .fa-check-circle { color: var(--accent-color); }
.response-page .fa-exclamation-triangle { color: #ef4444; }
.response-page p { max-width: 500px; margin-left: auto; margin-right: auto; }
.session-card {background-color: var(--card-color); border-radius: 8px; margin-bottom: 3rem; overflow: hidden; /* Ensures the video corners are rounded */}
.session-details {padding: 2rem;}
.session-title {margin-top: 0; color: var(--primary-text);}
.session-meta {font-weight: 600; color: var(--accent-color); margin-bottom: 1rem; display: block;}
.session-description {color: var(--secondary-text); font-size: 0.9rem;}

/* --- 7. Animations & Responsive Design --- */
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes blink { 50% { border-color: transparent; } }

@media(max-width: 768px) {
    .container { padding: 3rem 1rem; }
    h1 { font-size: 2.5rem; }
    .hero h1 { font-size: 3rem; }
    .hero .subtitle { font-size: 1.2rem; }
    .nav-container { flex-direction: column; height: auto; padding: 0.5rem 0; }
    .main-nav ul { padding-top: 0.5rem; gap: 1.5rem; }
    .hero { padding-top: 90px; }
    .cta-buttons { display: flex; flex-direction: column; align-items: center; gap: 1rem; width: 100%; max-width: 300px; }
    .skills-list, .cert-list { columns: 1; }
    .page-header, .hobby-header, .resume-header { padding-top: 3rem; }
    .post-title, .page-header h1, .hobby-header h1 { font-size: 2.5rem; }
    .timeline-container::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) { left: 0; }
    .timeline-item::after { left: 21px; }
}
/* --- 8. New Post Pop-up Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
}
.modal-overlay.is-visible {
    display: flex; /* Made visible by JavaScript */
}
.modal-content {
    background-color: var(--card-color);
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    border-top: 5px solid var(--accent-color);
}
.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    color: var(--secondary-text);
    cursor: pointer;
    line-height: 1;
}
.modal-close:hover {
    color: var(--primary-text);
}
.modal-content h3 {
    color: var(--primary-text);
    border-bottom: none;
}
/* --- 9. AI Chat Agent Styles --- */
.chat-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--accent-color);
    color: var(--bg-color);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1900;
    transition: transform 0.3s ease;
}
.chat-bubble:hover {
    transform: scale(1.1);
}
.chat-window {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 90%;
    max-width: 400px;
    height: 70vh;
    max-height: 600px;
    background-color: var(--bg-color);
    border: 1px solid var(--card-color);
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1900;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.chat-window.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.chat-header {
    background-color: var(--card-color);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-header h3 {
    margin: 0;
    font-size: 1.2rem;
    border: none;
}
.chat-close { font-size: 1.5rem; cursor: pointer; color: var(--secondary-text); }
.chat-body {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
}
.chat-message {
    margin-bottom: 1rem;
    max-width: 85%;
}
.chat-message p {
    padding: 0.8rem 1rem;
    border-radius: 15px;
    margin: 0;
    line-height: 1.5;
}
.ai-message { float: left; clear: both; }
.ai-message p { background-color: var(--card-color); color: var(--primary-text); border-bottom-left-radius: 3px; }
.user-message { float: right; clear: both; }
.user-message p { background-color: var(--accent-color); color: var(--bg-color); border-bottom-right-radius: 3px; }
.chat-footer {
    border-top: 1px solid var(--card-color);
    padding: 0.5rem;
}
#chatForm { display: flex; gap: 0.5rem; }
#chatInput {
    flex-grow: 1;
    border: none;
    background: var(--card-color);
    padding: 0.8rem;
    border-radius: 5px;
    color: var(--primary-text);
}
#chatForm button {
    background: var(--accent-color);
    border: none;
    color: var(--bg-color);
    font-size: 1.2rem;
    width: 50px;
    border-radius: 5px;
    cursor: pointer;
}