@import "https://unpkg.com/open-props";
@import "https://unpkg.com/open-props/normalize.min.css";

:root {
    --primary-color: hsl(27, 97%, 55%);
    --primary-color-darker: hsl(38, 89%, 18%);
    --default-text-color: hsl(0, 0%, 100%);
    --sub-text-color: hsl(0 0% 100% / 0.6);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,body {
    overflow-x: hidden;
}

/* Page base */
body {
    background-color: #0d0d0d;
    font-family: Roboto;
    color: var(--default-text-color);
    padding-top: 80px;
}

/* Navbar */
.topnav {
    width: 100%;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);

    position: fixed;
    top: 0;
    left: 0;

    z-index: 1000;

    background-color: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(10px);

    padding: 16px 24px;

}

/* Center container */
.nav-center {
    width: 100%;
    max-width: 1100px;
    padding: 0 24px;
}

/* Grid layout */
.nav-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Links container */
.nav-links {
    display: flex;
    gap: 28px;
}


/* Individual links */
.nav-links a {
    text-decoration: none;
    color: var(--default-text-color);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.4px;
    transition: color 0.2s ease, opacity 0.2s ease;
}

/* Hover effect */
.nav-links a:hover {
    color: var(--primary-color);
}

/* Brand link */
.brand {
    text-decoration: none;
    color: inherit;
}

.brand:hover .name {
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

/* Text container */
.brand-text {
    display: flex;
    flex-direction: column;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;        /* pushes footer to bottom */
}

/* Name styling */
.name {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Subtitle styling */
.title {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.6;
    margin-top: 2px;
}

/* Tags styling */
.project-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.project-tags span {
    background: var(--primary-color-darker);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--primary-color);
}

/* Arrow */
.project-arrow {
    font-size: 1rem;
    color: var(--default-text-color);
}

/* Hover effect */
.project-card:hover .project-arrow {
    color: var(--primary-color);
}

/* HERO SECTION */
.hero {
    padding: 140px 24px 120px;
    display: flex;
    justify-content: center;
}

.hero-container {
    max-width: 900px;
    text-align: center;
}

/* Headline */
.hero h1 {
    font-size: 3rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
}

/* Subtitle */
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--sub-text-color);
    margin-bottom: 40px;
}

/* Buttons container */
.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

@media (max-width: 600px) {

    .nav-grid {
        flex-direction: column;
        align-items: center;   /* center horizontally */
        text-align: center;    /* center text */
        gap: 12px;
    }

    .nav-links {
        justify-content: center;
        gap: 18px;
    }

    .brand-text {
        align-items: center;   /* center the name + title stack */
    }

}

/* Primary button */
.btn-primary {
    background: var(--primary-color);
    color: var(--default-text-color);
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.btn-primary:hover {
    opacity: 0.85;
}

/* Secondary button */
.btn-secondary {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s ease, border 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--default-text-color);
}

#hero {
    padding: 140px 24px;
    display: flex;
    justify-content: center;
    min-height: calc(100vh - 80px);
}

.hero-container {
    max-width: 1100px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

/* TEXT SIDE */
.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: clamp(1rem, calc(7vw + 1rem), 3rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 20px;
}

.highlight-name {
    color: var(--primary-color);
}
.highlight-link-name {
    color: var(--primary-color);
    text-decoration: none;
}
.highlight-link-name:hover {
    opacity: 0.85;
}

/* Outer container */
.hero-subtitle {
    position: relative;
    overflow: hidden; /* clips content to container */
    white-space: nowrap;
    width: 100%;
    font-size: clamp(0.8rem, 2.5vw, 1rem);
    margin-top: 8px;

    /* Fade effect at edges */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    mask-repeat: no-repeat;
    mask-size: 100% 100%;
}

/* Scroller itself */
.hero-scroller {
    display: flex;
    width: max-content;
    animation: scrollLeft 18s linear infinite;
    will-change: transform;
}

.hero-group {
    display: flex;
    gap: 8px;
    padding-right: 8px; /* spacing between loops */
}

@keyframes scrollLeft {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* Tags */
.hero-scroller .hero-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--primary-color-darker);
    color: var(--primary-color);
    border-radius: 12px;
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 500;
}

.hero-scroller .hero-tag:hover {
    background-color: var(--primary-color); /* full accent color on hover */
    color: var(--default-text-color);                                   /* contrast text */
    transition: background 0.3s, color 0.3s;
}

/* INDIVIDUAL TAG STYLE */
.hero-tag {
    padding: 0 24px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    flex-shrink: 0;
}

/* IMAGE SIDE */
.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

#hero-image {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);

    transform-style: preserve-3d;
    transition: transform 0.4s ease-in-out;
}

.hero-image img {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-image {
        order: -1;
        margin-bottom: 32px;
    }

    .hero-text {
        order: 0;
    }

    .hero-buttons {
        justify-content: center;
    }
}

/* PROJECTS SECTION */
#projects {
    padding: 120px 24px;
    display: flex;
    justify-content: center;
}

.projects-container {
    max-width: 1100px;
    width: 100%;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
}

.projects-header {
    display: flex;
    flex-direction: column; /* stack title + subtitle */
    gap: 8px;               /* spacing between title and subtitle */
    margin-bottom: 40px;    /* spacing before the grid */
}

.section-subtitle {
    font-size: 1rem;
    font-weight: 400;
    color: var(--sub-text-color);
    margin: 0;              /* remove default <p> margin to rely on gap */
    line-height: 1.5;
}

/* GRID */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

/* CARD */
.project-card {
    display: flex;           /* Flex container */
    flex-direction: column;  /* Stack content vertically */
    height: 100%;            /* Ensure full height in grid */
    text-decoration: none;
    color: inherit;
    padding: 32px;
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.25s ease,
                border 0.25s ease,
                background 0.25s ease;
                
}

/* Hover effect */
.project-card:hover {
    border: 1px solid var(--primary-color);
    background: rgba(255,255,255,0.04);
}

.project-card:hover h3 {
    color: var(--primary-color);
}

/* Title */
.project-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

/* Description */
.project-card p {
    font-size: 0.95rem;
    color: var(--sub-text-color);
    margin-bottom: 16px;
}

.project-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* let content grow */
}

.project-main {
    flex-grow: 1;           /* takes all available space */
}

/* Image container */
.project-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 20px;
    position: relative;

    flex-shrink: 0;  /* Prevent shrinking */
}

/* Image styling */
.project-image .card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

/* Smooth zoom effect on hover */
.project-card:hover .project-image .card-image {
    transform: scale(1.05);
}

.engine-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;               /* space between icon and text */
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(0,0,0,0.6);
    color: var(--default-text-color);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 2;
}

.engine-tag img {
    width: 1.4em;             /* scales with font-size */
    height: 1.6em;            /* keeps square ratio */
    object-fit: contain;    /* keeps proportions */
    display: block;
}

.hero-socials {
    margin-top: 40px;
    display: flex;
    gap: 22px;
    justify-content: center;
}

.hero-socials a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;
    border-radius: 50%;

    color: var(--sub-text-color);
    font-size: 1.2rem;

    transition: color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}

.hero-socials a::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--primary-color-darker);

    transform: scale(0.6);
    opacity: 0;

    transition: transform 0.25s ease, opacity 0.25s ease;

    z-index: 0; /* behind icon */
}

.hero-socials a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
    
}

.hero-socials a:hover::before {
    transform: scale(1);
    opacity: 1;
}

.hero-socials a i {
    position: relative;
    z-index: 1;
    transition: transform 0.2s ease;
}

.hero-socials a:hover i {
    transform: scale(1.15);
}

/* ABOUT ME SECTION */
#about-me {
    padding: 120px 24px;
    display: flex;
    justify-content: center;
}

.about-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 60px;
    max-width: 1100px;
    width: 100%;
    text-align: center;
}

/* Image column */
.about-image {
    flex: 1 1 350px;
    max-width: 400px;
}

.about-image img {
    width: 100%;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border: 3px solid var(--primary-color);
}

/* Text column */
.about-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 2 1 400px;
    color: var(--default-text-color);
}

.about-text h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.about-text p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 16px;
    color: var(--sub-text-color);
}

.skills-list {
    list-style: none;
    padding: 0;
    margin-top: 16px;
}

.skills-list li {
    font-size: 0.95rem;
    color: var(--sub-text-color);
    margin-bottom: 8px;
}

/* RESPONSIVE: stack image and text on smaller screens */
@media (max-width: 900px) {
    .about-container {
        flex-direction: column;
        text-align: center;
    }

    .about-image, .about-text {
        max-width: 100%;
    }

    .about-image {
        margin-bottom: 32px;
    }

    .about-text {
        text-align: center;   /* center all text inside */
    }

    .about-text h2 {
        text-align: center;
        margin-left: 0;
        margin-right: 0;
    }

    .about-text p {
        font-size: 0.95rem;
    }
}

/* CONNECT SECTION */
#connect {
    background-color: #0d0d0d;
    padding: 120px 24px;
    display: flex;
    justify-content: center; /* centers container horizontally */
    text-align: center;      /* centers all inner text */
}

.connect-container {
    display: flex;
    flex-direction: column;
    align-items: center;     /* centers heading, paragraph, button, socials vertically */
    gap: 24px;               /* spacing between elements */
    max-width: 800px;
    width: 100%;
    color: var(--default-text-color);
}

/* Heading */
#connect h2 {
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
}

/* Paragraph */
#connect p {
    font-size: 1rem;
    color: var(--sub-text-color);
    line-height: 1.6;
    margin: 0;
}

/* Button */
#connect .btn-primary {
    padding: 12px 28px;
    border-radius: 6px;
    background-color: var(--primary-color);
    color: var(--default-text-color);
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

#connect .btn-primary:hover {
    opacity: 0.85;
}

/* Social Icons */
.connect-socials {
    display: flex;
    gap: 28px;
    justify-content: center;  /* ensures icons are centered */
}

.connect-socials a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;
    border-radius: 50%;

    color: var(--sub-text-color);
    font-size: 1.2rem;

    transition: color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}

.connect-socials a::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--primary-color-darker);

    transform: scale(0.6);
    opacity: 0;

    transition: transform 0.25s ease, opacity 0.25s ease;

    z-index: 0; /* behind icon */
}

.connect-socials a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.connect-socials a:hover::before {
    transform: scale(1);
    opacity: 1;
}

.connect-socials a i {
    position: relative;
    z-index: 1;
    transition: transform 0.2s ease;
}

.connect-socials a:hover i {
    transform: scale(1.15);
}

/* Responsive */
@media (max-width: 900px) {
    #connect {
        padding: 80px 24px;
    }

    #connect h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 900px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* FOOTER */

.site-footer {
    display: flex;
    justify-content: center;
    align-items: center;

    padding: 20px 24px;

    border-top: 1px solid rgba(255,255,255,0.05);

    text-align: center;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.site-footer p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--sub-text-color);
}