/* --- General Styling & Variables --- */
:root {
    --primary-color: #0a0a0a;
    --secondary-color: #1a1a1a;
    --accent-color: #007bff;
    --text-color: #f0f0f0;
    --subtle-text: #a0a0a0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* --- Header & Navigation --- */
header {
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* --- Main Content & Sections --- */
main {
    padding-top: 80px; /* Offset for fixed header */
}

section {
    padding: 4rem 10%;
    border-bottom: 1px solid #2a2a2a;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: baseline;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--accent-color);
}
/* title text animation */
h1 > span {
    display: inline-block;
    overflow: hidden;      
    height: 1.5em;         
    position: relative;    
    

}


h1 > span > span {
    display: block;
    animation: slide 12s infinite ease-in-out;
}


@keyframes slide {
    
    0%, 16%  { transform: translateY(0%); }

    
    20%, 36% { transform: translateY(-100%); }

    
    40%, 56% { transform: translateY(-200%); }

    
    60%, 76% { transform: translateY(-300%); }

    
    80%, 96% { transform: translateY(-400%); }
}

/*project list dropdown*/

ul li a{
    padding: 20px, 25px;
}
ul li ul.dropdown li{
    display: block;
}

ul li ul.dropdown{
    display: block;
    position: absolute;
    z-index: 999;
    display: none
}

ul li:hover ul.dropdown{
    display: block;
    background-color: var(--secondary-color);
    padding: .5rem 1rem;
    border-radius: 5px;
    margin-top: 0rem;
}


p {
    color: var(--subtle-text);
    max-width: 70ch;
    margin: 0 auto;
}


#hero {
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom: none;
}

.hero-text .highlight {
    color: var(--accent-color);
}

#subtitle {
    font-size: 1.5rem;
    color: var(--text-color);
    min-height: 2.2rem;
}


.project-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--secondary-color);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.project-card h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin-top: 1.25rem;
}

.project-tech li {
    padding: 0.25rem 0.8rem;
    border: 1px solid var(--accent-color);
    border-radius: 999px;
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 500;
}

.project-links {
    margin-top: 1.5rem;
}

.project-links a {
    color: var(--text-color);
    background-color: #333;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    margin-right: 0.5rem;
    transition: background-color 0.3s ease;
}

.project-links a:hover {
    background-color: var(--accent-color);
}

/* --- Finished project carousel --- */
.project-carousel {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

#finished-projects {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    align-items: center;
    overflow: hidden;
    padding: 1rem 0;
    -webkit-mask-image: linear-gradient(to right, transparent, black 18%, black 82%, transparent);
    mask-image: linear-gradient(to right, transparent, black 18%, black 82%, transparent);
}

#finished-projects .project-card {
    grid-area: 1 / 1;
    width: 62%;
    justify-self: center;
    min-width: 0;
    transition: none;
    transform-origin: center;
    overflow-wrap: anywhere;
}

.project-arrow {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

.project-arrow:hover {
    color: var(--accent-color);
}

.project-arrow:focus-visible {
    outline: 2px solid var(--text-color);
    outline-offset: 4px;
}

.project-position {
    grid-column: 1 / -1;
    text-align: center;
}

@media (max-width: 600px) {
    .project-carousel { gap: 0.5rem; grid-template-columns: 44px minmax(0, 1fr) 44px; }
    #finished-projects {
        grid-column: 1 / -1;
        grid-row: 1;
        -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
        mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
    }
    #finished-projects .project-card { padding: 1rem; width: 76%; }
    .project-prev { grid-column: 1; grid-row: 2; }
    .project-next { grid-column: 3; grid-row: 2; }
    .project-position { grid-column: 2; grid-row: 2; }
}

/* --- Skills Section --- */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.skill-item {
    background-color: var(--secondary-color);
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    font-weight: 500;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 4rem 2rem;
    background-color: var(--secondary-color);
}

.social-links {
    margin: 1.5rem 0;
}

.social-links a {
    color: var(--text-color);
    font-size: 2rem;
    margin: 0 1rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color);
}

.copyright {
    font-size: 0.9rem;
    color: #666;
}
