* {
    user-select: none;
    box-sizing: border-box;
}

html {
    cursor: url('cursorsite.png'), auto;
}

body {
    background-color: black;
    color: white;
    margin: 0;
    padding: 20px;
    font-family: 'Courier New', monospace;
    transition: filter 0.2s ease;
    overflow-x: hidden;
    width: 100%;
}

body.light_mode {
    filter: invert(1);
    background-color: white;
}

body.light_mode .video_wrapper {
    filter: invert(1);
}

.site_wrapper {
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
}

#theme_toggle {
    position: fixed;
    top: 14px;
    right: 16px;
    background: black;
    color: white;
    border: 2px solid white;
    font-size: 1rem;
    padding: 4px 10px;
    cursor: url('grabsite.png'), auto;
    font-family: 'Courier New', monospace;
    z-index: 100;
    transition: background 0.15s, color 0.15s;
}

#theme_toggle:hover {
    background: white;
    color: black;
}

#intro {
    text-align: center;
    margin: 30px auto 20px auto;
    max-width: 600px;
}

#intro h1 {
    font-size: 2.4rem;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

#intro p {
    margin: 6px 0;
}

.degree_tag {
    font-size: 0.75rem;
    opacity: 0.55;
    margin-top: 12px !important;
    letter-spacing: 0.05em;
}

.section_header {
    display: flex;
    justify-content: center;
    margin: 36px 0 16px 0;
}

.section_icon {
    position: relative;
    width: 120px;
    height: auto;
}

.section_icon img {
    display: block;
    width: 100%;
    height: auto;
    image-rendering: pixelated;
}

.icon_flip_a img { animation: flip_h    0.9s steps(1) infinite; }
.icon_flip_b img { animation: flip_diag 1.1s steps(1) infinite; animation-delay: -0.5s; }

.section_divider {
    border: none;
    border-top: 1px solid white;
    opacity: 0.15;
    margin: 48px 0 0 0;
}

.section_title {
    text-align: center;
    font-size: 0.8rem;
    font-weight: normal;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.6;
    margin: -4px 0 24px 0;
}

.main_project {
    display: flex;
    gap: 28px;
    align-items: stretch;
    max-width: 820px;
    margin: 0 auto;
}

.main_project_info {
    flex: 1 1 45%;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.main_project_video {
    flex: 1 1 55%;
    min-width: 0;
    display: flex;
    align-items: center;
}

.video_wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border: 1px solid white;
}

.video_wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.feature_list {
    margin: 14px 0 0 0;
    padding-left: 18px;
    font-size: 0.85rem;
    line-height: 1.6;
    opacity: 0.85;
}

.feature_list li {
    margin-bottom: 4px;
}

.project_container {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.project {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project p {
    flex-grow: 1;
}

.outline_box {
    position: relative;
    padding: 18px;
    border: 20px solid transparent;
}

.outline_box::before {
    content: '';
    position: absolute;
    inset: -20px;
    border: 20px solid transparent;
    border-image: url('border.png') 20 stretch;
    pointer-events: none;
    z-index: 2;
}

.border_a::before { animation: flip_h    1.2s steps(1) infinite; }
.border_b::before { animation: flip_v    1.1s steps(1) infinite; animation-delay: -0.2s; }
.border_c::before { animation: flip_h    1.4s steps(1) infinite; animation-delay: -0.1s; }
.border_d::before { animation: flip_diag 1.3s steps(1) infinite; animation-delay: -0.95s; }
.border_e::before { animation: flip_v    1.5s steps(1) infinite; animation-delay: -0.9s; }
.border_f::before { animation: flip_h    1.6s steps(1) infinite; animation-delay: -1.1s; }

@keyframes flip_h    { 0%,49%  { transform: scaleX(1);   } 50%,100% { transform: scaleX(-1);  } }
@keyframes flip_v    { 0%,49%  { transform: scaleY(1);   } 50%,100% { transform: scaleY(-1);  } }
@keyframes flip_diag { 0%,49%  { transform: scale(1,1);  } 50%,100% { transform: scale(-1,-1);} }

.tag {
    font-size: 0.7rem;
    opacity: 0.5;
    letter-spacing: 0.08em;
    font-style: italic;
}

.leaf {
    position: fixed;
    pointer-events: none;
    z-index: 1;
    width: 15px;
    height: 15px;
    top: -50px;
    left: 100px;
}

.leaf img {
    display: block;
    width: 100%;
    height: 100%;
}

@keyframes fall {
    0%   { transform: translateY(0vh)   rotate(0deg);   }
    100% { transform: translateY(120vh) rotate(359deg); }
}

@keyframes evilfall {
    0%   { transform: translateY(0vh)   rotate(0deg);    }
    100% { transform: translateY(120vh) rotate(-359deg); }
}

h1, h2 {
    color: white;
    margin-bottom: 10px;
}

h2 {
    font-size: 1rem;
    letter-spacing: 0.05em;
}

p {
    line-height: 1.5;
    font-size: 0.88rem;
}

.nice_button {
    display: inline-block;
    background: black;
    color: white;
    padding: 7px 16px;
    border: 2px solid white;
    text-decoration: none;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    margin-top: 12px;
    transition: background 0.15s, color 0.15s;
}

.nice_button:hover {
    background: white;
    color: black;
    cursor: url('grabsite.png'), auto;
}

.evil_button {
    display: inline-block;
    background: black;
    color: white;
    padding: 5px 14px;
    border: 2px solid white;
    text-decoration: none;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    margin: 0 6px;
    transition: background 0.15s, color 0.15s;
    cursor: url('grabsite.png'), auto;
}

.evil_button:hover {
    background: white;
    color: black;
}

.links {
    display: flex;
    justify-content: center;
    margin-top: 36px;
    margin-bottom: 20px;
}

#trademark {
    display: flex;
    justify-content: center;
    opacity: 0.3;
    font-size: 0.75rem;
    margin-top: 10px;
}

@media (max-width: 768px) {
    body { padding: 24px; }

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

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

    .main_project {
        flex-direction: column;
        max-width: 100%;
    }

    .main_project_video {
        order: -1;
    }

    .outline_box {
        padding: 12px;
    }

    #intro {
        margin: 20px auto 16px auto;
    }

    #intro h1 {
        font-size: 1.8rem;
    }

    .section_icon {
        width: 90px;
    }
}

@media (max-width: 420px) {
    .outline_box {
        padding: 8px;
    }
}