/* ============================================
   ONE MORE BYTE — Website Styles
   Aesthetic: Warm, cozy pixel-art sunshine
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Core palette — warm, cozy, park-day vibes */
    --bg-base: #f9f7f4;
    --bg-cream: #f5efe4;
    --bg-warm: #f0e8d8;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;

    --text-primary: #3a2e24;
    --text-secondary: #6b5d50;
    --text-muted: #a08f7e;

    /* Accent colors from game worlds */
    --park-green: #5aad3a;
    --park-green-light: #8ed46e;
    --desert-orange: #e8943a;
    --ocean-blue: #4a9ede;
    --ice-cyan: #7dd8e8;
    --winter-purple: #b088d4;
    --sky-blue: #87ceeb;

    /* Primary accent */
    --accent: #e8943a;
    --accent-hover: #d07f2c;
    --accent-glow: rgba(232, 148, 58, 0.2);
    --accent-subtle: rgba(232, 148, 58, 0.1);
    --green-subtle: rgba(90, 173, 58, 0.1);

    /* Layout */
    --container: 1100px;
    --gap: clamp(1rem, 3vw, 2rem);
    --section-pad: clamp(2.5rem, 6vh, 4.5rem);

    /* Typography */
    --font-pixel: 'Silkscreen', cursive;
    --font-body: 'DM Sans', sans-serif;

    /* Borders */
    --border-light: rgba(58, 46, 36, 0.08);
    --border-medium: rgba(58, 46, 36, 0.12);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(58, 46, 36, 0.06);
    --shadow-md: 0 4px 20px rgba(58, 46, 36, 0.08);
    --shadow-lg: 0 8px 30px rgba(58, 46, 36, 0.1);

    /* Transitions */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.65;
    overflow-x: hidden;
    position: relative;
}

::selection {
    background: var(--desert-orange);
    color: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Pixel Grid Overlay --- */
.pixel-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.025;
    background-image:
        linear-gradient(rgba(58, 46, 36, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(58, 46, 36, 0.06) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* --- Container --- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gap);
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem var(--gap);
    transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s, box-shadow 0.4s;
}

.nav.scrolled {
    background: rgba(249, 247, 244, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.7rem var(--gap);
    box-shadow: 0 2px 20px rgba(58, 46, 36, 0.06);
}

.nav-logo {
    font-family: var(--font-pixel);
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    transition: color 0.3s;
}

.nav-logo:hover {
    color: var(--accent);
}

.logo-bracket {
    color: var(--park-green);
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-family: var(--font-pixel);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s var(--ease-out);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
    background: rgba(249, 247, 244, 0.97);
    backdrop-filter: blur(30px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu a {
    font-family: var(--font-pixel);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.mobile-menu a:hover {
    color: var(--accent);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7rem var(--gap) 3rem;
    overflow: hidden;
    background:
        linear-gradient(180deg,
            #c8e4f5 0%,
            #ddedf8 30%,
            #f2efe9 75%,
            var(--bg-base) 100%
        );
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 50% 60%, rgba(90, 173, 58, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 40% 30% at 20% 30%, rgba(135, 206, 235, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 40% 30% at 80% 25%, rgba(232, 148, 58, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 700px;
}

.hero-logo {
    width: clamp(240px, 45vw, 380px);
    height: auto;
    image-rendering: pixelated;
    margin: 0 auto 1.5rem;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) 0.2s forwards;
    filter: drop-shadow(0 4px 20px rgba(58, 46, 36, 0.12));
}

.hero-badge {
    font-family: var(--font-pixel);
    font-size: 0.65rem;
    letter-spacing: 0.35em;
    color: var(--park-green);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) 0.5s forwards;
}

.hero-title {
    font-family: var(--font-pixel);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-line {
    display: block;
    font-size: clamp(2.8rem, 8vw, 5.5rem);
    color: var(--text-primary);
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) 0.4s forwards;
}

.hero-line--accent {
    color: var(--accent);
    animation-delay: 0.55s;
    position: relative;
}

.hero-line--accent::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--park-green);
    animation: expandLine 0.6s var(--ease-out) 1.2s forwards;
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) 0.75s forwards;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) 0.95s forwards;
}

/* Floating pixel decorations */
.hero-decorations {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.pixel-float {
    position: absolute;
    border-radius: 2px;
    opacity: 0.3;
    animation: float 8s ease-in-out infinite;
}

.pixel-float--1 {
    width: 8px; height: 8px;
    background: var(--park-green);
    top: 20%; left: 12%;
    animation-delay: 0s;
}

.pixel-float--2 {
    width: 12px; height: 12px;
    background: var(--desert-orange);
    top: 30%; right: 15%;
    animation-delay: -2s;
    animation-duration: 10s;
}

.pixel-float--3 {
    width: 6px; height: 6px;
    background: var(--ocean-blue);
    bottom: 30%; left: 20%;
    animation-delay: -4s;
    animation-duration: 7s;
}

.pixel-float--4 {
    width: 10px; height: 10px;
    background: var(--ice-cyan);
    top: 60%; right: 10%;
    animation-delay: -1s;
    animation-duration: 9s;
}

.pixel-float--5 {
    width: 6px; height: 6px;
    background: var(--winter-purple);
    bottom: 20%; right: 30%;
    animation-delay: -3s;
    animation-duration: 11s;
}

/* Scroll hint */
.hero-scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeIn 1s var(--ease-out) 1.5s forwards;
}

.hero-scroll-hint span {
    font-family: var(--font-pixel);
    font-size: 0.55rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--text-muted), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

/* --- Buttons --- */
.btn {
    font-family: var(--font-pixel);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.85rem 2rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    border-radius: 4px;
}

.btn--primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 10px rgba(232, 148, 58, 0.25);
}

.btn--primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(232, 148, 58, 0.3);
}

.btn--ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid var(--border-medium);
}

.btn--ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    background: var(--accent-subtle);
}

.btn--sm {
    padding: 0.65rem 1.5rem;
    font-size: 0.65rem;
}

/* --- Sections --- */
.section {
    position: relative;
    padding: var(--section-pad) 0;
    z-index: 1;
}

.section-label {
    font-family: var(--font-pixel);
    font-size: 0.6rem;
    letter-spacing: 0.4em;
    color: var(--park-green);
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-label::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 2px;
    background: var(--park-green);
    vertical-align: middle;
    margin-left: 12px;
    opacity: 0.5;
}

/* --- About Section --- */
.section--about {
    border-top: 1px solid var(--border-light);
    background: var(--bg-warm);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.about-text h2 {
    font-family: var(--font-body);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 500;
    line-height: 1.35;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.about-text p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
    max-width: 620px;
}

.about-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.value-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 1.8rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.4s, transform 0.4s var(--ease-out), box-shadow 0.4s;
}

.value-card:hover {
    border-color: rgba(90, 173, 58, 0.25);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.value-icon {
    color: var(--park-green);
    margin-bottom: 1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-subtle);
    border-radius: 6px;
}

.value-card h3 {
    font-family: var(--font-pixel);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.value-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* --- Projects Section --- */
.section--projects {
    border-top: 1px solid var(--border-light);
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-light);
    background: rgba(90, 173, 58, 0.04);
}

.project-status {
    font-family: var(--font-pixel);
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    color: var(--park-green);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--park-green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.project-year {
    font-family: var(--font-pixel);
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.project-body {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    padding: 2rem;
}

.project-title {
    font-family: var(--font-pixel);
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.project-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.project-details p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    line-height: 1.65;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.tag {
    font-family: var(--font-pixel);
    font-size: 0.55rem;
    letter-spacing: 0.1em;
    padding: 0.35rem 0.75rem;
    background: var(--accent-subtle);
    color: var(--accent);
    border: 1px solid rgba(232, 148, 58, 0.15);
    border-radius: 3px;
}

.project-platforms {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.platform-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.platform-item svg {
    opacity: 0.6;
}

.project-links {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

/* Project cover image */
.project-visual {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.project-cover {
    width: 100%;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    image-rendering: pixelated;
    box-shadow: var(--shadow-sm);
}

/* --- Team Section --- */
.section--team {
    border-top: 1px solid var(--border-light);
    background: var(--bg-warm);
}

.team-content {
    max-width: 700px;
}

.team-intro {
    margin-bottom: 3rem;
}

.team-intro h2 {
    font-family: var(--font-body);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.team-intro p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 550px;
}

.team-member {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.member-avatar {
    flex-shrink: 0;
}

.avatar-pixel {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--green-subtle), rgba(232, 148, 58, 0.08));
    border: 2px solid rgba(90, 173, 58, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-pixel);
    font-size: 1.2rem;
    color: var(--park-green);
}

.member-info h3 {
    font-family: var(--font-pixel);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.member-role {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 400;
    display: block;
    margin-bottom: 0.75rem;
}

.member-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.skill-tag {
    font-family: var(--font-pixel);
    font-size: 0.5rem;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.6rem;
    background: var(--green-subtle);
    color: var(--text-muted);
    border: 1px solid rgba(90, 173, 58, 0.12);
    border-radius: 3px;
}

.member-bio {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* --- Connect Section --- */
.section--connect {
    border-top: 1px solid var(--border-light);
    background: #edf4f8;
}

.connect-content h2 {
    font-family: var(--font-body);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.connect-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.social-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    transition: border-color 0.3s, transform 0.3s var(--ease-out), box-shadow 0.3s;
    overflow: hidden;
    min-width: 0;
}

.social-card:hover {
    border-color: rgba(232, 148, 58, 0.25);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.social-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: color 0.3s;
}

.social-card:hover .social-icon {
    color: var(--accent);
}

.social-text {
    min-width: 0;
    overflow: hidden;
}

.social-name {
    font-family: var(--font-pixel);
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    display: block;
    color: var(--text-primary);
    white-space: nowrap;
}

.social-handle {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.connect-email {
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.connect-email p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.email-link {
    font-family: var(--font-pixel);
    font-size: 0.85rem;
    color: var(--accent);
    transition: color 0.3s;
    letter-spacing: 0.03em;
}

.email-link:hover {
    color: var(--accent-hover);
}

/* --- Footer --- */
.footer {
    border-top: 1px solid var(--border-light);
    padding: 3rem 0;
    background: var(--bg-cream);
}

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

.footer-logo {
    font-family: var(--font-pixel);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.footer-tagline {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
    opacity: 0.6;
}

/* --- Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Keyframes --- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes expandLine {
    from { width: 0; }
    to { width: 60%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(2deg); }
    50% { transform: translateY(-5px) rotate(-1deg); }
    75% { transform: translateY(-20px) rotate(1deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.2); transform-origin: top; }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .project-body {
        grid-template-columns: 1fr;
    }

    .project-visual {
        order: -1;
    }

    .team-member {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .member-skills {
        justify-content: center;
    }

    .social-grid {
        grid-template-columns: 1fr;
    }

    .hero-scroll-hint {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 260px;
        justify-content: center;
    }

    .value-card {
        padding: 1.2rem;
    }

    .project-card .project-header {
        padding: 0.75rem 1.25rem;
    }

    .project-body {
        padding: 1.25rem;
    }
}
