/* @import url('https://fonts.googleapis.com/css2?family=Silkscreen:wght@400;700&display=swap'); */

:root {
    --surface: #ffffff;
    --button-highlight: #ffffff;
    --button-face: #f0f0f0;
    --button-shadow: #808080;
    --window-frame: #000000;
    --dialog-blue: #000000;
    --text-color: #000000;
    --link-color: #000000;
    --link-visited: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

    /* cursor: url('assets/cursor.png'), auto; */
}

body {
    /* font-family: 'Silkscreen', 'Courier New', 'Fixedsys', monospace; */
    font-family: 'Courier New', monospace;
    background: rgb(212, 212, 212);
    /* background-image: url("assets/bg/bg1.png"), linear-gradient(to bottom, rgb(212, 212, 212) 0%, rgb(180, 180, 180) 100%); */
    /* animation: moveBackground 10s linear infinite; */
    background-attachment: fixed;
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.5;
    padding: 20px;
}

@keyframes rainbow {
    0% {
        color: #ff0000;
    }

    16% {
        color: #ff7f00;
    }

    33% {
        color: #ffff00;
    }

    50% {
        color: #00ff00;
    }

    66% {
        color: #0000ff;
    }

    83% {
        color: #8b00ff;
    }

    100% {
        color: #ff0000;
    }
}

@keyframes moveBackground {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 400px 400px;
    }
}

@keyframes rainbowBorder {
    0% {
        border-color: #ff0000;
    }

    16% {
        border-color: #ff7f00;
    }

    33% {
        border-color: #ffff00;
    }

    50% {
        border-color: #00ff00;
    }

    66% {
        border-color: #0000ff;
    }

    83% {
        border-color: #8b00ff;
    }

    100% {
        border-color: #ff0000;
    }
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Window Styles */
.window {
    background: var(--surface);
    border-top: 2px solid var(--button-highlight);
    border-left: 2px solid var(--button-highlight);
    border-bottom: 2px solid #000000;
    border-right: 2px solid #000000;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.title-bar {
    background: linear-gradient(90deg, #000000, #333333);
    padding: 3px 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title-bar-text {
    color: white;
    font-weight: bold;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.title-bar-controls {
    display: flex;
    gap: 2px;
}

.title-bar-controls button {
    width: 16px;
    height: 14px;
    padding: 0;
    border: none;
    background: var(--surface);
    border-top: 1px solid var(--button-highlight);
    border-left: 1px solid var(--button-highlight);
    border-bottom: 1px solid #000000;
    border-right: 1px solid #000000;
    font-size: 8px;
    position: relative;
}

/* Minimize button */
.title-bar-controls button:nth-child(1)::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 3px;
    right: 3px;
    height: 2px;
    background: #000000;
}

/* Maximize button */
.title-bar-controls button:nth-child(2)::after {
    content: '';
    position: absolute;

    top: 2px;
    left: 3px;
    right: 3px;
    bottom: 2px;

    border: 2px solid #000000;
}

/* Close button */
.title-bar-controls button:nth-child(3)::before,
.title-bar-controls button:nth-child(3)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    /* width: 10px; */
    width: 15%;
    /* height: 2px; */
    height: 80%;
    background: #000000;
}

.title-bar-controls button:nth-child(3)::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.title-bar-controls button:nth-child(3)::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.window-body {
    padding: 15px;
}

/* Header */
header .header-content {
    padding: 30px;
    text-align: center;
    background: var(--surface);
}

.header-info h1 {
    font-size: 28px;
    margin-bottom: 10px;
    text-transform: lowercase;
    /* animation: rainbow 10s linear infinite; */
    animation: none;
}

.header-info p {
    font-size: 12px;
    color: #505050;
}

/* Layout */
.layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    align-items: start;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 20px;
}

.tree-view {
    list-style: none;
    padding: 0;
}

.tree-view li {
    margin: 8px 0;
}

.tree-view a {
    color: var(--link-color);
    text-decoration: none;
    display: block;
    padding: 4px;
}

.tree-view a:hover {
    background: #000000;
    color: #ffffff;
}

.status-text {
    margin: 8px 0;
    font-size: 13px;
}

.counter {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    background: #000;
    color: #fff;
    padding: 2px 4px;
}

.button-wall {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}

.button-wall img {
    width: 120px;
    height: 42px;
    image-rendering: pixelated;
}

.button-wall a {
    display: inline-block;
    line-height: 0;
}

.button-wall a:hover {
    background: none;
}

/* Content */
.content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

h2 {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--button-shadow);
    text-transform: lowercase;
}

h3 {
    font-size: 16px;
    margin: 10px 0 5px;
}

p {
    margin: 10px 0;
}

a {
    color: var(--link-color);
    text-decoration: underline;
}

a:visited {
    color: var(--link-visited);
}

a:hover {
    background: #000000;
    color: #ffffff;
}

/* About Section */
.about-content {
    display: flex;
    gap: 20px;
    align-items: start;
}

.profile-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    /* border: 2px solid #000; */
    flex-shrink: 0;
    user-select: none;
    -webkit-user-drag: none;
}

.about-text {
    flex: 1;
}

/* Project List */
.project-item {
    margin-bottom: 20px;
    padding: 10px;
    background: #ffffff;
    border: 1px solid var(--button-shadow);
}

.project-item h3 {
    color: #000000;
    margin-top: 0;
}

/* Shrine Grid */
.shrine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.shrine-item {
    text-align: center;
    padding: 10px;
    background: #ffffff;
    border: 1px solid var(--button-shadow);
}

.shrine-item img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 8px;
}

.shrine-item p {
    font-size: 12px;
    margin: 0;
}

/* Form Elements */
.field-row-stacked {
    margin: 15px 0;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 5px;
    border: none;
    border-top: 2px solid var(--button-shadow);
    border-left: 2px solid var(--button-shadow);
    border-bottom: 2px solid var(--button-highlight);
    border-right: 2px solid var(--button-highlight);
    background: white;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

textarea {
    resize: vertical;
}

button {
    padding: 8px 20px;
    background: var(--surface);
    border: none;
    border-top: 2px solid var(--button-highlight);
    border-left: 2px solid var(--button-highlight);
    border-bottom: 2px solid #000000;
    border-right: 2px solid #000000;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    cursor: pointer;
}

button:active {
    border-top: 2px solid #000000;
    border-left: 2px solid #000000;
    /* border-bottom: 1px solid var(--button-highlight);
    border-right: 1px solid var(--button-highlight); */
}

/* Link List */
.link-list {
    list-style: none;
    padding: 0;
}

.link-list li {
    margin: 10px 0;
}

/* Footer */
.footer {
    /* display: none; */
    margin-top: 20px;
    /* border: 3px solid #ff0000; */
    border: 3px solid #000000;
    /* animation: rainbowBorder 3s linear infinite; */
}

.footer-content {
    text-align: center;
}

.footer-content p {
    margin: 5px 0;
    font-size: 13px;
}

.small-text {
    font-size: 11px;
    color: #505050;
}

/* Responsive */
@media (max-width: 768px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .about-content {
        flex-direction: column;
    }

    .shrine-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    body {
        padding: 10px;
    }
}

@media (max-width: 1600px) {
    .side-decoration {
        display: none;
    }
}

/* Scrollbar for Windows 98 feel */
::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}

::-webkit-scrollbar-track {
    background: #dfdfdf;
}

::-webkit-scrollbar-thumb {
    background: var(--surface);
    border-top: 2px solid var(--button-highlight);
    border-left: 2px solid var(--button-highlight);
    border-bottom: 2px solid #000000;
    border-right: 2px solid #000000;
}

::-webkit-scrollbar-corner {
    background: var(--surface);
}

/* Falling Images */
.falling-image {
    position: fixed;
    top: -100px;
    z-index: -1;
    pointer-events: none;
    image-rendering: pixelated;
    animation: fall linear forwards;
}

@keyframes fall {
    0% {
        top: 0%;
        opacity: 1;
        transform: rotate(0deg);
    }

    100% {
        top: 100%;
        opacity: 0.0;
        transform: rotate(360deg);
    }
}

#scramble {
    animation: textShadow 1s infinite;
}

/* cool text effect */
@keyframes textShadow {
  0% {
    text-shadow:
      0.4389924193300864px 0 1px rgba(0, 30, 255, 0.5),
      -0.4389924193300864px 0 1px rgba(255, 0, 80, 0.3),
      0 0 3px;
  }
  5% {
    text-shadow:
      2.7928974010788217px 0 1px rgba(0, 30, 255, 0.5),
      -2.7928974010788217px 0 1px rgba(255, 0, 80, 0.3),
      0 0 3px;
  }
  10% {
    text-shadow:
      0.02956275843481219px 0 1px rgba(0, 30, 255, 0.5),
      -0.02956275843481219px 0 1px rgba(255, 0, 80, 0.3),
      0 0 3px;
  }
  15% {
    text-shadow:
      0.40218538552878136px 0 1px rgba(0, 30, 255, 0.5),
      -0.40218538552878136px 0 1px rgba(255, 0, 80, 0.3),
      0 0 3px;
  }
  20% {
    text-shadow:
      3.4794037899852017px 0 1px rgba(0, 30, 255, 0.5),
      -3.4794037899852017px 0 1px rgba(255, 0, 80, 0.3),
      0 0 3px;
  }
  25% {
    text-shadow:
      1.6125630401149584px 0 1px rgba(0, 30, 255, 0.5),
      -1.6125630401149584px 0 1px rgba(255, 0, 80, 0.3),
      0 0 3px;
  }
  30% {
    text-shadow:
      0.7015590085143956px 0 1px rgba(0, 30, 255, 0.5),
      -0.7015590085143956px 0 1px rgba(255, 0, 80, 0.3),
      0 0 3px;
  }
  35% {
    text-shadow:
      3.896914047650351px 0 1px rgba(0, 30, 255, 0.5),
      -3.896914047650351px 0 1px rgba(255, 0, 80, 0.3),
      0 0 3px;
  }
  40% {
    text-shadow:
      3.870905614848819px 0 1px rgba(0, 30, 255, 0.5),
      -3.870905614848819px 0 1px rgba(255, 0, 80, 0.3),
      0 0 3px;
  }
  45% {
    text-shadow:
      2.231056963361899px 0 1px rgba(0, 30, 255, 0.5),
      -2.231056963361899px 0 1px rgba(255, 0, 80, 0.3),
      0 0 3px;
  }
  50% {
    text-shadow:
      0.08084290417898504px 0 1px rgba(0, 30, 255, 0.5),
      -0.08084290417898504px 0 1px rgba(255, 0, 80, 0.3),
      0 0 3px;
  }
  55% {
    text-shadow:
      2.3758461067427543px 0 1px rgba(0, 30, 255, 0.5),
      -2.3758461067427543px 0 1px rgba(255, 0, 80, 0.3),
      0 0 3px;
  }
  60% {
    text-shadow:
      2.202193051050636px 0 1px rgba(0, 30, 255, 0.5),
      -2.202193051050636px 0 1px rgba(255, 0, 80, 0.3),
      0 0 3px;
  }
  65% {
    text-shadow:
      2.8638780614874975px 0 1px rgba(0, 30, 255, 0.5),
      -2.8638780614874975px 0 1px rgba(255, 0, 80, 0.3),
      0 0 3px;
  }
  70% {
    text-shadow:
      0.48874025155497314px 0 1px rgba(0, 30, 255, 0.5),
      -0.48874025155497314px 0 1px rgba(255, 0, 80, 0.3),
      0 0 3px;
  }
  75% {
    text-shadow:
      1.8948491305757957px 0 1px rgba(0, 30, 255, 0.5),
      -1.8948491305757957px 0 1px rgba(255, 0, 80, 0.3),
      0 0 3px;
  }
  80% {
    text-shadow:
      0.0833037308038857px 0 1px rgba(0, 30, 255, 0.5),
      -0.0833037308038857px 0 1px rgba(255, 0, 80, 0.3),
      0 0 3px;
  }
  85% {
    text-shadow:
      0.09769827255241735px 0 1px rgba(0, 30, 255, 0.5),
      -0.09769827255241735px 0 1px rgba(255, 0, 80, 0.3),
      0 0 3px;
  }
  90% {
    text-shadow:
      3.443339761481782px 0 1px rgba(0, 30, 255, 0.5),
      -3.443339761481782px 0 1px rgba(255, 0, 80, 0.3),
      0 0 3px;
  }
  95% {
    text-shadow:
      2.1841838852799786px 0 1px rgba(0, 30, 255, 0.5),
      -2.1841838852799786px 0 1px rgba(255, 0, 80, 0.3),
      0 0 3px;
  }
  100% {
    text-shadow:
      2.6208764473832513px 0 1px rgba(0, 30, 255, 0.5),
      -2.6208764473832513px 0 1px rgba(255, 0, 80, 0.3),
      0 0 3px;
  }
}
