/* ============================================
   CSS Variables & Reset
   ============================================ */
:root {
    --primary-color: #1a1f3a;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #ffffff;
    --bg-dark: #0f172a;
    --bg-section: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Courier New', monospace;
    --section-padding: 100px 0;
    --border-radius: 8px;
    --border-radius-lg: 12px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
    
    * {
        scroll-behavior: inherit;
    }
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--primary-color);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* ============================================
   Header & Navigation
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.nav-brand a:hover {
    color: var(--accent-color);
}

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

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    padding: 0.5rem 0;
}

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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
    border-radius: 2px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-primary);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: 0;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn > * {
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: var(--accent-color) !important;
    color: white;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.3);
    border: 2px solid var(--accent-color);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px 0 rgba(59, 130, 246, 0.4);
    background: var(--accent-hover) !important;
    border-color: var(--accent-hover);
}

.btn-primary:focus {
    background: var(--accent-color) !important;
    outline: none;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.btn-primary:active {
    background: var(--accent-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    box-shadow: 0 2px 8px 0 rgba(59, 130, 246, 0.1);
}

.btn-outline:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px 0 rgba(59, 130, 246, 0.3);
    border-color: var(--accent-hover);
}

.btn-outline:active {
    transform: translateY(-1px);
}

.btn-outline:focus,
.btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
    border-radius: 14px;
}

.btn svg {
    transition: transform 0.3s ease;
}

.btn:hover svg {
    transform: scale(1.1);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 20px 80px;
    overflow: hidden;
    /* Let the background image show through (no solid navy) */
    background: transparent;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Hero background image */
    background-image: url('../assets/images/hero.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    opacity: 0.9;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Softer dark overlay so the hero image is clearly visible */
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.55));
    z-index: 0;
}

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

.hero-name {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
    animation: fadeInUp 0.8s ease;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-title {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease 0.2s both;
    font-weight: 500;
}

.hero-tagline {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.4s both;
    line-height: 1.6;
}

.hero .btn-primary {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    border: 2px solid var(--accent-color);
}

.hero .btn-primary:hover {
    background: #60a5fa;
    border-color: #60a5fa;
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
    transform: translateY(-3px);
}

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

/* ============================================
   Common Section Styles
   ============================================ */
.about,
.projects,
.skills,
.resume,
.contact {
    padding: var(--section-padding);
}

.about {
    background: var(--bg-light);
}

.projects {
    background: var(--bg-section);
}

.skills {
    background: var(--bg-light);
}

.resume {
    background: var(--primary-color);
    color: white;
}

.resume .section-title {
    color: white;
}

.resume .section-title::after {
    background: var(--accent-color);
}

.contact {
    background: var(--bg-section);
}

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

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-text strong {
    color: var(--accent-color);
    font-weight: 600;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-xl);
    border: 4px solid var(--accent-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.4);
}

.profile-placeholder {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: var(--shadow-xl);
}

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

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

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

.project-image {
    width: 100%;
    height: 200px;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.project-placeholder {
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
}

.project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

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

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-badge {
    padding: 0.4rem 0.8rem;
    background: var(--bg-section);
    color: var(--accent-color);
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.project-links {
    margin-top: auto;
}

/* ============================================
   Skills Section
   ============================================ */
.skills-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.skills-cards-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.skills-category {
    margin-bottom: 0;
}

.skills-category-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-align: left;
}

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

.skill-item {
    padding: 0.5rem 0.7rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--accent-color);
    transition: var(--transition);
    border: 2px solid var(--accent-color);
}

.focus-areas {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

/* Hexagon Chart */
.hexagon-chart-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.hexagon-chart {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.hexagon-svg {
    width: 100%;
    height: auto;
}

.skill-label {
    font-size: 11px;
    font-weight: 600;
    fill: var(--primary-color);
    font-family: var(--font-primary);
}

.skill-percentage {
    font-size: 10px;
    font-weight: 700;
    fill: var(--accent-color);
    font-family: var(--font-primary);
}

.skill-points circle {
    transition: all 0.3s ease;
    cursor: pointer;
    display: none;
    opacity: 1;
    pointer-events: none;
}

.skill-points circle:hover {
    r: 12;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.8));
}

.skill-area polygon {
    transition: opacity 0.3s ease;
}

/* ============================================
   Resume Section
   ============================================ */
.resume-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.resume-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
}

.resume .btn-primary {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 4px 14px 0 rgba(255, 255, 255, 0.2);
}

.resume .btn-primary:hover {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 8px 20px 0 rgba(59, 130, 246, 0.4);
    transform: translateY(-3px);
}

.resume .btn-primary:active {
    transform: translateY(-1px);
}

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

.contact-form-wrapper {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form .btn-primary {
    width: 100%;
    margin-top: 0.5rem;
}

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

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-message {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
    display: none;
}

.form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    display: block;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    display: block;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-info-item h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.contact-info-item a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: var(--transition);
}

.contact-info-item a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-dark);
    text-decoration: none;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: 2px solid var(--border-color);
}

.social-link:hover {
    background: var(--bg-section);
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateX(5px);
}

.social-link svg {
    width: 24px;
    height: 24px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0 2rem;
    position: relative;
}

.footer-content {
    text-align: center;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-social-link {
    color: white;
    transition: var(--transition);
    opacity: 0.8;
}

.footer-social-link:hover {
    opacity: 1;
    transform: translateY(-3px);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 999;
}

.back-to-top:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.back-to-top.visible {
    display: flex;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        padding: 1rem;
        display: block;
        width: 100%;
    }

    .nav-toggle {
        display: flex;
    }

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

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

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

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

    .hero-title {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .profile-image,
    .profile-placeholder {
        width: 250px;
        height: 250px;
    }

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

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

    .skills-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hexagon-chart-wrapper {
        order: -1;
    }
    
    .hexagon-chart {
        max-width: 300px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

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

    .hero {
        padding: 100px 15px 60px;
    }

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

    .about,
    .projects,
    .skills,
    .resume,
    .contact {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }
}
