/* --- CSS Variables & Design System (Light Theme) --- */
:root {
    --color-bg-main: #f8fafc;
    --color-bg-card: #ffffff;
    --color-bg-header: rgba(255, 255, 255, 0.85);
    
    --color-text-primary: #0f172a; /* Slate 900 */
    --color-text-secondary: #475569; /* Slate 600 */
    --color-text-muted: #94a3b8; /* Slate 400 */
    
    --color-accent: #0f172a; /* Clean Dark Slate */
    --color-accent-hover: #1e293b; /* Slate 800 */
    --color-link-hover: #2563eb; /* Subtle Blue */
    
    --border-color: #e2e8f0; /* Slate 200 */
    --border-color-hover: #cbd5e1; /* Slate 300 */
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.04), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.05), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
    --shadow-glow: 0 0 15px rgba(37, 99, 235, 0.1);
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --- Layout & Typography --- */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

ul {
    list-style: none;
}

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

/* --- Reusable Components & Cards --- */
.card {
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    color: var(--color-text-primary);
    display: block;
}

/* title underline removed */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background: var(--color-accent);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--color-text-primary);
    border: 1px solid var(--border-color);
    margin-left: 12px;
}

.btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

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

.btn-outline:hover {
    background: var(--color-text-primary);
    color: #ffffff;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-job {
    background: #f1f5f9;
    color: var(--color-text-primary);
    border: 1px solid var(--border-color);
}

.badge-intern {
    background: #fef4e6;
    color: #d97706;
    border: 1px solid #fbd5a2;
}

/* --- Header / Navigation --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: var(--color-bg-header);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    padding: 4px 0;
}

.header.scrolled {
    box-shadow: var(--shadow-sm);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
}

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

.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    position: relative;
    padding: 4px 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-text-primary);
    transition: var(--transition-smooth);
}

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

.btn-contact {
    padding: 6px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.btn-contact:hover {
    background: #f8fafc;
    border-color: var(--color-text-primary);
}

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

.hamburger .bar {
    width: 22px;
    height: 2px;
    background-color: var(--color-text-primary);
    transition: var(--transition-smooth);
}

/* --- Hero Section --- */
.hero-section {
    padding: 120px 0 80px 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 40px;
    align-items: center;
}

.tagline {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.hero-title {
    font-size: 2.75rem;
    line-height: 1.15;
    margin-bottom: 8px;
    color: var(--color-text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.hero-description {
    font-size: 0.98rem;
    color: var(--color-text-secondary);
    margin-bottom: 28px;
    max-width: 600px;
}

.hero-cta {
    margin-bottom: 32px;
    display: flex;
    align-items: center;
}

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

.social-links a {
    color: var(--color-text-secondary);
    background: #ffffff;
    border: 1px solid var(--border-color);
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.social-links a:hover {
    color: var(--color-text-primary);
    border-color: var(--color-text-primary);
    background: #f8fafc;
    transform: translateY(-2px);
}

/* Profile Photo Frame */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-frame {
    width: 340px;
    height: 420px;
    border-radius: 20px;
    overflow: hidden;
    border: 4px solid #ffffff;
    box-shadow: var(--shadow-lg);
    background: #f1f5f9;
    transition: var(--transition-smooth);
}

.profile-frame:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
}

.profile-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- About Section --- */
.about-section {
    padding: 80px 0;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.about-text-card h3, .about-details-card h3 {
    font-size: 1.35rem;
    margin-bottom: 16px;
    color: var(--color-text-primary);
    font-family: var(--font-heading);
}

.about-text-card p {
    color: var(--color-text-secondary);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.details-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.details-list li:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--color-text-primary);
    font-family: var(--font-heading);
}

.detail-value {
    color: var(--color-text-secondary);
    text-align: right;
    max-width: 60%;
}

/* --- Experience Timeline --- */
.experience-section {
    padding: 80px 0;
}

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

.timeline::after {
    content: '';
    position: absolute;
    width: 1px;
    background: var(--border-color);
    top: 0;
    bottom: 0;
    left: 16px;
}

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

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--color-text-primary);
    left: 12px;
    top: 6px;
    z-index: 2;
}

.timeline-date {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.timeline-content {
    padding: 20px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.timeline-title {
    font-size: 1.15rem;
    color: var(--color-text-primary);
}

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

.experience-bullets {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    padding-left: 16px;
    list-style-type: disc;
}

.experience-bullets li {
    margin-bottom: 6px;
}

.timeline-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tech-tag {
    background: #f1f5f9;
    color: var(--color-text-secondary);
    padding: 3px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* --- Skills Section --- */
.skills-section {
    padding: 80px 0;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

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

.skills-card {
    display: flex;
    flex-direction: column;
}

.skills-icon {
    color: var(--color-text-primary);
    margin-bottom: 16px;
}

.skills-card h3 {
    font-size: 1.15rem;
    margin-bottom: 14px;
    color: var(--color-text-primary);
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skills-tags li {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    font-size: 0.8rem;
    border-radius: 6px;
    color: var(--color-text-secondary);
}

.skills-tags li:hover {
    border-color: var(--color-text-primary);
    color: var(--color-text-primary);
    background: #f1f5f9;
}

/* --- Projects Section --- */
.projects-section {
    padding: 80px 0;
}

.project-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--color-text-secondary);
    padding: 6px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--color-accent);
    color: #ffffff;
    border-color: var(--color-accent);
}

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

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.project-header-info {
    margin-bottom: 12px;
}

.project-badge {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 6px;
    display: inline-block;
}

.project-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--color-text-primary);
}

.project-summary {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 18px;
    flex-grow: 1;
}

.project-footer-btns {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
}

.project-github-link {
    color: var(--color-text-secondary);
    background: #ffffff;
    border: 1px solid var(--border-color);
    width: 34px;
    height: 34px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-github-link:hover {
    color: var(--color-text-primary);
    border-color: var(--color-text-primary);
    background: #f8fafc;
}

/* --- Contact Section --- */
.contact-section {
    padding: 80px 0;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
}

.contact-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 32px;
}

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

.contact-info-card h3, .contact-form-card h3 {
    font-size: 1.35rem;
    margin-bottom: 16px;
    color: var(--color-text-primary);
}

.contact-text {
    color: var(--color-text-secondary);
    margin-bottom: 24px;
    font-size: 0.92rem;
}

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

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

.contact-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 1px;
}

.contact-value {
    color: var(--color-text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

a.contact-value:hover {
    color: var(--color-link-hover);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-primary);
    font-family: var(--font-heading);
}

.form-group input, .form-group textarea {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 14px;
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--color-text-primary);
    background: #ffffff;
    box-shadow: var(--shadow-glow);
}

/* --- Footer --- */
.footer {
    background: #f8fafc;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.back-to-top {
    background: #ffffff;
    border: 1px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    color: var(--color-text-primary);
    border-color: var(--color-text-primary);
    transform: translateY(-2px);
}

/* --- MODAL DIALOGS (Light Elegant Theme) --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
}

.modal-wrapper {
    position: relative;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 720px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 2;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
}

.modal.active .modal-wrapper {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-smooth);
}

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

.modal-body {
    padding: 32px;
}

.modal-badge {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 8px;
    display: inline-block;
}

.modal-title {
    font-size: 1.5rem;
    color: var(--color-text-primary);
    margin-bottom: 24px;
    line-height: 1.35;
}

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

.modal-section h4 {
    font-size: 1rem;
    color: var(--color-text-primary);
    margin-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 4px;
}

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

/* Image Gallery within Modals */
.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
}

.gallery-item img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid #f1f5f9;
    transition: var(--transition-smooth);
}

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

.image-caption {
    font-size: 0.72rem;
    color: var(--color-text-secondary);
    text-align: center;
    font-weight: 500;
}

.modal-list {
    padding-left: 16px;
    list-style-type: disc;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.modal-list li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.modal-list li strong {
    color: var(--color-text-primary);
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.modal-tags span {
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    color: var(--color-text-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.modal-footer {
    margin-top: 28px;
    border-top: 1px solid #f1f5f9;
    padding-top: 18px;
}

/* --- ANIMATIONS & KEYFRAMES --- */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- RESPONSIVE MEDIA QUERIES (Mobile Optimized) --- */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .hero-section {
        padding-top: 100px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.15rem;
    }
    
    .profile-frame {
        width: 270px;
        height: 330px;
        border-radius: 16px;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background: #ffffff;
        width: 100%;
        height: calc(100vh - 60px);
        text-align: center;
        gap: 30px;
        padding-top: 40px;
        transition: 0.25s ease-out;
        border-top: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    .timeline::after {
        left: 8px;
    }
    
    .timeline-item {
        padding-left: 28px;
    }
    
    .timeline-dot {
        left: 4px;
    }
    
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-gallery {
        grid-template-columns: 1fr;
    }
    
    .gallery-item img {
        height: 160px; /* larger detail on mobile */
    }
    
    .card {
        padding: 20px;
    }
    
    .experience-bullets {
        font-size: 0.88rem;
    }
}
