/* ================================
   RESET & ROOT VARIABLES
   ================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --white: #FFFFFF;
    --black: #000000;
    --gray: #666666;
    --light-gray: #e0e0e0;
    --section-padding: 120px;
    --section-horizontal: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    background: var(--white);
    color: var(--black);
    line-height: 1.8;
    overflow-x: hidden;
}

/* ================================
   NAVIGATION
   ================================ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    z-index: 1000;
    padding: 40px var(--section-horizontal);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

nav.scrolled {
    padding: 24px var(--section-horizontal);
    border-bottom: 1px solid var(--light-gray);
}

nav .logo {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--black);
}

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

nav .nav-links a {
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--black);
    transition: color 0.2s ease;
}

nav .nav-links a:hover {
    color: var(--gray);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
}

.hamburger span {
    width: 24px;
    height: 1px;
    background: var(--black);
    transition: all 0.3s ease;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    z-index: 999;
    padding: 100px 40px;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--black);
}

.close-menu {
    position: absolute;
    top: 40px;
    right: 40px;
    font-size: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--black);
}

/* ================================
   HERO SECTION
   ================================ */
#hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 var(--section-horizontal);
}

#hero h1 {
    font-size: 72px;
    font-weight: 300;
    letter-spacing: -1px;
    margin-bottom: 24px;
}

#hero p {
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 0.5px;
    max-width: 800px;
}

/* ================================
   SECTIONS
   ================================ */
section {
    padding: var(--section-padding) var(--section-horizontal);
}

.section-container {
    max-width: 800px;
    margin: 0 auto;
}

.section-title {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 48px;
}

/* ================================
   ABOUT
   ================================ */
#about p {
    font-size: 16px;
    margin-bottom: 24px;
}

/* ================================
   EXPERIENCES
   ================================ */
#experiences .section-container {
    max-width: 900px;
}

.experience {
    margin-bottom: 80px;
}

.experience:last-child {
    margin-bottom: 0;
}

.experience h3 {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 8px;
}

.experience .role {
    font-size: 18px;
    font-weight: 300;
    margin-bottom: 8px;
}

.experience .time {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 16px;
}

.experience ul {
    list-style: none;
    padding-left: 16px;
}

.experience ul li {
    font-size: 16px;
    margin-bottom: 8px;
    position: relative;
}

.experience ul li:before {
    content: "•";
    position: absolute;
    left: -16px;
}

/* ================================
   PROJECTS
   ================================ */
#projects .section-container {
    max-width: 1200px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px 80px;
}

.project h3 {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 16px;
}

.project p {
    font-size: 16px;
    margin-bottom: 12px;
}

.project .tools {
    font-size: 14px;
    color: var(--gray);
}

/* ================================
   SKILLS
   ================================ */
#skills .section-container {
    max-width: 1000px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 80px;
}

.skill-category {
    margin-bottom: 48px;
}

.skill-category:last-child {
    margin-bottom: 0;
}

.skill-category h3 {
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 24px;
}

.skill-category ul {
    list-style: none;
}

.skill-category ul li {
    font-size: 16px;
    margin-bottom: 12px;
}

/* ================================
   CONTACT
   ================================ */
#contact .section-container {
    max-width: 600px;
}

#contact a {
    display: block;
    font-size: 16px;
    color: var(--black);
    text-decoration: none;
    margin-bottom: 16px;
    transition: color 0.2s ease;
}

#contact a:hover {
    color: var(--gray);
}

/* ================================
   BLOG PAGE
   ================================ */
#blog-header {
    padding: 160px var(--section-horizontal) 80px;
}

#blog-header .section-container {
    max-width: 800px;
}

.search-bar {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid var(--black);
    font-size: 16px;
    font-weight: 300;
    background: transparent;
    margin-bottom: 32px;
    outline: none;
}

.filters {
    display: flex;
    gap: 24px;
}

.filters button {
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: none;
    border: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filters button.active {
    border-bottom: 2px solid var(--black);
}

.filters button:hover {
    opacity: 0.7;
}

/* ================================
   BLOG POSTS
   ================================ */
.post-preview {
    margin-bottom: 64px;
    padding-bottom: 64px;
    border-bottom: 1px solid var(--light-gray);
}

.post-preview:last-child {
    border-bottom: none;
}

.post-preview h2 {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 16px;
}

.post-preview p {
    font-size: 16px;
    margin-bottom: 12px;
}

.post-preview .date {
    font-size: 14px;
    color: var(--gray);
}

/* ================================
   GALLERY
   ================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 40px var(--section-horizontal);
}

.gallery-item {
    aspect-ratio: 1;
    background: var(--light-gray);
    cursor: pointer;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ================================
   LIGHTBOX
   ================================ */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    z-index: 2000;
    padding: 40px;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 40px;
    right: 40px;
    font-size: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--black);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--black);
}

.lightbox-nav.prev {
    left: 40px;
}

.lightbox-nav.next {
    right: 40px;
}

/* ================================
   PAGE SWITCHING
   ================================ */
.page {
    display: none;
    opacity: 0;
    transform: translateY(12px);
}

.page.active {
    display: block;
    animation: pageTransition 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes pageTransition {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================
   SCROLL REVEAL ANIMATIONS
   ================================ */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grouped items */
.reveal-on-scroll:nth-child(1) {
    transition-delay: 0s;
}

.reveal-on-scroll:nth-child(2) {
    transition-delay: 0.1s;
}

.reveal-on-scroll:nth-child(3) {
    transition-delay: 0.2s;
}

.reveal-on-scroll:nth-child(4) {
    transition-delay: 0.3s;
}

.reveal-on-scroll:nth-child(5) {
    transition-delay: 0.4s;
}

.reveal-on-scroll:nth-child(6) {
    transition-delay: 0.5s;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 1023px) {
    :root {
        --section-padding: 80px;
        --section-horizontal: 60px;
    }

    #hero h1 {
        font-size: 60px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    :root {
        --section-padding: 60px;
        --section-horizontal: 24px;
    }

    nav .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    #hero h1 {
        font-size: 48px;
    }

    #hero p {
        font-size: 16px;
    }

    .section-title {
        font-size: 12px;
    }

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

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

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

    .filters {
        flex-wrap: wrap;
    }
}

/* ================================
   BLOG DROPDOWN MENU
   ================================ */
.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 16px;
    background: var(--white);
    border: 1px solid var(--light-gray);
    list-style: none;
    padding: 16px 0;
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 100;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--black);
    transition: color 0.2s ease, background 0.2s ease;
}

.dropdown-menu a:hover {
    background: #fafafa;
    color: var(--gray);
}
/* ================================
   ABOUT PHOTO CIRCLE
   ================================ */
.about-photo-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 48px;
}

.about-photo-circle {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    border: 1px solid var(--light-gray);
    overflow: hidden;
}

.about-photo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 767px) {
    .about-photo-circle {
        width: 140px;
        height: 140px;
    }
}
/* ================================
   BUTTONS
   ================================ */
.button {
    display: inline-block;
    padding: 14px 32px;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--black);
    background: var(--white);
    border: 1px solid var(--black);
    transition: background 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.button:hover {
    background: #fafafa;
    color: var(--gray);
}

.cv-button {
    margin-top: 32px;
}

/* ================================
   SECTION HEADER
   ================================ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 64px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header .section-title {
    margin-bottom: 0;
}

.text-link {
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--black);
    background: none;
    border: none;
    border-bottom: 1px solid transparent;
    padding: 0 0 2px 0;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.text-link:hover {
    color: var(--gray);
    border-bottom-color: var(--gray);
}

/* Keep aligned on mobile */
@media (max-width: 767px) {
    .section-header {
        flex-direction: row; /* Keep horizontal */
        justify-content: space-between;
        align-items: center;
    }
}

/* ================================
   ALL PROJECTS PAGE
   ================================ */
#all-projects-hero {
    padding: 160px var(--section-horizontal) 80px;
    text-align: center;
}

#all-projects-hero .section-container {
    max-width: 800px;
}

.page-heading {
    font-size: 48px;
    font-weight: 300;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.page-subheading {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 32px;
    color: var(--gray);
}

.back-link {
    font-size: 13px;
    display: inline-block;
}

#all-projects-grid {
    padding: 40px var(--section-horizontal) var(--section-padding);
}

#all-projects-grid .section-container {
    max-width: 1200px;
}

@media (max-width: 767px) {
    .page-heading {
        font-size: 36px;
    }
    
    #all-projects-hero {
        padding: 120px var(--section-horizontal) 60px;
    }
}

/* ================================
   LOGO MODES (EMPTY/TEXT)
   ================================ */
.logo {
    display: flex;
    align-items: center;
    min-width: 150px; /* Prevent layout shift */
}

.logo-text {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Empty Mode (default on hero) */
.logo-empty-mode .logo-text {
    opacity: 0;
    transform: translateX(-8px);
}

/* Text Mode (on scroll/other pages) */
.logo-text-mode .logo-text {
    opacity: 1;
    transform: translateX(0);
}

/* ================================
   BLOG POST HEADER
   ================================ */
.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 24px;
}

.post-header h2 {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 0;
    flex: 1;
}

.read-all-button {
    font-size: 13px;
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
/* ================================
   BLOG POST DETAIL PAGE
   ================================ */
#blog-post-detail {
    padding: 160px var(--section-horizontal) var(--section-padding);
}

.blog-post-container {
    max-width: 740px;
}

.post-title {
    font-size: 42px;
    font-weight: 300;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
    margin-top: 48px;
}

.post-meta {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--light-gray);
}

.post-body {
    font-size: 16px;
    line-height: 1.8;
}

.post-body p {
    margin-bottom: 24px;
}

.post-body h2 {
    font-size: 28px;
    font-weight: 400;
    margin-top: 48px;
    margin-bottom: 24px;
}

.post-body h3 {
    font-size: 22px;
    font-weight: 400;
    margin-top: 32px;
    margin-bottom: 16px;
}

@media (max-width: 767px) {
    .post-title {
        font-size: 32px;
    }
    
    #blog-post-detail {
        padding: 120px var(--section-horizontal) var(--section-padding);
    }
}

/* ================================
   MOBILE MENU (UPDATED WITH ANIMATION)
   ================================ */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    z-index: 999;
    padding: 100px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    overflow-y: auto;
    
    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-menu a {
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--black);
}

.close-menu {
    position: absolute;
    top: 40px;
    right: 40px;
    font-size: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--black);
}

/* ================================
   BODY NO-SCROLL
   ================================ */
.body-no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ================================
   FOOTER
   ================================ */
.site-footer {
    text-align: center;
    padding: 60px var(--section-horizontal);
    font-size: 13px;
    font-weight: 300;
    color: var(--gray);
    border-top: 1px solid var(--light-gray);
    margin-top: 80px;
}