/* CSS grid: https://css-tricks.com/snippets/css/complete-guide-grid/ */
/* color palette (Bootstrap purple scale) */
/* 600: #59359a */
/* 700: #432874 */
/* 800: #301e51 */
/* 900: #160d27 */

/* ============================================================
   Global
   ============================================================ */

body {
    background-color: #f9f9f9 !important;
    margin: 0;
    padding: 0;
}

h2 {
    text-align: center;
    text-decoration: underline;
    margin-bottom: 1rem !important;
}

.inner-container {
    padding-top: 60px;
    padding-bottom: 60px;
}

/* ============================================================
   Section colours
   ============================================================ */

.section-software-developer {
    background-color: #442878;
    color: white;
}

.section-favorite-repos {
    background-color: #301e51;
    color: white;
}

.section-my-github-repos {
    background-color: #f9f9f9;
}

.section-quotes {
    background-color: #442878;
}

/* ============================================================
   Name-tag banner
   ============================================================ */

.section-tag img {
    width: 60vw;
}

@media screen and (max-width: 767px) {
    .section-tag img {
        width: 100vw;
    }
}

.section-starttag {
    margin-bottom: 50px;
    user-select: none;
}

.section-starttag > * {
    padding-left: 5rem;
    padding-right: 5rem;
}

.section-endtag {
    margin-top: 70px;
    margin-bottom: 40px;
    user-select: none;
}

.section-endtag > * {
    padding-left: 5rem;
    padding-right: 5rem;
}

/* ============================================================
   Rainbow / fading background
   ============================================================ */

.rainbow-backround {
    background-image: linear-gradient(
        to right,
        #ff00000f,
        #ffa5000f,
        #ffff000f,
        #0080000f,
        #0000ff0f,
        #4b00820f,
        #ee82ee0f
    );
}

.background-fading-bottom {
    -webkit-mask-image: linear-gradient(to top, transparent 2.5%, black 15%);
    mask-image: linear-gradient(to top, transparent 2.5%, black 15%);
}

/* ============================================================
   Skew dividers
   ============================================================ */

.skew-top-left-light-purple {
    width: 50%;
    height: 2.3vw;
    position: absolute;
    left: 0px;
    background: linear-gradient(to right bottom, #f9f9f9 49%, #442878 50%);
}

.skew-top-right-light-purple {
    width: 50%;
    height: 2.3vw;
    position: absolute;
    left: 50%;
    background: linear-gradient(to left bottom, #f9f9f9 49%, #442878 50%);
}

.skew-bottom-left-light-purple {
    width: 50%;
    height: 2.3vw;
    position: absolute;
    left: 0px;
    background: linear-gradient(to left top, #f9f9f9 49%, #442878 50%);
}

.skew-bottom-right-light-purple {
    width: 50%;
    height: 2.3vw;
    position: absolute;
    left: 50%;
    background: linear-gradient(to right top, #f9f9f9 49%, #442878 50%);
}

.skew-right-bottom-to-left-dark-purple {
    width: 100%;
    height: 1.3vw;
    position: absolute;
    left: 0px;
    background: linear-gradient(to left bottom, #f9f9f9 49%, #301e51 50%);
}

.skew-left-top-to-right-dark-purple {
    width: 100%;
    height: 1.3vw;
    position: absolute;
    right: 0px;
    background: linear-gradient(to right top, #f9f9f9 49%, #301e51 50%);
}

.skew-right-bottom-to-left-light-purple {
    width: 100%;
    height: 1.3vw;
    position: absolute;
    left: 0px;
    background: linear-gradient(to left bottom, #f9f9f9 49%, #442878 50%);
}

.skew-left-top-to-right-light-purple {
    width: 100%;
    height: 1.3vw;
    position: absolute;
    right: 0px;
    background: linear-gradient(to right top, #f9f9f9 49%, #442878 50%);
}

/* ============================================================
   Typed-text hero
   ============================================================ */

#typed-text {
    min-height: 11rem;
}

#typed-text::before {
    content: "I'm ";
}

/* ============================================================
   GitHub visualization
   ============================================================ */

.github-repo {
    font-size: 1.7rem;
}

.github-repo a {
    color: white;
    text-decoration: none;
}

.github-description {
    color: white;
    min-height: 51px;
}

.github-repo a:hover {
    text-decoration: underline;
}

span.github-name-repo-separator::before {
    content: "/";
    color: #c0c0c0;
}

/* ============================================================
   Xing / LinkedIn grid
   ============================================================ */

.xing-linkedin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    text-align: center;
    user-select: none;
}

.xing-linkedin-grid-item {
    grid-column: span 1;
    filter: grayscale(0.4);
}

.xing-linkedin-grid-item:hover {
    filter: grayscale(0);
}

.linkedin-area {
    background-color: #007bb6;
}

.linkedin-area img {
    width: 80%;
    height: auto;
}

.xing-area {
    background-color: #00605e;
}

.xing-area img {
    width: 80%;
    height: auto;
}

/* ============================================================
   My GitHub repos cards
   ============================================================ */

.my-repos-detailed-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    padding: 10px;
}

.my-repos-detailed-grid .card {
    grid-column: span 6;
    margin: 7px;
}

@media screen and (max-width: 1000px) {
    .my-repos-detailed-grid .card {
        grid-column: span 12;
    }
}

/* ============================================================
   Favourite repos grid
   ============================================================ */

.favorite-projects-grid {
    background: #301e51;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: 180px 180px 180px;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 10px;
}

.favorite-projects-grid-item {
    grid-column: span 6;
    padding: 12px;
    text-align: center;
    border: 1px solid white;
    border-radius: 6px;
    background-color: #432874;
}

.favorite-projects-grid-item:hover {
    background-color: #59359a;
}

.favorite-projects-external-link {
    margin-left: 3px;
    margin-right: 3px;
}

@media screen and (max-width: 1000px) {
    .favorite-projects-grid-item {
        grid-column: span 12;
    }

    .favorite-projects-grid {
        gap: 5px;
        grid-template-rows: repeat(14, 136px);
    }

    .github-description {
        display: none;
    }
}

/* ============================================================
   Quotes
   ============================================================ */

blockquote {
    font-family: Georgia, serif;
    font-size: 28px;
    font-style: italic;
    margin: 0.35em 2.5em;
    padding: 0.25em 40px;
    line-height: 1.45;
    position: relative;
    color: #f7f7f7;
}

blockquote:before {
    display: block;
    content: "\201C";
    font-size: 100px;
    position: absolute;
    left: -20px;
    top: -20px;
    color: #999999;
}

blockquote cite {
    color: #bbbbbb;
    font-size: 17px;
    display: block;
    margin-top: 9px;
}

blockquote cite:before {
    content: "\2014 \2009";
}

/* ============================================================
   Contact grid
   ============================================================ */

.contact-grid {
    background: #301e51;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: 180px;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 10px;
}

.contact-grid-item {
    grid-column: span 4;
    padding: 12px;
    text-align: center;
    border: 1px solid white;
    border-radius: 6px;
    background-color: #432874;
}

.contact-grid-item:hover {
    background-color: #59359a;
}

@media screen and (max-width: 1000px) {
    .contact-grid-item {
        grid-column: span 12;
    }

    .contact-grid {
        gap: 5px;
        grid-template-rows: 136px 136px 136px;
    }
}

/* ============================================================
   Bootstrap accordion overrides
   ============================================================ */

.accordion {
    --bs-accordion-active-color: ghostwhite !important;
    --bs-accordion-active-bg: #59359a !important;
    --bs-accordion-btn-focus-box-shadow: 0 0 0 0.2rem #c9a5ff !important;
}

/* ============================================================
   Badge colours (language tags)
   ============================================================ */

.badge-csharp {
    background-color: #442878 !important;
}

.badge-python {
    background-color: #0080a0 !important;
}

.badge-java {
    background-color: #c32833 !important;
}

.badge-javascript {
    background-color: #f0db50 !important;
    color: black !important;
}

.badge-nodejs {
    background-color: #83ba73 !important;
    color: black !important;
}

/* ============================================================
   Blog – shared
   ============================================================ */

.blog-hero {
    background-color: #442878;
    color: white;
    padding: 4rem 0 3rem;
    text-align: center;
}

.blog-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}

.blog-hero p {
    font-size: 1.1rem;
    opacity: 0.85;
}

/* Blog index – article cards */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.blog-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    box-shadow: 0 6px 24px rgba(68, 40, 120, 0.18);
    transform: translateY(-3px);
}

.blog-card-body {
    padding: 1.4rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.5rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.blog-card-meta .lang-badge {
    background: #442878;
    color: white;
    border-radius: 4px;
    padding: 1px 7px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.blog-card h2 {
    font-size: 1.25rem;
    text-align: left;
    text-decoration: none;
    margin-bottom: 0.6rem;
    color: #1a1a2e;
}

.blog-card p {
    color: #555;
    font-size: 0.95rem;
    flex: 1;
}

.blog-card a.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: #442878;
    font-weight: 600;
    text-decoration: none;
}

.blog-card a.read-more:hover {
    text-decoration: underline;
}

/* Blog article page */

.blog-article-wrapper {
    max-width: 780px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

.blog-article-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid #442878;
    padding-bottom: 1.2rem;
}

.blog-article-header h1 {
    font-size: 2.2rem;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}

.blog-article-meta {
    font-size: 0.85rem;
    color: #888;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.blog-article-meta .lang-badge {
    background: #442878;
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
}

.blog-article-content {
    line-height: 1.8;
    font-size: 1.05rem;
    color: #333;
}

.blog-article-content h2 {
    text-align: left;
    text-decoration: none;
    font-size: 1.6rem;
    color: #442878;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #e0d0f0;
    padding-bottom: 0.3rem;
}

.blog-article-content h3 {
    font-size: 1.25rem;
    color: #301e51;
    margin-top: 1.5rem;
}

.blog-article-content code {
    background: #f0eaf8;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.9em;
    color: #442878;
}

.blog-article-content pre {
    background: #1a1a2e;
    color: #e8e8f0;
    border-radius: 8px;
    padding: 1.2rem;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.6;
}

.blog-article-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.blog-article-content blockquote {
    font-size: 1.1rem;
    margin: 1.5rem 0;
    padding: 0.5rem 1.5rem;
    border-left: 4px solid #442878;
    background: #f8f4ff;
    color: #333;
}

.blog-article-content blockquote:before {
    display: none;
}

.blog-article-content blockquote cite {
    color: #666;
    font-size: 0.9rem;
}

/* Language switcher on blog pages */

.lang-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.lang-switcher a {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #442878;
    color: #442878;
    transition: background 0.15s, color 0.15s;
}

.lang-switcher a:hover,
.lang-switcher a.active {
    background: #442878;
    color: white;
}

/* Blog nav bar */

.blog-navbar {
    background-color: #301e51;
    padding: 0.75rem 0;
}

.blog-navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-navbar-brand {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
}

.blog-navbar-brand:hover {
    color: #c9a5ff;
}

.blog-navbar-links {
    display: flex;
    gap: 1.2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-navbar-links a {
    color: #d0c0f0;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.15s;
}

.blog-navbar-links a:hover {
    color: white;
}

/* Blog footer */

.blog-footer {
    background-color: #1a1a2e;
    color: #aaa;
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.85rem;
}

.blog-footer a {
    color: #c9a5ff;
    text-decoration: none;
}

.blog-footer a:hover {
    text-decoration: underline;
}

/* RSS link */

.rss-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #f26522;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 600;
}

.rss-link:hover {
    text-decoration: underline;
}

/* Back link */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #442878;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.back-link:hover {
    text-decoration: underline;
}
