:root {
    --color-bg: #FFFFFF;
    --color-text: #000000;
    --color-accent: #85BBFF;

    --font-thin: 'NaN Rage Soft Thin', system-ui, -apple-system, sans-serif;
    --font-regular: 'NaN Rage Soft Regular', system-ui, -apple-system, sans-serif;
    --font-extrabold: 'NaN Rage Soft ExtraBold', system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #000000;
        --color-text: #FFFFFF;
        --color-accent: #85BBFF;
    }

    .contact-text {
        color: #000000CA !important;
    }
}

@font-face {
    font-family: 'NaN Rage Soft Thin';
    src: url('../fonts/rage-soft-thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NaN Rage Soft Regular';
    src: url('../fonts/rage-soft-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NaN Rage Soft ExtraBold';
    src: url('../fonts/rage-soft-extrabold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

*::-webkit-scrollbar {
    display: none;
}

*::-webkit-scrollbar-thumb {
    background-color: transparent;
}

*::-webkit-scrollbar-track {
    background-color: transparent;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: 'NaN Rage Soft Regular', system-ui, -apple-system, sans-serif;
    font-size: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    line-height: 1.6;
    text-transform: lowercase;
    font-synthesis: none;
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--color-accent);
}

button {
    background-color: var(--color-accent);
    color: var(--color-bg);
    border: none;
    cursor: pointer;
}

button:hover,
button:focus {
    opacity: 0.9;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-extrabold);
    text-transform: lowercase;
    margin: 0;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 2rem + 2.5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 1.75rem + 1.5vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 1.35rem + 0.75vw, 2rem);
}

h4 {
    font-size: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
}

h5 {
    font-size: clamp(1.125rem, 1.05rem + 0.375vw, 1.25rem);
}

h6 {
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
}

.display-text,
.hero-text,
.large-text {
    font-family: var(--font-thin);
    font-size: clamp(3rem, 2.5rem + 2.5vw, 5rem);
    text-transform: lowercase;
    line-height: 1.1;
}

#hero-title {
    font-family: var(--font-thin);
    font-weight: lighter;
    font-size: clamp(3.5rem, 3rem + 3vw, 5.5rem);
    margin-bottom: clamp(-48px, calc(-2.142857vw - 17.142857px), -24px);
}

p,
span,
div,
li,
a,
button,
input,
textarea,
label {
    text-transform: lowercase;
}

p {
    margin: 0 0 1rem 0;
}

b {
    font-family: var(--font-extrabold);
}

main {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    padding: clamp(1.5rem, 5vw, 3rem);
    max-width: 1000px;
    margin: 0 auto;
    min-height: 100vh;
}

section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    padding: clamp(1rem, 4vh, 4rem) 0;
}

.mascot-container {
    width: 100%;
    max-width: 196px;
    height: auto;
}

.mascot-container svg {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

@media (prefers-color-scheme: dark) {
    .mascot-container svg {
        filter: none;
    }
}

.tagline {
    font-size: clamp(1.125rem, 1rem + 0.625vw, 1.5rem);
    opacity: 0.8;
}

.about {
    max-width: 65ch;
    margin: 0 auto;
}

.beliefs {
    max-width: 65ch;
    margin: 0 auto;
}

.skills {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
    width: 100%;
}

.skill-category h3 {
    margin-bottom: 0.75rem;
    color: var(--color-accent);
}

.skill-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-category li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-text);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.skill-category li:hover {
    opacity: 1;
}

.projects {
    max-width: 1000px;
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0;
    border-radius: 1rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--color-text);
    overflow: hidden;
    background-color: var(--color-bg);
    position: relative;
    opacity: 1;
}

.project-card:hover {
    opacity: 1;
}

@media (prefers-color-scheme: dark) {
    .project-card {
        border-color: rgba(255, 255, 255, 0.1);
    }
}

.project-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 12px 24px rgba(133, 187, 255, 0.15);
}

@media (prefers-color-scheme: dark) {
    .project-card:hover {
        box-shadow: 0 12px 24px rgba(133, 187, 255, 0.25);
    }
}

.project-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-accent) 0%, #6BA3E8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-image {
    transform: scale(1.02);
}

.project-image img {
    width: 50%;
    height: auto;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-card-content {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-card h3 {
    margin: 0;
    color: var(--color-accent);
}

.project-card p {
    margin: 0;
    opacity: 0.75;
    line-height: 1.5;
}

.faq {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.faq-item {
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    .faq-item {
        border-color: rgba(255, 255, 255, 0.15);
    }
}

.faq-item:hover {
    border-color: rgba(0, 0, 0, 0.25);
}

@media (prefers-color-scheme: dark) {
    .faq-item:hover {
        border-color: rgba(255, 255, 255, 0.25);
    }
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background-color: transparent;
    color: var(--color-text);
    border: none;
    text-align: left;
    font-family: var(--font-extrabold);
    font-size: clamp(1.125rem, 1rem + 0.625vw, 1.375rem);
    cursor: pointer;
    transition: opacity 0.3s ease;
    min-height: 44px;
}

.faq-question:hover {
    opacity: 0.8;
}

.faq-icon {
    font-family: var(--font-regular);
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.25rem 1.5rem;
}

.faq-answer p {
    margin: 0;
    opacity: 0.8;
    line-height: 1.6;
}

.contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    max-width: 65ch;
    margin: 0 auto;
}

.contact-btn {
    display: block;
    text-decoration: none;
    color: var(--color-text);
    border-radius: 12px;
    transition: transform 0.05s ease, box-shadow 0.05s ease;
    box-shadow: 0 6px 0 #5a8fd4, 0 7px 8px rgba(0, 0, 0, 0.15);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-regular);
}

.contact-btn-cap {
    background: linear-gradient(to bottom, #a3c9ff, #85bbff);
    border: 1px solid #5a8fd4;
    border-radius: 12px;
    padding: 0.4rem 1.4rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    transition: transform 0.05s ease, box-shadow 0.05s ease, background 0.05s ease;
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.contact-icon {
    font-size: 80px;
    color: var(--color-bg);
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    line-height: 1;
}

.contact-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    text-align: left;
    color: #FFFFFFDA;
}

.contact-label {
    font-size: 22px;
    text-transform: lowercase;
    transition: font-weight 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: var(--font-extrabold);
    margin-bottom: -6px;
}

.contact-handle {
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-btn:hover .contact-btn-cap {
    transform: translateY(2px);
    background: linear-gradient(to bottom, #8fb9f5, #6ba3e8);
}

.contact-btn:hover .contact-icon {
    transform: scale(1.1) rotate(-5deg);
}

.contact-btn:hover .contact-label {
    font-weight: 700;
}

.contact-btn:active {
    transform: translateY(4px);
    box-shadow: none;
}

.contact-btn:active .contact-btn-cap {
    transform: translateY(4px);
    box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.08),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1);
    background: linear-gradient(to bottom, #7db3ed, #6ba3e8);
}

footer {
    padding: clamp(1.5rem, 5vw, 3rem);
    text-align: center;
    opacity: 0.6;
    text-decoration: underline !important;
    text-decoration-style: wavy !important;
    text-underline-offset: 5px !important;
}

footer p {
    margin: 0;
    font-size: clamp(0.875rem, 0.85rem + 0.125vw, 1rem);
}

footer a {
    color: var(--color-text);
    transition: opacity 0.3s ease-in-out;
}

footer a:hover,
footer a:focus {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

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

    .project-card {
        flex-direction: row;
        gap: 0;
    }

    .project-image {
        width: 35%;
        aspect-ratio: 1 / 1;
        flex-shrink: 0;
        padding: 1.5rem;
    }

    .project-image img {
        width: 70%;
    }

    .project-card-content {
        flex: 1;
        padding: 1.25rem 1.5rem;
        justify-content: center;
    }
}

@media (min-width: 768px) {
    main {
        gap: clamp(3rem, 6vw, 5rem);
        padding: clamp(2rem, 6vw, 4rem);
    }

    .hero {
        gap: 2rem;
        min-height: 100vh;
        padding: clamp(2rem, 6vh, 6rem) 0;
    }

    .mascot-container {
        max-width: 220px;
    }

    section {
        gap: 0.4rem;
    }

    .about,
    .beliefs,
    .contact {
        max-width: 70ch;
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }

    .projects-grid {
        gap: 2.5rem;
    }
}

@media (min-width: 1024px) {
    main {
        gap: clamp(4rem, 8vw, 6rem);
        padding: clamp(3rem, 8vw, 5rem);
    }

    .hero {
        gap: 2.5rem;
        min-height: 100vh;
        padding: clamp(3rem, 8vh, 8rem) 0;
    }

    .mascot-container {
        max-width: 260px;
    }

    section {
        gap: 0.2rem;
    }

    .about,
    .beliefs,
    .contact {
        max-width: 75ch;
    }

    .skills-grid {
        gap: 3rem;
    }

    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }

    .project-card {
        flex-direction: column;
        gap: 1rem;
    }

    .project-image {
        width: 100%;
        aspect-ratio: 16 / 9;
        padding: 2.5rem;
    }

    .project-image img {
        width: 60%;
    }

    .project-card-content {
        padding: 1.25rem 1.5rem 1.5rem;
    }

    .contact-link {
        padding: 1rem 2rem;
    }
}