/* FONT: SPACE GROTESK */
@font-face {
    font-family: 'Space Grotesk';
    src: url('fonts/SpaceGrotesk/SpaceGrotesk-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Space Grotesk';
    src: url('fonts/SpaceGrotesk/SpaceGrotesk-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Space Grotesk';
    src: url('fonts/SpaceGrotesk/SpaceGrotesk-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1;
}

h1 {
    font-weight: 600;
    font-size: 48px;
}

p {
    font-weight: 400;
    font-size: 16px;
}

/* CONSTANT VARIABLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #0a0a0a;
    --dark-gray: #1a1a1a;
    --medium-gray: #2a2a2a;
    --light-gray: #9a9a9a;
    --red: #ff2e2e;
    --red-dark: #cc0000;
    --white: #ffffff;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    font-size: 16px;
    background-color: var(--black);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* NAVIGATION BAR */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1.5rem 5%;
    border-bottom: 1px solid var(--medium-gray);
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

nav .container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo span {
    color: var(--red);
}

.nav-buttons {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-buttons a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.3s ease;
    position: relative;
}

.nav-buttons a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--red);
    transition: width 0.3s ease;
}

.nav-buttons a:hover {
    color: var(--red);
}

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

/* MAIN SECTION */
.main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 5% 4rem;
    position: relative;
    overflow: hidden;
}

.main-content {
    max-width: 1400px;
    width: 100%;
    display: flex;
    gap: 4rem;
    align-items: center;
    justify-content: space-between;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main h1 {
    font-family: 'Space-Grotesk', sans-serif;
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -0.03em;
    position: relative;
}

.main h1 .line-1 {
    display: block;
    animation: fadeIn 1s ease-out 0.5s backwards;
}

.main h1 .line-2-highlight {
    display: block;
    animation: fadeIn 1s ease-out 0.7s backwards;
}

.main h1 .highlight {
    color: var(--red);
    position: relative;
}

/* Blinking cursor */
.cursor-blink {
    animation: blink 1s step-end infinite;
    margin-left: 10px;
    color: var(--red);
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-description {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: var(--light-gray);
    max-width: 700px;
    margin-bottom: 3rem;
    font-weight: 300;
    animation: fadeIn 1s ease-out 0.9s backwards;
}

/* PHOTO */
.main-photo {
    flex: 1 1 40%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 1s ease-out 1.1s backwards;
}

.photo-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 2px solid var(--medium-gray);
    transition: all 0.4s ease;
}

.photo-container:hover {
    border-color: var(--red);
    transform: translateY(-5px);
}

.photo-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: var(--red);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    z-index: 1;
}

.photo-container:hover::before {
    transform: scaleX(1);
}

.photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: all 0.4s ease;
}

.photo-container img:hover {
    transform: scale(1.05);
}

.photo-container:not(:has(img)),
.photo-container img[src=""],
.photo-container img:not([src]) {
    background: linear-gradient(135deg, var(--medium-gray) 0%, var(--dark-gray) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-container:not(:has(img))::after,
.photo-container img[src=""]::after {
    content: 'RS';
    position: absolute;
    font-size: 6rem;
    font-weight: 700;
    color: var(--red);
    font-family: 'Space-Grotesk', sans-serif;
}

/* SECTIONS */
section {
    padding: 8rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Space-Grotesk', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--light-gray);
    margin-bottom: 4rem;
    font-weight: 300;
}

/* ABOUT ME SECTION */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--light-gray);
    margin-bottom: 1.5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.skill-item {
    padding: 2rem 1.5rem;
    background-color: var(--dark-gray);
    border: 1px solid var(--medium-gray);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 46, 46, 0.1), transparent);
    transition: left 0.6s ease;
}

.skill-item:hover::before {
    left: 100%;
}

.skill-item:hover {
    background-color: var(--medium-gray);
    border-color: var(--red);
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(255, 46, 46, 0.2);
}

.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: bounce-icon 2s ease-in-out infinite;
}

@keyframes bounce-icon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.skill-item:hover .skill-icon {
    animation: spin 0.6s ease;
}

@keyframes spin {
    from {
        transform: rotate(0deg) scale(1);
    }

    to {
        transform: rotate(360deg) scale(1.2);
    }
}

.skill-item h3 {
    font-family: 'Space-Grotesk', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--white);
}

.skill-item p {
    color: var(--light-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* PROJECT SECTION */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.project-card {
    background-color: var(--dark-gray);
    border: 1px solid var(--medium-gray);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--red), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--red);
    box-shadow: 0 15px 40px rgba(255, 46, 46, 0.2);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-image {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, var(--medium-gray) 0%, var(--dark-gray) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space-Grotesk', sans-serif;
    font-size: 4rem;
    color: var(--red);
    border-bottom: 1px solid var(--medium-gray);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1);
}

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

.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 46, 46, 0.2), transparent);
    transition: left 0.6s ease;
}

.project-card:hover .project-image::after {
    left: 100%;
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-family: 'Space-Grotesk', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

.project-card:hover .project-content h3 {
    color: var(--red);
}

.project-content p {
    color: var(--light-gray);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tag {
    padding: 0.4rem 1rem;
    background-color: var(--medium-gray);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--medium-gray);
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: var(--black);
    border-color: var(--red);
    color: var(--red);
    transform: translateY(-2px);
}

/* CONTACT SECTION */

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item h3 {
    font-family: 'Space-Grotesk', sans-serif;
    font-size: 1.2rem;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.contact-item a {
    color: var(--light-gray);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
}

.contact-item a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--red);
    transition: width 0.3s ease;
}

.contact-item a:hover {
    color: var(--red);
    transform: translateX(5px);
}

.contact-item a:hover::after {
    width: 100%;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 2px solid var(--medium-gray);
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: var(--red);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: -1;
}

.social-links a:hover {
    border-color: var(--red);
    color: var(--white);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 46, 46, 0.3);
}

.social-links a:hover::before {
    width: 100%;
    height: 100%;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--light-gray);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    background-color: var(--dark-gray);
    border: 1px solid var(--medium-gray);
    color: var(--white);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--red);
    background-color: var(--medium-gray);
    box-shadow: 0 0 20px rgba(255, 46, 46, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.cta-button {
    padding: 1rem 2.5rem;
    background-color: var(--red);
    color: var(--white);
    border: 2px solid var(--red);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    align-self: flex-start;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: var(--white);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: 0;
}

.cta-button:hover::before {
    width: 400px;
    height: 400px;
}

.cta-button:hover {
    color: var(--red);
    border-color: var(--white);
    box-shadow: 0 10px 30px rgba(255, 46, 46, 0.4);
    transform: translateY(-3px);
}

.cta-button span {
    position: relative;
    z-index: 1;
}

.cta-button:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(255, 46, 46, 0.3);
}

/* FOOTER */

footer {
    border-top: 1px solid var(--medium-gray);
    padding: 3rem 5%;
    text-align: center;
}

footer p {
    color: var(--light-gray);
    font-size: 0.95rem;
}

footer span {
    color: var(--red);
    animation: heartbeat 1.5s ease-in-out infinite;
}

@media (max-width: 968px) {
    .nav-links {
        gap: 1.5rem;
    }

    .main-content {
        flex-direction: column;
        text-align: center;
    }

    .main-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    section {
        padding: 5rem 5%;
    }

    .main {
        padding: 6rem 5% 3rem;
    }
}

@media (max-width: 640px) {
    nav .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.85rem;
    }

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

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}