* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0d1117;
    color: #e6edf3;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    user-select: none;
}

body.game-active {
    user-select: none;
}

body.light-mode {
    background-color: #ffffff;
    color: #0d1117;
}

body.light-mode nav {
    background-color: rgba(255, 255, 255, 0.9);
}

body.light-mode .nav-links a {
    color: #0d1117;
}

body.light-mode .project-card {
    background-color: #f0f0f0;
    border-color: #d0d0d0;
}

body.light-mode .form-group input,
body.light-mode .form-group textarea {
    background-color: #f0f0f0;
    border-color: #d0d0d0;
    color: #0d1117;
}

body.light-mode #catch-btn {
    background-color: transparent !important;
    color: #58a6ff !important;
    border-color: #58a6ff !important;
}

body.light-mode #catch-btn:hover {
    background-color: #58a6ff !important;
    color: #ffffff !important;
}

body.light-mode #phantom-cursor {
    background-color: #0d1117;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    z-index: 100;
    background-color: rgba(13, 17, 23, 0.9);
    backdrop-filter: blur(10px);
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #58a6ff;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: #e6edf3;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #58a6ff;
}

#hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}


.hero-content {
    position: relative;
    z-index: 1;
}

.hero-greeting {
    font-size: 1.2rem;
    color: #58a6ff;
    margin-bottom: 10px;
}

.hero-name {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 300;
    color: #8b949e;
    margin-bottom: 30px;
}

.hero-btn {
    display: inline-block;
    padding: 12px 30px;
    border: 2px solid #58a6ff;
    color: #58a6ff;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.hero-btn:hover {
    background-color: #58a6ff;
    color: #0d1117;
}

#about {
    padding: 100px 40px;
    max-width: 1100px;
    margin: 0 auto;
}

#about h2 {
    font-size: 2rem;
    color: #58a6ff;
    margin-bottom: 20px;
}

.about-container {
    display: flex;
    gap: 60px;
    align-items: center;
}

.about-image img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    object-position: center 30%;
    border-radius: 50%;
    border: 3px solid #58a6ff;
}

.about-text p {
    color: #8b949e;
    margin-bottom: 15px;
    font-size: 1rem;
}

#skills {
    padding: 60px 40px 100px;
    max-width: 1100px;
    margin: 0 auto;
}

#skills h2 {
    font-size: 2rem;
    color: #58a6ff;
    margin-bottom: 40px;
    text-align: center;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
}

.skill-tile {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: default;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.35s ease,
                border-color 0.35s ease;
}

.skill-tile img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.skill-tile span {
    color: #8b949e;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.35s ease;
}

.skill-tile:hover {
    transform: translateY(-8px) scale(1.08);
    box-shadow: 0 12px 30px -8px var(--brand);
    border-color: var(--brand);
}

.skill-tile:hover img {
    transform: scale(1.1);
}

.skill-tile:hover span {
    color: #e6edf3;
}

body.light-mode .skill-tile {
    background-color: #f0f0f0;
    border-color: #d0d0d0;
}

body.light-mode .skill-tile span {
    color: #0d1117;
}

/* GitHub-specific: invert to white in dark mode */
.skill-tile img[alt="GitHub"] {
    filter: invert(1);
}

.skill-tile img[alt="CSS3"] {
    filter: invert(39%) sepia(90%) saturate(1200%) hue-rotate(182deg) brightness(95%);
}

body.light-mode .skill-tile img[alt="GitHub"] {
    filter: none;
}

#projects {
    padding-top: 260px;
    padding-bottom: 100px;
}

#projects .projects-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
}

#projects h2 {
    font-size: 2rem;
    color: #58a6ff;
    margin-bottom: 20px;
    padding: 0 40px;
    text-align: center;
}

.browser-frame {
    border-radius: 10px;
    overflow: hidden;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.3),
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 30px 60px -15px rgba(88, 166, 255, 0.15),
        0 50px 100px -20px rgba(0, 0, 0, 0.5);
    transform: translateY(0);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.browser-frame:hover {
    transform: translateY(-12px);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 16px 40px rgba(0, 0, 0, 0.4),
        0 50px 90px -15px rgba(88, 166, 255, 0.28),
        0 80px 150px -20px rgba(0, 0, 0, 0.55);
}

.browser-bar {
    background-color: #1e2330;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.browser-dots {
    display: flex;
    gap: 6px;
}

.browser-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
}

.browser-dots span:nth-child(1) { background-color: #ff5f57; }
.browser-dots span:nth-child(2) { background-color: #febc2e; }
.browser-dots span:nth-child(3) { background-color: #23c840; }

.browser-address {
    background-color: #2d3244;
    color: #8b949e;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 4px;
    flex: 1;
}

.browser-frame img {
    width: 100%;
    display: block;
}
 
.project {
    display: flex;
    align-items: center;
    min-height: 500px;
    margin-bottom: 120px;
    position: relative;
    gap: 60px;
    padding: 40px;
}

.image-left .project-image {
    margin-left: 0;
    padding-left: 0;
}



.project-image {
    width: 60%;
    position: relative;
    flex-shrink: 0;
    margin-right: 0;
    z-index: 1;
}

.project-image img {
    width: 100%;
    height: auto;
    object-position: top;
    display: block;
}

.project.image-right {
    flex-direction: row-reverse;
}

.project-info {
    width: 40%;
    padding: 0 60px;
    position: relative;
    z-index: 2;
}

.project-info h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    line-height: 1.8;
}

.project-tech {
    display: flex;
    gap: 14px;
    margin: 20px 0 24px;
    flex-wrap: wrap;
}

.image-right .project-tech {
    justify-content: flex-end;
}

.project-tech img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    opacity: 0.75;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-tech img:hover {
    opacity: 1;
    transform: translateY(-3px);
}

.project-link {
    color: #58a6ff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #e6edf3;
}

#contact {
    padding: 100px 40px;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

#contact h2 {
    font-size: 2rem;
    color: #58a6ff;
    margin-bottom: 15px;
}

#contact p {
    color: #8b949e;
    margin-bottom: 40px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 14px;
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #e6edf3;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #58a6ff;
}

button[type="submit"] {
    padding: 14px 30px;
    background-color: #58a6ff;
    color: #0d1117;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #79b8ff;
}

footer {
    text-align: center;
    padding: 30px 40px;
    border-top: 1px solid #30363d;
    color: #8b949e;
    font-size: 0.85rem;
}

footer p {
    margin-bottom: 5px;
}

/*Mouse Styles*/
#mouse-character {
    position: absolute;
    width: 64px;
    height: 64px;
    z-index: 9999;
    image-rendering: pixelated;
}

#phantom-cursor {
  position: fixed;
  width: 12px;
  height: 12px;
  background-color: #e6edf3;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  display: none;
}

#catch-btn {
    position: absolute;
    z-index: 99998;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #58a6ff;
    background-color: #161b22;
    border: 1px solid #58a6ff;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

#catch-btn:hover {
    background-color: #58a6ff;
    color: #0d1117;
}

/* Tablets */
@media (max-width: 900px) {
    nav {
        padding: 15px 20px;
    }
    
    .nav-links {
        gap: 20px;
    }
    
    .hero-name {
        font-size: 2.8rem;
    }
    
    .hero-title {
        font-size: 1.15rem;
        padding: 0 20px;
    }
    
    #about {
        padding: 80px 20px;
    }
    
    .about-container {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .about-image img {
        width: 200px;
        height: 200px;
    }
    
    #projects {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    
    #projects .projects-container {
        padding: 0 20px;
    }
    
    .project {
        flex-direction: column;
        min-height: auto;
        margin-bottom: 50px;
        gap: 30px;
    }
    
    .project-image {
        width: 100%;
        margin-right: 0;
    }

    .image-right .project-info {
        text-align: left;
    }

    .image-right .project-tech {
        justify-content: flex-start;
    }
    
    .project-info {
        width: 100%;
        padding: 10px 0;
    }

    .project-info h3 {
        font-size: 1.3rem;
        line-height: 1.3;
    }

    .project-tech img {
        width: 24px;
        height: 24px;
    }
    
    .browser-frame {
        transform: none;
    }
    
    .browser-frame:hover {
        transform: none;
    }

    .project.image-right {
        flex-direction: column;
    }
}

/* Phones */
@media (max-width: 600px) {
    nav {
        padding: 12px 16px;
    }
    
    .nav-logo {
        font-size: 1.2rem;
    }
    
    .nav-links {
        gap: 15px;
    }
    
    .nav-links a {
        font-size: 0.85rem;
    }
    
    .hero-name {
        font-size: 2.2rem;
    }
    
    .hero-title {
        font-size: 1rem;
    }
    
    .hero-greeting {
        font-size: 1rem;
    }
    
    #skills {
        padding: 40px 20px 60px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 12px;
    }
    
    .skill-tile {
        padding: 16px 10px;
    }
    
    .skill-tile img {
        width: 36px;
        height: 36px;
    }
    
    .skill-tile span {
        font-size: 0.75rem;
    }

    .project-tech img {
        width: 20px;
        height: 20px;
    }

    .project-tech {
        gap: 10px;
    }
    
    #contact {
        padding: 60px 20px;
    }
    
    /* Disable catch game on mobile — pointer lock is awkward on touch */
    #catch-btn {
        display: none !important;
    }
}

