/* Author: Dexter Law
Date: 02/18/2026
File Name: styles.css
*/

/* Brand Variables */
:root {
    --color-primary-bg: #222121;    /* Deep Space */
    --color-secondary-bg: #2A2A2A;  /* Charcoal */
    --color-accent-purple: #B786FF; /* Radiant Purple */
    --text-main: #FAFCFC;           /* Cloud White */
    --text-muted: #E5E4E3;          /* Mist Gray */
    --btn-hover: #D1B3FF;
    --border-glass: rgba(250, 252, 252, 0.1);
}

/* CSS Reset & Sticky Footer Setup */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%; /* Required for sticky footer */
}

body {
    background-color: var(--color-primary-bg);
    color: var(--text-main);
    font-family: 'Inter', Verdana, Arial, sans-serif;
    display: flex;
    flex-direction: column;
}

/* Layout Container */
#container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Images */
img {
    max-width: 100%;
    display: block;
    border-radius: 8px;
    margin: 1rem auto;
}

/* Header */
header {
    width: 100%;
    padding: 2% 5%;
    text-align: center;
}

header h1 {
    color: var(--color-accent-purple);
    font-size: 2.5em;
    margin-bottom: 0.5em;
}

/* ============================================================
   NAVIGATION & HAMBURGER MENU
   ============================================================ */
nav {
    width: 100%;
    background-color: var(--color-secondary-bg);
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
    padding: 0.5em 0;
}

.nav-content {
    max-width: 1200px; 
    margin: 0 auto;
    display: flex;
    justify-content: space-between; 
    align-items: center;
    padding: 15px 20px;
}

.brand-logo {
    font-size: 1.8rem; 
    font-weight: 700;  
    color: var(--text-main); 
    letter-spacing: -0.5px;
    font-family: 'Inter', sans-serif; 
}

.initial {
    color: var(--color-accent-purple); 
}

nav ul {
    list-style-type: none;
    text-align: center;
}

nav li {
    display: inline-block;
}

nav li a {
    display: block;
    color: var(--text-main);
    font-weight: bold;
    text-decoration: none;
    padding: 0.8em 1.5em;
    transition: 0.3s ease;
}

nav li a:hover {
    color: var(--color-accent-purple);
    text-shadow: 0 0 10px var(--color-accent-purple);
}

/* Desktop Hidden Hamburger */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 100; 
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
main {
    flex: 1; 
    max-width: 1000px;
    width: 90%;
    margin: 2em auto;
    padding: 3%;
    background-color: var(--color-secondary-bg);
    border-radius: 12px;
    border: 1px solid var(--border-glass);
}

main h2, main h3 {
    color: var(--color-accent-purple);
    margin-bottom: 1rem;
}

hr {
    border: 0;
    border-top: 1px solid var(--border-glass);
    margin: 2em 0;
}

p, li {
    color: var(--text-main);
    line-height: 1.6;
}

.edu-entry, .job-entry, .project-entry, .certification, .tech-stack p {
    margin-bottom: 2em;
}

ul {
    margin-left: 1.5em;
    margin-bottom: 1em;
}

iframe {
    width: 100%;
    filter: invert(90%) hue-rotate(180deg);
    border-radius: 8px;
    margin-top: 1rem;
}

#contact-info a {
    color: var(--color-accent-purple);
    text-decoration: none;
}

/* ============================================================
   HOME & ABOUT LAYOUTS
   ============================================================ */
.index-main, .about-main {
    max-width: 1200px; 
    background-color: transparent; 
    border: none;
    margin-top: 5vh;
}

.hero-flex, .about-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.about-flex {
    align-items: flex-start;
    gap: 80px;
}

.hero-text, .about-text-content {
    flex: 1.2;
}

.about-text-content {
    flex: 1.5;
}

.greeting {
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: var(--text-muted);
}

.hero-text h1 {
    font-size: 4rem; 
    margin: 0;
    color: var(--text-main);
}

.sub-headline {
    font-size: 2rem;
    color: var(--color-accent-purple);
    margin-bottom: 1.5rem;
}

.hero-bio, .main-bio {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

.btn-primary {
    background-color: var(--color-accent-purple);
    color: #000;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.btn-outline {
    border: 1px solid var(--color-accent-purple);
    color: var(--color-accent-purple);
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.btn-primary:hover { background-color: var(--btn-hover); }

/* Image Frames */
.hero-image-container, .about-image-container {
    flex: 0.8;
    display: flex;
    justify-content: center;
}

.about-image-container {
    flex: 1;
}

.image-circle-frame {
    width: 400px;
    height: 400px;
    border: 8px solid var(--color-accent-purple);
    border-radius: 50%;
    overflow: hidden;
    position: relative;
}

.image-frame {
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1 / 1.1;
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    overflow: hidden;
    background-color: var(--color-secondary-bg);
}

.image-circle-frame img, .image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
}

.image-frame img {
    filter: grayscale(20%);
}

.section-label {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.about-headline {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 2rem;
    color: var(--text-main);
}

.about-headline .highlight {
    color: var(--color-accent-purple);
}

/* Achievement/Checklist Styling */
.achievement-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.achievement-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.check-icon {
    color: var(--color-accent-purple);
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 2px;
}

.achievement-item p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-main);
}

/* ============================================================
   ACCORDIONS & DROPDOWNS (CV & Services)
   ============================================================ */
details, .skill-category {
    background-color: var(--color-primary-bg); 
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.skill-category {
    background-color: var(--color-secondary-bg);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

summary, .skill-category summary {
    padding: 1.5rem;
    cursor: pointer;
    list-style: none; 
    display: flex;
    outline: none;
    align-items: center;
}

summary::-webkit-details-marker {
    display: none; 
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

summary:hover h3 {
    color: var(--color-accent-purple);
    text-shadow: 0 0 8px rgba(183, 134, 255, 0.4);
}

.job-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.accordion-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid var(--border-glass);
    animation: slideDown 0.4s ease-out;
}

details[open], .skill-category[open] {
    border-color: var(--color-accent-purple);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   PROJECT CONTENT SECTION
   ============================================================ */
.project-content {
    padding: 1.5rem; 
    border-top: 1px solid var(--border-glass); 
    animation: slideDown 0.4s ease-out; 
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.project-description {
    line-height: 1.6;
    margin-bottom: 10px;
    padding: 0 5px;
}

/* ============================================================
   SKILLS GRID LAYOUT & CARDS
   ============================================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px; 
    padding: 1.5rem;
    background-color: #1A1A1A; 
    border-top: 1px solid var(--border-glass);
    width: 100%; 
}

.skill-card {
    background-color: var(--color-secondary-bg);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative; 
    overflow: hidden;   
}

.skill-card:hover {
    border-color: var(--color-accent-purple);
    transform: translateY(-3px);
}

.skill-card p {
    margin: 0;
    padding: 0 10px;
    font-size: 1.1rem !important;
    line-height: 1.2;
    font-weight: 700 !important;
}

/* Hidden detail text inside cards */
.skill-card::after {
    content: attr(data-detail);
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
    opacity: 0;
    transition: opacity 0.3s;
}

.skill-card:hover::after {
    opacity: 1;
}

/* SPECIAL ACTION CARDS (DOCS & GITHUB) */
.docs-card {
    background: #eef6ff !important;
    border: 2px solid #004a99 !important;
    text-decoration: none;
}

.github-card {
    background: #f0fff4 !important;
    border: 2px solid #28a745 !important;
    text-decoration: none;
}

/* Force Black text on the <p> tags inside docs/github cards */
.docs-card p, .github-card p {
    color: #000000 !important;
}

/* Deep Purple Descriptive Text on Special Cards */
.docs-card::after, .github-card::after {
    color: #5e2d9b !important; 
}


/* ============================================================
   FOOTER
   ============================================================ */
footer {
    padding: 3em 1em;
    background-color: var(--color-primary-bg);
    width: 100%;
}

footer p {
    font-size: 0.85em;
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 0.5em;
}

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


/* ============================================================
   RESPONSIVENESS (TABLETS & MOBILE)
   ============================================================ */

/* Tablet & Smaller Laptops */
@media (max-width: 900px) {
    
    .about-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .achievement-item {
        text-align: left;
    }

    /* Reveal the hamburger icon */
    .hamburger {
        display: flex;
    }

    /* Keep logo on left, hamburger on right */
    .nav-content {
        justify-content: space-between;
        position: relative; 
    }

    /* Style the hidden dropdown menu */
    nav ul {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-secondary-bg);
        border-bottom: 1px solid var(--color-accent-purple);
        display: flex;
        flex-direction: column;
        padding: 0;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); 
        transition: clip-path 0.4s ease-in-out;
        box-shadow: 0 10px 15px rgba(0,0,0,0.5);
        z-index: 99;
    }

    /* The class JavaScript adds to slide the menu open */
    nav ul.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    }

    nav li {
        width: 100%;
        text-align: center;
    }

    nav li a {
        padding: 1.2rem;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(250, 252, 252, 0.05);
    }

    /* Animate the hamburger into a purple 'X' */
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
        background-color: var(--color-accent-purple);
    }
    .hamburger.active .bar:nth-child(2) {
        opacity: 0; 
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
        background-color: var(--color-accent-purple);
    }

    /* Stack the hero section and shrink the image */
    .hero-flex { 
        flex-direction: column-reverse; 
        text-align: center; 
        gap: 30px; 
    }
    .hero-text h1 { 
        font-size: 2.8rem; 
    }
    .hero-btns { 
        justify-content: center; 
    }
    .image-circle-frame {
        width: 300px;
        height: 300px;
    }
}

/* Mobile Phones */
@media (max-width: 600px) {
    
    /* Forces the company name and dates to stack vertically */
    .summary-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px; 
    }

    /* Ensures the role/date text aligns left under the title */
    .job-meta {
        text-align: left;
        line-height: 1.4;
        font-size: 0.9rem;
        display: block; 
        margin-top: 5px;
    }

    .accordion-content {
        padding: 0 1rem 1.5rem 1rem;
    }

    /* Force the descriptive skill text to always show on mobile */
    .skill-card::after {
        opacity: 1;
        color: var(--text-muted); 
        margin-top: 10px;
    }

    /* Further shrink the image for mobile */
    .image-circle-frame {
        width: 220px;
        height: 220px;
        border-width: 5px; 
    }
    
    /* Stack buttons to make them full-width and tap-friendly */
    .hero-btns {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .btn-primary, .btn-outline {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}