/* Technical, confident portfolio theme - shared site stylesheet */
:root {
    /* --- Color Palette --- */

    /* Background Colors */
    --color-background-dark: #071226; /* Darker background, used for subtle variations */
    --color-background-main: #0b1924; /* Main background color for the entire page */

    /* Text Colors */
    --color-text-primary: #e0f2fe; /* Primary text color for headings and main content */
    --color-text-muted: #98b0bf; /* Secondary text color for less prominent information */

    /* Accent Colors */
    --color-accent-primary: #39c0ff; /* Main accent color (blue), used for links, highlights */
    --color-accent-secondary: #66f0c1; /* Secondary accent color (green), used for badges, hover effects */
    --color-accent-tertiary: #d884bc; /* Tertiary accent color (yellow-green), used in gradients */
    --color-accent-quaternary: #ffb347; /* Quaternary accent color (orange) */

    /* Surface & Overlay Colors (for cards, headers, glassy effects) */
    --color-surface-card-base: rgba(255,255,255,0.03); /* Base transparent white for general cards */
    --color-surface-card-alt: rgba(255,255,255,0.04); /* Alternative transparent white for general cards */
    --color-surface-muted: rgba(255,255,255,0.02); /* Lighter transparent white for some elements, e.g., nav hover */
    --color-surface-glass: rgba(255,255,255,0.03); /* Transparent white for glassy effects (same as card-base) */
    --color-surface-feature-card-start: rgba(255,255,255,0.12); /* Start of feature card background gradient */
    --color-surface-feature-card-end: rgba(255,255,255,0.10); /* End of feature card background gradient */

    /* Border Colors */
    --color-border-header: rgba(255,255,255,0.02); /* Border color for the header and footer */
    --color-border-card-feature: rgba(57,192,255,0.15); /* Border color for feature cards */
    --color-border-badge: rgba(57,192,255,0.06); /* Border color for badges */
    --color-border-nav-focus: rgba(57,192,255,0.12); /* Border/shadow color for navigation links on focus */

    /* Shadow Colors (using rgba for transparency) */
    --color-shadow-light: rgba(0,0,0,0.25); /* Light shadow, e.g., for timeline items */
    --color-shadow-medium: rgba(0,0,0,0.3); /* Medium shadow, e.g., for general cards and buttons */
    --color-shadow-strong: rgba(0,0,0,0.45); /* Stronger shadow, e.g., for header and button hover */
    --color-shadow-nav-card: rgba(0,0,0,0.5); /* Specific shadow for navigation cards */
    --color-shadow-feature-card: rgba(0,0,0,0.6); /* Strongest shadow, e.g., for feature cards */
    --color-shadow-nav-card-hover: rgba(0,0,0,0.75); /* Shadow for navigation cards on hover */
    --color-shadow-button-active: rgba(0,0,0,0.2); /* Shadow for buttons in active state */

    /* --- Gradients --- */
    --gradient-card-border: linear-gradient(to bottom, var(--color-accent-primary), var(--color-accent-tertiary)); /* Gradient for card left borders */
    --gradient-header-bg: linear-gradient(180deg, var(--color-surface-muted), var(--color-surface-header-gradient-end)); /* Background gradient for the site header */
    --gradient-card-default-bg: linear-gradient(180deg, var(--color-surface-card-base), var(--color-surface-card-alt)); /* Default card background gradient */
    --gradient-card-feature-bg: linear-gradient(180deg, var(--color-surface-feature-card-start), var(--color-surface-feature-card-end)); /* Feature card background gradient */
    --gradient-button-primary: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-tertiary)); /* Primary button background gradient */
    --gradient-nav-card-bg: linear-gradient(180deg, var(--color-surface-muted), var(--color-surface-card-alt)); /* Navigation card background gradient */
    --gradient-footer-bg: linear-gradient(180deg, var(--color-surface-muted), var(--color-surface-muted)); /* Footer background gradient */
    --gradient-nav-underline: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-tertiary)); /* Navigation underline gradient */


    /* --- Typography --- */
    --font-family-mono: "SFMono-Regular", "Roboto Mono", Menlo, Monaco, monospace; /* Monospace font for code-like text */
    --font-family-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; /* Sans-serif font for general text */

    /* --- Spacing & Sizing --- */
    --border-radius-default: 12px; /* Default border-radius for cards and buttons */
}

/* Ensures padding and border are included in element's total width/height for consistent sizing */
html {
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

/* Simplified background for consistent appearance across the entire page */
html, body {
    height: 100%;
    margin: 0;
    background-color: var(--color-background-main); /* Sets the main background color for the page */
    color: var(--color-text-primary); /* Sets the default text color */
    font-family: var(--font-family-sans); /* Sets the default font family */
    -webkit-font-smoothing: antialiased; /* Improves text rendering on macOS */
    -moz-osx-font-smoothing: grayscale; /* Improves text rendering on macOS */
    line-height: 1.5; /* Sets default line height for readability */
}

/* Body layout for sticky footer and overall page structure */
body {
    display: flex;
    flex-direction: column; /* Arranges content vertically */
    min-height: 100vh; /* Ensures body takes at least full viewport height */
    padding-top: 84px; /* Space for the fixed header on desktop */
}

/* Main content area styling, centering and setting max width */
main.content {
    width: 100%;
    max-width: 1160px; /* Maximum width for content */
    margin: 0 auto; /* Centers the content horizontally */
    padding: 2rem 1.25rem; /* Padding around the content */
    display: flex;
    flex-direction: column; /* Stacks sections vertically */
    gap: 1rem; /* Space between sections */
    background-color: var(--color-background-main); /* Ensures content background matches body */
}

/* Fixed header styling at the top of the page */
.site-header {
    position: fixed; /* Keeps header visible when scrolling */
    top: 0;
    left: 0;
    right: 0;
    height: 72px; /* Fixed height for the header */
    display: flex;
    align-items: center; /* Vertically centers content */
    z-index: 120; /* Ensures header is above other content */
    background: var(--gradient-header-bg); /* Subtle gradient background */
    backdrop-filter: blur(8px) saturate(120%); /* Glassmorphism effect */
    box-shadow: 0 6px 20px var(--color-shadow-strong); /* Shadow for depth */
    border-bottom: 1px solid var(--color-border-header); /* Bottom border */
    padding: 0 1.25rem; /* Horizontal padding */
}

/* Inner container for header content, centering and spacing elements */
.site-header > .inner {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between; /* Spaces out title and navigation */
    align-items: center;
}

/* Styling for the site title/logo in the header */
.site-title {
    font-family: var(--font-family-mono);
    color: var(--color-text-primary);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    display: inline-flex;
    gap: 0.6rem;
    align-items: center;
}

/* Pseudo-element for the "</>" icon before the site title */
.site-title::before {
    content: "</>";
    color: var(--color-accent-primary);
    font-size: 0.85rem;
    opacity: 0.95;
    margin-right: 6px;
    font-family: var(--font-family-mono);
    transform: translateY(-1px);
}

/* Styling for the main navigation list */
nav.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem; /* Space between navigation items */
    align-items: center;
}

/* Styling for individual navigation links */
.site-nav a {
    position: relative;
    display: inline-block;
    color: var(--color-text-muted); /* Muted color by default */
    text-decoration: none;
    font-weight: 600;
    padding: 0.45rem 0.7rem;
    border-radius: 8px;
    transition: color 220ms ease, transform 220ms cubic-bezier(.2,.9,.2,1); /* Smooth transitions for hover effects */
    will-change: transform;
}

/* Hover effect for navigation links */
.site-nav a:hover {
    color: var(--color-text-primary); /* Changes text color on hover */
    background: var(--color-border-badge); /* Subtle background on hover */
    transform: translateY(-2px); /* Slight lift effect */
}

/* Underline pseudo-element for navigation links */
nav.site-nav a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    transform: translateX(-50%) scaleX(0); /* Hidden by default */
    transform-origin: center;
    width: 60%;
    height: 3px;
    background: var(--gradient-nav-underline); /* Gradient underline */
    border-radius: 999px;
    transition: transform 420ms cubic-bezier(.2,.9,.2,1), opacity 300ms ease;
    opacity: 0;
    pointer-events: none;
}

/* Hover/focus effect to reveal the underline */
nav.site-nav a:hover::after,
nav.site-nav a:focus::after {
    transform: translateX(-50%) scaleX(1); /* Expands the underline */
    opacity: 1;
}

/* Styling for the active navigation link (current page) */
nav.site-nav a.active {
    color: var(--color-text-primary); /* Active link has primary text color */
}
/* Ensures the active link's underline is always visible */
nav.site-nav a.active::after {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
}

/* Focus-visible styling for accessibility */
nav.site-nav a:focus-visible {
    box-shadow: 0 0 0 3px var(--color-border-nav-focus);
    border-radius: 8px;
}

/* General styling for all content cards */
.card {
    background: var(--gradient-card-default-bg); /* Subtle gradient background */
    border-radius: var(--border-radius-default); /* Rounded corners */
    padding: 1.5rem;
    box-shadow: 0 6px 12px var(--color-shadow-medium); /* Shadow for depth */
    position: relative;
    overflow: hidden;
}

/* Left border gradient for cards */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-card-border); /* Applies the defined gradient */
    border-top-left-radius: var(--border-radius-default);
    border-bottom-left-radius: var(--border-radius-default);
    z-index: 2;
}

/* Special styling for "feature" cards, making them more prominent */
.card.feature {
    border-left: none; /* Removes the default left border */
    border-image: none;
    background: var(--gradient-card-feature-bg); /* Stronger background gradient */
    border: 1px solid var(--color-border-card-feature); /* Subtle border */
    box-shadow: 0 12px 30px var(--color-shadow-feature); /* Stronger shadow */
    margin-bottom: 2rem;
}

/* Styling for H1 and H2 headings within cards */
.card h1, .card h2 {
    font-family: var(--font-family-mono);
    color: var(--color-text-primary);
    margin: 0 0 0.75rem 0;
}

/* Specific styling for H1 within cards */
.card h1 {
    font-size: 2rem;
    letter-spacing: -0.02em;
}

/* Specific styling for H2 within cards */
.card h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Styling for paragraphs within cards */
.card p {
    color: var(--color-text-muted); /* Muted text color */
    margin: 0 0 1rem 0;
    font-size: 1rem;
}

/* Styling for unordered lists within cards */
.card ul {
    color: var(--color-text-muted);
    margin: 0.5rem 0 0 1rem;
    padding: 0;
}

/* Styling for list items within cards */
.card li {
    margin-bottom: 0.6rem;
}

/* Container for badges/tags */
.meta-line {
    display: flex;
    gap: 12px; /* Space between badges */
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-top: 0.75rem;
    align-items: center;
    flex-wrap: wrap; /* Allows badges to wrap to next line */
}

/* Styling for individual badges/tags */
.badge {
    background: var(--color-surface-muted); /* Subtle background */
    color: var(--color-accent-secondary); /* Accent color for text */
    padding: 6px 8px;
    border-radius: 8px;
    font-family: var(--font-family-mono);
    font-size: 0.85rem;
    border: 1px solid var(--color-border-badge); /* Subtle border */
}

/* General link styling */
a { color: var(--color-accent-primary); } /* Sets link color to primary accent */

/* Container for action buttons */
.action-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center; /* Centers buttons */
}

/* Styling for primary action buttons */
.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius-default);
    background: var(--gradient-button-primary); /* Gradient background */
    color: var(--color-text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 15px var(--color-shadow-medium);
    transition: all 0.3s ease-in-out; /* Smooth transitions for hover */
    will-change: transform, box-shadow;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

/* Hover effect for action buttons */
.action-button:hover {
    transform: translateY(-3px); /* Lifts button */
    box-shadow: 0 8px 20px var(--color-shadow-strong); /* Stronger shadow */
    opacity: 0.9;
}

/* Active state for action buttons */
.action-button:active {
    transform: translateY(0); /* Resets position */
    box-shadow: 0 2px 10px var(--color-shadow-button-active); /* Smaller shadow */
}

/* Keyframe animation for elements dropping in */
@keyframes dropIn {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Grid layout for navigation cards (e.g., on home page) */
.card-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid columns */
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Styling for individual navigation cards */
.nav-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    border-radius: var(--border-radius-default);
    background: var(--gradient-nav-card-bg); /* Background gradient */
    box-shadow: 0 8px 20px var(--color-shadow-nav-card);
    text-decoration: none;
    color: var(--color-text-primary);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    will-change: transform, box-shadow;
    animation: dropIn 0.6s ease-out forwards; /* Applies drop-in animation */
    opacity: 0; /* Hidden initially for animation */
}

/* Staggered animation delays for nav cards */
.nav-card:nth-child(1) { animation-delay: 0.1s; }
.nav-card:nth-child(2) { animation-delay: 0.2s; }
.nav-card:nth-child(3) { animation-delay: 0.3s; }

/* Hover effect for navigation cards */
.nav-card:hover {
    transform: translateY(-25px) scale(1.07); /* Lifts and slightly scales card */
    box-shadow: 0 20px 40px var(--color-shadow-nav-card-hover); /* Stronger shadow */
}

/* Styling for icons within navigation cards */
.nav-card .icon {
    font-size: 2.5rem;
    color: var(--color-accent-primary);
    margin-bottom: 0.75rem;
    line-height: 1;
}

/* Styling for headings within navigation cards */
.nav-card h3 {
    font-family: var(--font-family-mono);
    color: var(--color-text-primary);
    font-size: 1.2rem;
    margin: 0 0 0.5rem 0;
}

/* Styling for paragraphs within navigation cards */
.nav-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.4;
}

/* Grid layout for project cards */
.project-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column by default */
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Styling for individual project cards */
.project-card {
    display: flex;
    flex-direction: column; /* Stacks content and image vertically on small screens */
    background: var(--gradient-card-default-bg);
    border-radius: var(--border-radius-default);
    box-shadow: 0 6px 12px var(--color-shadow-medium);
    overflow: hidden;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    will-change: transform, box-shadow;
}

/* Left border gradient for project cards */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-card-border);
    border-top-left-radius: var(--border-radius-default);
    border-bottom-left-radius: var(--border-radius-default);
    z-index: 2;
}

/* Content area within a project card */
.project-content {
    padding: 1.5rem;
    padding-bottom: 4rem; /* Extra padding at bottom for meta-line */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Styling for project titles */
.project-content h2 {
    font-family: var(--font-family-mono);
    color: var(--color-text-primary);
    font-size: 1.5rem;
    margin: 0 0 0.75rem 0;
}

/* Styling for paragraphs within project content */
.project-content p {
    color: var(--color-text-muted);
    margin: 0 0 1rem 0;
    font-size: 1rem;
}

/* Styling for project images */
.project-image {
    width: 100%;
    aspect-ratio: 4 / 3; /* Maintains aspect ratio */
    background-size: contain; /* Ensures image fits within bounds */
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 0 0 var(--border-radius-default) var(--border-radius-default); /* Rounded bottom corners */
    padding: 1.5rem;
    background-origin: content-box;
    background-clip: content-box;
}

/* Specific background images for each project */
.project-image.website {
    background-image: url('../Images/Visual_Studio.png');
}

.project-image.cloudflare {
    background-image: url('../Images/cloudflare-logo.png');
}

.project-image.linux {
    background-image: url('../Images/Ubuntu_Logo.png');
}

.project-image.n8n {
    background-image: url('../Images/n8n-logo.png');
}

.project-image.car-audio {
    background-image: url('../Images/vibe_audio.png');
}

/* Styling for project links (not currently used in HTML) */
.project-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Site-wide footer styling */
.site-footer {
    margin-top: auto; /* Pushes footer to the bottom of the page */
    padding: 2rem 1.25rem;
    background: var(--gradient-footer-bg); /* Subtle background */
    border-top: 1px solid var(--color-border-header); /* Top border */
}

/* Inner container for footer content, spacing elements */
.footer-content {
    max-width: 1160px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between; /* Spaces out contact info and social links */
    align-items: center;
    gap: 1rem;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* Styling for social media links in the footer */
.social-links { display: flex; gap: 0.75rem; list-style: none; padding: 0; margin: 0; }
.social-links a { color: var(--color-text-muted); text-decoration: none; font-weight: 600; }
.social-links a:hover { color: var(--color-accent-secondary); } /* Changes color on hover */

/* Media queries for responsive design on smaller screens (e.g., tablets and mobile) */
@media (max-width:880px){
    /* Adjustments for header on smaller screens */
    .site-header{
        padding: 1.5rem 0.75rem 1rem 0.75rem; /* Increased top padding for more space above the name */
        height: auto; /* Allows header to grow with its content */
    }
    /* Adjust body padding-top to match the new, taller mobile header */
    body {
        padding-top: 96px;
    }

    /* Adjust main content padding */
    main.content{ padding:1.5rem 0.85rem; }
    /* Stacks footer content vertically */
    .footer-content{ flex-direction:column; text-align:center; gap:0.5rem; }
    /* Adjust card padding */
    .card{ padding:1.25rem; }

    /* Adjustments for mobile navigation */
    .site-header > .inner {
        flex-direction: column; /* Stacks title and nav vertically */
        align-items: flex-start;
        gap: 0.5rem;
    }

    nav.site-nav ul {
        flex-wrap: wrap; /* Allows nav items to wrap */
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .site-nav a {
        padding: 0.3rem 0.5rem;
        font-size: 0.9rem;
    }
}

/* Media query for larger screens (e.g., desktop) to adjust project card layout */
@media (min-width: 768px) {
    .project-card {
        flex-direction: row; /* Arranges content and image side-by-side */
        align-items: stretch;
    }

    .project-image {
        width: 300px; /* Fixed width for image */
        border-radius: 0 var(--border-radius-default) var(--border-radius-default) 0; /* Rounded right corners */
    }

    /* Reverses layout for even-numbered project cards */
    .project-card:nth-child(even) {
        flex-direction: row-reverse;
    }

    /* Adjusts border-radius for images in reversed project cards */
    .project-card:nth-child(even) .project-image {
        border-radius: var(--border-radius-default) 0 0 var(--border-radius-default); /* Rounded left corners */
    }

    /* Adjusts the gradient border position for reversed project cards */
    .project-card:nth-child(even)::before {
        left: auto;
        right: 0;
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
        border-top-right-radius: var(--border-radius-default);
        border-bottom-right-radius: var(--border-radius-default);
    }
}

/* Styling for the timeline container (used on Career page) */
.timeline {
    display: flex;
    flex-direction: column; /* Stacks timeline items vertically */
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Styling for individual timeline items (overridden by inline styles in Career.html for some properties) */
.timeline-item {
    display: grid;
    grid-template-columns: minmax(90px, 160px) 1fr; /* Two columns: date and content */
    column-gap: 1rem;
    gap: 0.75rem;
    align-items: start;
    padding: 1.25rem;
    border-radius: 10px;
    background: var(--gradient-card-default-bg);
    border-left: none; /* Removes default left border */
    border-image: none;
    overflow: visible;
    box-shadow: 0 4px 10px var(--color-shadow-light);
    position: relative;
    overflow: hidden;
}

/* Styling for timeline icons (not explicitly used in current HTML, but defined) */
.timeline-icon {
    font-size: 2rem;
    color: var(--color-accent-primary);
    flex-shrink: 0;
    line-height: 1;
}

/* Styling for the content area within a timeline item */
.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Styling for the year in a timeline item (not explicitly used in current HTML, but defined) */
.timeline-year {
    font-family: var(--font-family-mono);
    color: var(--color-text-primary);
    font-size: 1rem;
    font-weight: 500;
}

/* Styling for the title in a timeline item (not explicitly used in current HTML, but defined) */
.timeline-title {
    font-family: var(--font-family-mono);
    color: var(--color-text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

/* Styling for the description in a timeline item (not explicitly used in current HTML, but defined) */
.timeline-description {
    color: var(--color-text-muted);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Removes bottom margin from the last timeline item */
.timeline-item:last-child {
    margin-bottom: 0;
}