:root {
    --primary: #BD5D38;
    --accent-color: #BD5D38;
    --bg-light: #ffffff;
    --bg-gray: #f9fafb;
    /* bg-gray-50 */
    --text-dark: #1a1a1a;
    --text-muted: #6b7280;
    --sidebar-width: 250px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
    border: 2px solid #1a1a1a;
}

::-webkit-scrollbar-thumb:hover {
    background: #a34e2f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Sidebar Styling */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background-color: var(--primary);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1.5rem;
    z-index: 1000;
}

#flying-pig {
    width: 60px;
    height: auto;
    background: transparent;
    border: none;
    outline: none;
    image-rendering: pixelated;
}

#pig-container.fly {
    display: block;
    animation: flyAcross 15s linear forwards;
}

@keyframes flyAcross {
    from {
        left: -100px;
        top: 10%;
    }

    to {
        left: 100vw;
        top: 80%;
    }
}

/* Scroll to Top Button */
#scrollToTop {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    font-size: 1.2rem;
    align-items: center;
    justify-content: center;
}

#scrollToTop:hover {
    background-color: #a34e2f;
    transform: translateY(-5px);
}

#scrollToTop.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer-badge img {
    height: 120px;
    border-radius: 4px;
    width: auto;
}

.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-container img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.sidebar-identity {
    margin-top: 0.5rem;
}

.sidebar-identity h3 {
    font-size: 1.25rem;
    color: white;
    margin: 0;
    font-weight: 700;
}

.sidebar-identity p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.logo-container img:hover {
    transform: scale(1.05);
    border-color: white;
}

.sidebar-identity h3 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    font-weight: 700;
}

.sidebar-identity p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-bottom: 0;
}

.nav-links {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    text-align: center;
}

.nav-item:hover,
.nav-item.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Main Content Styling */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 5rem;
    width: calc(100% - var(--sidebar-width));
    /* Use full remaining width */
}

section {
    margin-bottom: 8rem;
    scroll-margin-top: 5rem;
}

h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-dark);
    line-height: 1.1;
}

h2 {
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 2.5rem;
    color: var(--text-dark);
    border-bottom: 4px solid var(--primary);
    display: inline-block;
    padding-bottom: 0.5rem;
    font-weight: 800;
}

h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 1.15rem;
}

/* Hero Section */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4rem;
    margin-bottom: 8rem;
}

.hero-content {
    flex: 1;
}

.hero-visual {
    flex: 0 0 450px;
    position: relative;
}

.network-image {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid #e5e7eb;
}

.highlight {
    color: var(--primary);
}

.nickname {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: -1.2rem;
    margin-bottom: 2.2rem;
    font-style: italic;
    opacity: 0.8;
}

.header-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1.5rem 0 2rem 0;
}

.tool-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 0.4rem;
    border-radius: 0.4rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: 1px solid #e5e7eb;
}

.tool-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.tool-item img {
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--primary);
    color: white !important;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.social-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: #a34e2f;
    /* Slightly darker than primary */
    color: white !important;
}

.social-button i {
    font-size: 1.2rem;
}

.tool-logo:hover {
    transform: scale(1.2);
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(189, 93, 56, 0.4));
}

.hero-bio p {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
    max-width: 800px;
}

/* Infrastructure Status */
.infrastructure-status {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-gray);
    padding: 0.75rem 1.25rem;
    border-radius: 2rem;
    border: 1px solid #e5e7eb;
    margin-top: 1rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background-color: #22c55e;
    box-shadow: 0 0 8px #22c55e;
}

.status-dot.offline {
    background-color: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.status-text {
    font-size: 0.95rem;
    color: var(--text-dark);
}

.status-ping {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.contact-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
}

.contact-link:hover {
    text-decoration: underline;
}

/* Education Section */
.education-item {
    margin-bottom: 2.5rem;
}

.school-name {
    font-size: 1.4rem;
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.degree-info {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Experience & Tags (Minimal) */
.experience-summary-minimal {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.summary-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem 2rem;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
}

.summary-item .dot {
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
}

.summary-item .label {
    font-weight: 600;
    color: var(--text-muted);
}

.summary-item .val {
    color: var(--text-color);
    font-weight: 500;
}

.experience-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f5f5f5;
}

.experience-item:last-child {
    border-bottom: none;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.25rem;
}

.title-with-icon {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.section-bullet {
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.experience-company-logo {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: white;
    padding: 6px;
    border-radius: 10px;
    border: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.experience-company-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.job-position {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 0.25rem;
}

.item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.item-tag {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
}

.duration-tag {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.job-title {
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.job-date {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

/* Competences */
.competence-category {
    margin-bottom: 2rem;
}

.competence-list {
    list-style: none;
}

.competence-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.competence-list li::before {
    content: '•';
    color: var(--primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Projects Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--bg-gray);
    padding: 2.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.project-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.project-link:hover {
    text-decoration: underline;
}

/* Flying Pig */
#pig-container {
    position: fixed;
    top: 15%;
    right: -150px;
    z-index: 2000;
    pointer-events: none;
    transition: transform 10s linear;
}

#flying-pig {
    width: 60px;
    height: auto;
    background: transparent;
    border: none;
    outline: none;
    image-rendering: pixelated;
    mix-blend-mode: multiply;
}

#pig-container.fly {
    transform: translateX(calc(-100vw - 300px));
}

/* Contact Section */
/* Sponsorship Section */
.sponsorship-section {
    margin-bottom: 6rem;
}

.sponsorship-card {
    background: var(--card-bg);
    border-radius: 1.25rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-lg);
    max-width: 700px;
}

.sponsorship-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.sponsorship-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.sponsorship-list li {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.sponsorship-list li:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.sponsorship-list i {
    color: var(--primary);
    font-size: 1.2rem;
}

.sponsorship-note {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem !important;
    border-left: 3px solid #ef4444;
    padding-left: 1rem;
    margin-top: 1.5rem;
}

.sponsorship-cta {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-button.mini {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
}

.contact-section {
    margin-bottom: 8rem;
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    background: var(--bg-gray);
    padding: 2.5rem;
    border-radius: 1rem;
    text-align: center;
    border: 1px solid #e5e7eb;
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.contact-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.contact-card h3 {
    margin-bottom: 0.5rem;
}

.contact-card p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* Firework */
.sidebar-footer {
    padding: 1rem;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.sidebar-footer .nav-item {
    width: 100%;
}

.firework-icon {
    font-size: 1.8rem;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.7;
}

.firework-icon:hover {
    opacity: 1;
    transform: scale(1.2) rotate(15deg);
}

/* Kaboom Particles */
.particle {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 3000;
    animation: explode 0.8s ease-out forwards;
}

@keyframes explode {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* Footer disclaimer */
.footer-disclaimer {
    font-size: 0.9rem;
    color: var(--text-muted);
    opacity: 0.8;
    margin-top: -0.5rem !important;
}

.ip-check {
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.ipv6-success {
    color: #06d6a0;
    font-weight: 600;
}

.ipv4-info {
    color: var(--text-muted);
}

.ip-check i {
    margin-right: 0.4rem;
}

/* Footer */
.footer {
    margin-top: 6rem;
    padding: 3rem 0;
    border-top: 1px solid #e5e7eb;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.site-metrics {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: #f9fafb;
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    border: 1px solid #f3f4f6;
}

.site-metrics .separator {
    color: #e5e7eb;
}

.site-metrics i {
    color: var(--accent-color);
    margin-right: 0.4rem;
}

.footer-info p {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

.abuse-badge {
    width: 150px;
    /* Adjusted from 401px for better fit */
    height: auto;
    transition: transform 0.2s ease;
}

.abuse-badge:hover {
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 1100px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1.5rem;
        flex-direction: column;
    }

    .logo-container {
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
        margin-bottom: 1rem;
        text-align: left;
    }

    .logo-container img {
        width: 50px;
        height: 50px;
        margin-bottom: 0;
    }

    .sidebar-identity {
        margin-top: 0;
    }

    .nav-links {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 1rem;
    }

    .nav-item {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }

    .sidebar-footer {
        display: none;
        /* Hide firework on mobile sidebar for now */
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 2rem 1rem;
    }

    .hero {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
        margin-bottom: 4rem;
    }

    .hero-visual {
        flex: 0 0 auto;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .header-tools {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    .experience-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .company-logo {
        display: none;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }
}

@media (max-width: 600px) {
    .nav-links {
        display: none;
        /* Consider a hamburger menu for very small screens */
    }
}