/* ============================================
   Portfolio Site Styles
   ============================================ */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --dark: #0f172a;
    --darker: #020617;
    --light: #f8fafc;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --success: #10b981;
    --danger: #ef4444;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --container: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--light);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    max-width: var(--container);
    margin: 0 auto;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand .brand-dot {
    width: 10px; height: 10px;
    background: var(--gradient);
    border-radius: 50%;
}

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

.nav-links a {
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

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

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -6px; left: 0; right: 0;
    height: 2px;
    background: var(--gradient);
    border-radius: 2px;
}

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--dark);
}

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-links {
        position: fixed;
        top: 64px; left: 0; right: 0;
        background: white;
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
        border-bottom: 1px solid var(--gray-200);
        transform: translateY(-200%);
        transition: var(--transition);
    }
    .nav-links.open { transform: translateY(0); }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 0;
    transition: var(--transition);
    text-decoration: none;
}
.btn-primary { background: var(--gradient); color: white; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: white; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-light { background: white; color: var(--dark); box-shadow: var(--shadow); }
.btn-light:hover { transform: translateY(-2px); }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.85rem; }

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    background:
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 40%),
        linear-gradient(180deg, #fafbff 0%, #f3f4ff 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 20%; right: -5%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-greeting {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-greeting::before {
    content: '';
    width: 40px; height: 2px;
    background: var(--primary);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--dark);
}

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

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-bio {
    color: var(--gray-600);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-wrapper {
    position: relative;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: var(--gradient);
    padding: 6px;
    box-shadow: var(--shadow-lg);
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid white;
}

.hero-image .floating-badge {
    position: absolute;
    background: white;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: float 4s ease-in-out infinite;
}

.floating-badge.exp { top: 10%; left: -10%; }
.floating-badge.projects { bottom: 10%; right: -10%; animation-delay: 1.5s; }

.floating-badge i { color: var(--primary); }
.floating-badge .num { color: var(--dark); font-size: 1.1rem; }

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

@media (max-width: 992px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-greeting { justify-content: center; }
    .hero-buttons { justify-content: center; }
    .hero-bio { margin-left: auto; margin-right: auto; }
    .hero-image-wrapper { width: 280px; height: 280px; margin: 0 auto; }
    .floating-badge.exp { left: 0; }
    .floating-badge.projects { right: 0; }
}

@media (max-width: 576px) {
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1.15rem; }
}

/* ===== Sections ===== */
.section {
    padding: 6rem 0;
}

.section-alt { background: white; }

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

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

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.05rem;
}

@media (max-width: 576px) {
    .section { padding: 4rem 0; }
    .section-title { font-size: 1.8rem; }
}

/* ===== Cards / Project grid ===== */
.grid {
    display: grid;
    gap: 1.75rem;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 992px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
}

.project-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
}

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

.project-card .cover {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--gray-100);
    position: relative;
}

.project-card .cover img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .cover img { transform: scale(1.05); }

.project-card .badge-featured {
    position: absolute;
    top: 1rem; right: 1rem;
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-card .body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-card h3 {
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.project-card .desc {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex: 1;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.tech-badge {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
}

.project-card .actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

/* ===== Skills section ===== */
.skill-group {
    margin-bottom: 2.5rem;
}

.skill-group-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 4px solid var(--primary);
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.skill-pill {
    background: white;
    padding: 1.25rem 1rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-100);
}

.skill-pill:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.skill-pill .skill-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.skill-pill .skill-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark);
    display: block;
    margin-bottom: 0.5rem;
}

.skill-bar {
    height: 4px;
    background: var(--gray-200);
    border-radius: 999px;
    overflow: hidden;
}

.skill-bar .fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 999px;
    transition: width 1s ease-out;
}

/* ===== Services ===== */
.service-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-100);
}

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

.service-card .icon-wrap {
    width: 60px; height: 60px;
    border-radius: var(--radius);
    background: var(--gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
}

.service-card h3 {
    color: var(--dark);
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.service-card p {
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* ===== Experience timeline ===== */
.timeline {
    position: relative;
    padding-left: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px; top: 0; bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem; top: 6px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--gradient);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--primary);
}

.timeline-period {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-item h3 {
    color: var(--dark);
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.timeline-item .company {
    color: var(--gray-600);
    font-weight: 500;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.timeline-item p {
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* ===== Stats strip ===== */
.stats-strip {
    background: var(--gradient);
    padding: 3rem 0;
    color: white;
}

.stats-strip .grid-4 { gap: 2rem; }

.stat {
    text-align: center;
}

.stat .number {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat .label {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ===== About page ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

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

.about-image-wrap {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 1;
}

.about-image-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.info-list {
    list-style: none;
    margin-top: 1.5rem;
}

.info-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1rem;
    font-size: 0.95rem;
}

.info-list .label {
    font-weight: 600;
    color: var(--gray-700);
}

.info-list .value {
    color: var(--gray-600);
}

/* ===== Contact ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}

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

.contact-info-card {
    background: var(--gradient);
    color: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    height: fit-content;
}

.contact-info-card h3 { color: white; margin-bottom: 1rem; }
.contact-info-card p { opacity: 0.9; margin-bottom: 2rem; font-size: 0.95rem; }

.contact-info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-info-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
}

.contact-info-list .icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-info-list a { color: white; }

.social-icons {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
}

.social-icons a {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    transition: var(--transition);
}

.social-icons a:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-2px);
}

.contact-form-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--gray-50);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

textarea.form-control {
    min-height: 140px;
    resize: vertical;
}

.form-error {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ===== Project detail ===== */
.project-hero {
    padding: 8rem 0 4rem;
    background: linear-gradient(180deg, #fafbff 0%, white 100%);
}

.project-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.project-meta span { display: inline-flex; align-items: center; gap: 0.4rem; }

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

.project-gallery img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.project-gallery img:hover { transform: scale(1.02); }

.project-content {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    line-height: 1.8;
    color: var(--gray-700);
}

.project-content h2, .project-content h3 {
    color: var(--dark);
    margin: 1.5rem 0 0.75rem;
}

/* ===== Footer ===== */
.footer {
    background: var(--darker);
    color: var(--gray-400);
    padding: 3rem 0 1.5rem;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

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

.footer h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer a {
    color: var(--gray-400);
    display: block;
    padding: 0.25rem 0;
}

.footer a:hover { color: white; }

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9rem;
}

/* ===== Filters bar ===== */
.filters-bar {
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-chip {
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: 0;
    text-decoration: none;
}

.filter-chip:hover, .filter-chip.active {
    background: var(--gradient);
    color: white;
}

/* ===== Empty state ===== */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: 1rem;
}

/* ===== Pagination ===== */
.pagination-wrap {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
}

.pagination {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.pagination .page-item .page-link {
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius);
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
    font-size: 0.9rem;
    display: inline-block;
}

.pagination .page-item.active .page-link {
    background: var(--gradient);
    color: white;
    border-color: transparent;
}

/* ===== Dynamic sections styling ===== */
.dynamic-section .content { line-height: 1.8; color: var(--gray-700); font-size: 1.05rem; }
.dynamic-section .content p { margin-bottom: 1rem; }
