*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}
* {
    max-width: 100%;
}

button {
    cursor: pointer;
}

@font-face {
    font-family: 'Inter';
    src:
        local('Inter Regular'),
        url('../fonts/Inter-Regular.woff2') format('woff2'),
        url('../fonts/Inter-Regular.woff') format('woff'),
        url('../fonts/Inter-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src:
        local('Inter Medium'),
        url('../fonts/Inter-Medium.woff2') format('woff2'),
        url('../fonts/Inter-Medium.woff') format('woff'),
        url('../fonts/Inter-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src:
        local('Inter SemiBold'),
        url('../fonts/Inter-SemiBold.woff2') format('woff2'),
        url('../fonts/Inter-SemiBold.woff') format('woff'),
        url('../fonts/Inter-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src:
        local('Inter Bold'),
        url('../fonts/Inter-Bold.woff2') format('woff2'),
        url('../fonts/Inter-Bold.woff') format('woff'),
        url('../fonts/Inter-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-primary: #1a1a1d;
    --bg-secondary: #4e4e50;
    --accent-dark: #6f2232;
    --accent-medium: #950740;
    --accent-bright: #c3073f;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
}

body {
    font-family: 'Inter';
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 400;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.cursor-glow {
    position: fixed;
    width: 256px;
    height: 256px;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.15;
    background: radial-gradient(circle, var(--accent-bright) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    z-index: 9999;
    mix-blend-mode: screen;
    transition: opacity 0.3s ease;
}

@media (pointer: coarse) {
    .cursor-glow {
        display: none;
    }
}

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: var(--bg-primary);
    padding: 20px;
}

.hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 64px;
    width: 100%;
}

.hero-text {
    flex: 1;
    text-align: left;
}

.hero-photo-wrap {
    flex-shrink: 0;
    opacity: 0;
    transform: translateX(-30px);
    animation: fadeInLeft 0.8s ease 0.3s forwards;
}

.hero-photo-frame {
    position: relative;
    width: 320px;
    height: 460px;
    border-radius: 4px 60px 4px 60px;
    overflow: hidden;
    border: 2px solid var(--accent-bright);
    box-shadow:
        8px 8px 0 var(--accent-dark),
        0 0 60px rgba(195, 7, 63, 0.2);
}

.hero-photo-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(195, 7, 63, 0.15) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    filter: grayscale(15%);
    transition: filter 0.4s ease;
}

.hero-photo-frame:hover .hero-photo {
    filter: grayscale(0%);
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-title {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.7s ease forwards;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    margin-top: 16px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.7s ease 0.1s forwards;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: flex-start;
    align-items: center;
    margin-top: 48px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.7s ease 0.2s forwards;
}

.hero-buttons .btn {
    white-space: nowrap;
    flex: 0 1 auto;
    min-width: fit-content;
}

.btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--accent-bright);
    color: white;
}
.btn-primary:hover {
    background-color: var(--accent-medium);
    transform: scale(1.05);
}

.btn-outline {
    background-color: transparent;
    color: white;
    border: 2px solid var(--accent-bright);
}
.btn-outline:hover {
    background-color: var(--accent-bright);
    transform: scale(1.05);
}

.scroll-arrow {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn 0.7s ease 0.5s forwards;
    cursor: pointer;
}

.scroll-arrow svg {
    width: 32px;
    height: 32px;
    color: var(--accent-bright);
    animation: bounce 2s infinite;
}

.dot {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
}
.dot-1 {
    width: 8px;
    height: 8px;
    background-color: var(--accent-bright);
    top: 80px;
    left: 10%;
}
.dot-2 {
    width: 12px;
    height: 12px;
    background-color: var(--accent-medium);
    top: 160px;
    right: 20%;
    opacity: 0.4;
}
.dot-3 {
    width: 8px;
    height: 8px;
    background-color: var(--accent-dark);
    bottom: 160px;
    left: 20%;
}

.about {
    padding: 96px 20px;
    background-color: var(--bg-secondary);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
    opacity: 0;
    transform: translateY(30px);
}

.section-title.visible {
    animation: fadeInUp 0.6s ease forwards;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}

@media (min-width: 768px) {
    .about-content {
        grid-template-columns: 1fr 1fr;
    }
}

.about-text {
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.8;
    opacity: 0;
    transform: translateY(30px);
}

.about-text.visible {
    animation: fadeInUp 0.6s ease 0.1s forwards;
}
.about-text p {
    margin-bottom: 20px;
}

.about-icons {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
}

.icon-box {
    width: 56px;
    height: 56px;
    background-color: var(--bg-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-box svg {
    width: 28px;
    height: 28px;
}
.icon-box.code svg {
    color: var(--accent-bright);
}
.icon-box.palette svg {
    color: var(--accent-medium);
}
.icon-box.terminal svg {
    color: var(--accent-dark);
}

.skills-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: white;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tag {
    padding: 8px 16px;
    background-color: var(--accent-dark);
    color: white;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

.skill-tag.visible {
    animation: fadeInUp 0.4s ease forwards;
}
.skill-tag:hover {
    background-color: var(--accent-medium);
    transform: translateY(-2px);
}

.pet-projects {
    padding: 96px 20px;
    background-color: var(--bg-primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 640px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.project-card {
    background-color: var(--bg-secondary);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
}

.project-card.visible {
    animation: fadeInUp 0.6s ease forwards;
}
.project-card:hover {
    border-color: var(--accent-bright);
    transform: translateY(-4px);
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}
.project-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 16px;
}
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tech-tag {
    padding: 4px 12px;
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    border-radius: 9999px;
    font-size: 0.75rem;
}

.project-links {
    display: flex;
    gap: 16px;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--accent-bright);
}
.project-link svg {
    width: 20px;
    height: 20px;
}

.simple-projects {
    padding: 96px 20px;
    background-color: var(--bg-secondary);
}

.section-desc {
    text-align: center;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    font-size: 1rem;
    opacity: 0;
    transform: translateY(30px);
}

.section-desc.visible {
    animation: fadeInUp 0.6s ease 0.1s forwards;
}

.simple-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
    overflow: hidden;
    min-width: 0;
}

@media (max-width: 768px) {
    .simple-grid {
        grid-template-columns: 1fr;
    }
}
.simple-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background-color: var(--bg-primary);
    border-radius: 12px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
    min-width: 0;
    overflow: hidden;
    width: 100%;
}

.simple-item.visible {
    animation: fadeInUp 0.6s ease forwards;
}
.simple-item:hover {
    background-color: #2a2a2d;
}
.simple-item:hover .simple-arrow {
    color: var(--accent-bright);
    transform: translateX(4px);
}

.simple-icon {
    width: 48px;
    height: 48px;
    background-color: var(--accent-dark);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
}

.simple-item:hover .simple-icon {
    background-color: var(--accent-medium);
}
.simple-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.simple-info {
    flex: 1;
    min-width: 0;
}
.simple-title {
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.simple-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.simple-arrow {
    color: var(--text-secondary);
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.simple-arrow svg {
    width: 20px;
    height: 20px;
}

.footer {
    padding: 48px 20px;
    background-color: var(--bg-primary);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-name {
    font-weight: 600;
    font-size: 1.125rem;
    color: white;
}
.footer-copy {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 4px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: var(--bg-secondary);
    border-radius: 50%;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--accent-bright);
    color: white;
}
.social-link svg {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--bg-secondary);
    text-align: center;
}
.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}
@media (max-width: 900px) {
    .hero-inner {
        flex-direction: column-reverse;
        text-align: center;
        gap: 40px;
    }
    .hero-text {
        text-align: center;
    }
    .hero-photo-frame {
        width: 220px;
        height: 320px;
    }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        padding: 0 16px;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
}
@media (max-width: 320px) {
    .hero-buttons .btn {
        font-size: 0.85rem;
        padding: 10px 16px;
    }
}
