/* ===========================
   Custom Font Integration
   =========================== */
@font-face {
    font-family: 'Neon';
    src: url('fonts/Neon.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Overpass';
    src: url('fonts/overpass font/overpass-light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Overpass';
    src: url('fonts/overpass font/overpass-regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Overpass';
    src: url('fonts/overpass font/overpass-bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

/* ===========================
   CSS Reset & Base Styles
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Overpass', sans-serif;
    font-weight: 400;
    color: #2c2c2c;
    margin: 0;
}

#container1 {
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: relative;
    background: url('images/textures/background.png') no-repeat center center fixed;
    background-size: cover;
}

#container2 {
    position: absolute;
    top: 0px;
    bottom: 0px;
    left: 0px;
    right: 0px; /* exact value is given through JavaScript */
    overflow: auto;
}

/* Grainy texture overlay */
#container1::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.03) 0px,
            transparent 1px,
            transparent 2px,
            rgba(0, 0, 0, 0.03) 3px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.03) 0px,
            transparent 1px,
            transparent 2px,
            rgba(0, 0, 0, 0.03) 3px
        );
    opacity: 0.4;
    pointer-events: none;
    z-index: 9999;
}

/* ===========================
   Navigation Bar
   =========================== */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background: transparent;
    padding: 1.5rem 2rem;
    z-index: 100000;
}

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

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-tab {
    font-family: 'Overpass', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #2c2c2c;
    text-decoration: none;
    padding: 0.7rem 2.5rem;
    background: url('images/textures/navbar.png') center center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    transition: opacity 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.nav-tab:hover {
    opacity: 0.85;
}

.nav-tab.active {
    opacity: 1;
}

.nav-social {
    display: flex;
    gap: 1rem;
    background: url('images/textures/navbar.png') center center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    padding: 0.7rem 1.5rem;
}

.nav-social a {
    color: #2c2c2c;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-social a:hover {
    opacity: 0.7;
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    margin-top: -80px;
    padding-top: 120px;
    position: relative;
}

.scroll-indicator {
    position: absolute;
    left: 12%;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    z-index: 50;
}

.scroll-indicator p {
    font-family: 'Neon', sans-serif;
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    text-shadow:
        2px 2px 0px #FF6B6B,
        4px 4px 0px #FF8E53,
        6px 6px 15px rgba(0, 0, 0, 0.5);
}

.scroll-indicator .arrow {
    font-family: 'Neon', sans-serif;
    font-size: 2.5rem;
    color: #ffffff;
    display: block;
    text-shadow:
        2px 2px 0px #FF6B6B,
        4px 4px 0px #FF8E53,
        6px 6px 15px rgba(0, 0, 0, 0.5);
}

.hero-plank {
    background: url('images/textures/plank1.png') center center;
    background-size: contain;
    background-repeat: no-repeat;
    padding: 5rem 3rem;
    animation: fadeIn 1.2s ease-in;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-intro {
    font-family: 'Neon', sans-serif;
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-name {
    font-family: 'Neon', sans-serif;
    font-size: 5rem;
    color: #ffffff;
    text-shadow:
        3px 3px 0px #FF6B6B,
        6px 6px 0px #FF8E53,
        9px 9px 20px rgba(0, 0, 0, 0.6);
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.hero-image-link {
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    position: relative;
    z-index: 100;
}

.hero-image {
    margin-top: 2rem;
    display: inline-block;
    animation: fadeIn 1.5s ease-in 0.3s both;
    position: relative;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.hero-image-link:hover .hero-image {
    transform: scale(1.05);
}

.hero-image:hover {
    cursor: pointer;
}

.hero-thumbtack {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: auto;
    z-index: 10;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.hero-image img:not(.hero-thumbtack) {
    width: 400px;
    height: auto;
    display: block;
}

/* ===========================
   Projects Section
   =========================== */
.projects-section {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Neon', sans-serif;
    font-size: 3.5rem;
    color: #ffffff;
    text-align: center;
    text-shadow:
        2px 2px 0px #FF6B6B,
        4px 4px 0px #FF8E53,
        6px 6px 15px rgba(0, 0, 0, 0.5);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-family: 'Overpass', sans-serif;
    font-weight: 400;
    font-size: 1.2rem;
    color: #ffffff;
    text-align: center;
    margin-bottom: 3rem;
    opacity: 0.9;
}

/* ===========================
   Polaroid Grid
   =========================== */
.polaroid-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    padding: 2rem 0;
}

.polaroid {
    background: #ffffff;
    padding: 1.2rem;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(0, 0, 0, 0.1);
    transform: rotate(var(--rotation));
    transition: all 0.4s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    animation: fadeIn 0.8s ease-in both;
}

.thumbtack {
    position: absolute;
    top: -8px;
    left: var(--thumbtack-position);
    width: 40px;
    height: auto;
    z-index: 10;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.polaroid:nth-child(1) { animation-delay: 0.1s; }
.polaroid:nth-child(2) { animation-delay: 0.2s; }
.polaroid:nth-child(3) { animation-delay: 0.3s; }
.polaroid:nth-child(4) { animation-delay: 0.4s; }
.polaroid:nth-child(5) { animation-delay: 0.5s; }
.polaroid:nth-child(6) { animation-delay: 0.6s; }
.polaroid:nth-child(7) { animation-delay: 0.7s; }
.polaroid:nth-child(8) { animation-delay: 0.8s; }
.polaroid:nth-child(9) { animation-delay: 0.9s; }
.polaroid:nth-child(10) { animation-delay: 1s; }

.polaroid:hover {
    transform: rotate(0deg) scale(1.05) translateY(-10px);
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.polaroid-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f0f0f0;
    margin-bottom: 1rem;
    border: 1px solid #d0d0d0;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}

.polaroid-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: 2px solid #e8e8e8;
}

.polaroid-caption {
    text-align: center;
}

.polaroid-caption h3 {
    font-family: 'Neon', sans-serif;
    font-size: 1.6rem;
    color: #2c2c2c;
    margin-bottom: 0.4rem;
}

.polaroid-caption .date {
    font-family: 'Overpass', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.6rem;
}

.polaroid-caption .description {
    font-family: 'Overpass', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    color: #444;
    line-height: 1.4;
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   Responsive Design
   =========================== */

/* Tablets (2 columns) */
@media (max-width: 1024px) {
    .polaroid-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }

    .hero-name {
        font-size: 4.5rem;
    }

    .section-title {
        font-size: 3rem;
    }

    .section-subtitle {
        font-size: 1.1rem;
    }

    .scroll-indicator {
        left: 8%;
    }

    .scroll-indicator p {
        font-size: 1.5rem;
    }

    .scroll-indicator .arrow {
        font-size: 2rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-tab {
        font-size: 1rem;
        padding: 0.4rem 1rem;
    }
}

/* Mobile (1 column) */
@media (max-width: 768px) {
    .polaroid-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem 0;
    }

    .navbar {
        padding: 1rem;
    }

    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-tab {
        font-size: 0.9rem;
        padding: 0.6rem 1.5rem;
    }

    .hero {
        min-height: 80vh;
        padding: 1rem;
    }

    .hero-plank {
        padding: 3rem 1.5rem;
    }

    .hero-intro {
        font-size: 1.5rem;
    }

    .hero-name {
        font-size: 3rem;
        text-shadow:
            2px 2px 0px #FF6B6B,
            4px 4px 0px #FF8E53,
            6px 6px 15px rgba(0, 0, 0, 0.6);
    }

    .hero-thumbtack {
        width: 40px;
        top: -12px;
    }

    .hero-image img:not(.hero-thumbtack) {
        width: 300px;
        height: auto;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .scroll-indicator {
        display: none;
    }

    .projects-section {
        padding: 3rem 1rem;
    }

    .polaroid {
        max-width: 400px;
        margin: 0 auto;
    }

    .polaroid-caption h3 {
        font-size: 1.4rem;
    }

    .polaroid-caption .description {
        font-size: 0.9rem;
    }

    .thumbtack {
        width: 35px;
        top: -6px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .hero-plank {
        padding: 2.5rem 1rem;
    }

    .hero-name {
        font-size: 2.5rem;
    }

    .hero-intro {
        font-size: 1.2rem;
    }

    .hero-thumbtack {
        width: 35px;
        top: -10px;
    }

    .hero-image img:not(.hero-thumbtack) {
        width: 250px;
        height: auto;
    }

    .section-title {
        font-size: 2rem;
    }

    .nav-tab {
        font-size: 0.8rem;
        padding: 0.5rem 1.2rem;
    }

    .nav-social {
        gap: 1rem;
    }

    .nav-social a {
        width: 40px;
        height: 40px;
    }

    .nav-social svg {
        width: 20px;
        height: 20px;
    }

    .thumbtack {
        width: 30px;
        top: -5px;
    }
}
