@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Light Mode (Default) */
    --bg-color: #fafafa;
    --grid-line: #e5e7eb;
    --card-bg: rgba(255, 255, 255, 0.6);
    --card-border: rgba(0, 0, 0, 0.06);
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    --text-primary: #1f2937;
    --text-secondary: #6b7280;

    /* Tech Accents (Common) */
    --tech-blue: #3b82f6;
    --tech-green: #10b981;
    --tech-purple: #8b5cf6;
    --tech-orange: #f97316;
    --tech-red: #ef4444;

    --pill-bg: #fff;
    --pill-border: rgba(0, 0, 0, 0.08);
}

body.dark-mode {
    /* Dark Mode Overrides */
    --bg-color: #0b1120;
    /* Deep dark blue/slate */
    --grid-line: rgba(255, 255, 255, 0.05);
    --card-bg: rgba(30, 41, 59, 0.4);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;

    --pill-bg: rgba(30, 41, 59, 0.6);
    --pill-border: rgba(255, 255, 255, 0.05);
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 8.5rem;
    /* Position to the left of source button */
    z-index: 50;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    /* Standardize radius */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    box-sizing: border-box;
    padding: 0;
}

.theme-toggle:hover {
    color: var(--text-primary);
    border-color: var(--tech-purple);
    background: var(--bg-color);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    color: var(--text-primary);
    background-color: var(--bg-color);
    /* Blueprint Grid Background */
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: center center;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    width: 100%;
    -webkit-font-smoothing: antialiased;
}

/* Bento Grid System */
.bento-container {
    perspective: 1000px;
}

.grid-wrapper {
    display: grid;
    /* Layout: 3 columns. Profile/About take 2, Tech takes 1 vertical sidebar */
    grid-template-columns: 1.5fr 1.5fr 1fr;
    grid-template-rows: auto 1fr;
    gap: 1rem;
    width: 100%;
    max-width: 1100px;
    height: 100%;
    max-height: 700px;
    margin: auto;

    /* Grid Areas */
    grid-template-areas:
        "profile profile tech"
        "about   about   tech";
}

/* Card General Styles */
.bento-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 4px;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 2rem;
    transition: all 0.2s ease-out;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Colored Top Borders for visual distinction */
.profile-card {
    border-top: 3px solid var(--tech-blue);
}

.about-visual-card {
    border-top: 3px solid var(--tech-green);
}

.tech-card {
    border-top: 3px solid var(--tech-orange);
}

.bento-card:hover {
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

/* Area Mapping */
.profile-card {
    grid-area: profile;
    justify-content: center;
    align-items: center;
}

.about-visual-card {
    grid-area: about;
    justify-content: center;
}

.tech-card {
    grid-area: tech;
    justify-content: flex-start;
    padding-top: 2rem;
}

/* Card Content: Profile */
.profile-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    width: 100%;
    justify-content: center;
}

.image-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    /* No Grayscale - Full Color */
}

.status-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--tech-green);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.profile-info {
    text-align: left;
}

.profile-name {
    font-family: var(--body-font);
    font-weight: 700;
    font-size: 2.25rem;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1.1;
    background: -webkit-linear-gradient(45deg, #1f2937, #4b5563);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.profile-role {
    font-family: var(--code-font);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--tech-blue);
    margin-top: 0.25rem;
    background: rgba(59, 130, 246, 0.1);
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
}

.bio-short {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
    text-align: center;
}

.bio-short p {
    font-family: var(--body-font);
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 80%;
    margin: 0 auto;
}

.accent-text {
    font-family: var(--code-font);
    color: var(--tech-purple);
    background: rgba(139, 92, 246, 0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
}

/* Card Content: Social */
.social-icons-wrapper {
    display: flex;
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.social-link {
    color: var(--text-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link:hover {
    transform: translateY(-2px);
}

/* Brand Colors on Hover */
.social-link[aria-label="Github"]:hover {
    color: #333;
}

.social-link[aria-label="LinkedIn"]:hover {
    color: #0077b5;
}

.social-link[aria-label="X"]:hover {
    color: #000;
}

.social-link[aria-label="Email"]:hover {
    color: var(--tech-orange);
}

.icon-box {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-box svg {
    width: 22px;
    height: 22px;
}

/* Card Content: About */
.section-title {
    font-family: var(--code-font);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: #9ca3af;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::before {
    content: '//';
    color: var(--tech-green);
}

.scroll-text {
    font-family: var(--body-font);
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.link-highlight {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-color: var(--tech-blue);
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
    transition: all 0.2s;
}

.link-highlight:hover {
    color: var(--tech-blue);
    background: rgba(59, 130, 246, 0.05);
}

/* Card Content: Tech */
.tech-groups-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.tech-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tech-category-label {
    font-family: var(--code-font);
    font-size: 0.7rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-pill {
    font-family: var(--code-font);
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    background: var(--pill-bg);
    border: 1px solid var(--pill-border);
    border-radius: 4px;
    color: var(--text-secondary);
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.tech-pill:hover {
    border-color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* Syntax Highlighting for Tech Groups */
/* Group 1: Core (PHP/Laravel) -> Purple */
.tech-group:nth-child(1) .tech-pill {
    border-left: 2px solid var(--tech-purple);
    color: var(--text-primary);
}

.tech-group:nth-child(1) .tech-pill:hover {
    background: rgba(139, 92, 246, 0.05);
}

/* Group 2: Frontend -> Blue */
.tech-group:nth-child(2) .tech-pill {
    border-left: 2px solid var(--tech-blue);
    color: var(--text-primary);
}

.tech-group:nth-child(2) .tech-pill:hover {
    background: rgba(59, 130, 246, 0.05);
}

/* Group 3: Infrastructure -> Orange */
.tech-group:nth-child(3) .tech-pill {
    border-left: 2px solid var(--tech-orange);
    color: var(--text-primary);
}

.tech-group:nth-child(3) .tech-pill:hover {
    background: rgba(249, 115, 22, 0.05);
}

/* Dark Mode Overrides for Specific Elements */
body.dark-mode .profile-name {
    background: -webkit-linear-gradient(45deg, #e2e8f0, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-mode .social-link[aria-label="Github"]:hover {
    color: #fff;
}

body.dark-mode .social-link[aria-label="X"]:hover {
    color: #fff;
}

body.dark-mode .social-link[aria-label="LinkedIn"]:hover {
    color: #0a66c2;
}

/* Lighter blue */

.tech-footer-note {
    margin-top: auto;
    font-family: var(--code-font);
    font-size: 0.65rem;
    color: var(--tech-green);
    /* Positive info color */
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
    padding-top: 1rem;
}

/* Source Button (Replaces Tailwind util classes) */
/* Source Button (Replaces Tailwind util classes) */
.source-btn {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 36px;
    /* Match theme toggle height */
    padding: 0 0.75rem;
    background: var(--card-bg);
    color: var(--text-secondary);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    /* Match theme toggle radius */
    font-family: var(--code-font);
    font-size: 0.75rem;
    text-decoration: none;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.source-btn:hover {
    background: var(--bg-color);
    color: var(--text-primary);
    border-color: var(--tech-purple);
}

.source-btn svg {
    width: 16px;
    height: 16px;
}

/* Responsive */
/* Tablet (Vertical or Small Desktop) */
@media (max-width: 1024px) {
    .grid-wrapper {
        grid-template-columns: 1fr 1fr;
        /* 2 Column Layout */
        grid-template-rows: auto;
        grid-template-areas:
            "profile profile"
            "about   tech";
        height: auto;
        max-height: none;
        padding-bottom: 2rem;
    }

    .bento-card {
        min-height: 250px;
        /* Ensure content breathes */
    }
}

/* Mobile (Single Column) */
@media (max-width: 768px) {
    body {
        /* Allow scroll on mobile */
        overflow-y: auto;
        padding-bottom: 2rem;
    }

    .bento-container {
        height: auto;
        padding: 1rem;
        align-items: flex-start;
        /* Top align content */
    }

    .grid-wrapper {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        gap: 1.5rem;
        padding: 0;
        margin: 0;
    }

    .profile-card {
        padding: 2rem 1.5rem;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .image-wrapper {
        width: 140px;
        height: 140px;
        margin-bottom: 0.5rem;
    }

    .profile-info {
        text-align: center;
        align-items: center;
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .profile-name {
        font-size: 2rem;
    }

    .social-icons-wrapper {
        justify-content: center;
        width: 100%;
        flex-wrap: wrap;
    }

    .bio-short {
        margin-top: 1.25rem;
        padding-top: 1.25rem;
    }

    .bento-card {
        padding: 1.5rem;
    }

    /* Adjust tech pills for wrap */
    .tech-list {
        justify-content: flex-start;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .profile-name {
        font-size: 1.75rem;
    }

    .social-icons-wrapper {
        gap: 1rem;
    }
}