@property --grad-stop {
    syntax: '<percentage>';
    inherits: false;
    initial-value: 40%;
}

@font-face {
  font-display: swap;
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/poppins-v24-latin-regular.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  src: url('fonts/poppins-v24-latin-600.woff2') format('woff2');
}

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

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #111;
    color: white;
}

/* Navbar */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: #111;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #888;
}

/* Hero Section */
.hero {
    width: 100%;
    height: clamp(260px, 38vw, 440px);
    overflow: hidden;
    position: relative;
}

.page-om-mig .hero {
    height: clamp(170px, 24vw, 280px);
}

.hero::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 35%;
    background: linear-gradient(to bottom, #111 0%, rgba(17, 17, 17, 0.6) 40%, rgba(17, 17, 17, 0) 100%);
    pointer-events: none;
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 55%;
    background: linear-gradient(to bottom, rgba(17, 17, 17, 0) 0%, rgba(17, 17, 17, 0.75) 50%, rgba(17, 17, 17, 0.95) 80%, #111 100%);
    pointer-events: none;
}

.hero img {
    width: 100%;
    height: 100%;
    display: block;
    transform: scale(1.16);
    transform-origin: center center;
    object-fit: cover;
    filter: brightness(0.7);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 640px;
    z-index: 1;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.55);
}

/* Intro Section */
.intro-section {
    padding: 0;
    margin: 0;
    text-align: left;
}

.intro-section h1 {
    font-size: 3.5rem;
    margin-bottom: 30px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.25), 0 4px 12px rgba(0, 0, 0, 0.8);
}

.intro-accent {
    color: #515151;
}

.intro-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #aaa;
}

/* Projects Section */
.projects-section {
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.project-item {
    overflow: hidden;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    display: block;
    opacity: 0;
    transform: translateY(12px) scale(0.985);
    animation: project-item-in 0.32s ease-out forwards;
    will-change: transform, opacity;
}

.project-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.5s ease;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.4) var(--grad-stop), transparent 100%);
    transition: --grad-stop 0.4s ease;
    pointer-events: none;
}

.project-overlay h2 {
    position: absolute;
    bottom: 12px;
    left: 20px;
    color: white;
    font-size: 1.2rem;
    font-weight: normal;
    text-align: left;
    z-index: 2;
    transition: bottom 0.4s ease;
}

.project-item:hover .project-overlay {
    --grad-stop: 60%;
}

.project-item:hover .project-overlay h2 {
    bottom: 20px;
}

@keyframes project-item-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.project-item:nth-child(1) { animation-delay: 0.02s; }
.project-item:nth-child(2) { animation-delay: 0.05s; }
.project-item:nth-child(3) { animation-delay: 0.08s; }
.project-item:nth-child(4) { animation-delay: 0.11s; }
.project-item:nth-child(5) { animation-delay: 0.14s; }
.project-item:nth-child(6) { animation-delay: 0.17s; }
.project-item:nth-child(7) { animation-delay: 0.20s; }
.project-item:nth-child(8) { animation-delay: 0.23s; }
.project-item:nth-child(9) { animation-delay: 0.26s; }
.project-item:nth-child(10) { animation-delay: 0.29s; }
.project-item:nth-child(11) { animation-delay: 0.32s; }
.project-item:nth-child(12) { animation-delay: 0.35s; }
.project-item:nth-child(13) { animation-delay: 0.38s; }
.project-item:nth-child(14) { animation-delay: 0.41s; }
.project-item:nth-child(15) { animation-delay: 0.44s; }
.project-item:nth-child(16) { animation-delay: 0.47s; }
.project-item:nth-child(17) { animation-delay: 0.50s; }
.project-item:nth-child(18) { animation-delay: 0.53s; }
.project-item:nth-child(19) { animation-delay: 0.56s; }
.project-item:nth-child(20) { animation-delay: 0.59s; }
.project-item:nth-child(21) { animation-delay: 0.62s; }
.project-item:nth-child(22) { animation-delay: 0.65s; }
.project-item:nth-child(23) { animation-delay: 0.68s; }
.project-item:nth-child(24) { animation-delay: 0.71s; }
.project-item:nth-child(25) { animation-delay: 0.74s; }
.project-item:nth-child(26) { animation-delay: 0.77s; }
.project-item:nth-child(27) { animation-delay: 0.80s; }
.project-item:nth-child(28) { animation-delay: 0.83s; }
.project-item:nth-child(29) { animation-delay: 0.86s; }
.project-item:nth-child(30) { animation-delay: 0.89s; }

@media (prefers-reduced-motion: reduce) {
    .project-item {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

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

@media (max-width: 600px) {
    .hero {
        height: clamp(220px, 65vw, 300px);
    }

    .hero-content {
        left: 50%;
        max-width: none;
        padding-top: 35px;
    }

    .intro-section h1 {
        font-size: 2rem;
        letter-spacing: 0.02em;
    }

    .intro-section p {
        font-size: 1rem;
    }

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

    .project-overlay h2 {
        font-size: 1.1rem;
    }

    .project-overlay {
        --grad-stop: 20%;
    }

    .project-item:hover .project-overlay {
        --grad-stop: 20%;
    }

    .project-item:hover .project-overlay h2 {
        bottom: 12px;
    }


}

/* Project Detail Page */
.project-detail {
    padding: 60px 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.project-detail h1 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    font-weight: normal;
}

.project-detail h2 {
    font-size: 2rem;
    margin-top: 60px;
    margin-bottom: 40px;
    text-align: center;
    font-weight: normal;
}

.project-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.project-content img {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: block;
}

.project-description {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.project-description p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 10px;
}

.project-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 0 auto;
}

.project-images img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Centered single-image layout for project pages */
.project-images.centered {
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-images.centered .centered-image {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    display: block;
}

@media (max-width: 768px) {
    .project-images {
        grid-template-columns: 1fr;
    }
}

.project-steps {
    max-width: 1400px;
    margin: 0 auto;
    margin-left: 80px;
    margin-right: 80px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.step-row {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 30px;
    align-items: center;
}

.step-row img {
    width: 100%;
    height: auto;
    display: block;
}

.step-text p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .step-row {
        grid-template-columns: 1fr;
    }
    
    .project-steps {
        margin-left: 0;
        margin-right: 0;
    }
}

.project-steps.centered-text {
    text-align: center;
    gap: 10px;
}

.project-steps.centered-text p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* About Page */
.about-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
}

/* Social Icons */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
}

.social-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #222;
    border: 1px solid #444;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    background-color: #333;
    border-color: #666;
    transform: scale(1.1);
}

.social-icon svg {
    width: 30px;
    height: 30px;
}

.social-text {
    font-size: 0.9rem;
    color: #999;
}

@media (max-width: 768px) {
    .social-icons {
        flex-direction: column;
        gap: 40px;
    }
}
