/* ================= CUSTOM FONT DEFINITION (Self-Hosted) ================= 
  The TTF files are assumed to be located in a folder named 'fonts' 
  one directory level up from this styles.css file.
*/

/* --- 1. Regular (400) */
@font-face {
    font-family: 'Poppins';
    src: url('fonts/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap; 
}

/* --- 2. Medium (500) */
@font-face {
    font-family: 'Poppins';
    src: url('fonts/Poppins-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap; 
}

/* --- 3. SemiBold (600) */
@font-face {
    font-family: 'Poppins';
    src: url('fonts/Poppins-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap; 
}

/* --- 4. Bold (700) */
@font-face {
    font-family: 'Poppins';
    src: url('fonts/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap; 
}

/* --- 5. ExtraBold (800) */
@font-face {
    font-family: 'Poppins';
    src: url('fonts/Poppins-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap; 
}

/* --- 6. Italic (Optional, for browser use of <em>/<i> tags) */
@font-face {
    font-family: 'Poppins';
    src: url('fonts/Poppins-Italic.ttf') format('truetype');
    font-weight: 400; 
    font-style: italic;
    font-display: swap; 
}

/* ================= Global ================= */
:root {
    /* --- COLOR PALETTE (Data Dashboard UI) --- */
    --primary-color: #6a6aff; /* Soft Purple/Indigo */
    --secondary-color: #a4a4ff; /* Lighter Purple/Accent */
    --background-light: #f7f9fd; /* Very soft off-white/light gray (Clean base) */
    --background-dark: #1e1e2c; /* Deep slate gray/navy for dark mode */
    
    /* Lighter Muted Text for Better Hierarchy */
    --text-color-light: #181a25; /* Dark text for high contrast */
    --text-color-dark: #e6e6f2; /* Pale text on dark background */
    --text-muted-light: #7b879a; /* Softer gray for less focus */
    --text-muted-dark: #9da5b3; /* Light gray for muted text */
    
    --card-background-light: white; /* Pure white cards for high contrast */
    --card-background-dark: #2a2a41; /* Slightly lighter dark card */
    
    /* NEW: Pastel colors for visual separation/bars (used in skills/cards) */
    --pastel-blue: #e0e6ff;
    --pastel-purple: #f2e6ff;

    /* NEW VARIABLE for Subtle Background Gradient Color */
    --background-accent-light: #f1f3f7; /* Slightly deeper shade of your base */
}

body {
    margin: 0;
    font-family: "Poppins", sans-serif;
    color: var(--text-color-light);
    cursor: default;
    transition: background-color 0.3s, color 0.3s;
    
    /* IMPLEMENTATION: Subtle vertical gradient for page depth */
    background: linear-gradient(180deg, 
                var(--background-light) 0%, 
                var(--background-accent-light) 100%);
    background-attachment: fixed; /* Keeps the gradient stable while scrolling */
}

/* Consistent Line Height for Readability */
section p, .skill-tag p, .system-card p, .system-card li {
    line-height: 1.5;
}


html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
}

/* UX Polish: Custom Selection Color for Brand Consistency */
::selection {
    background-color: var(--secondary-color); 
    color: white; 
}


/* Accessibility: Enhanced Focus States for Material Look */
a:focus, button:focus, input:focus {
    outline: 3px solid var(--secondary-color);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ================= Dark Mode Enhancement ================= */
@media (prefers-color-scheme: dark) {
    body {
        /* Revert to solid dark color to maintain clarity in dark mode */
        background: var(--background-dark);
        color: var(--text-color-dark);
        background-image: none;
    }
    
    /* Dark Mode Header (Frosted Glass) */
    header {
        background: rgba(42, 42, 65, 0.9); /* Slightly translucent */
        backdrop-filter: blur(8px);
        box-shadow: 0px 4px 15px rgba(255,255,255,0.08);
        background-image: none; /* Remove gradient line */
    }

    .logo-group img {
        background: var(--card-background-dark);
    }

    .nav-links a {
        color: var(--text-color-dark);
    }
    
    section p, .skill-tag p, .system-card p, .system-card li {
        color: var(--text-muted-dark) !important;
    }

    .skill-tag, .system-card, .contact-card {
        background: var(--card-background-dark);
        box-shadow: 0px 6px 25px rgba(255,255,255,0.08);
    }
    
    .contact-card a {
        color: var(--text-color-dark);
    }
    
    .contact-card p {
        color: var(--text-color-dark) !important;
    }

    footer {
        background: #181a25; /* Darker footer */
        color: var(--text-muted-dark);
    }
}

/* ================= Header (Frosted Glass Look) ================= */
header {
    position: sticky;
    top: 0;
    /* Frosted Glass Effect: Light translucent background with blur */
    background: rgba(255, 255, 255, 0.9); 
    backdrop-filter: blur(8px);
    
    padding: 10px 60px; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    box-shadow: 0px 4px 12px rgba(0,0,0,0.06); /* Softer shadow */
    z-index: 999;
    
    background-image: none; 
    
    /* Setting a fixed height */
    height: 82px; 
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-group img {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: 4px solid var(--primary-color); 
    padding: 2px;
    background: var(--card-background-light);
}

/* Typography Polish: Slight size reduction for balance */
.logo-text {
    font-size: 24px; /* Reduced from 26px */
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 30px; 
}

.nav-links a {
    font-size: 16px; 
    font-weight: 500;
    text-decoration: none;
    color: var(--text-color-light);
    transition: 0.2s ease;
    padding: 4px 8px; 
    border-radius: 8px;
}

/* IMPROVED LINK HOVER EFFECT */
.nav-links a:hover {
    color: var(--primary-color);
    background-color: var(--pastel-blue); 
    box-shadow: none; 
}

.menu-toggle {
    display: none;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
    line-height: 1; /* Ensures X and Hamburger are centered properly */
}

/* ================ Section Formatting ================= */
section {
    padding: 55px 90px;
    text-align: center;
}

section h2 {
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* Typography Polish: Add subtle letter spacing to tagline */
.tagline {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 17px;
    margin-bottom: 40px; 
    letter-spacing: 0.02em; 
}

/* ================ Hero Section ================= */
/* Typography Polish: Increase font size for impact */
#home h1 {
    font-size: 52px; /* Increased from 46px */
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.15; /* Slightly tighter line height */
}

#home p {
    font-size: 18px;
    max-width: 800px;
    margin: auto;
    color: var(--text-muted-light);
    line-height: 1.6;
}

/* Optimized CTA Button Gradient and Hover */
.cta-btn {
    padding: 14px 45px; 
    /* Diagonal gradient for more visual interest */
    background: linear-gradient(135deg, 
                var(--primary-color) 0%,
                #8f8fff 50%, /* Middle highlight color */
                var(--secondary-color) 100%);
    border: none;
    border-radius: 35px;
    color: white;
    margin-top: 35px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    
    /* Added background size for position shift effect */
    background-size: 200% 100%; 
    transition: all 0.4s ease; /* Transition ALL properties smoothly */
    
    box-shadow: 0px 8px 18px rgba(106, 106, 255, 0.4); 
}

.cta-btn:hover {
    /* Shift background to the right for a subtle animation/pulse */
    background-position: right center; 
    transform: translateY(-2px); 
    box-shadow: 0px 14px 28px rgba(106, 106, 255, 0.45);
}

/* ================ Skills Section (Pill/Tag Design) ================= */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    max-width: 1200px;
    margin: auto;
}

.skill-tag {
    padding: 16px 25px;
    border-radius: 12px;
    background: var(--card-background-light);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); 
    text-align: left;
    transition: 0.3s ease;
    max-width: 300px;
    flex: 1 1 250px;
    
    /* MODIFIED: Use primary color for the top accent border */
    border-top: 3px solid var(--primary-color); 
}

.skill-tag:hover {
    transform: translateY(-4px);
    /* MODIFIED: Use subtle purple glow on hover for consistency */
    box-shadow: 0px 8px 25px rgba(106, 106, 255, 0.25);
}

/* TOUCH/ACTIVE ENHANCEMENT */
.skill-tag:active {
    transform: translateY(-2px);
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.12);
    transition: none;
}

.skill-tag h3 {
    font-size: 17px;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 8px;
    font-weight: 600;
}

.skill-tag p {
    color: var(--text-muted-light);
    font-size: 14px;
    margin: 0;
}

/* ================ Systems Validated (Enhanced Material Card) ================= */
.systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(300px,1fr));
    gap: 30px;
    max-width: 1100px;
    margin: auto;
    /* Increase top margin for better separation from the tagline/h2 */
    margin-top: 45px; 
}

.system-card {
    background: var(--card-background-light);
    padding: 25px;
    border-radius: 14px;
    
    /* MODIFIED: Apply the highlight border to ALL cards for consistency */
    border-left: 6px solid var(--primary-color); 
    
    /* MODIFIED: Apply the enhanced shadow to ALL cards for consistency */
    box-shadow: 0px 6px 20px rgba(106, 106, 255, 0.2); 
    
    /* MODIFIED: Adjust padding to account for the new border */
    padding-left: 19px; 
    
    text-align: left;
    transition: 0.4s ease;
}

.system-card:hover {
    transform: translateY(-4px);
    
    /* MODIFIED: Use the enhanced hover shadow */
    box-shadow: 0px 10px 25px rgba(106, 106, 255, 0.3);
}

/* TOUCH/ACTIVE ENHANCEMENT */
.system-card:active {
    transform: translateY(-2px);
    box-shadow: 0px 6px 15px rgba(0,0,0,0.1);
    transition: none; 
}

/* REMOVED: .system-card.active-highlight rule is no longer needed. */

.system-card h3 {
    color: var(--primary-color);
    font-size: 20px;
    margin-bottom: 8px;
    font-weight: 600;
}

/* General paragraph styling within the card */
.system-card p {
    color: var(--text-muted-light);
    font-size: 15px;
    margin-bottom: 12px;
}

/* Styling for the new unordered list inside the card */
.system-card ul {
    list-style-type: none; 
    padding-left: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.system-card li {
    position: relative;
    padding-left: 20px;
    font-size: 14px;
    color: var(--text-muted-light);
    margin-bottom: 4px;
}

/* Custom bullet point using the primary color */
.system-card li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
    position: absolute;
    left: 0;
}

/* ================ Contact ================= */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 24px;
    max-width: 900px;
    margin: auto;
    margin-top: 20px;
}

.contact-card {
    padding: 22px;
    border-radius: 14px;
    background: var(--card-background-light);
    box-shadow: 0px 4px 12px rgba(0,0,0,0.08);
    transition: 0.3s ease; 
    
    /* MODIFIED: Add a top accent border for consistency */
    border-top: 3px solid var(--primary-color);
}

/* CONTACT CARD HOVER (Subtle lift) */
.contact-card:hover {
    transform: translateY(-2px);
    /* MODIFIED: Use a subtle purple glow on hover for consistency */
    box-shadow: 0px 6px 15px rgba(106, 106, 255, 0.2);
}

/* CONTACT CARD TOUCH/ACTIVE ENHANCEMENT */
.contact-card:active {
    transform: translateY(-1px);
    box-shadow: 0px 4px 10px rgba(0,0,0,0.1);
    transition: none; 
}

.contact-card h4 {
    margin-bottom: 8px;
    color: var(--primary-color);
    font-weight: 600;
}

.contact-card a {
    color: var(--text-color-light);
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s ease;
}

.contact-card a:hover {
    color: var(--primary-color);
}

/* Style for non-link text (e.g., Location paragraph) */
.contact-card p {
    color: var(--text-color-light);
    font-weight: 500;
    margin: 0;
    transition: 0.2s ease;
}

/* ================= Footer =============== */
footer {
    margin-top: 50px;
    /* Increase padding for visual breathing room */
    padding: 20px 16px; 
    font-size: 14px;
    background: #e0e6ec; /* Light cool gray */
    color: var(--text-muted-light);
    text-align: center;
}

@media (prefers-color-scheme: dark) {
    footer {
        background: #181a25;
    }
}


/* ================ Reveal Animation ================= */
.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: 0.55s ease-out;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================= Responsive Enhancement (Mobile First) =============== */
@media (max-width:768px){
    /* Mobile Polish: Allow header height to adapt */
    header {
        height: auto; 
        padding: 10px 18px; 
    }
    
    /* FIX: Allow contact cards to stack on mobile */
    .contact-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    /* New: Mobile Navigation */
    .nav-links {
        display: none; 
        position: absolute;
        /* Adjusted top position to correctly clear the dynamic header height */
        top: 60px; 
        right: 18px; 
        left: auto;
        width: 80%; 
        max-width: 300px; 
        background: var(--card-background-light);
        flex-direction: column;
        align-items: flex-start; 
        padding: 15px 0;
        box-shadow: 0px 4px 20px rgba(0,0,0,0.2); 
        
        border-radius: 16px; 
        border-top: none; 
        transition: transform 0.3s ease-out;
        transform: scale(0.95) translateY(-10px); 
        transform-origin: top right;
    }

    .nav-links.open {
        display: flex; 
        transform: scale(1) translateY(0);
    }
    
    .nav-links a {
        padding: 10px 20px; 
        width: 100%;
        text-align: left; 
        border-bottom: 1px solid #f0f0f0; 
    }
    /* Dark mode mobile menu link separator */
    @media (prefers-color-scheme: dark) {
        .nav-links a {
            border-bottom: 1px solid #3c3c54; 
        }
    }


    /* Remove border on the last link */
    .nav-links a:last-child {
        border-bottom: none;
    }
    
    .menu-toggle {
        display: block; 
    }

    section {
        padding: 45px 24px;
    }

    /* Mobile Polish: Adjust title back down slightly for mobile screens */
    #home h1 {
        font-size: 40px; /* Adjusted from 38px */
    }

    .cta-btn {
        width: 85%;
    }
}