/* CSS Variables for Theming */
:root {
    --primary-bg: #0a0a0a;
    --secondary-bg: #141414;
    --accent-color: #cc0000;
    --text-primary: #ffffff;
    --text-secondary: rgb(170, 170, 170);
    --border-color: rgb(40, 40, 40);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.4);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

html {
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* Custom Scrollbar — WebKit (Chrome, Edge, Safari) */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

::-webkit-scrollbar-thumb:active {
    background: rgba(204, 0, 0, 0.8);
}

body {
    top: 0;
    left: 0;
    padding: 0;
    margin: 0;
    display: relative;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
    background-color: var(--primary-bg);
}

*, *::before, *::after {
    box-sizing: border-box;
}

h1 {
    margin: 0;
    color: white;
    font-size: 50px;
    padding-bottom: 20px;
    text-align: center;
}

/* Section Titles — enhanced headings for major sections */
.section-title {
    text-transform: uppercase;
    letter-spacing: 5px;
    font-weight: 700;
    position: relative;
    padding-bottom: 20px;
    color: var(--accent-color);
    text-shadow:
        0 0 20px rgba(204, 0, 0, 0.3),
        0 0 40px rgba(204, 0, 0, 0.12);
    /* Scroll entrance + delayed color reveal */
    opacity: 0;
    transform: translateY(25px);
    transition:
        opacity 0.4s ease-out,
        transform 0.4s ease-out,
        color 0.5s ease-out 0.35s,
        text-shadow 0.5s ease-out 0.35s;
}

.section-title.visible {
    opacity: 1;
    transform: translateY(0);
    color: var(--text-primary);
    text-shadow:
        0 0 30px rgba(204, 0, 0, 0.12),
        0 0 60px rgba(204, 0, 0, 0.04);
}

h3 {
    color: white;    
}

ul {
    margin: 0;
    padding: 0px 50px;
    color: white;
}

a {
    color: var(--text-primary);
    text-decoration: none;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-color);
    color: var(--text-primary);
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

/* Toolbar */

.toolbar{
    font-size: 35px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 75px;
    position: fixed;
    align-content: center;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    padding-left: 6%;
    padding-right: 0;
    width: 100%;
    max-width: 100vw;
    display: flex;
    align-items: center;
    z-index: 1000;
    box-sizing: border-box;
    box-shadow: var(--shadow-md);
    transition: background-color var(--transition-normal);
}

.title {
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar a{
    margin: 10px;
    font-size: 20px;
    text-decoration: none;
    transition: color var(--transition-fast), transform var(--transition-fast);
    position: relative;
}

.toolbar a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width var(--transition-normal);
}

.toolbar a:hover,
.toolbar a.active {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.toolbar a:hover::after,
.toolbar a.active::after {
    width: 100%;
}

.toolbar a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
    border-radius: 2px;
}

.spacer {
    flex: 1 1 auto;
}

.navbar {
    display: flex;
    padding: 0 10%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
    width: 30px;
    height: 30px;
    justify-content: space-around;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Homepage */

.home {
    background-color: var(--secondary-bg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: calc(100vh - 75px + 300px);
    min-height: calc(100vh - 75px + 300px);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.7);
    min-width: 280px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.home::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("assets/images/html1.png");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.home.bg-loaded::after {
    opacity: 1;
}

.home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(0, 0, 0, 0.25) 0%,
        rgba(0, 0, 0, 0.25) 20%,
        #141414 100%);
    pointer-events: none;
    z-index: 1;
}

.home-content-container {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero — Name */
.hero-name {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px 0;
    padding: 0;
    letter-spacing: -0.5px;
    line-height: 1.15;
}

/* Hero — Role subtitle */
.hero-subtitle {
    font-size: clamp(16px, 2.4vw, 26px);
    font-weight: 500;
    color: var(--accent-color);
    margin: 0;
    padding: 0;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* Hero — Thin decorative divider */
.hero-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 22px auto;
    width: 60%;
    max-width: 320px;
}

.hero-divider span {
    display: block;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent 0%,
        var(--accent-color) 30%,
        var(--accent-color) 70%,
        transparent 100%
    );
    opacity: 0.5;
}

/* Hero — Experience credentials */
.hero-experience {
    font-size: clamp(13px, 1.6vw, 17px);
    font-weight: 400;
    color: var(--text-secondary);
    margin: 0 0 28px 0;
    padding: 0;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    line-height: 1.6;
}

/* Hero — Typing animation line */
.hero-typing {
    font-size: clamp(20px, 2.8vw, 32px);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

.typing-text {
    color: var(--accent-color);
    font-weight: 700;
    display: inline-block;
    min-width: 1px;
}

.typing-cursor {
    color: var(--accent-color);
    font-weight: 700;
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Scroll Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* About me */

.about-me {
    min-height: 1280px;
    background-image: linear-gradient(176deg, var(--secondary-bg) 0%, var(--secondary-bg) 70%, var(--primary-bg) calc(80% + 2px));
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.left_block {
    padding: 50px;
    min-width: 35%;
    margin: auto;
    background-color: var(--primary-bg);
    border-radius: 75px;
    color: var(--text-primary);
    font-size: 28px;
    line-height: 1.5;
    border: var(--border-color) solid 1px;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.left_block:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.left_block b {
    font-size: 32px;
}

.selfpic {
    display: flex;
    align-items: center; /* Vertically center the text next to the image */
    margin-bottom: 20px;
}

.selfpic-img-wrapper {
    position: relative;
    display: inline-block;
    margin-right: 20px;
    cursor: pointer;
}

.selfpic img {
    height: 375px;
    border-radius: 50%;
    display: block;
    transition: opacity 0.4s ease;
}

.selfpic-img-wrapper .selfpic-loader {
    position: absolute;
    top: -4%;
    left: -4%;
    width: 108%;
    height: 108%;
    pointer-events: none;
    transform: rotate(-90deg); /* Start the stroke from the top */
}

.selfpic-img-wrapper .selfpic-loader circle {
    fill: none;
    stroke: var(--accent-color);
    stroke-width: 3;
    stroke-linecap: round;
    /* Circumference = 2 * PI * 96 ≈ 603.19 */
    stroke-dasharray: 603.19;
    stroke-dashoffset: 603.19;
    transition: none; /* No transition by default so reset is instant */
}

.selfpic-img-wrapper.loading .selfpic-loader circle {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 2.5s linear;
}

/* Brief flash effect when the image swaps */
.selfpic-img-wrapper.swapping img {
    opacity: 0.6;
}

.selfpic-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1; /* Allow the text to take up remaining space */
}

@media (max-width: 1800px) {
    .selfpic {
        display: block; /* Stack the image and text vertically */
        text-align: center; /* Center the text under the image */
    }

    .selfpic-img-wrapper {
        margin-right: 0; /* Remove the right margin */
        margin-bottom: 20px; /* Add space between the image and the text */
    }

    .selfpic-text {
        align-items: center; /* Center the text under the image */
    }
}

.right_block {
    padding: 50px;
    width: 48%;
    margin: auto;
    background-color: var(--primary-bg);
    border-radius: 75px;
    color: var(--text-primary);
    font-size: 22px;
    line-height: 1.5;
    border: var(--border-color) solid 1px;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.right_block:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skills_technologies {
    padding-top: 15px;
}

.skills_technologies b {
    padding-left: 50px;
}

.skills_technologies ul li{
    font-size: 25px;
    padding-top: 20px ;
    list-style-type: none;
}

.skills_technologies hr {
    margin: 0;
    padding: 0;
    border: none;
    border-top: 2px var(--accent-color) solid;
    transition: border-color var(--transition-fast);
}

.skills_technologies ul li:hover + hr {
    border-top-color: var(--text-primary);
}

/* Work Experience */

.Work_Experience {
    padding: 80px 20px 40px;
    background-color: var(--primary-bg);
    min-height: 400px;
    margin: 0 auto;
    box-sizing: border-box;
    position: relative;
    text-align: center;
}

.Work_Experience::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    max-width: 500px;
    height: 2px;
    background: linear-gradient(to right, transparent 0%, var(--accent-color) 30%, var(--accent-color) 70%, transparent 100%);
    opacity: 0.4;
    pointer-events: none;
}

.Work_Experience::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--primary-bg));
    pointer-events: none;
    z-index: 0;
}

.Work_Experience_Table {
    width: 80%;
    border-collapse: separate;
    border-spacing: 0;
    color: white;
    font-size: 22px;
    margin: 25px auto 0;
    background-color: #111111;
    border: 1px solid rgb(50, 50, 50);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.Work_Experience_Table th, .Work_Experience_Table td {
    padding: 14px 18px;
    text-align: left;
    border: none;
    border-bottom: 1px solid rgb(35, 35, 35);
}

.Work_Experience_Table th {
    background-color: #1a1a1a;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1.5px;
    border-bottom: 2px solid var(--accent-color);
}

.Work_Experience_Table tr {
    transition: all var(--transition-normal);
}

.Work_Experience_Table .expandable-row {
    cursor: pointer;
}

.Work_Experience_Table .expandable-row:hover {
    background-color: rgba(255, 255, 255, 0.04);
    box-shadow: var(--shadow-sm);
}

/* Expandable row chevron indicator */
.expandable-row td:last-child {
    position: relative;
    padding-right: 30px;
}

.expandable-row td:last-child::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text-secondary);
    border-bottom: 2px solid var(--text-secondary);
    transform: translateY(-60%) rotate(45deg);
    transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.expandable-row.expanded td:last-child::after {
    transform: translateY(-30%) rotate(-135deg);
    border-color: var(--accent-color);
}

.expandable-row:hover td:last-child::after {
    border-color: var(--accent-color);
}

/* Details row — always rendered, inner content animates */
.details-row {
    cursor: default;
}

.details-row:hover {
    background-color: transparent !important;
    transform: none !important;
    box-shadow: none !important;
}

.details-row td {
    padding: 0 !important;
    border: none !important;
}

.details-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;
    opacity: 0;
    padding: 0 6%;
    background: rgba(0, 0, 0, 0.4);
    border-left: 3px solid var(--accent-color);
    border-radius: 0 8px 8px 0;
    margin: 0 10px;
}

.details-row.active-row .details-content {
    max-height: 600px;
    opacity: 1;
    padding: 20px 6%;
    margin: 8px 10px;
}

/* Details title */
.details-title {
    margin: 0 0 14px 0;
    padding: 0 0 10px 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    letter-spacing: 0.3px;
}

.details-company {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 18px;
}

/* Details list */
.details-list {
    display: block;
    margin: 0;
    padding-left: 20px;
    list-style-type: none;
}

.details-list li {
    padding: 6px 0;
    line-height: 1.6;
    position: relative;
    padding-left: 16px;
    font-size: 16px;
    color: var(--text-secondary);
}

.details-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 50%;
}

.details-list li strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Portfolio */

.Portfolio {
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(204, 0, 0, 0.06) 0%, transparent 60%),
        var(--primary-bg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: auto;
    padding: 50px 0 200px 0;
    position: relative;
}

.Portfolio::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("assets/images/html1.png");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.Portfolio.bg-loaded::after {
    opacity: 1;
}

.Portfolio > h1,
.Portfolio > .project-wrapper {
    position: relative;
    z-index: 2;
}

.Portfolio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 50% 10%, rgba(204, 0, 0, 0.04) 0%, transparent 50%),
        linear-gradient(to bottom,
            rgba(0, 0, 0, 0.75) 0%,
            rgba(0, 0, 0, 0.4) 15%,
            rgba(0, 0, 0, 0.4) 70%,
            rgba(0, 0, 0, 0.8) 100%);
    pointer-events: none;
    z-index: 1;
}

.project-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px; /* Adjust space between project containers */
    margin-left: 20%;
    margin-right: 20%;
    box-sizing: border-box;
}

/* Container for each project */
.project-container {
    position: relative;
    width: 300px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
    background-color: var(--secondary-bg);
}

.project-container:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

/* Styling for the project images */
.project-image {
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 175px;
    display: block;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-container:hover .project-image img {
    transform: scale(1.1);
}

/* Button overlay */
.project-link {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background-color: rgba(0, 0, 0, 0.8);
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: all var(--transition-normal);
    color: var(--text-primary);
    opacity: 0;
    border: 2px solid var(--accent-color);
}

.project-container:hover .project-link {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    background-color: var(--accent-color);
    box-shadow: var(--shadow-md);
}

.project-link:hover {
    background-color: rgba(204, 0, 0, 0.9);
    transform: translateX(-50%) translateY(-2px) scale(1.05);
}

/* Styling for project information */
.project-info {
    padding: 15px;
    text-align: center;
    height: 100%;
    background-color: var(--secondary-bg);
    transition: background-color var(--transition-normal);
}

.project-container:hover .project-info {
    background-color: rgba(20, 20, 20, 0.95);
}

.project-info h2 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: var(--text-primary);
}

.project-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

/* GitHub Activity */

.github-activity {
    padding: 80px 20px 60px;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(204, 0, 0, 0.04) 0%, transparent 60%),
        var(--primary-bg);
    text-align: center;
    color: var(--text-primary);
    position: relative;
}

.github-activity::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    max-width: 500px;
    height: 2px;
    background: linear-gradient(to right, transparent 0%, var(--accent-color) 30%, var(--accent-color) 70%, transparent 100%);
    opacity: 0.4;
    pointer-events: none;
}

.github-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Contribution Grid */
.github-grid-wrapper {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 10px;
}

.github-grid-labels {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 22px;
    min-width: 32px;
    text-align: right;
}

.github-grid-labels span {
    height: 12px;
    margin-bottom: 2px;
    font-size: 10px;
    line-height: 12px;
    color: var(--text-secondary);
    opacity: 0.7;
}

.github-grid-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    flex: 1;
    min-width: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.github-grid-months {
    display: flex;
    gap: 0;
    margin-bottom: 4px;
    height: 18px;
}

.github-grid-months span {
    min-width: 14px;
    font-size: 10px;
    color: var(--text-secondary);
    opacity: 0.7;
    text-align: left;
    line-height: 18px;
}

.github-grid {
    display: flex;
    gap: 2px;
}

.github-grid-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.github-grid-cell {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    transition: outline 0.15s ease, transform 0.15s ease;
    cursor: default;
}

.github-grid-cell:hover {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: -1px;
    transform: scale(1.3);
    z-index: 1;
}

/* Color levels — red theme */
.github-grid-cell[data-level="0"] {
    background-color: rgba(255, 255, 255, 0.04);
}

.github-grid-cell[data-level="1"] {
    background-color: rgba(204, 0, 0, 0.25);
}

.github-grid-cell[data-level="2"] {
    background-color: rgba(204, 0, 0, 0.5);
}

.github-grid-cell[data-level="3"] {
    background-color: rgba(204, 0, 0, 0.75);
}

.github-grid-cell[data-level="4"] {
    background-color: var(--accent-color);
}

/* Grid Footer (total contributions + legend) */
.github-grid-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 0 4px;
}

.github-total-contributions {
    font-size: 13px;
    color: var(--text-secondary);
    opacity: 0.8;
    font-style: italic;
}

/* Legend */
.github-grid-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.github-legend-label {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.7;
    padding: 0 4px;
}

.github-legend-box {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.github-legend-box[data-level="0"] { background-color: rgba(255, 255, 255, 0.04); }
.github-legend-box[data-level="1"] { background-color: rgba(204, 0, 0, 0.25); }
.github-legend-box[data-level="2"] { background-color: rgba(204, 0, 0, 0.5); }
.github-legend-box[data-level="3"] { background-color: rgba(204, 0, 0, 0.75); }
.github-legend-box[data-level="4"] { background-color: var(--accent-color); }

/* Skeleton loading */
.github-grid-skeleton {
    display: flex;
    gap: 2px;
    height: 98px;
    width: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.github-skeleton {
    pointer-events: none;
}

.github-skeleton .skeleton-line {
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    margin-bottom: 10px;
}

.skeleton-short { width: 40%; }
.skeleton-long { width: 90%; }
.skeleton-medium { width: 30%; }

/* Subtitle */
.github-subtitle {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 20px 0;
    letter-spacing: 1px;
}

/* Commit Cards */
.github-commits {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.github-commit-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 260px;
    padding: 18px 20px;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.github-commit-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.commit-repo {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.commit-message {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    margin-bottom: 10px;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.commit-time {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-top: auto;
}

/* Commit stats row (date + additions/deletions) */
.commit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 4px;
}

.commit-stats-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: auto;
    padding-top: 8px;
}

.commit-date {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.7;
}

.commit-diff {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Consolas', 'Courier New', monospace;
}

.commit-additions {
    color: #3fb950;
}

.commit-deletions {
    color: #f85149;
}

.commit-separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Repo Cards */
.github-repos {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.github-repo-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 260px;
    padding: 18px 20px;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.github-repo-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.repo-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    width: 100%;
}

.repo-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    word-break: break-word;
}

.repo-description {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.repo-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: auto;
    width: 100%;
}

.repo-lang {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-secondary);
}

.repo-lang-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--accent-color);
}

.repo-stat {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.7;
}

.github-no-data {
    color: var(--text-secondary);
    font-size: 14px;
    opacity: 0.6;
}

/* Error State */
.github-error {
    margin: 20px 0;
}

.github-error p {
    color: var(--text-secondary);
    font-size: 14px;
}

.github-error a {
    color: var(--accent-color);
    text-decoration: underline;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.github-error a:hover {
    color: var(--text-primary);
}

/* Profile Button */
.github-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    background-color: transparent;
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    text-decoration: none;
    transition: background-color var(--transition-normal), transform var(--transition-fast), box-shadow var(--transition-normal);
}

.github-profile-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.github-btn-icon {
    width: 22px;
    height: 22px;
    filter: invert(1) brightness(1.2);
}

/* Contact */

.contact {
    background:
        radial-gradient(ellipse at 50% 60%, rgba(204, 0, 0, 0.05) 0%, transparent 60%),
        var(--primary-bg);
    height: auto;
    padding: 100px 0;
    text-align: center;
    color: var(--text-primary);
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    max-width: 500px;
    height: 2px;
    background: linear-gradient(to right, transparent 0%, var(--accent-color) 30%, var(--accent-color) 70%, transparent 100%);
    opacity: 0.4;
    pointer-events: none;
}

.contact::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, #000000);
    pointer-events: none;
}

.contact h1 {
    padding-bottom: 20px;
}

.contact img {
    height: 50px;
}

.Get_In_Touch {
    font-size: 22px;
    padding: 0 50px 50px 50px;
    margin: auto;
    width: 28%;
    min-width: 400px;
    background-color: var(--secondary-bg);
    border: 1px var(--border-color) solid;
    border-radius: 75px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    box-sizing: border-box;
}

.Get_In_Touch:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Media query for screen widths 1400-1800px */
@media (max-width: 1800px) {
    .Get_In_Touch {
        width: 35%;
        min-width: 380px;
    }
}

/* Media query for screen widths 1400px and below */
@media (max-width: 1400px) {
    .Get_In_Touch {
        width: 45%;
        min-width: 360px;
    }
}

.Get_In_Touch p {
    display: flex;
    align-items: center;
    padding: 10px 0;
    color: white;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.Get_In_Touch p a {
    word-break: break-all;
}

.Get_In_Touch img {
    padding-right: 25px;
    height: 50px;
    filter: invert(1) brightness(1.5);
}

.Social_Media {
    text-align: center;
}

.Social_Media img {
    transition: transform var(--transition-normal), filter var(--transition-fast);
    filter: invert(1) brightness(1.5);
}

.Social_Media a {
    display: inline-block;
    transition: transform var(--transition-fast);
}

.Social_Media a:hover {
    transform: translateY(-3px);
}

.Social_Media img:hover {
    transform: scale(1.2);
    filter: invert(1) brightness(1.8) drop-shadow(0 4px 8px rgba(204, 0, 0, 0.3));
}

/* Mobile and Tablet Responsive Styles */

/* Tablet styles (768px to 1024px) */
@media (max-width: 1024px) {
    .toolbar {
        font-size: 28px;
        height: 65px;
        padding-left: 3%;
    }

    .toolbar a {
        font-size: 18px;
        margin: 8px;
    }

    .navbar {
        padding: 0 5%;
    }

    .home {
        height: calc(100vh - 65px + 200px);
        min-height: calc(100vh - 65px + 200px);
    }

    .about-me {
        flex-direction: column;
        padding: 20px;
    }
    
    .project-wrapper {
        margin-left: 15%;
        margin-right: 15%;
    }

    .left_block {
        width: 90%;
        min-width: auto;
        margin-bottom: 30px;
        padding: 30px;
        font-size: 22px;
    }

    .right_block {
        width: 90%;
        padding: 30px;
        font-size: 20px;
    }

    .Work_Experience_Table {
        width: 95%;
        font-size: 18px;
        border-radius: 10px;
    }

    .Work_Experience_Table th {
        font-size: 12px;
        padding: 12px 14px;
    }

    .Work_Experience_Table th, .Work_Experience_Table td {
        padding: 12px 14px;
    }

    .details-title {
        font-size: 20px;
    }

    .details-company {
        font-size: 16px;
    }

    .details-list li {
        font-size: 15px;
    }

    .Get_In_Touch {
        width: 55%;
        min-width: 340px;
    }

    .github-content {
        max-width: 100%;
    }

    .github-grid-cell {
        width: 11px;
        height: 11px;
    }

    .github-commit-card {
        width: 230px;
    }

    .github-repo-card {
        width: 230px;
    }
}

/* Mobile styles (up to 768px) */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .toolbar {
        font-size: 18px;
        height: 45px;
        min-height: 45px;
        flex-direction: row;
        padding: 5px 3%;
        max-width: 100vw;
        box-sizing: border-box;
        align-items: center;
    }

    .Title {
        margin-bottom: 0;
        font-size: 18px;
        line-height: 1.2;
    }

    .spacer {
        flex: 1 1 auto;
    }

    .hamburger {
        display: flex;
        margin-right: 10px;
    }

    .navbar {
        position: fixed;
        top: 45px;
        left: 0;
        right: 0;
        background-color: black;
        flex-direction: column;
        width: 100%;
        padding: 15px 0;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }

    .navbar.active {
        max-height: 400px;
        padding: 15px 0;
    }

    .navbar a {
        font-size: 16px;
        margin: 0;
        padding: 12px 20px;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid rgb(50, 50, 50);
        line-height: 1.4;
        box-sizing: border-box;
    }

    .navbar a:last-child {
        border-bottom: none;
    }

    .home {
        height: calc(100vh - 45px + 150px);
        min-height: calc(100vh - 45px + 150px);
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .home-content-container {
        padding: 0 16px;
    }

    .hero-divider {
        margin: 16px auto;
        width: 50%;
    }

    .hero-experience {
        margin-bottom: 20px;
    }

    .hero-contact-links {
        gap: 16px;
        margin-top: 22px;
    }

    .hero-contact-links a {
        font-size: 14px;
        padding: 7px 14px;
        gap: 6px;
    }

    .hero-contact-links img {
        width: 18px;
        height: 18px;
    }

    .about-me {
        flex-direction: column;
        padding: 20px 10px;
        min-height: auto;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .left_block {
        width: 95%;
        min-width: auto;
        max-width: 100%;
        margin-bottom: 20px;
        padding: 20px;
        font-size: 18px;
        border-radius: 25px;
        box-sizing: border-box;
    }

    .left_block b {
        font-size: 22px;
    }

    .selfpic {
        flex-direction: column;
        text-align: center;
    }

    .selfpic img {
        height: 250px;
    }

    .selfpic-img-wrapper {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .Selfpic_Text {
        font-size: 16px;
    }

    .skills_technologies {
        padding-top: 10px;
    }

    .skills_technologies b {
        padding-left: 0;
        font-size: 20px;
    }

    .skills_technologies ul {
        padding: 0px 20px;
    }

    .skills_technologies ul li {
        font-size: 18px;
        padding-top: 15px;
    }

    .right_block {
        width: 95%;
        max-width: 100%;
        padding: 20px;
        font-size: 16px;
        border-radius: 25px;
        box-sizing: border-box;
    }

    .right_block h1 {
        font-size: 32px;
    }

    .Work_Experience {
        padding: 20px 10px;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .Work_Experience h1 {
        font-size: 32px;
    }

    .section-title {
        letter-spacing: 3px;
        padding-bottom: 24px;
    }

    /* --- Card layout for mobile --- */
    .Work_Experience_Table {
        width: 100%;
        min-width: unset;
        font-size: 14px;
        border-radius: 10px;
    }

    .Work_Experience_Table thead {
        display: none;
    }

    .Work_Experience_Table .expandable-row {
        display: flex;
        flex-direction: column;
        padding: 16px 18px;
        position: relative;
        border-bottom: 1px solid rgb(35, 35, 35);
    }

    .Work_Experience_Table .expandable-row td {
        display: block;
        padding: 0;
        border: none;
    }

    /* Reorder: Title (4th) first, Company (3rd) second, Date (1st) and Type (2nd) last */
    .Work_Experience_Table .expandable-row td:nth-child(4) {
        order: 1;
        font-weight: 700;
        font-size: 16px;
        color: var(--text-primary);
        padding-right: 28px;
        padding-bottom: 4px;
    }

    .Work_Experience_Table .expandable-row td:nth-child(3) {
        order: 2;
        font-size: 14px;
        color: var(--text-secondary);
        padding-bottom: 6px;
    }

    .Work_Experience_Table .expandable-row td:nth-child(1) {
        order: 3;
        font-size: 12px;
        color: var(--text-secondary);
        opacity: 0.6;
    }

    .Work_Experience_Table .expandable-row td:nth-child(2) {
        order: 4;
        font-size: 12px;
        color: var(--text-secondary);
        opacity: 0.6;
    }

    /* Chevron repositioned to top-right of card */
    .expandable-row td:last-child {
        padding-right: 0;
    }

    .expandable-row td:last-child::after {
        right: 0;
        top: 4px;
        width: 7px;
        height: 7px;
        position: absolute;
    }

    /* Details row - full width card continuation */
    .Work_Experience_Table .details-row td {
        display: block;
        width: 100%;
    }

    .details-content {
        margin: 0;
        padding: 0 4%;
        border-radius: 0 0 8px 8px;
    }

    .details-row.active-row .details-content {
        padding: 16px 5%;
        margin: 0;
    }

    .details-title {
        font-size: 18px;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }

    .details-company {
        font-size: 14px;
        display: block;
        margin-top: 2px;
    }

    .details-list li {
        font-size: 13px;
        padding: 4px 0;
        padding-left: 14px;
    }

    .details-list li::before {
        width: 5px;
        height: 5px;
        top: 12px;
    }

    .Portfolio {
        padding: 30px 10px 100px 10px;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .Portfolio h1 {
        font-size: 32px;
    }

    .project-wrapper {
        gap: 15px;
        margin-left: 8%;
        margin-right: 8%;
        padding: 0;
        width: auto;
        max-width: 100%;
        box-sizing: border-box;
    }

    .project-container {
        width: 100%;
        max-width: 350px;
    }

    .project-image img {
        height: 200px;
    }

    .project-link {
        font-size: 14px;
        padding: 8px 16px;
    }

    /* GitHub Activity mobile */
    .github-activity {
        padding: 50px 10px 40px;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .github-activity h1 {
        font-size: 32px;
    }

    .github-content {
        padding: 0 6px;
    }

    .github-grid-wrapper {
        gap: 4px;
        position: relative;
    }

    .github-grid-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        left: 28px;
        bottom: 0;
        width: 30px;
        background: linear-gradient(to right, var(--primary-bg), transparent);
        pointer-events: none;
        z-index: 2;
    }

    .github-grid-labels {
        min-width: 24px;
    }

    .github-grid-labels span {
        font-size: 9px;
    }

    .github-grid-cell {
        width: 10px;
        height: 10px;
    }

    .github-grid-months span {
        font-size: 9px;
        min-width: 12px;
    }

    .github-subtitle {
        font-size: 20px;
    }

    .github-grid-footer {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .github-total-contributions {
        font-size: 12px;
    }

    .github-commits {
        flex-direction: column;
        align-items: center;
    }

    .github-commit-card {
        width: 100%;
        max-width: 350px;
    }

    .github-repos {
        flex-direction: column;
        align-items: center;
    }

    .github-repo-card {
        width: 100%;
        max-width: 350px;
    }

    .github-profile-btn {
        font-size: 14px;
        padding: 10px 22px;
    }

    .contact {
        padding: 50px 0;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .contact h1 {
        font-size: 32px;
    }

    .Get_In_Touch {
        width: 90%;
        padding: 20px;
        font-size: 18px;
        border-radius: 25px;
    }

    .Get_In_Touch p {
        font-size: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .Get_In_Touch img {
        height: 40px;
        padding-right: 15px;
    }

    .Social_Media {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        margin-top: 20px;
    }

    .Social_Media a {
        display: inline-block;
    }

    .Social_Media img {
        height: 40px;
    }

    h1 {
        font-size: 32px;
    }
}

/* Small mobile devices (up to 480px) */
@media (max-width: 480px) {
    .toolbar {
        font-size: 16px;
        height: 40px;
        min-height: 40px;
        padding: 4px 2%;
    }

    .Title {
        font-size: 16px;
        line-height: 1.2;
    }

    .navbar {
        top: 40px;
        padding: 12px 0;
    }

    .navbar.active {
        padding: 12px 0;
    }

    .navbar a {
        font-size: 14px;
        padding: 10px 15px;
        line-height: 1.4;
    }

    .home {
        height: calc(100vh - 40px + 100px);
        min-height: calc(100vh - 40px + 100px);
    }

    .home-content-container {
        padding: 0 12px;
    }

    .hero-divider {
        margin: 12px auto;
        width: 45%;
    }

    .hero-experience {
        margin-bottom: 16px;
        letter-spacing: 1px;
    }

    .hero-contact-links {
        gap: 12px;
        margin-top: 18px;
    }

    .hero-contact-links a {
        font-size: 13px;
        padding: 6px 12px;
        gap: 5px;
    }

    .hero-contact-links img {
        width: 16px;
        height: 16px;
    }

    .left_block {
        padding: 15px;
        font-size: 16px;
    }

    .left_block b {
        font-size: 18px;
    }

    .selfpic img {
        height: 200px;
    }

    .Selfpic_Text {
        font-size: 14px;
    }

    .skills_technologies ul li {
        font-size: 16px;
    }

    .right_block {
        padding: 15px;
        font-size: 14px;
    }

    .right_block h1 {
        font-size: 28px;
    }

    .Work_Experience_Table {
        font-size: 12px;
        min-width: unset;
    }

    .Work_Experience_Table .expandable-row {
        padding: 12px 14px;
    }

    .Work_Experience_Table .expandable-row td:nth-child(4) {
        font-size: 15px;
    }

    .Work_Experience_Table .expandable-row td:nth-child(3) {
        font-size: 13px;
    }

    .Work_Experience_Table .expandable-row td:nth-child(1),
    .Work_Experience_Table .expandable-row td:nth-child(2) {
        font-size: 11px;
    }

    .details-title {
        font-size: 16px;
    }

    .details-company {
        font-size: 13px;
    }

    .details-list li {
        font-size: 12px;
    }

    .Portfolio h1 {
        font-size: 28px;
    }

    .section-title {
        letter-spacing: 2px;
        padding-bottom: 22px;
    }


    .project-container {
        max-width: 100%;
    }

    /* GitHub Activity small mobile */
    .github-activity {
        padding: 40px 6px 30px;
    }

    .github-activity h1 {
        font-size: 28px;
    }

    .github-grid-wrapper::after {
        left: 24px;
    }

    .github-grid-labels {
        min-width: 20px;
    }

    .github-grid-labels span {
        font-size: 8px;
    }

    .github-grid-cell {
        width: 9px;
        height: 9px;
    }

    .github-grid-months span {
        font-size: 8px;
        min-width: 11px;
    }

    .github-subtitle {
        font-size: 18px;
    }

    .github-commit-card {
        padding: 14px 16px;
    }

    .github-repo-card {
        padding: 14px 16px;
    }

    .commit-message {
        font-size: 13px;
    }

    .repo-description {
        font-size: 12px;
    }

    .github-total-contributions {
        font-size: 11px;
    }

    .github-profile-btn {
        font-size: 13px;
        padding: 8px 18px;
    }

    .contact h1 {
        font-size: 28px;
    }

    .Get_In_Touch {
        width: 95%;
        padding: 15px;
        font-size: 16px;
    }

    .Get_In_Touch p {
        font-size: 14px;
    }

    h1 {
        font-size: 28px;
    }
}

/* Easter egg: Idle mouse message */
.idle-message {
    position: fixed;
    bottom: 24px;
    right: 24px;
    color: var(--text-secondary);
    font-size: 13px;
    font-style: italic;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
    z-index: 9999;
}
.idle-message.visible {
    opacity: 0.6;
}

/* Easter egg: Custom context menu */
.custom-context-menu {
    position: fixed;
    z-index: 10000;
    background: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 0;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    display: none;
}
.custom-context-menu.active {
    display: block;
}
.custom-context-menu a {
    display: block;
    padding: 10px 18px;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.custom-context-menu a:hover {
    background: var(--accent-color);
    color: var(--text-primary);
}

/* Easter egg: Hidden footer message */
.hidden-footer-msg {
    text-align: center;
    font-size: 11px;
    color: var(--primary-bg);
    margin: 0;
    padding: 10px 0 4px 0;
    user-select: text;
}
.hidden-footer-msg::selection {
    background: var(--accent-color);
    color: var(--text-primary);
}

/* Hero — Contact links */
.hero-contact-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin: 28px 0 0 0;
    padding: 0;
    flex-wrap: wrap;
}

.hero-contact-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    transition: color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), background var(--transition-fast);
}

.hero-contact-links a:hover {
    color: var(--text-primary);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    background: rgba(204, 0, 0, 0.08);
}

.hero-contact-links a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 8px;
}

.hero-contact-links img {
    width: 20px;
    height: 20px;
    filter: invert(1) brightness(1.5);
    transition: filter var(--transition-fast);
}

.hero-contact-links a:hover img {
    filter: invert(1) brightness(1.8) drop-shadow(0 0 4px rgba(204, 0, 0, 0.4));
}

/* Easter egg: Date-aware greeting */
.hero-greeting {
    font-size: clamp(12px, 1.4vw, 15px);
    color: var(--text-secondary);
    margin: 16px 0 0 0;
    padding: 0;
    font-style: italic;
    opacity: 0.7;
    letter-spacing: 0.5px;
    min-height: 1.2em;
}

/* Easter egg: Coffee counter */
.coffee-counter {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    opacity: 0.3;
    transition: opacity var(--transition-normal);
    cursor: pointer;
    z-index: 9999;
    user-select: none;
}
.coffee-counter:hover {
    opacity: 0.7;
}
.coffee-icon {
    font-size: 16px;
}
.coffee-count {
    font-variant-numeric: tabular-nums;
}
