/*
 * Website theme - dark & fancy, driven by the admin Theme Setting.
 *
 * Colours come from the --brand-* variables emitted by
 * components/template1/website/master/branding-styles.blade.php:
 *   --brand-accent       highlight (gold in Black Gold)
 *   --brand-logo-header  deepest background
 *   --brand-sidebar      raised surfaces (nav, cards)
 * Fallbacks are the Black Gold values, so the sheet also works on its own.
 * Loaded after style.css and overrides it.
 */

:root {
    --w-accent: var(--brand-accent, #FFD700);
    --w-bg: var(--brand-logo-header, #000000);
    --w-surface: var(--brand-sidebar, #1A2035);
    --w-bg-2: color-mix(in srgb, var(--w-surface) 35%, var(--w-bg));
    --w-card: color-mix(in srgb, var(--w-surface) 70%, transparent);
    --w-card-solid: color-mix(in srgb, var(--w-surface) 80%, var(--w-bg));
    --w-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
    --w-line: color-mix(in srgb, #ffffff 9%, transparent);
    --w-accent-soft: color-mix(in srgb, var(--w-accent) 14%, transparent);
    --w-accent-glow: color-mix(in srgb, var(--w-accent) 45%, transparent);
    --w-accent-light: color-mix(in srgb, var(--w-accent) 55%, #ffffff);
    --w-accent-dark: color-mix(in srgb, var(--w-accent) 70%, #000000);
    --w-gradient: linear-gradient(120deg, var(--w-accent-dark), var(--w-accent) 35%, var(--w-accent-light) 50%, var(--w-accent) 65%, var(--w-accent-dark));
    --w-text: #d4d7dd;
    --w-muted: #9097a3;
    --w-heading: #ffffff;
}

/*==================================================
                  GENERAL
====================================================*/
body {
    background: var(--w-bg);
    color: var(--w-text);
}

::selection { background: var(--w-accent); color: var(--w-bg); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--w-bg); }
::-webkit-scrollbar-thumb { background: var(--w-accent-dark); border-radius: 10px; border: 2px solid var(--w-bg); }
::-webkit-scrollbar-thumb:hover { background: var(--w-accent); }

h1, h2, h3, h4, h5, h6 { color: var(--w-heading); letter-spacing: .02em; }

a { color: var(--w-accent); transition: color .25s ease; }
a:hover, a:focus, a:active { color: var(--w-accent-light); }

.text-primary, .text-info { color: var(--w-accent) !important; }
.bg-primary { background-color: var(--w-surface) !important; }

section.resume-section {
    position: relative;
    border-bottom: 1px solid var(--w-line);
    background: var(--w-bg);
}

section.resume-section:nth-of-type(even),
#education, #project, #experiences {
    background: var(--w-bg-2);
}

/* Section headings: white title, glowing gradient bar. */
section.resume-section h2 {
    font-size: 3.2rem;
    margin-bottom: .75rem;
}

.heading-border {
    position: relative;
    width: 90px;
    height: 4px;
    border-radius: 4px;
    background: var(--w-gradient);
    background-size: 200% 100%;
    box-shadow: 0 0 18px var(--w-accent-glow);
    animation: w-shimmer 4s linear infinite;
}

.heading-border::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--w-accent);
    transform: translate(-50%, -50%) rotate(45deg);
    box-shadow: 0 0 12px var(--w-accent-glow);
}

/*==================================================
                    SIDE NAV
====================================================*/
#sideNav {
    background: linear-gradient(180deg, var(--w-surface), var(--w-bg)) !important;
    border-right: 1px solid var(--w-accent-soft);
    box-shadow: 8px 0 40px rgba(0, 0, 0, .45);
}

#sideNav::after {
    content: "";
    position: absolute;
    top: 0;
    right: -1px;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--w-accent), transparent);
    opacity: .6;
}

#sideNav .navbar-brand img.img-profile {
    border: 3px solid var(--w-accent) !important;
}

#sideNav .navbar-brand .img-profile {
    padding: 4px;
    background: var(--w-bg);
    box-shadow: 0 0 0 6px var(--w-accent-soft), 0 0 40px var(--w-accent-glow);
    animation: w-pulse 3.5s ease-in-out infinite;
}

/* Shown when there is no profile photo. */
#sideNav .navbar-brand .profile-initials {
    padding: 0;
    border: 0;
    animation: w-shimmer 6s linear infinite, w-pulse 3.5s ease-in-out infinite;
    width: 9rem;
    height: 9rem;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-family: 'Saira Extra Condensed', serif;
    font-size: 3.6rem;
    font-weight: 700;
    color: var(--w-bg);
    background: var(--w-gradient);
    background-size: 200% 100%;
}

#sideNav .brand-name {
    font-family: 'Saira Extra Condensed', serif;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--w-accent);
}

#sideNav .navbar-nav .nav-item .nav-link {
    position: relative;
    color: var(--w-muted);
    letter-spacing: .14em;
    font-size: .82rem;
    padding: .7rem 1rem;
    transition: color .25s ease, letter-spacing .25s ease;
}

#sideNav .navbar-nav .nav-item .nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: .35rem;
    width: 0;
    height: 2px;
    background: var(--w-accent);
    box-shadow: 0 0 10px var(--w-accent-glow);
    transform: translateX(-50%);
    transition: width .3s ease;
}

#sideNav .navbar-nav .nav-item .nav-link:hover,
#sideNav .navbar-nav .nav-item .nav-link.active {
    color: var(--w-accent);
    letter-spacing: .2em;
}

#sideNav .navbar-nav .nav-item .nav-link:hover::after,
#sideNav .navbar-nav .nav-item .nav-link.active::after {
    width: 36px;
}

#sideNav .navbar-toggler {
    border-color: var(--w-accent-soft);
}

/*==================================================
                    ABOUT (hero)
====================================================*/
#about {
    background: var(--w-bg);
    overflow: hidden;
}

/* Replaces the old rotating blue gradient with drifting glows + a fine grid. */
#about::before {
    content: "";
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(circle at 20% 25%, var(--w-accent-glow) 0, transparent 28%),
        radial-gradient(circle at 80% 70%, color-mix(in srgb, var(--w-accent) 25%, transparent) 0, transparent 32%),
        radial-gradient(circle at 60% 10%, color-mix(in srgb, var(--w-surface) 90%, transparent) 0, transparent 45%);
    filter: blur(30px);
    opacity: .55;
    animation: w-drift 18s ease-in-out infinite alternate;
}

#about::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--w-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--w-line) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
    pointer-events: none;
}

#about > * { z-index: 2; }

#about h1 {
    font-size: clamp(3.2rem, 9vw, 7.5rem);
    line-height: 1;
    background: var(--w-gradient);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 6px 30px var(--w-accent-soft));
    animation: w-shimmer 6s linear infinite, w-rise .9s ease-out both;
}

#about .subheading {
    color: var(--w-muted);
    letter-spacing: .3em;
}

#about p.mb-5 {
    color: var(--w-text) !important;
    font-size: 1.05rem;
    line-height: 1.85;
    padding: 1.5rem 1.75rem;
    border-left: 3px solid var(--w-accent);
    background: var(--w-card);
    border-radius: 0 12px 12px 0;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: w-rise 1.1s ease-out both;
    /* The box is capped at 560px; without this it sat against the left of the
       hero while the name and the social icons above and below were centred. */
    margin-left: auto;
    margin-right: auto;
}

.list-social-icons a { color: var(--w-accent); }

.list-social-icons .fa-stack {
    transition: transform .3s ease, filter .3s ease;
}

.list-social-icons .fa-stack .fa-circle { color: transparent; }

.list-social-icons .fa-stack::before {
    content: "";
    position: absolute;
    inset: 2px;
    border: 2px solid var(--w-accent);
    border-radius: 50%;
    transition: background .3s ease, box-shadow .3s ease;
}

.list-social-icons .fa-inverse { color: var(--w-accent); transition: color .3s ease; }

.list-social-icons a:hover .fa-stack { transform: translateY(-4px); }
.list-social-icons a:hover .fa-stack::before { background: var(--w-accent); box-shadow: 0 0 25px var(--w-accent-glow); }
.list-social-icons a:hover .fa-inverse { color: var(--w-bg); }

/*==================================================
             EDUCATION & PROJECT cards
====================================================*/
/* Rotating neon border (conic gradient on the border box). */
@property --w-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

#education .card,
#project .card {
    position: relative;
    height: calc(100% - 3rem);
    border: 1px solid transparent;
    border-radius: 14px;
    background:
        linear-gradient(var(--w-card-solid), var(--w-card-solid)) padding-box,
        conic-gradient(from var(--w-angle), var(--w-line) 0 62%, var(--w-accent) 80%, var(--w-accent-light) 84%, var(--w-line) 96%) border-box;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    overflow: hidden;
    animation: w-border-spin 6s linear infinite;
    transition: transform .35s ease, box-shadow .35s ease;
}

/* Spotlight that follows the mouse (--mx/--my set by theme.js). */
#education .card::before,
#project .card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), var(--w-accent-soft), transparent 70%);
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}

#education .card:hover::before,
#project .card:hover::before { opacity: 1; }

/* HUD corner brackets. */
#education .card::after,
#project .card::after {
    content: "";
    position: absolute;
    inset: 10px;
    pointer-events: none;
    opacity: .5;
    background:
        linear-gradient(var(--w-accent), var(--w-accent)) top left / 14px 2px no-repeat,
        linear-gradient(var(--w-accent), var(--w-accent)) top left / 2px 14px no-repeat,
        linear-gradient(var(--w-accent), var(--w-accent)) bottom right / 14px 2px no-repeat,
        linear-gradient(var(--w-accent), var(--w-accent)) bottom right / 2px 14px no-repeat;
    transition: inset .35s ease, opacity .35s ease;
}

#education .card:hover::after,
#project .card:hover::after { inset: 4px; opacity: 1; }

#education .card > *,
#project .card > * { position: relative; z-index: 1; }

#education .card:hover,
#project .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .5), 0 0 30px var(--w-accent-soft);
    animation-duration: 2.5s;
}

#education .card h4,
#project .card h4 { color: var(--w-heading); }

#education .card h5,
#project .card h5 { color: var(--w-accent); text-transform: none; font-size: 1.2rem; }

#education .card p,
#project .card p { color: var(--w-text); }

#education .card .fa,
#project .card .fa {
    width: 42px;
    height: 42px;
    line-height: 42px;
    text-align: center;
    border-radius: 50%;
    background: var(--w-accent-soft);
    color: var(--w-accent) !important;
}

#education .resume-date span,
#project .resume-date span {
    display: inline-block;
    padding: .25rem .8rem;
    border: 1px solid var(--w-accent-soft);
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
}

/*==================================================
             SERVICES & TESTIMONIALS
====================================================*/
#services .service-card,
#reviews .review-card {
    background: var(--w-card-solid);
    border: 1px solid var(--w-line);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}

#services .service-card:hover,
#reviews .review-card:hover {
    transform: translateY(-6px);
    border-color: var(--w-accent-soft);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .5), 0 0 30px var(--w-accent-soft);
}

#services .service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--w-accent-soft);
    color: var(--w-accent);
    font-size: 24px;
}

#services .service-card h4 { color: var(--w-heading); }
#services .service-card p { color: var(--w-text); }

#reviews .review-stars { color: color-mix(in srgb, var(--w-muted) 60%, transparent); margin-bottom: 14px; }
#reviews .review-stars .is-on { color: var(--w-accent); }
#reviews .review-text { color: var(--w-text); font-style: italic; margin-bottom: 22px; }
#reviews .review-by { display: flex; align-items: center; gap: 12px; }
#reviews .review-by img,
#reviews .review-initials { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
#reviews .review-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--w-bg);
    background: var(--w-accent);
}
#reviews .review-by b { display: block; color: var(--w-heading); }
#reviews .review-by small { color: var(--w-muted); }

/*==================================================
                    EXPERIENCE timeline
====================================================*/
#experience-box:before {
    width: 2px;
    background: linear-gradient(180deg, transparent, var(--w-accent), transparent);
    box-shadow: 0 0 12px var(--w-accent-glow);
}

#experience-box .experience:first-child:before,
#experience-box .experience:last-child:before {
    background: var(--w-accent);
    border-color: var(--w-bg);
    box-shadow: 0 0 0 2px var(--w-accent), 0 0 20px var(--w-accent-glow);
}

#experience-box .experience-icon {
    background: var(--w-bg);
    border-color: var(--w-accent);
}

#experience-box .experience-icon:before { background: var(--w-bg); }
#experience-box .experience:hover .experience-icon:before { background: var(--w-accent); box-shadow: 0 0 14px var(--w-accent-glow); }

#experience-box .experience-content {
    background: var(--w-card);
    border: 1px solid var(--w-line);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

#experience-box .experience:hover .experience-content {
    border-color: var(--w-accent-soft);
    box-shadow: 0 16px 36px rgba(0, 0, 0, .5), 0 0 26px var(--w-accent-soft);
}

#experience-box .experience-content:before {
    background: var(--w-accent);
    border-color: var(--w-accent);
}

#experience-box .experience:hover .experience-content:before { background: var(--w-accent-light); border-color: var(--w-accent-light); }

#experience-box .experience-content:after { background: var(--w-accent-soft); }

#experience-box .date { color: var(--w-accent); letter-spacing: .06em; }
#experience-box .experience:hover .date { color: var(--w-accent-light); }
#experience-box .experience-content h3 { color: var(--w-heading); }
#experience-box .title { color: var(--w-muted); }
#experience-box .experience:hover .title { color: var(--w-accent); }
#experience-box .description { color: var(--w-text); }

/*==================================================
                    BLOG
====================================================*/
#blog .blog-item .blog-link {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--w-line);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
    transition: transform .35s ease, box-shadow .35s ease;
}

#blog .blog-item .blog-link img { transition: transform .6s ease; }
#blog .blog-item .blog-link:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0, 0, 0, .55), 0 0 30px var(--w-accent-soft); }
#blog .blog-item .blog-link:hover img { transform: scale(1.08); }

#blog .blog-item .blog-link .caption-port {
    z-index: 3;
    background: linear-gradient(160deg, color-mix(in srgb, var(--w-bg) 30%, transparent), color-mix(in srgb, var(--w-accent) 70%, transparent));
}

#blog .blog-item .blog-link .caption-port .caption-port-content { color: var(--w-bg); }

/*==================================================
                BLOG POST MODAL
====================================================*/
body.modal-open .modal-backdrop.show {
    background: var(--w-bg);
    opacity: .82;
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    body.modal-open .modal-backdrop.show {
        opacity: .7;
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
    }
}

.post-modal { padding: 0 !important; }

.post-modal .post-dialog {
    max-width: 1040px;
    width: calc(100% - 48px);
    height: calc(100vh - 64px);
    margin: 32px auto;
}

.post-modal.fade .post-dialog { transform: translateY(24px) scale(.98); transition: transform .35s ease; }
.post-modal.show .post-dialog { transform: none; }

.post-panel {
    position: relative;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--w-line);
    border-radius: 16px;
    background: var(--w-card-solid);
    color: var(--w-text);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px var(--w-accent-soft);
}

/* Thin accent line along the top, with the reading progress over it. */
.post-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 5;
    background: var(--w-accent-soft);
}

.post-progress span {
    display: block;
    height: 100%;
    background: var(--w-accent);
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform .1s linear;
}

.post-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 6;
    width: 40px;
    height: 40px;
    border: 1px solid var(--w-line);
    border-radius: 50%;
    background: color-mix(in srgb, var(--w-bg) 70%, transparent);
    cursor: pointer;
    transition: border-color .2s ease, transform .2s ease;
}

.post-close span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    margin: -1px 0 0 -8px;
    border-radius: 2px;
    background: var(--w-text);
    transform: rotate(45deg);
    transition: background .2s ease;
}

.post-close span + span { transform: rotate(-45deg); }
.post-close:hover { border-color: var(--w-accent); transform: rotate(90deg); }
.post-close:hover span { background: var(--w-accent); }
.post-close:focus { outline: 2px solid var(--w-accent); outline-offset: 2px; }

.post-grid {
    display: grid;
    grid-template-columns: 38% 1fr;
    height: 100%;
}

/* Poster column */
.post-media {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: 36px 28px;
    background: var(--w-bg);
    border-right: 1px solid var(--w-line);
}

.post-media-frame { position: relative; }

.post-media-frame img {
    display: block;
    width: 100%;
    max-height: calc(100vh - 260px);
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}

.post-corner {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid var(--w-accent);
    opacity: .6;
}
.post-corner.tl { top: -8px; left: -8px; border-right: 0; border-bottom: 0; }
.post-corner.tr { top: -8px; right: -8px; border-left: 0; border-bottom: 0; }
.post-corner.bl { bottom: -8px; left: -8px; border-right: 0; border-top: 0; }
.post-corner.br { bottom: -8px; right: -8px; border-left: 0; border-top: 0; }

.post-media-frame img.is-changing { animation: w-post-in .35s ease both; }

.post-gallery-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: none;
    width: 38px;
    height: 38px;
    margin-top: -19px;
    border: 1px solid var(--w-line);
    border-radius: 50%;
    background: color-mix(in srgb, var(--w-bg) 75%, transparent);
    color: var(--w-heading);
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.post-gallery-arrow.prev { left: 10px; }
.post-gallery-arrow.next { right: 10px; }
.post-gallery-arrow:hover { border-color: var(--w-accent); color: var(--w-accent); }
.post-gallery-arrow:focus { outline: 2px solid var(--w-accent); outline-offset: 2px; }
.post-modal.has-gallery .post-gallery-arrow { display: block; }

.post-thumbs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.post-thumb {
    width: 52px;
    height: 64px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 6px;
    background: none;
    opacity: .55;
    cursor: pointer;
    transition: opacity .2s ease, border-color .2s ease;
}

.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-thumb:hover { opacity: .85; }
.post-thumb.is-active { opacity: 1; border-color: var(--w-accent); }
.post-thumb:focus { outline: 2px solid var(--w-accent); outline-offset: 2px; }

/* Image count on blog grid cards */
#blog .blog-item .blog-link .blog-count {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 4;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--w-bg);
    background: var(--w-accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
}

.post-media-caption {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--w-mono);
    font-size: .78rem;
    letter-spacing: .12em;
    color: var(--w-muted);
}

.post-live {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--w-accent);
}

/* Article column */
.post-body {
    overflow-y: auto;
    padding: 44px 48px 36px;
    scrollbar-width: thin;
    scrollbar-color: var(--w-accent-dark) transparent;
}

.post-body > * { max-width: 620px; }

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
    margin-bottom: 14px;
    font-size: .82rem;
    color: var(--w-muted);
}

.post-meta .fa { color: var(--w-accent); margin-right: 4px; }

.post-tag {
    font-family: var(--w-mono);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--w-accent);
}

/* Readable title: normal case, moderate size (overrides the site-wide uppercase h2). */
.post-modal .post-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
    color: var(--w-heading);
    margin: 0 44px 16px 0;
}

.post-divider {
    width: 48px;
    height: 3px;
    margin-bottom: 24px;
    border-radius: 3px;
    background: var(--w-accent);
}

.post-content {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--w-text);
}

.post-content p { margin-bottom: 1.1em; }

.post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5, .post-content h6 {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
    color: var(--w-heading);
    margin: 1.8em 0 .6em;
}

.post-content h4::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 10px 2px 0;
    background: var(--w-accent);
    transform: rotate(45deg);
}

.post-content ul, .post-content ol { padding-left: 1.2em; margin-bottom: 1.1em; }
.post-content li { margin-bottom: .45em; padding-left: .2em; }
.post-content li::marker { color: var(--w-accent); }
.post-content strong, .post-content b { color: var(--w-heading); font-weight: 600; }
.post-content em { color: var(--w-accent-light); }
.post-content a { color: var(--w-accent); text-decoration: underline !important; text-underline-offset: 3px; }
.post-content img { max-width: 100%; height: auto; border-radius: 8px; }

/* Previous / next */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--w-line);
}

.post-nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--w-line);
    border-radius: 10px;
    background: transparent;
    color: var(--w-text);
    text-align: left;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}

.post-nav-btn.next { justify-content: flex-end; text-align: right; }
.post-nav-btn .fa { flex: 0 0 auto; color: var(--w-accent); }
.post-nav-btn span { min-width: 0; }
.post-nav-btn small { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--w-muted); }
.post-nav-btn b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .88rem; font-weight: 600; color: var(--w-heading); }
.post-nav-btn:hover { border-color: var(--w-accent); background: var(--w-accent-soft); }
.post-nav-btn:focus { outline: 2px solid var(--w-accent); outline-offset: 2px; }

/* Gentle fade when switching posts */
.post-modal.is-switching .post-body > *,
.post-modal.is-switching .post-media-frame {
    animation: w-post-in .4s ease both;
}

@keyframes w-post-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* Tablet & phone: one scrolling column */
@media (max-width: 991px) {
    .post-modal .post-dialog { width: 100%; height: 100%; margin: 0; max-width: none; }
    .post-panel { border-radius: 0; border: 0; overflow-y: auto; }
    .post-grid { display: block; height: auto; }
    .post-media { padding: 56px 20px 20px; border-right: 0; border-bottom: 1px solid var(--w-line); }
    .post-media-frame { max-width: 380px; margin: 0 auto; width: 100%; }
    .post-media-frame img { max-height: 55vh; }
    .post-body { overflow: visible; padding: 28px 20px 32px; }
    .post-body > * { max-width: none; }
    .post-modal .post-title { font-size: 1.35rem; margin-right: 0; }
    .post-nav { grid-template-columns: 1fr; }
    .post-progress { position: sticky; }
    .post-close { position: fixed; }
}

/*==================================================
                    BUTTONS
====================================================*/
.btn-general { border-radius: 999px; letter-spacing: .12em; padding: 12px 34px; }

.btn-white {
    position: relative;
    border: 0;
    color: var(--w-bg);
    font-weight: 700;
    background: var(--w-gradient);
    background-size: 200% 100%;
    box-shadow: 0 8px 24px var(--w-accent-soft);
    transition: background-position .6s ease, box-shadow .3s ease, transform .3s ease;
}

.btn-white:hover,
.btn-white:focus {
    color: var(--w-bg);
    background: var(--w-gradient);
    background-size: 200% 100%;
    background-position: 100% 0;
    box-shadow: 0 10px 34px var(--w-accent-glow);
    transform: translateY(-2px);
}

.btn-green { border-color: var(--w-accent); color: var(--w-accent); }
.btn-green:hover, .btn-green:focus { background-color: var(--w-accent); color: var(--w-bg); }

/*==================================================
                    CONTACT
====================================================*/
#contact .contact-cont h3,
.contact-box-desc h3 {
    color: var(--w-heading);
}

#contact .contact-cont h3 {
    display: inline-block;
    background: var(--w-gradient);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: w-shimmer 6s linear infinite;
}

.contact-box-desc h3 i,
.cl-atlantis { color: var(--w-accent) !important; }

/* The icon is fa-2x next to normal-size text, so line them up properly
   instead of letting them sit on the same baseline with a bare space. */
#contact .contact-box-desc h3 {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: .4rem;
}

#contact .contact-box-desc h3 i {
    line-height: 1;
    flex: 0 0 auto;
}

.contact-box-desc p,
#contact .contact-cont2 address,
#contact .contact-cont2 address a { color: var(--w-text); }

#contact .contact-cont2 address a:hover { color: var(--w-accent); }

.con-form input,
.con-form textarea {
    background: var(--w-card);
    border: 1px solid var(--w-line);
    border-radius: 10px;
    color: var(--w-heading);
    padding: .8rem 1rem;
    transition: border-color .25s ease, box-shadow .25s ease;
}

.con-form input { height: auto; }

/* The base theme spaces inputs with margin-top but the textarea with
   margin on both sides, so the gaps came out uneven. Space every field
   from its column instead, so they all match. */
#contact .con-form > [class*="col-"] { margin-bottom: 20px; }
#contact .con-form > [class*="col-"]:last-child { margin-bottom: 0; }

#contact .con-form input,
#contact .con-form textarea {
    margin: 0;
    width: 100%;
    max-width: 100%;
    /* Without this, width:100% plus the field's own padding overflowed the
       column and the boxes ran off the right edge of a phone. */
    box-sizing: border-box;
}

#contact .con-form textarea { height: 180px; }
.con-form input::placeholder,
.con-form textarea::placeholder { color: var(--w-muted); }

.con-form input:focus,
.con-form textarea:focus {
    background: var(--w-card);
    color: var(--w-heading);
    border-color: var(--w-accent);
    box-shadow: 0 0 0 3px var(--w-accent-soft);
    outline: 0;
}

/* Plain icons, no ring. The box stays 44px so it is still an easy tap target,
   and the styling goes on the link rather than the <i>: the brand icons are
   inline SVG and only the email is a Font Awesome <i>, so styling the <i>
   reached one of the four. */
.social-icon-f li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--w-accent);
    /* An inline-flex box takes its baseline from its first child, so without
       this the Font Awesome envelope sat lower than the SVG brands. */
    vertical-align: middle;
    transition: all .3s ease;
}

.social-icon-f li a i {
    width: auto;
    height: auto;
    /* The theme gives Font Awesome icons a right margin for use beside text;
       as the only child of a centred ring it pushed the envelope 5px left. */
    margin: 0 !important;
    font-size: 18px;
    line-height: 1;
    color: inherit !important;
    border: 0 !important;
}

/* Without the ring a filled background would read as a square block, so the
   icon lifts and glows instead. drop-shadow suits both the SVG brands and the
   Font Awesome envelope; box-shadow would have drawn a box around nothing. */
.social-icon-f li a:hover {
    color: var(--w-heading);
    filter: drop-shadow(0 0 10px var(--w-accent-glow));
    transform: translateY(-3px);
}

/* Contact form anti-spam question */
#contact .captcha-field label {
    display: block;
    margin: 0 0 8px;
    font-size: .95rem;
    color: var(--w-text);
}

#contact .captcha-field label span { color: var(--w-accent); }

/* The answer is one or two digits, so keep the box small and stand the Send
   button beside it — the two belong to the same action. The column above
   already carries the standard 20px gap, so this row adds none of its own. */
#contact .captcha-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px 20px;
}

#contact .captcha-row .captcha-field { flex: 1 1 240px; }
#contact .captcha-row .sub-but { flex: 0 0 auto; }
#contact .captcha-field .form-control { max-width: 200px; }

/* Turnstile renders a fixed-width widget; give it its own line. */
#contact .captcha-field .cf-turnstile { margin-top: 4px; }

@media (max-width: 767px) {
    #contact .contact-box-desc h3 { justify-content: center; }
    #contact .contact-box-desc { margin-bottom: 30px; }

    /* Full width on a phone: a boxed-in field clips its own placeholder. */
    #contact .captcha-row { display: block; text-align: left; }
    #contact .captcha-row .captcha-field { width: 100%; }
    #contact .captcha-field .form-control { max-width: 100%; width: 100%; }
    #contact .captcha-row .sub-but { margin-top: 16px; }
    #contact .captcha-row .sub-but .btn { width: 100%; }
}

/*==================================================
                    ANIMATIONS
====================================================*/
@keyframes w-shimmer {
    from { background-position: 0% 0; }
    to { background-position: 200% 0; }
}

@keyframes w-pulse {
    0%, 100% { box-shadow: 0 0 0 6px var(--w-accent-soft), 0 0 30px var(--w-accent-soft); }
    50% { box-shadow: 0 0 0 10px var(--w-accent-soft), 0 0 55px var(--w-accent-glow); }
}

@keyframes w-drift {
    from { transform: translate3d(-3%, -2%, 0) rotate(0deg); }
    to { transform: translate3d(3%, 2%, 0) rotate(8deg); }
}

@keyframes w-rise {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 991px) {
    #sideNav { border-right: 0; border-bottom: 1px solid var(--w-accent-soft); }
    #sideNav::after { display: none; }
    section.resume-section h2 { font-size: 2.4rem; }
}

/*==================================================
          TECH LAYER - boot, progress, hero FX
====================================================*/

/* Boot screen */
.boot-screen {
    position: fixed;
    inset: 0;
    /* Above the language switcher (10050), which has to clear template 4's
       navbar: nothing belongs on top of the loading screen. */
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--w-bg);
    font-family: var(--w-mono);
    color: var(--w-accent);
    transition: opacity .6s ease, visibility .6s ease;
    animation: w-boot-fallback 0s linear 3s forwards;
}

.boot-screen.is-done { opacity: 0; visibility: hidden; }

.boot-inner { width: min(360px, 80vw); }
.boot-line { font-size: .95rem; letter-spacing: .05em; margin-bottom: 14px; }
.boot-prompt { margin-right: 6px; }
.boot-dots::after { content: ""; animation: w-dots 1.2s steps(4) infinite; }

.boot-bar {
    height: 3px;
    background: var(--w-line);
    border-radius: 3px;
    overflow: hidden;
}

.boot-bar span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--w-gradient);
    box-shadow: 0 0 14px var(--w-accent-glow);
}

.boot-meta { margin-top: 10px; font-size: .8rem; color: var(--w-muted); text-align: right; }

/* Scroll progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 4000;
    pointer-events: none;
}

.scroll-progress span {
    display: block;
    height: 100%;
    background: var(--w-gradient);
    box-shadow: 0 0 12px var(--w-accent-glow);
    transform: scaleX(0);
    transform-origin: 0 50%;
}

/* Hero layers */
#about > .hero-network,
#about > .hero-scan,
#about > .hero-floaters,
#about > .hero-hud {
    position: absolute !important;
    inset: 0;
    pointer-events: none;
}

#about > .hero-network { z-index: 1; }
#about > .hero-floaters { z-index: 1; }
#about > .hero-hud { z-index: 1; inset: 22px; }
#about > .hero-scan { z-index: 3; overflow: hidden; }

.hero-scan::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 120px;
    top: -120px;
    background: linear-gradient(180deg, transparent, var(--w-accent-soft) 85%, color-mix(in srgb, var(--w-accent) 40%, transparent));
    animation: w-scan 6s cubic-bezier(.6, 0, .4, 1) infinite;
}

.hero-scan::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px);
}

.hero-floaters i {
    position: absolute;
    font-size: 2.6rem;
    color: var(--w-accent);
    opacity: .14;
    filter: drop-shadow(0 0 10px var(--w-accent-glow));
    animation: w-float 9s ease-in-out infinite;
}

.hero-floaters i:nth-child(1)  { top: 12%; left: 8%;  animation-delay: 0s; }
.hero-floaters i:nth-child(2)  { top: 20%; right: 10%; font-size: 3.4rem; animation-delay: -2s; }
.hero-floaters i:nth-child(3)  { top: 70%; left: 12%; animation-delay: -4s; }
.hero-floaters i:nth-child(4)  { bottom: 12%; right: 16%; animation-delay: -1s; }
.hero-floaters i:nth-child(5)  { top: 45%; left: 4%;  font-size: 2rem; animation-delay: -6s; }
.hero-floaters i:nth-child(6)  { top: 48%; right: 5%; font-size: 2.2rem; animation-delay: -3s; }
.hero-floaters i:nth-child(7)  { top: 8%;  left: 48%; font-size: 1.8rem; animation-delay: -5s; }
.hero-floaters i:nth-child(8)  { bottom: 8%; left: 36%; font-size: 2rem; animation-delay: -7s; }
.hero-floaters i:nth-child(9)  { top: 30%; left: 24%; font-size: 1.6rem; animation-delay: -8s; }
.hero-floaters i:nth-child(10) { bottom: 26%; right: 30%; font-size: 1.7rem; animation-delay: -2.5s; }

.hud-corner {
    position: absolute;
    width: 34px;
    height: 34px;
    border: 2px solid var(--w-accent);
    opacity: .55;
    animation: w-hud 3s ease-in-out infinite;
}

.hud-corner.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.hud-corner.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; animation-delay: -.75s; }
.hud-corner.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; animation-delay: -1.5s; }
.hud-corner.br { bottom: 0; right: 0; border-left: 0; border-top: 0; animation-delay: -2.25s; }

/* Glitch name: two offset copies flicker over the gradient text. */
.glitch { position: relative; display: inline-block; }

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    background: inherit;
    background-size: inherit;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    pointer-events: none;
}

.glitch::before { animation: w-glitch-a 5s steps(1) infinite; text-shadow: -3px 0 rgba(0, 255, 255, .45); }
.glitch::after  { animation: w-glitch-b 5s steps(1) infinite; text-shadow: 3px 0 rgba(255, 0, 90, .45); }
.glitch:hover::before,
.glitch:hover::after { animation-duration: .7s; }

#about .hero-terminal {
    margin-top: 1.1rem;
    font-family: var(--w-mono);
    font-size: clamp(1rem, 2.2vw, 1.35rem);
    font-weight: 400;
    text-transform: none;
    letter-spacing: .02em;
    color: var(--w-text) !important;
    min-height: 1.8em;
    /* A long job title wraps onto the next line instead of running off the
       edge - including one long unbroken word, which spaces cannot break. */
    overflow-wrap: anywhere;
    word-break: break-word;
}

.hero-terminal .prompt { color: var(--w-accent); margin-right: .5rem; }

.hero-terminal .caret {
    display: inline-block;
    width: .6em;
    height: 1.1em;
    margin-left: 3px;
    vertical-align: -0.15em;
    background: var(--w-accent);
    box-shadow: 0 0 10px var(--w-accent-glow);
    animation: w-blink 1s steps(1) infinite;
}

.hero-scroll {
    display: inline-block;
    margin-top: 2.5rem;
    opacity: .75;
}

.hero-scroll .mouse {
    display: block;
    width: 24px;
    height: 38px;
    border: 2px solid var(--w-accent);
    border-radius: 14px;
    position: relative;
}

.hero-scroll .wheel {
    position: absolute;
    top: 7px;
    left: 50%;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: var(--w-accent);
    animation: w-wheel 1.6s ease-in-out infinite;
}

/* Faint moving grid behind the content sections. */
section.resume-section:not(#about)::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--w-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--w-line) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: .35;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
    animation: w-grid 30s linear infinite;
    pointer-events: none;
}

section.resume-section:not(#about) > * { position: relative; z-index: 1; }

/* The "// 01" counters above each heading and the "01" in front of each nav
   item have been dropped: the numbering carried no meaning and the headings
   and menu read more directly without it. */

/* Experience: a data pulse travelling down the timeline. */
#experience-box::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 6px;
    height: 70px;
    margin-left: -2.5px;
    border-radius: 6px;
    background: linear-gradient(180deg, transparent, var(--w-accent-light));
    box-shadow: 0 0 16px var(--w-accent);
    animation: w-pulse-down 3.2s linear infinite;
}

@media only screen and (max-width: 767px) {
    #experience-box::after { left: 20px; }
}

/* Button shine sweep */
.btn-white { overflow: hidden; }
.btn-white::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
    transform: skewX(-20deg);
    animation: w-shine 3.5s ease-in-out infinite;
}

/* Scroll reveal (classes added by theme.js) */
.reveal {
    opacity: 0;
    transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1), filter .8s ease;
}
.reveal-up    { transform: translateY(40px); }
.reveal-left  { transform: translateX(-60px); }
.reveal-right { transform: translateX(60px); }
.reveal-zoom  { transform: scale(.88); filter: blur(6px); }
.reveal-scale { transform: scaleX(0); }
.reveal.is-visible { opacity: 1; transform: none; filter: none; }

/* Keyframes */
@keyframes w-border-spin { to { --w-angle: 360deg; } }
@keyframes w-boot-fallback { to { opacity: 0; visibility: hidden; } }
@keyframes w-dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
@keyframes w-scan { 0% { top: -120px; } 60%, 100% { top: 110%; } }
@keyframes w-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-26px) rotate(6deg); }
}
@keyframes w-hud { 0%, 100% { opacity: .25; } 50% { opacity: .85; } }
@keyframes w-blink { 50% { opacity: 0; } }
@keyframes w-wheel {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(14px); opacity: 0; }
}
@keyframes w-grid { to { background-position: 80px 80px; } }
@keyframes w-pulse-down {
    0% { top: -70px; opacity: 0; }
    10%, 90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}
@keyframes w-shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
@keyframes w-glitch-a {
    0%, 90%, 100% { opacity: 0; transform: none; clip-path: none; }
    91% { opacity: .9; transform: translate(-5px, -2px); clip-path: inset(10% 0 55% 0); }
    93% { opacity: .9; transform: translate(5px, 1px); clip-path: inset(60% 0 12% 0); }
    95% { opacity: .9; transform: translate(-3px, 2px); clip-path: inset(35% 0 40% 0); }
    97% { opacity: 0; }
}
@keyframes w-glitch-b {
    0%, 91%, 100% { opacity: 0; transform: none; clip-path: none; }
    92% { opacity: .9; transform: translate(5px, 2px); clip-path: inset(70% 0 5% 0); }
    94% { opacity: .9; transform: translate(-5px, -1px); clip-path: inset(5% 0 70% 0); }
    96% { opacity: .9; transform: translate(3px, 0); clip-path: inset(45% 0 30% 0); }
    98% { opacity: 0; }
}

@media (max-width: 991px) {
    .hero-floaters i { font-size: 1.6rem !important; }
    #about > .hero-hud { inset: 12px; }
    .hud-corner { width: 22px; height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
    .boot-screen { display: none; }
}

/* A 60px sideways slide sticks out past a phone's edge, so the page shows a
   horizontal scrollbar until the element animates in. Slide up instead. */
@media (max-width: 767px) {
    .reveal-left,
    .reveal-right { transform: translateY(40px); }
}

/* Download CV, under the hero's social icons (shown only when a resume is uploaded). */
.hero-cv { margin-top: 28px; position: relative; z-index: 2; }
.hero-cv .btn { display: inline-flex; align-items: center; gap: 10px; }

/*====================================================
                   SKILLS
======================================================*/
#skills .skill-group {
    color: var(--w-accent);
    font-size: 1rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

#skills .skill-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 0;
}

#skills .skill-tags li {
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--w-card);
    border: 1px solid var(--w-line);
    color: var(--w-text);
    font-size: .92rem;
    transition: border-color .25s ease, color .25s ease, transform .25s ease;
}

#skills .skill-tags li:hover {
    border-color: var(--w-accent);
    color: var(--w-heading);
    transform: translateY(-2px);
}
/* Service descriptions come from the editor now, so they can contain
   paragraphs and lists. The last one keeps the card spacing intact. */
.svc-rich > :last-child { margin-bottom: 0; }
.svc-rich ul, .svc-rich ol { padding-left: 1.1em; margin-bottom: .6em; }
