/* ============================================
   PORTFOLIO STYLESHEET
   Full-Stack Developer Portfolio
   ============================================ */

/* ============ CSS VARIABLES / THEMING ============ */
:root {
    /* Primary color (dynamic) */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --primary-rgb: 59, 130, 246;

    /* Light mode */
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-card: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
    --nav-bg: rgba(255,255,255,0.85);

    /* Sizing */
    --container: 1200px;
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
    --header-h: 70px;

    /* Typography */
    --font-lao: 'Noto Sans Lao Looped', 'Poppins', sans-serif;
    --font-en: 'Poppins', 'Noto Sans Lao Looped', sans-serif;
}

/* Dark mode */
[data-theme="dark"] {
    --bg: #0f172a;
    --bg-alt: #1e293b;
    --bg-card: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -2px rgba(0,0,0,0.2);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.4), 0 8px 10px -6px rgba(0,0,0,0.3);
    --nav-bg: rgba(15,23,42,0.85);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
}

body {
    font-family: var(--font-lao);
    font-weight: 400;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: var(--transition); }
button { cursor: pointer; font-family: inherit; border: none; background: none; color: inherit; }
ul { list-style: none; }
input, textarea { font-family: inherit; }

/* ============ UTILITIES ============ */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

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

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

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 16px;
}

.section-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    margin: 0 auto;
    border-radius: 2px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.4);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.5);
}

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

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-alt);
    color: var(--text);
    transition: var(--transition);
    font-size: 1rem;
}

.icon-btn:hover {
    background: var(--primary);
    color: white;
    transform: rotate(15deg);
}

/* ============ NAVIGATION ============ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-logo i {
    font-size: 1.6rem;
}

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

.nav-link {
    font-weight: 500;
    position: relative;
    padding: 4px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

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

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

.menu-toggle {
    display: none;
}

/* Color Panel */
.color-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-lg);
    width: 260px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

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

.color-panel-title {
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.color-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.color-option {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 3px solid transparent;
    transition: var(--transition);
    position: relative;
}

.color-option:hover {
    transform: scale(1.15);
}

.color-option.active {
    border-color: var(--text);
    transform: scale(1.1);
}

.color-option.active::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
}

.color-custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
}

.color-custom label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

#customColor {
    width: 40px;
    height: 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
}

/* ============ HERO SECTION ============ */
.hero {
    min-height: 100vh;
    padding: calc(var(--header-h) + 40px) 0 60px;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 100%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.15) 0%, transparent 70%);
    z-index: -1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-greeting {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.wave {
    display: inline-block;
    animation: wave 2s infinite;
    transform-origin: 70% 70%;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-10deg); }
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    min-height: 1.2em;
}

.cursor {
    color: var(--primary);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-subtitle {
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-description {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 32px;
    max-width: 500px;
}

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

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

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

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-4px);
    border-color: var(--primary);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-blob {
    position: absolute;
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
    animation: morph 8s ease-in-out infinite;
    opacity: 0.9;
}

@keyframes morph {
    0%, 100% { border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; }
    50% { border-radius: 70% 30% 46% 54% / 30% 60% 40% 70%; }
}

.hero-avatar {
    position: relative;
    z-index: 2;
    width: 300px;
    height: 300px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.floating-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: var(--shadow);
    animation: float 3s ease-in-out infinite;
}

.icon-1 { top: 10%; left: 5%; color: #61dafb; animation-delay: 0s; }
.icon-2 { top: 20%; right: 5%; color: #339933; animation-delay: 0.5s; }
.icon-3 { bottom: 20%; left: 0; color: #f7df1e; animation-delay: 1s; }
.icon-4 { bottom: 10%; right: 10%; color: #e34f26; animation-delay: 1.5s; }
.icon-5 { top: 50%; left: 90%; color: #1572b6; animation-delay: 2s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--primary);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

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

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

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image-wrapper {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10rem;
    color: white;
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    margin: 0 auto;
}

.experience-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--bg-card);
    padding: 16px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.exp-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.exp-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.about-content h3 {
    font-size: 1.6rem;
    margin-bottom: 16px;
    font-weight: 700;
}

.about-content p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.about-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-item i {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-item > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.info-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.info-value {
    font-weight: 500;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    padding: 24px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat span:not(.stat-num) {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stat p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ============ SKILLS SECTION ============ */
.skills-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    border-radius: 50px;
    background: var(--bg-alt);
    color: var(--text);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.tab-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.tab-content {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: grid;
}

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

.skill-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: default;
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.skill-card i {
    font-size: 3rem;
    margin-bottom: 12px;
    display: block;
}

.skill-card h4 {
    font-size: 1rem;
    font-weight: 600;
}

/* ============ SERVICES SECTION ============ */
.services {
    background: var(--bg-alt);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card.featured {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: transparent;
}

.service-card.featured::before {
    background: rgba(255,255,255,0.3);
}

.service-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.service-icon {
    width: 70px;
    height: 70px;
    border-radius: var(--radius);
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 20px;
    transition: var(--transition);
}

.service-card.featured .service-icon {
    background: rgba(255,255,255,0.2);
    color: white;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(-5deg);
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.service-card > p {
    font-size: 0.95rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.service-card.featured > p {
    color: rgba(255,255,255,0.9);
}

.service-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.service-features i {
    color: #22c55e;
    font-size: 0.8rem;
}

.service-card.featured .service-features i {
    color: white;
}

/* ============ PROJECTS SECTION ============ */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 22px;
    border-radius: 50px;
    background: transparent;
    color: var(--text);
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.filter-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.project-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.project-card.hidden {
    display: none;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    transition: var(--transition);
}

.project-card:hover .project-placeholder {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-links {
    display: flex;
    gap: 16px;
}

.project-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-link {
    transform: translateY(0);
    opacity: 1;
}

.project-link:hover {
    background: var(--primary);
    color: white;
}

.project-info {
    padding: 24px;
}

.project-category {
    display: inline-block;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.project-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

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

.project-tags span {
    padding: 4px 12px;
    border-radius: 50px;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 500;
}

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

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

.contact-info h3 {
    font-size: 1.6rem;
    margin-bottom: 16px;
    font-weight: 700;
}

.contact-info > p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius);
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-item > div {
    display: flex;
    flex-direction: column;
}

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

.contact-item a,
.contact-item span:not(.contact-label) {
    font-weight: 500;
    color: var(--text);
}

.contact-item a:hover {
    color: var(--primary);
}

.contact-social {
    display: flex;
    gap: 12px;
}

/* Contact Form */
.contact-form {
    background: var(--bg-card);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-size: 0.95rem;
    transition: var(--transition);
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.form-status {
    margin-top: 16px;
    padding: 12px;
    border-radius: var(--radius);
    text-align: center;
    font-size: 0.9rem;
    display: none;
}

.form-status.success {
    display: block;
    background: rgba(34,197,94,0.15);
    color: #22c55e;
}

.form-status.error {
    display: block;
    background: rgba(239,68,68,0.15);
    color: #ef4444;
}

/* ============ FOOTER ============ */
.footer {
    background: var(--bg-alt);
    padding: 60px 0 20px;
    border-top: 1px solid var(--border);
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 16px;
    max-width: 350px;
    font-size: 0.95rem;
}

.footer h4 {
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

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

.social-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============ BACK TO TOP ============ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}

/* ============ ANIMATIONS ON SCROLL ============ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ============ RESPONSIVE / MOBILE ============ */
@media (max-width: 992px) {
    .hero-container,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-visual {
        height: 400px;
        order: -1;
    }

    .hero-blob { width: 300px; height: 300px; }
    .hero-avatar { width: 220px; height: 220px; font-size: 6rem; }
    .floating-icon { width: 50px; height: 50px; font-size: 1.4rem; }

    .footer-container {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

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

    .nav-menu {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        gap: 0;
        padding: 20px 24px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
    }

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

    .nav-menu li {
        padding: 12px 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-menu li:last-child { border-bottom: none; }

    .menu-toggle {
        display: flex;
    }

    .hero {
        padding-top: calc(var(--header-h) + 20px);
    }

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

    .about-stats {
        gap: 12px;
        padding: 16px;
    }

    .stat-num { font-size: 1.5rem; }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-form { padding: 24px; }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand p { margin: 16px auto 0; }

    .social-links { justify-content: center; }

    .color-panel {
        right: 12px;
        width: calc(100vw - 24px);
        max-width: 280px;
    }

    .hero-buttons { justify-content: center; }
    .hero-social { justify-content: center; }
    .hero-content { text-align: center; }
    .hero-description { margin-left: auto; margin-right: auto; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }

    .nav-logo span { font-size: 1.1rem; }
    .icon-btn { width: 38px; height: 38px; }
    .nav-actions { gap: 6px; }

    .btn { padding: 12px 22px; font-size: 0.9rem; }

    .hero-blob { width: 260px; height: 260px; }
    .hero-avatar { width: 180px; height: 180px; font-size: 4.5rem; }

    .service-card, .contact-form { padding: 24px 20px; }
}

/* ============ SELECTION ============ */
::selection {
    background: var(--primary);
    color: white;
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }
