:root {
    --bg-color: #000;
    --text-color: #ffffff;
    --link-color: #ffffff;
    --font-family: 'IBM Plex Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

h1,
h2,
h3 {
    animation: body-glitch 10s infinite;
    word-wrap: break-word;
}

img {
    max-width: 100%;
    height: auto;
}

@keyframes body-glitch {

    0%,
    75% {
        transform: translate(0);
        filter: none;
        color: inherit;
        text-shadow: none;
    }

    /* Water-like sweep start */
    80% {
        color: #00ff41;
        text-shadow: -20px 0 10px rgba(0, 255, 65, 0);
    }

    85% {
        text-shadow: 0 0 15px rgba(0, 255, 65, 0.8), 20px 0 10px rgba(0, 255, 65, 0);
    }

    92% {
        transform: translate(1px, 1px) skewX(1deg);
        filter: hue-rotate(1deg) brightness(1.1);
        color: #00ff41;
        text-shadow: 10px 0 20px rgba(0, 255, 65, 0.6);
    }

    94% {
        transform: translate(-1px, -1px) skewX(-1deg);
        filter: hue-rotate(-1deg);
        color: #00ff41;
        text-shadow: 20px 0 25px rgba(0, 255, 65, 0.9);
    }

    96% {
        transform: translate(1px, -1px);
        filter: brightness(1.2);
        color: #00ff41;
        text-shadow: 0 0 15px rgba(0, 255, 65, 0.6);
    }

    98% {
        transform: translate(-1px, 1px);
        filter: none;
        color: #00ff41;
        text-shadow: -10px 0 10px rgba(0, 255, 65, 0.3);
    }

    100% {
        transform: translate(0);
        color: inherit;
        text-shadow: none;
    }
}

header {
    padding: 2rem 1rem;
}

.header-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-prompt {
    font-size: 1.2rem;
}

.glitch-link {
    color: inherit;
    text-decoration: none;
}

.prompt-symbol {
    margin-left: 0.5rem;
}

.cursor {
    display: inline-block;
    width: 1ch;
    color: var(--cursor-color, var(--text-color));
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    from,
    to {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

nav a {
    color: var(--link-color);
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 1rem;
}

nav a:hover {
    text-decoration: underline;
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

@media (max-width: 600px) {
    main {
        padding: 1rem;
    }
}

/* Content Page Styling */
.content-page {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    /* Centers content horizontally */
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    padding-top: 5rem;
    min-height: auto;
}

@media (max-width: 768px) {
    .content-page {
        padding-top: 2rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .prose h1,
    .blog-list h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
}

.content-page.centered {
    justify-content: flex-start;
    padding-top: 5rem;
}

.about-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 2.5rem auto;
    display: block;
    border: 3px solid var(--text-color);
    box-shadow: 0 0 20px rgba(0, 255, 249, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (max-width: 480px) {
    .about-image {
        width: 150px;
        height: 150px;
    }
}

.about-image:hover {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 0 30px rgba(255, 0, 193, 0.4);
    border-color: #ff00c1;
}

.prose h1,
.blog-list h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.prose h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose p {
    margin-bottom: 1.5rem;
}

.prose ul {
    margin-bottom: 1.5rem;
    margin-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

/* Blog List Styling */
.blog-list {
    text-align: center;
    width: 100%;
}

.posts-ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.post-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    width: 100%;
}

.post-date {
    opacity: 0.5;
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
    letter-spacing: 1px;
}

.post-link {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.post-link:hover {
    color: #00fff9;
    text-shadow: 0 0 8px rgba(0, 255, 249, 0.5);
}

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

.post-meta {
    opacity: 0.6;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.social-links a {
    color: var(--link-color);
    text-decoration: none;
    font-size: 1.6rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    opacity: 0.7;
    transform: translateY(-3px);
}

.social-links a:hover {
    opacity: 0.7;
}

footer {
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.6;
}

/* Glitch Effect */
.glitch {
    position: relative;
    display: inline-block;
    font-weight: 500;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}

/* Hover Glitch Effect */
.social-icon-img {
    width: 1.2rem;
    height: 1.2rem;
    vertical-align: middle;
    filter: invert(1);
    /* Match white icon theme */
    display: inline-block;
}

.glitch-hover {
    position: relative;
    display: inline-block;
    color: inherit;
    text-decoration: none;
}

.glitch-hover:hover {
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 12px rgba(0, 255, 249, 0.4);
    transition: text-shadow 0.3s ease;
}

.glitch-hover:hover::before,
.glitch-hover:hover::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: -1;
}

.glitch-hover:hover::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-hover:hover::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}

/* Contact Button */
.contact-btn {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.8rem 1.5rem;
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--text-color);
    font-family: var(--font-family);
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.contact-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--text-color);
}

@keyframes glitch-anim {
    0% {
        clip: rect(31px, 9999px, 94px, 0);
        transform: skew(0.85deg);
    }

    5% {
        clip: rect(70px, 9999px, 71px, 0);
        transform: skew(0.58deg);
    }

    10% {
        clip: rect(62px, 9999px, 86px, 0);
        transform: skew(0.48deg);
    }

    15% {
        clip: rect(27px, 9999px, 16px, 0);
        transform: skew(0.8deg);
    }

    20% {
        clip: rect(49px, 9999px, 5px, 0);
        transform: skew(0.12deg);
    }

    25% {
        clip: rect(56px, 9999px, 55px, 0);
        transform: skew(0.04deg);
    }

    30% {
        clip: rect(82px, 9999px, 31px, 0);
        transform: skew(0.66deg);
    }

    35% {
        clip: rect(66px, 9999px, 52px, 0);
        transform: skew(0.39deg);
    }

    40% {
        clip: rect(11px, 9999px, 10px, 0);
        transform: skew(0.56deg);
    }

    45% {
        clip: rect(56px, 9999px, 49px, 0);
        transform: skew(0.32deg);
    }

    50% {
        clip: rect(59px, 9999px, 48px, 0);
        transform: skew(0.63deg);
    }

    55% {
        clip: rect(62px, 9999px, 56px, 0);
        transform: skew(0.97deg);
    }

    60% {
        clip: rect(81px, 9999px, 32px, 0);
        transform: skew(0.58deg);
    }

    65% {
        clip: rect(21px, 9999px, 39px, 0);
        transform: skew(0.44deg);
    }

    70% {
        clip: rect(10px, 9999px, 60px, 0);
        transform: skew(0.35deg);
    }

    75% {
        clip: rect(100px, 9999px, 34px, 0);
        transform: skew(0.24deg);
    }

    80% {
        clip: rect(52px, 9999px, 91px, 0);
        transform: skew(0.18deg);
    }

    85% {
        clip: rect(52px, 9999px, 69px, 0);
        transform: skew(0.43deg);
    }

    90% {
        clip: rect(12px, 9999px, 95px, 0);
        transform: skew(0.79deg);
    }

    95% {
        clip: rect(74px, 9999px, 14px, 0);
        transform: skew(0.49deg);
    }

    100% {
        clip: rect(3px, 9999px, 5px, 0);
        transform: skew(0.5deg);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(65px, 9999px, 100px, 0);
        transform: skew(0.85deg);
    }

    23% {
        clip: rect(51px, 9999px, 63px, 0);
        transform: skew(0.25deg);
    }

    49% {
        clip: rect(96px, 9999px, 37px, 0);
        transform: skew(0.95deg);
    }

    77% {
        clip: rect(100px, 9999px, 73px, 0);
        transform: skew(0.15deg);
    }

    100% {
        clip: rect(78px, 9999px, 86px, 0);
        transform: skew(0.49deg);
    }
}

/* Waving Hand Animation */
.wave {
    animation-name: wave-animation;
    animation-duration: 2.5s;
    animation-iteration-count: infinite;
    transform-origin: 70% 70%;
    display: inline-block;
}

@keyframes wave-animation {
    0% {
        transform: rotate(0.0deg)
    }

    10% {
        transform: rotate(14.0deg)
    }

    20% {
        transform: rotate(-8.0deg)
    }

    30% {
        transform: rotate(14.0deg)
    }

    40% {
        transform: rotate(-4.0deg)
    }

    50% {
        transform: rotate(10.0deg)
    }

    60% {
        transform: rotate(0.0deg)
    }

    100% {
        transform: rotate(0.0deg)
    }
}

/* Name Glitch - Subtle */
.name-glitch {
    position: relative;
    display: inline-block;
    color: #fff;
    max-width: 100%;
}

@media (max-width: 600px) {
    .name-glitch {
        display: block;
        width: 100%;
    }
}

.name-glitch::before,
.name-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    clip: rect(0, 0, 0, 0);
}

.name-glitch::before {
    left: -2px;
    text-shadow: 2px 0 #00fff9;
    animation: name-glitch-anim-1 2s infinite linear alternate-reverse;
}

.name-glitch::after {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    animation: name-glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes name-glitch-anim-1 {
    0% {
        clip: rect(20px, 9999px, 21px, 0);
    }

    10% {
        clip: rect(50px, 9999px, 52px, 0);
    }

    20% {
        clip: rect(30px, 9999px, 31px, 0);
    }

    30% {
        clip: rect(10px, 9999px, 12px, 0);
    }

    40% {
        clip: rect(60px, 9999px, 62px, 0);
    }

    50% {
        clip: rect(40px, 9999px, 41px, 0);
    }

    60% {
        clip: rect(80px, 9999px, 82px, 0);
    }

    70% {
        clip: rect(70px, 9999px, 71px, 0);
    }

    80% {
        clip: rect(90px, 9999px, 92px, 0);
    }

    90% {
        clip: rect(10px, 9999px, 11px, 0);
    }

    100% {
        clip: rect(0, 9999px, 0, 0);
    }
}

@keyframes name-glitch-anim-2 {
    0% {
        clip: rect(80px, 9999px, 81px, 0);
    }

    10% {
        clip: rect(10px, 9999px, 11px, 0);
    }

    20% {
        clip: rect(60px, 9999px, 61px, 0);
    }

    30% {
        clip: rect(40px, 9999px, 41px, 0);
    }

    40% {
        clip: rect(20px, 9999px, 21px, 0);
    }

    50% {
        clip: rect(90px, 9999px, 91px, 0);
    }

    60% {
        clip: rect(30px, 9999px, 31px, 0);
    }

    70% {
        clip: rect(50px, 9999px, 51px, 0);
    }

    80% {
        clip: rect(70px, 9999px, 71px, 0);
    }

    90% {
        clip: rect(110px, 9999px, 112px, 0);
    }

    100% {
        clip: rect(0, 9999px, 0, 0);
    }
}

/* Markdown Content Styling */
.markdown-body {
    line-height: 1.6;
    color: var(--text-color);
}

.markdown-body h1 {
    font-size: 2.5rem;
}

.markdown-body h2 {
    font-size: 2.2rem;
}

.markdown-body h3 {
    font-size: 2rem;
}

.markdown-body h4 {
    font-size: 1.3rem;
    color: #00fff9;
}

@media (max-width: 768px) {
    .markdown-body h1 {
        font-size: 2rem;
    }

    .markdown-body h2 {
        font-size: 1.6rem;
    }

    .markdown-body h3 {
        font-size: 1.4rem;
    }

    .markdown-body h4 {
        font-size: 1.2rem;
    }

    .markdown-body p,
    .markdown-body li {
        font-size: 1rem;
    }
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.markdown-body p,
.markdown-body li {
    font-size: 1.05rem;
    opacity: 0.9;
}

.post-tags {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.tag {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-family: var(--font-family);
    opacity: 0.8;
}

.post-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
    width: 100% !important;
}

.markdown-body {
    width: 100% !important;
    text-align: left !important;
}

.post-header {
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 2rem !important;
}

.markdown-body img {
    display: block !important;
    margin: 2rem auto !important;
    max-width: 100% !important;
}

.markdown-body p {
    margin-bottom: 1rem;
}

.markdown-body ul,
.markdown-body ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.markdown-body code {
    background: #2d2d2d;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'IBM Plex Mono', monospace;
}

.markdown-body pre {
    background: #1a1a1a;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    border: 1px solid #333;
    margin-bottom: 1rem;
    max-width: 100%;
    white-space: pre-wrap;
    word-break: break-all;
}

.markdown-body blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
    color: #888;
    font-style: italic;
}

.share-section {
    margin-top: 3rem !important;
    padding-top: 2rem !important;
    border-top: 1px solid #333 !important;
    text-align: center !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.share-title {
    font-size: 1rem;
    color: #888;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.share-btn:hover {
    background: #222;
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
}

.share-btn i {
    font-size: 1rem;
}

.share-btn.copy:active {
    transform: scale(0.95);
}


@media (max-width: 600px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .header-container {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }

    nav a {
        margin: 0 0.4rem;
        font-size: 0.9rem;
    }

    .terminal-prompt {
        font-size: 1rem;
    }
}

.tool-page {
    background-color: #000;
    min-height: 100vh;
    padding: 1.5rem;
    font-family: var(--font-family);
    color: #ffffff;
}

.tool-container {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
    padding: 0 1rem;
}

.tool-heading {
    color: #ffc107;
    font-size: 3rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.4);
    display: inline-block;
}

@media (max-width: 600px) {
    .tool-heading {
        font-size: 1.8rem;
    }

    .tool-page {
        padding: 1rem 0.5rem;
    }
}

.tool-terminal {
    background: transparent;
    padding: 1rem;
    border: none;
}

.terminal-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.terminal-label {
    font-size: 1.1rem;
    color: #ffc107;
}

.terminal-input {
    background: #111;
    border: 1px solid #333;
    color: #fff;
    padding: 0.6rem;
    width: 100%;
    max-width: 400px;
    border-radius: 4px;
    font-family: var(--font-family);
    outline: none;
    font-size: 0.95rem;
}

.terminal-input:focus {
    border-color: #ffc107;
}

.tool-btn.savage-btn {
    background-color: #08944e;
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    font-family: var(--font-family);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.tool-btn.savage-btn:hover {
    background-color: #ffaa00;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 170, 0, 0.3);
}

.terminal-results {
    margin-top: 1.5rem;
    /* Tightened */
    text-align: center;
    /* Center placeholder */
}

.results-placeholder {
    font-size: 1.2rem;
    color: rgba(255, 193, 7, 0.5);
    margin-top: 1rem;
}

/* Arranged 2-column Grid */
.dork-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 600px) {
    .dork-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .dork-category-card {
        padding: 0.8rem;
    }
}

.dork-category-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 1rem;
    transition: transform 0.2s ease;
}

.dork-category-card:hover {
    transform: scale(1.02);
}

.dork-category-title {
    color: #ffc107;
    margin: 0 0 0.8rem 0;
    font-size: 1.4rem;
    border-bottom: 1px solid rgba(255, 193, 7, 0.2);
    display: block;
}

.dork-item-link {
    color: #69f0ae;
    text-decoration: none;
    word-break: break-all;
    font-family: var(--font-family);
    font-size: 0.95rem;
    display: block;
    margin-top: 0.3rem;
    padding: 0.4rem;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.dork-item-link:hover {
    color: #fff;
    background: rgba(105, 240, 174, 0.1);
    box-shadow: 0 0 12px rgba(105, 240, 174, 0.4);
    /* Glow effect */
    text-shadow: 0 0 5px rgba(105, 240, 174, 0.8);
}

.error-msg {
    color: #ff4444;
    font-family: var(--font-family);
    text-align: center;
    width: 100%;
}

.dork-query {
    color: #00ff41;
}