/* 1. FONT IMPORTS & ROOT VARIABLES
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Special+Elite:wght@400;600&display=swap');

:root {
    --content-bg-color: #0816249b;
    --content-text-color: #ffffea; 
    --heading-color: cyan; 
    --accent-color: magenta; 
    --green-accent-color: rgb(100, 255, 160); 
    --subtle-border: #0b1b2c; 
    --font-body: 'Lato', sans-serif;
    --font-heading: 'Special Elite', sans-serif;
}

/* 2. BASE & BODY STYLES
   ========================================================================== */
/* Apply the 'theme-dark' class to the body tag of your CV html file */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #111111;
    color: #d1d1c9;
}

canvas {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
}

/* 3. LAYOUT & CONTAINER
   ========================================================================== */
/* This targets the existing .user-page-content div */
.user-page-content {
    max-width: 850px;
    margin: 40px auto;
    padding: 40px;
    background-color: var(--content-bg-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: left;
}

/* 4. HEADER & TYPOGRAPHY
   ========================================================================== */
/* This targets the main H1 (e.g., "CV+: Dermot Hunt") */
.user-page-content h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--heading-color);
    margin: 0 0 5px 0;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

/* This targets the paragraph directly under the H1 */
.nav-links ul {
    list-style: none; /* Remove default bullets */
    padding-left: 0;
    margin: 15px 0 40px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 25px;
    font-size: 0.95rem;
}

.nav-links li {
    position: relative;
    padding-left: 1.2em; /* Space for the custom bullet */
}

.nav-links li::before {
    content: '⍼'; /* Custom bullet character */
    position: absolute;
    left: 0;
    color: inherit; /* Use parent text color */
}

.nav-links a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

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

/* General heading styles within the CV */
.user-page-content h2,
.user-page-content h3 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.user-page-content h2 {
    font-size: 1.6rem;
    border-bottom: 1px solid var(--subtle-border);
    padding-bottom: 8px;
}

.user-page-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--heading-color);
}

.user-page-content p {
    font-size: 1rem;
    margin-bottom: 1em;
}

/* 5. CV SECTIONS (using .content-card)
   ========================================================================== */
/* We'll restyle the existing portfolio cards to look like CV entries */
.content-box {
    display: block; /* Override grid layout from main styles */
}

.content-card {
    padding: 0;
    margin-bottom: 30px;
    border: none;
    border-left: 3px solid var(--subtle-border);
    padding-left: 20px;
    background-color: transparent;
    box-shadow: none;
    border-radius: 0;
    transition: border-color 0.3s ease;
}

.content-card:hover {
    border-left-color: var(--accent-color); /* Using --accent2 from styles.css for hover */
    transform: none; /* Disable hover effect from main styles */
    box-shadow: none;
}

/* This targets the H3 inside the card (e.g., "Staff Writer: SPYSCAPE") */
.content-card h3 {
    margin-top: 0;
    margin-bottom: 5px;
}

/* 6. CV Section Grouping
   ========================================================================== */
.content-section {
    padding: 25px;
    margin-bottom: 35px;
    border: 1px solid var(--subtle-border);
    border-radius: 6px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* This creates the parent-level hover effect */
.content-section:hover {
    background-color: #0c1f33; /* A subtle dark blue, slightly lighter than bg */
    border-color: var(--accent-color);
}

/* Section title styles */
.content-section h2 {
    /* Override the general h2 style for sections */
    border-bottom: none;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.6rem;
    color: var(--accent-color);
}

/* Adjustments for cards within a section */
.content-section .content-card {
    margin-bottom: 20px; /* Reduce margin between cards in a section */
}

.content-section .content-card:last-child {
    margin-bottom: 0; /* No margin for the last card in a section */
}

/* 7. Content/Link Components
   ========================================================================== */

/* --- Content Grid --- */
.content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Default to 3 columns */
    gap: 15px;
    padding-top: 10px; /* Space between header and grid */
}

.content-item {
    background-color: var(--subtle-border);
    padding: 10px 15px;
    border-radius: 4px;
    color: var(--content-text-color);
    text-align: center;
    font-size: 0.95rem;
}

/* Responsive grid columns */
/* On medium screens (tablets), go to 2 columns */
@media (max-width: 768px) { .skills-grid { grid-template-columns: repeat(2, 1fr); } }

/* On small screens (mobile), stack to 1 column */
@media (max-width: 480px) { .skills-grid { grid-template-columns: 1fr; } }

/* --- Link Cards --- */
.linkcards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
}  

.linkcard {
  border: 1px solid #37474f;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background-color: #162037;
  color: var(--p-text);
  text-decoration: none;
  transition: transform 0.3s ease-in-out, border-color 0.3s ease-in-out;
}  

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


/* 8. UTILITIES & PRINT STYLES
   ========================================================================== */
@media print {
    body.theme-dark, .user-page-content {
        margin: 0;
        padding: 0;
        box-shadow: none;
        border: none;
    }

    .btn-logout {
        display: none !important;
    }
}

/* 9. Component: Login Modal
   ========================================================================== */

.login-button {
    font-family: var(--font-main);
    color: var(--login-color);
    background-color: transparent;
}

.login-button:hover, .login-button:focus {
    color: var(--bgcolor); /* Text color changes to background color */
    background-color: var(--login-hover-color); /* Background becomes light */
    border-color: var(--login-hover-color); /* Border matches background */
    outline: none;
}

.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--bgcolor);
    color: var(--text-color);
    margin: auto;
    padding: 30px;
    border: 1px solid var(--accent1);
    border-radius: 8px;
    width: 80%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    font-family: var(--font-main);
}

.modal-content h2 {
    font-family: var(--font-alt);
    color: var(--accent2);
    margin-top: 0;
    text-align: center;
}

.close-button {
    color: var(--login-color);
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: var(--text-color);
    text-decoration: none;
}

.modal-content label { display: block; margin-bottom: 8px; color: var(--accent1); }
.modal-content input[type="email"], .modal-content input[type="password"] { width: calc(100% - 22px); padding: 10px; margin-bottom: 20px; border: 1px solid var(--accent2); border-radius: 4px; background-color: #333; color: var(--text-color); /* Default color */ }
.modal-content button[type="submit"] { background-color: var(--accent1); color: var(--bgcolor); padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; width: 100%; }
.modal-content button[type="submit"]:hover { background-color: var(--accent2); }
.error-message { color: #ff4d4d; text-align: center; margin-top: 15px; font-size: 0.9em; }

/* 10. Component: Responsive Embed (for videos)
   ========================================================================== */
.responsive-embed {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.responsive-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border: none;
}