/*
    Name: Bram Weitzman - Personal Portfolio
    Author: Gemini AI
    Description: A lightweight, responsive, dark-mode theme for a personal portfolio website.
*/

/* --- CSS Variables --- */
:root {
    --primary-bg: #121212;
    --secondary-bg: #1e1e1e;
    --primary-text: #e0e0e0;
    --accent-color: #0097a7; /* A modern teal */
    --accent-hover: #00bcd4;
    --code-bg: #1e1e1e;
    --code-text: #33ff33; /* Terminal Green */
    --header-bg: rgba(30, 30, 30, 0.85);
    --border-color: #444;
    --card-bg: #2a2a2a;
    --font-primary: 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-monospace: 'Consolas', 'Menlo', 'Courier New', monospace;
    --rem-base: 16px;
}

/* --- Global Resets & Base Styles --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--rem-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--primary-bg);
    color: var(--primary-text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-text);
    margin-bottom: 1rem;
    line-height: 1.2;
}
h1.hero-headline, h2 {
    color: var(--accent-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }

p {
    margin-bottom: 1rem;
}

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

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.content-wrapper {
    width: 90%;
    max-width: 1200px;
    margin: 2rem auto;
    flex-grow: 1;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Header & Navigation --- */
.main-header {
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.logo a {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--primary-text);
}
.logo a:hover {
    color: var(--accent-hover);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
}

/* --- Mobile Navigation --- */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.hamburger-bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--primary-text);
    transition: all 0.3s ease-in-out;
}

/* --- Putty/CLI Code Snippet Style --- */
.cli-code-block {
    background-color: var(--code-bg);
    font-family: var(--font-monospace);
    color: var(--code-text);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin: 2rem 0;
    overflow-x: auto;
    position: relative;
}

.cli-code-block pre {
    margin: 0;
}

.cli-code-block .copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--accent-color);
    color: var(--primary-bg);
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-weight: bold;
    opacity: 0.7;
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

.cli-code-block:hover .copy-btn {
    opacity: 1;
}

.cli-code-block .copy-btn:hover {
    background-color: var(--accent-hover);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    text-align: center;
    padding: 6rem 1rem;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: linear-gradient(rgba(18, 18, 18, 0.7), rgba(18, 18, 18, 0.7)), url('../images/hero-bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    border-bottom: none;
    overflow: hidden;
}

.hero-headline {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.hero-subhead {
    font-size: 1.5rem;
    color: var(--primary-text);
    font-weight: 300;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* --- Grid Layouts (for Projects/Certs) --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden; /* Important for image corners */
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px 0px rgba(0, 188, 212, 0.3); /* Accent color glow */
}

.card__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.card__content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allows button to stick to the bottom */
}

.card__content h3 {
    margin-top: 0;
    color: var(--primary-text);
}

.card__content p {
    flex-grow: 1; /* Pushes button down */
}

.card__button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-color);
    color: var(--primary-bg);
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    margin-top: 1rem;
    align-self: flex-start; /* Button doesn't stretch */
    transition: background-color 0.3s ease;
}

.card__button:hover {
    background-color: var(--accent-hover);
    color: var(--primary-bg);
}


/* --- Certs Page --- */
.cert-image {
    margin-bottom: 1rem;
    border-radius: 4px;
    background-color: #333; /* Placeholder bg */
}

/* --- Resume Page --- */
.resume-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}
.resume-section:last-child {
    border-bottom: none;
}
.job-title {
    font-weight: bold;
}
.job-date {
    font-style: italic;
    color: #aaa;
}

/* --- Footer --- */
.main-footer {
    text-align: center;
    padding: 2rem 5%;
    margin-top: 2rem;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    color: #aaa;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    html {
        font-size: calc(var(--rem-base) * 0.9);
    }
    
    .main-header {
        padding: 1rem 5%;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 70%;
        background-color: var(--secondary-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    .nav-links[data-visible="true"] {
        transform: translateX(0);
    }

    .mobile-nav-toggle {
        display: block;
    }

    /* Hamburger to X animation */
    .mobile-nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .mobile-nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
        opacity: 0;
    }
    .mobile-nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-headline {
        font-size: 2.5rem;
    }

    .hero-subhead {
        font-size: 1.25rem;
    }
}
