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

:root {
    --primary: #6d8c7a;
    --primary-dark: #4e6a5c;

    --bg-dark: #f5f4f1;     /* warm stone */
    --bg-card: #ffffff;

    --text-primary: #222222;
    --text-secondary: #7a7a7a;
    --text-tertiary: #624d16;

    --gradient-1: linear-gradient(135deg, #6d8c7a 0%, #8fa89a 100%);
    --gradient-2: linear-gradient(135deg, #8fa89a 0%, #6d8c7a 100%);
}


html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* ===========================
   Navigation
   =========================== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* ===========================
   Language Switch
   =========================== */
.lang-switch {
    display: flex;
    background: var(--bg-card);
    border-radius: 50px;
    padding: 4px;
    gap: 4px;
}

.lang-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.lang-btn.active {
    background: var(--gradient-1);
    color: white;
}

/* ===========================
   Buttons
   =========================== */
.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 10px 40px rgba(109, 140, 122, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(109, 140, 122, 0.4);
}

.btn-secondary {
    background: transparent;
    color: rgba(71, 48, 14, 0.436);
    border: 2px solid rgba(102, 101, 101, 0.2);
}

.btn-secondary:hover {
    background: rgba(57, 57, 57, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ===========================
   Section Common Styles
   =========================== */
section {
    padding: 8rem 5%;
    position: relative;
}

.section-label {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.section-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.8;
}

.section-description-right-align {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 400px;
    line-height: 1.8;
    text-align: right; /* Aligns text to the right */
    margin-left: auto; /* Pushes the description to the right */
    margin-right: 0; /* Ensures no extra space on the right */
}

/* ===========================
   Scroll Animations
   =========================== */
.reveal {
    opacity: 0;
    transform: translateY(80px);
    transition: all 1s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 1s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(100px);
    transition: all 1s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 1s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 0 5%;
}

.hero-bg {
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at 30% 50%, rgba(99, 241, 170, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(103, 242, 223, 0.1) 0%, transparent 40%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-5%, 5%) rotate(5deg); }
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 900px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 0.3s;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 0.5s;
    
}

.hero-title span {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--text-tertiary);
}

.hero-description {
    font-size: 1.3rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 0.7s;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 0.9s;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: var(--primary-dark);
}

.scroll-indicator div {
    width: 30px;
    height: 50px;
    border: 2px solid rgba(50, 35, 10, 0.3);
    border-radius: 20px;
    position: relative;
}

.scroll-indicator div::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: scrollDown 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

@keyframes scrollDown {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 30px; }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   About Section
   =========================== */
.about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-image {
    position: relative;
    max-width: 420px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image img {
    max-width: 100%;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.about-image-wrapper {
            position: relative;
            border-radius: 20px;
            overflow: hidden;
            max-width: 360px; /* keep the image a bit smaller than the column */
            margin: 0 auto;
}

.about-image-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    /* background: var(--gradient-1); */
    opacity: 0.2;
    z-index: 1;
}
        /* Ensure actual <img> fills wrapper while preserving aspect ratio */
        .about-image-wrapper img,
        .about-image-wrapper .about-image-inner img {
            width: 100%;
            height: auto;
            display: block;
            object-fit: contain;
        }

        /* Slightly reduce size on small screens */
        @media (max-width: 600px) {
            .about-image-wrapper {
                max-width: 280px;
            }
        }

.about-decoration {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 3px solid var(--primary);
    border-radius: 20px;
    top: -20px;
    right: -20px;
    z-index: -1;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 15px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ===========================
   Experience Section
   =========================== */
.experience {
    background: linear-gradient(180deg, var(--bg-dark) 0%, #ece8e3 100%);
}

.timeline {
    max-width: 800px;
    margin: 4rem auto 0;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.timeline-item {
    padding-left: 3rem;
    padding-bottom: 3rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(109, 140, 122, 0.5);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.timeline-company {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.timeline-description {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===========================
   Projects Section
   =========================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 700px));
    gap: 2rem;
    margin-top: 4rem;
}

.project-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.5s ease;
    position: relative;
}

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

.project-image {
    height: 400px;
    background: linear-gradient(135deg, #b8d4c6 0%, #f5f4f1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* If project-image contains an actual <img>, make it cover the area */
.project-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.project-content {
    padding: 2rem;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.project-tag {
    padding: 0.4rem 1rem;
    background: rgba(109, 140, 122, 0.2);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ===========================
   Photography Section
   =========================== */
.photography {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.photography .reveal {
    text-align: right;
}

/* .gallery-deck {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.deck-container {
    position: relative;
    width: 100%;
    max-height: 700px;
    aspect-ratio: 3/4;
} */

.gallery-card {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
    background: var(--bg-card);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card stacking - base state */
.gallery-card[data-position="0"] {
    z-index: 30;
    transform: translateY(0) scale(1);
    opacity: 1;
}

.gallery-card[data-position="1"] {
    z-index: 20;
    transform: translateY(15px) scale(0.96);
    opacity: 0.7;
}

.gallery-card[data-position="2"] {
    z-index: 10;
    transform: translateY(30px) scale(0.92);
    opacity: 0.4;
}

/* Card swap animation */

@keyframes swapToBack {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        z-index: 30;
        opacity: 1;
    }
    /* Quick peek out: minimal movement, subtle tilt */
    40% {
        transform: translate(15%, -10px) scale(1.02) rotate(3deg);
        z-index: 30;
        opacity: 1;
    }
    /* Start dropping behind sooner */
    70% {
        transform: translate(5%, 15px) scale(0.94) rotate(1deg);
        z-index: 10;
        opacity: 0.6;
    }
    /* Settle exactly into position */
    100% {
        transform: translate(0, 30px) scale(0.92) rotate(0deg);
        z-index: 10;
        opacity: 0.4;
    }
}

.gallery-card.swapping-out {
    /* Fast but smooth: 0.45s is the sweet spot for UI feedback */
    animation: swapToBack 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    background: var(--bg-card);
}

.gallery-deck {
    position: relative;
    display: grid; 
    /* Column 1: The deck (takes most space), Column 2: The button (auto-width) */
    grid-template-columns: 1fr auto; 
    align-items: center; /* Vertically centers the button to the deck */
    gap: 2rem;
    width: 100%;
}

.deck-container {
    position: relative;
    width: 100%;
    max-height: 700px;
    aspect-ratio: 3/4;
    /* Ensure the deck stays in the first grid column */
    grid-column: 1;
}

.deck-next {
    grid-column: 2; /* Forces button to the right column */
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
    /* Removed margin-top/gap issues from flex-column */
}

.deck-next:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.deck-next svg {
    width: 32px;
    height: 32px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* ===========================
   Values Section
   =========================== */
.values {
    text-align: center;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.value-card {
    padding: 3rem 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    transition: all 0.5s ease;
}

.value-card:hover {
    transform: translateY(-10px);
    background: linear-gradient(135deg, rgba(109, 140, 122, 0.1) 0%, rgba(122, 184, 160, 0.1) 100%);
}

.value-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.value-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.value-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===========================
   Skills Section
   =========================== */
.skills-reveal {
    text-align: center;
    padding: 6rem 5%;
    background: linear-gradient(180deg, #ece8e3 0%, var(--bg-dark) 100%);
}

.skills-teaser {
    max-width: 600px;
    margin: 0 auto;
}

.skills-teaser h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.skills-teaser p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.reveal-skills-btn {
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
    background: var(--gradient-1);
    border: none;
    color: white;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.reveal-skills-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.reveal-skills-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 50px rgba(109, 140, 122, 0.4);
}

.reveal-skills-btn:hover::before {
    opacity: 1;
}

.skills-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 1s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
    opacity: 0;
}

.skills-container.show {
    max-height: 2000px;
    opacity: 1;
}

.skills-content {
    padding: 4rem 5%;
}

.skills-header {
    text-align: center;
    margin-bottom: 4rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-category {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
}

.skill-category h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.skill-category h3 span {
    font-size: 1.5rem;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-name {
    display: flex;
    justify-content: space-between;
    font-weight: 500;
}

.skill-percent {
    color: var(--primary);
    font-weight: 600;
}

.skill-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 10px;
    width: 0;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.skills-container.show .skill-progress {
    width: var(--progress);
}

.skills-note{
  max-width: 100%;
  display: block;              /* or remove display property */
  margin: 8rem auto 0;
  padding: 0 1rem;             /* optional: breathing room on mobile */
  overflow-wrap: break-word;   /* break long words if needed */
  word-break: break-word;      /* extra safety for very long strings */
}


/* ===========================
   Contact Section
   =========================== */
.contact {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(109, 140, 122, 0.1) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.contact-content {
    position: relative;
    z-index: 1;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: var(--bg-card);
    border-radius: 50px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.contact-link span {
    font-size: 1.3rem;
}

/* ===========================
   Footer
   =========================== */
footer {
    padding: 2rem 5%;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 968px) {
    .about {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-image {
        order: -1;
        max-width: 400px;
        margin: 0 auto;
    }

    .photography {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .photography .reveal-right {
        order: -1;
        text-align: left;
    }

    .photography .section-description-right-align {
        text-align: left;
        margin-left: 0;
    }

    .gallery-deck {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        grid-template-columns: 1fr; /* Stack them again on mobile */
        justify-items: center;
    }

    .deck-container {
        max-height: 500px;
    }

    .nav-links a:not(.lang-switch) {
        display: none;
    }
}

@media (max-width: 600px) {
    .about-stats {
        grid-template-columns: 1fr;
    }

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

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