/* =========================
   WRIT 20833 Portfolio Template
   CSS Stylesheet for Research Project Portfolios
   ========================= */

/* =========================
   CSS Variables (Color Scheme)
   ========================= */
:root {
  --bg-color: black;    
  --text-color: yellow; 
  --link-color: yellow;  
  --accent-color: yellow; 
} 

body {

    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    
    background-image: url("../images/starsbg.png");
    
    background-size: cover;
    
    background-repeat: no-repeat;
    
    background-position: center;
    
    line-height: 1.6;
    
    color: var(--text-color);
    
    background-color: var(--bg-color);
    
    }

/* This is where I put in my own code to try and make the background an image (specifically starsbg.png) OK that did not work so Dr. Rode helped me out and wrote THAT ^^ code to help us out.

body {
background-image: url("../images/starsbg.png"); 
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}
    
:root {
    --text-color: yellow; 
    --link-color: yellow;  
    --accent-color: yellow; 
  }*/

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

html {
    scroll-behavior: smooth;       /* Smooth scrolling for anchor links */
}

body {
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* =========================
   Header & Navigation
   ========================= */
/* Style semantic tags directly - no classes needed! */
header {
    background-color: var(--primary-color);
    color: yellow;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: yellow;
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
}

header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

nav {
    background-color: black;
    padding: 0.75rem;
    display: flex;              /* Make nav a flex container */
    justify-content: center;    /* Center the ul inside nav */
    position: sticky;           /* Stick to top when scrolling */
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Style the navigation list */
nav ul {
    list-style: none;           /* Remove bullets */
    padding: 0;                 /* Remove default padding */
    margin: 0;                  /* Remove default margin */
    display: flex;              /* Arrange items horizontally */
    flex-direction: row;        /* Explicit: horizontal on desktop */
    justify-content: center;    /* Center the items */
    gap: 1rem;                  /* Space between items */
    flex-wrap: wrap;            /* Wrap on small screens */
}

nav li {
    list-style: none;           /* Extra insurance - remove bullets */
}

nav a {
    color: yellow;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: background-color 0.3s ease;
    border-radius: 4px;
}

nav a:hover {
    background-color: var(--primary-color);
}

/* =========================
   Main Content
   ========================= */
/* Style main semantic tag directly */
main {
    max-width: 900px;          /* Don't get too wide */
    margin: 2rem auto;         /* Center horizontally */
    padding: 0 1rem;           /* Space on sides for mobile */
}

/* All sections inside main get consistent styling */
main section {
    background-color: black;
    padding: 2rem;
    margin-bottom: 2rem;       /* Space between sections */
    border-radius: 8px;        /* Rounded corners */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Style h2 headings inside sections */
main section h2 {
    color: var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.875rem;
}

main section h3 {
    color: var(--text-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

/* Paragraphs inside sections */
main section p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Lists inside sections */
main section ul,
main section ol {
    margin: 1rem 0 1rem 2rem;
    line-height: 1.8;
}

main section li {
    margin-bottom: 0.5rem;
}

/* =========================
   Data Visualizations
   ========================= */
/* Container for charts and images */
.viz-container {
    margin: 2rem 0;
    text-align: center;
}

.viz-container img {
    max-width: 100%;           /* Responsive: never wider than container */
    height: auto;              /* Maintain aspect ratio */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
}

/* Figure captions */
.viz-container figcaption {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Grid layout for multiple visualizations */
.viz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* =========================
   Code Blocks
   ========================= */
/* Improve pre/code styling for Python code */
pre {
    background: #2d2d2d;          /* Dark background */
    color: #f8f8f2;               /* Light text */
    border: none;
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

/* Inline code (inside paragraphs) */
p code, li code {
    background: #f4f4f4;
    color: #c7254e;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Code block titles */
.code-title {
    background: #1e1e1e;
    color: #9cdcfe;
    padding: 0.5rem 1rem;
    border-radius: 8px 8px 0 0;
    font-family: monospace;
    font-size: 0.85rem;
    margin-bottom: -0.5rem;
}

.code-title + pre {
    border-radius: 0 0 8px 8px;
    margin-top: 0;
}

/* =========================
   Data Tables
   ========================= */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: black;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid #e2e8f0;
}

th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

tr:nth-child(even) {
    background: black;
}

.results-table {
    font-size: 0.95rem;
    margin: 1.5rem auto;
    max-width: 700px;
}

.results-table td {
    text-align: center;
}

.results-table td:first-child {
    text-align: left;
    font-weight: 500;
}

/* Highlight key rows */
.results-table tr.highlight {
    background: black;
    font-weight: bold;
}

/* =========================
   Framework Connections
   ========================= */
.framework-callout {
    background: linear-gradient(135deg,  rgb(31, 31, 31));
    border-left: 5px solid var(--secondary-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.framework-callout h3 {
    color: var(--primary-color);
    margin-top: 0;
}

.framework-callout strong {
    color: var(--secondary-color);
}

/* =========================
   Footer (semantic tag)
   ========================= */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* =========================
   Responsive Design (Mobile)
   ========================= */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;     /* Smaller on mobile */
    }

    nav {
        font-size: 0.9rem;
    }

    /* Stack navigation vertically on mobile */
    nav ul {
        flex-direction: column;  /* Change from row to column */
        align-items: center;     /* Center the stacked items */
    }

    nav a {
        display: block;          /* Full width for easier tapping */
        width: 100%;
        text-align: center;
    }

    main section {
        padding: 1rem;         /* Less padding on mobile */
    }

    .viz-grid {
        grid-template-columns: 1fr;  /* Single column on mobile */
    }
}

/* =========================
   Print Styles (Optional)
   ========================= */
@media print {
    nav {
        display: none;
    }

    main section {
        box-shadow: none;
        page-break-inside: avoid;
    }
}
