/* ========================================
   MODERN MINIMALIST PORTFOLIO - WARM THEME
   ======================================== */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #e07a5f, #f2a65a, #c1666b);
    z-index: 2000;
    transition: width 0.1s ease;
}

/* CSS Variables */
:root {
    /* Colors - Warm Charcoal & Terracotta */
    --bg-primary: #0e0c10;
    --bg-secondary: #15131a;
    --bg-card: #1c1a22;
    --bg-card-hover: #26242e;

    --accent: #e07a5f;
    --accent-hover: #c1666b;
    --accent-secondary: #f2a65a;
    --accent-soft: rgba(224, 122, 95, 0.12);
    --accent-glow: rgba(224, 122, 95, 0.35);

    --text-primary: #f5f0ea;
    --text-secondary: #b8b0a8;
    --text-muted: #7a7270;

    --border-color: rgba(224, 122, 95, 0.08);
    --border-hover: rgba(224, 122, 95, 0.2);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --section-padding: 100px 0;
    --container-padding: 0 24px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* Light Theme Variables - Warm Sand */
.light-mode {
    --bg-primary: #fdf6ee;
    --bg-secondary: #fff9f3;
    --bg-card: #ffffff;
    --bg-card-hover: #fef0e0;

    --accent: #d35f3e;
    --accent-hover: #b5402a;
    --accent-secondary: #e89540;
    --accent-soft: rgba(211, 95, 62, 0.1);
    --accent-glow: rgba(211, 95, 62, 0.2);

    --text-primary: #2d1b12;
    --text-secondary: #5c4033;
    --text-muted: #8a7060;

    --border-color: rgba(139, 90, 60, 0.1);
    --border-hover: rgba(139, 90, 60, 0.2);
}

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

/* ========================================
   NAVIGATION
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    /* Context aware background */
    background: var(--bg-primary);
    background-color: var(--bg-primary-fade, rgba(10, 10, 15, 0.8));
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-medium);
}

body:not(.light-mode) .navbar {
    --bg-primary-fade: rgba(14, 12, 16, 0.88);
}

body.light-mode .navbar {
    --bg-primary-fade: rgba(253, 246, 238, 0.85);
}

.navbar.scrolled {
    padding: 15px 0;
}

body:not(.light-mode) .navbar.scrolled {
    background: rgba(14, 12, 16, 0.97);
}

body.light-mode .navbar.scrolled {
    background: rgba(253, 246, 238, 0.95);
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo-accent {
    color: var(--accent);
}

.nav-menu {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: var(--accent-soft);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-switcher {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.lang-switcher:hover {
    border-color: var(--border-hover);
}

.lang-active {
    color: var(--accent);
}

.lang-divider {
    margin: 0 4px;
    color: var(--text-muted);
}

.lang-inactive {
    color: var(--text-muted);
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.theme-toggle:hover {
    border-color: var(--border-hover);
    color: var(--accent);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 24px 80px;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(ellipse at 70% 30%, var(--accent-soft) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 80px;
    align-items: center;
}

.hero-text {
    position: relative;
    z-index: 1;
}

.hero-greeting {
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-name {
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 8px;
    letter-spacing: -2px;
}

.hero-surname {
    display: block;
    color: var(--text-secondary);
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.hero-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.info-item i {
    width: 20px;
    color: var(--accent);
    font-size: 0.9rem;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary, #f2a65a));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover), var(--accent));
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(224, 122, 95, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.hero-socials {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

.social-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-2px);
}

.hero-image {
    position: relative;
    z-index: 1;
}

.image-wrapper {
    position: relative;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 4/5;
    margin: 0 auto;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-xl);
    filter: grayscale(20%);
    transition: var(--transition-medium);
}

.image-wrapper:hover img {
    filter: grayscale(0%);
}

.image-border {
    position: absolute;
    inset: -8px;
    border: 2px solid var(--accent);
    border-radius: calc(var(--radius-xl) + 8px);
    opacity: 0.3;
    display: none;
}

/* ========================================
   SECTION STYLES
   ======================================== */
section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-label {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -1px;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about {
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    gap: 60px;
}

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

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.about-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition-medium);
}

.about-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}


.card-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    border-radius: var(--radius-md);
    color: var(--accent);
    font-size: 1.4rem;
}

.about-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.about-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hobbies {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.hobbies-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hobbies-list {
    display: flex;
    justify-content: center;
    gap: 32px;
}

.hobby-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.hobby-item i {
    color: var(--accent);
    font-size: 1.1rem;
}

/* ========================================
   TIMELINE SECTION
   ======================================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 80px;
    margin-bottom: 40px;
}

.timeline-dot {
    position: absolute;
    left: 35px;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--bg-primary);
    border: 2px solid var(--accent);
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-item:hover .timeline-dot {
    background: var(--accent);
    transform: scale(1.2);
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-content {
    background: var(--bg-card);
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition-medium);
}

.timeline-item:hover .timeline-content {
    border-color: var(--accent);
    transform: translateX(10px);
    box-shadow: 0 5px 20px var(--accent-soft);
}

.timeline-icon {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 12px;
}

.timeline-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.timeline-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.timeline-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.timeline-list {
    margin-top: 10px;
    padding-left: 18px;
}

.timeline-list li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    list-style-type: circle;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        padding-left: 50px;
    }

    .timeline-dot {
        left: 15px;
    }
}


/* ========================================
   SKILLS SECTION
   ======================================== */
.skills {
    background: var(--bg-secondary);
}

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

.skill-category {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.category-title i {
    color: var(--accent);
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.skill-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.skill-tag i {
    font-size: 1rem;
    color: var(--accent);
}

.approach {
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.approach-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
}

.approach-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.approach-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.approach-item i {
    color: var(--accent);
    margin-top: 3px;
}

/* ========================================
   PROJECTS SECTION
   ======================================== */
.projects {
    background: var(--bg-primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.project-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition-medium);
}

.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.project-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    border-radius: var(--radius-md);
    color: var(--accent);
    font-size: 1.2rem;
}

.project-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: var(--transition-fast);
}

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

.project-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.project-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 6px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.projects-cta {
    text-align: center;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact {
    background: var(--bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.contact-item:hover {
    border-color: var(--accent);
    transform: translateX(4px);
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    border-radius: var(--radius-md);
    color: var(--accent);
    font-size: 1.1rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.contact-value {
    font-size: 1rem;
    font-weight: 500;
}

.contact-goal {
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.contact-goal h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--accent);
}

.contact-goal p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    padding: 40px 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.footer-socials a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ========================================
   ANIMATIONS & EFFECTS
   ======================================== */

/* Floating Background Blobs */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: floating 20s infinite alternate cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

.blob-1 {
    top: -10%;
    right: -5%;
    background: radial-gradient(circle, rgba(224, 122, 95, 0.12) 0%, transparent 70%);
    animation-duration: 25s;
}

.blob-2 {
    bottom: -10%;
    left: -5%;
    background: radial-gradient(circle, rgba(242, 166, 90, 0.08) 0%, transparent 70%);
    animation-duration: 30s;
    animation-delay: -5s;
}

/* Keyframes */
@keyframes floating {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(5%, 10%) scale(1.1);
    }

    66% {
        transform: translate(-5%, 5%) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

@keyframes titleReveal {
    from {
        opacity: 0;
        transform: translateY(20px) skewY(2deg);
    }

    to {
        opacity: 1;
        transform: translateY(0) skewY(0);
    }
}

/* Base Fade-in Refinement */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Specific Reveal Animations for Hero */
.hero-name span {
    display: inline-block;
    opacity: 0;
    animation: titleReveal 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero-name span:nth-child(1) {
    animation-delay: 0.2s;
}

.hero-name span.hero-surname {
    animation-delay: 0.4s;
}

.hero-greeting,
.hero-title,
.hero-subtitle,
.hero-info,
.hero-buttons,
.hero-socials {
    opacity: 0;
    animation: titleReveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero-greeting {
    animation-delay: 0.1s;
}

.hero-title {
    animation-delay: 0.6s;
}

.hero-subtitle {
    animation-delay: 0.7s;
}

.hero-info {
    animation-delay: 0.8s;
}

.hero-buttons {
    animation-delay: 0.9s;
}

.hero-socials {
    animation-delay: 1s;
}


/* ========================================
   CUSTOM CURSOR
   ======================================== */
.cursor-dot,
.cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    transition: transform 0.1s ease-out, opacity 0.3s ease;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-soft);
}

@media (max-width: 1024px) {

    .cursor-dot,
    .cursor-outline {
        display: none;
    }
}

/* ========================================
   PROJECT MODALS
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 18, 16, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-secondary);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 20px;
    position: relative;
    padding: 40px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--accent);
}

.modal-body img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 2rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.modal-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* ========================================
   CONTACT FORM
   ======================================== */
.contact-form-container {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.form-group textarea {
    height: 150px;
    resize: none;
}

.contact-form .btn {
    width: 100%;
    justify-content: center;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 60px;
    }

    .hero-info {
        align-items: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-socials {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

    .image-wrapper {
        max-width: 300px;
    }

    .about-cards {
        grid-template-columns: repeat(3, 1fr);
    }

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

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

    .approach-items {
        grid-template-columns: 1fr;
    }

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

    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 20px;
    }

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

    .nav-link {
        padding: 14px 16px;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero {
        padding-top: 100px;
    }

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

    .about-cards {
        grid-template-columns: 1fr;
    }

    .hobbies-list {
        flex-direction: column;
        gap: 16px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .info-item {
        font-size: 0.85rem;
    }
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    z-index: 10000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.visible {
    transform: translateY(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-success i {
    color: #22c55e;
}

.toast-error i {
    color: #ef4444;
}

/* ========================================
   GITHUB REPOS STYLES
   ======================================== */
.github-repos-container {
    padding-top: 40px;
}

.repos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.repo-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: var(--transition-medium);
}

.repo-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--accent-soft);
}

.repo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.repo-header i {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.repo-stats {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.repo-stats span i {
    font-size: 0.85rem;
    color: var(--accent);
}

.repo-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.repo-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    flex-grow: 1;
}

.repo-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.repo-lang {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
}

.repo-link {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.repo-link:hover {
    color: var(--accent);
}

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

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

.lottie-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.5;
}


/* Branded Tech Icons Refinement */
.skill-tag i {
    font-size: 1.25rem !important;
    transition: var(--transition-fast);
}

.skill-tag i.colored {
    color: unset !important;
    /* Use Devicon branded colors */
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.1));
}

.skill-tag:hover i.colored {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

.terminal-branded {
    color: #4D4D4D !important;
}


/* Refinement: Hide Lottie background symbols and fix branded icons */
.image-wrapper {
    overflow: hidden !important;
}

.skill-tag i {
    font-size: 1.25rem !important;
    transition: var(--transition-fast);
}

.skill-tag i.colored {
    color: unset !important;
}

.skill-tag:hover i.colored {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

.terminal-branded {
    color: #4D4D4D !important;
}


/* Enhanced Project Modals (Case Study Styles) */
.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 24px;
}

.modal-section {
    margin-bottom: 24px;
}

.modal-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-section-title i {
    font-size: 1rem;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 24px 0;
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.modal-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    justify-content: flex-start;
    padding-top: 8px;
}

@media (max-width: 768px) {
    .modal-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}


/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-soft);
    border-radius: 10px;
    border: 2px solid var(--bg-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Skeleton Loading Animation */
.skeleton {
    background: linear-gradient(90deg, #1c1a22 25%, #26242e 50%, #1c1a22 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite linear;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    height: 200px;
    width: 100%;
    margin-bottom: 20px;
}


/* Architecture Flow Styling */
.architecture-flow {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px dashed var(--accent-soft);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: var(--accent);
    margin-top: 0.5rem;
    line-height: 1.6;
    text-align: center;
}

.architecture-section {
    margin-bottom: 2rem !important;
}

/* Interactive Grid Background */
.interactive-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image:
        radial-gradient(circle at 2px 2px, rgba(224, 122, 95, 0.04) 1px, transparent 0);
    background-size: 40px 40px;
    opacity: 0.5;
}


/* Footer Refinements */
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid rgba(224, 122, 95, 0.08);
    padding-bottom: 3rem;
}

.footer-brand .footer-mission {
    margin-top: 1rem;
    opacity: 0.6;
    max-width: 400px;
    font-size: 0.95rem;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-light);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}