/* ===================================
   CSS VARIABLES (Custom Properties)
   =================================== */
:root {
    --primary-color: #ff6b9d;
    --secondary-color: #c44569;
    --accent-color: #ffa502;
    --light-pink: #ffeef8;
    --dark-text: #2d3436;
    --light-text: #636e72;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.2);
    --gradient-primary: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
    --gradient-alt: linear-gradient(135deg, #ffeef8 0%, #ffffff 100%);
    --transition-speed: 0.3s;
    --border-radius: 12px;
    --max-width: 1200px;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
}

/* ===================================
   GLOBAL RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--white);
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--secondary-color);
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-lg) 0;
}

.section-alt {
    background: var(--gradient-alt);
}

.section-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    color: var(--secondary-color);
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 1s ease-in-out;
}

/* ===================================
   HEADER SECTION
   =================================== */
.header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: var(--spacing-lg) 0;
    text-align: center;
    box-shadow: 0 4px 6px var(--shadow);
}

.main-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.profile-image-wrapper {
    display: flex;
    justify-content: center;
    margin: var(--spacing-md) 0;
}

.profile-image {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 6px solid var(--white);
    box-shadow: 0 8px 16px var(--shadow-hover);
    object-fit: cover;
    transition: transform var(--transition-speed) ease;
    animation: float 3s ease-in-out infinite;
}

.profile-image:hover {
    transform: scale(1.05);
}

.subtitle {
    font-size: 1.1rem;
    margin: var(--spacing-sm) 0;
    line-height: 1.8;
}

.location {
    font-size: 1rem;
    margin: var(--spacing-sm) 0 var(--spacing-md);
    opacity: 0.95;
}

/* ===================================
   NAVIGATION
   =================================== */
.nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.nav-link {
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.2);
    transition: all var(--transition-speed) ease;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ===================================
   ABOUT SECTION
   =================================== */
.about-content p {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
    text-align: justify;
    color: var(--light-text);
}

.about-content strong {
    color: var(--primary-color);
}

/* ===================================
   SKILLS SECTION
   =================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.skill-card {
    background: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px var(--shadow);
    text-align: center;
    transition: all var(--transition-speed) ease;
    border: 2px solid transparent;
}

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

.skill-card h3 {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.personal-skills {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    max-width: 600px;
    margin: 0 auto;
}

.personal-skill-item {
    background: var(--white);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px var(--shadow);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark-text);
    border-left: 4px solid var(--primary-color);
    transition: all var(--transition-speed) ease;
}

.personal-skill-item:hover {
    transform: translateX(10px);
    box-shadow: 0 4px 8px var(--shadow-hover);
}

/* ===================================
   PROJECTS SECTION
   =================================== */
.projects-wrapper {
    overflow-x: auto;
}

.projects-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 8px var(--shadow);
}

.projects-table thead {
    background: var(--gradient-primary);
    color: var(--white);
}

.projects-table th,
.projects-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.projects-table th {
    font-weight: 600;
    font-size: 1.1rem;
}

.projects-table tbody tr {
    transition: background-color var(--transition-speed) ease;
}

.projects-table tbody tr:hover {
    background-color: var(--light-pink);
}

.projects-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===================================
   GOALS SECTION
   =================================== */
.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.goal-card {
    background: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    transition: all var(--transition-speed) ease;
}

.goal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px var(--shadow-hover);
}

.goal-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.goal-card p {
    font-size: 1rem;
    color: var(--dark-text);
    margin: 0;
}

/* ===================================
   CONTACT SECTION
   =================================== */
.contact-intro {
    text-align: center;
    font-size: 1.1rem;
    color: var(--light-text);
    margin-bottom: var(--spacing-md);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 8px var(--shadow);
}

.form-group {
    margin-bottom: var(--spacing-sm);
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color var(--transition-speed) ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.form-buttons {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    flex: 1;
    min-width: 150px;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.btn-secondary {
    background: #e0e0e0;
    color: var(--dark-text);
}

.btn-secondary:hover {
    background: #d0d0d0;
}

/* ===================================
   SOCIAL SECTION
   =================================== */
.social-links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    max-width: 700px;
    margin: 0 auto;
}

.social-item {
    background: var(--white);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px var(--shadow);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    transition: all var(--transition-speed) ease;
}

.social-item:hover {
    transform: translateX(10px);
    box-shadow: 0 4px 8px var(--shadow-hover);
}

.social-icon {
    font-size: 1.5rem;
}

.social-link {
    font-weight: 500;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    background: var(--gradient-primary);
    color: var(--white);
    text-align: center;
    padding: var(--spacing-md) 0;
    margin-top: var(--spacing-lg);
}

.footer p {
    margin: 0.5rem 0;
}

.footer-quote {
    font-style: italic;
    font-size: 1.1rem;
    margin-top: var(--spacing-sm);
}

/* ===================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   =================================== */

/* Tablet (768px and below) */
@media screen and (max-width: 768px) {
    :root {
        --spacing-sm: 0.75rem;
        --spacing-md: 1.5rem;
        --spacing-lg: 2rem;
    }

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

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

    .profile-image {
        width: 180px;
        height: 180px;
    }

    .nav {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-link {
        text-align: center;
    }

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

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

    .projects-table {
        font-size: 0.9rem;
    }

    .projects-table th,
    .projects-table td {
        padding: 0.75rem;
    }

    .form-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* Mobile (480px and below) */
@media screen and (max-width: 480px) {
    :root {
        --spacing-sm: 0.5rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    .main-title {
        font-size: 1.5rem;
    }

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

    .profile-image {
        width: 150px;
        height: 150px;
        border-width: 4px;
    }

    .subtitle {
        font-size: 1rem;
    }

    .about-content p {
        font-size: 1rem;
    }

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

    .skill-card {
        padding: var(--spacing-sm);
    }

    .projects-wrapper {
        margin: 0 calc(var(--spacing-sm) * -1);
    }

    .projects-table {
        font-size: 0.8rem;
    }

    .projects-table th,
    .projects-table td {
        padding: 0.5rem;
    }

    .contact-form {
        padding: var(--spacing-sm);
    }

    .social-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .goal-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}

/* Large Desktop (1200px and above) */
@media screen and (min-width: 1200px) {
    .main-title {
        font-size: 3rem;
    }

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

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

/* ===================================
   SMOOTH SCROLLING
   =================================== */
html {
    scroll-behavior: smooth;
}

/* ===================================
   ACCESSIBILITY IMPROVEMENTS
   =================================== */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* Back Button */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #2d7a4f;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 12px 24px;
    border-radius: 8px;
    background: rgba(45, 122, 79, 0.1);
    transition: all 0.3s ease;
    margin: 20px;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.back-button:hover {
    background: #2d7a4f;
    color: white;
    transform: translateX(-5px);
}


/* ===================================
   ENHANCED RESPONSIVE DESIGN
   =================================== */

/* Tablet */
@media (max-width: 1024px) {
    .header {
        padding: 3rem 2rem;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .profile-image {
        width: 200px;
        height: 200px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .back-button {
        top: 10px;
        left: 10px;
        font-size: 1rem;
        padding: 10px 16px;
    }
    
    .header {
        padding: 2.5rem 1.5rem;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .profile-image {
        width: 180px;
        height: 180px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .info-grid,
    .skills-grid,
    .hobbies-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .back-button span:last-child {
        display: none;
    }
    
    .back-button {
        padding: 8px 12px;
    }
    
    .header {
        padding: 2rem 1rem;
    }
    
    .main-title {
        font-size: 1.5rem;
    }
    
    .profile-image {
        width: 150px;
        height: 150px;
    }
    
    .section {
        padding: 2rem 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .info-card,
    .skill-card,
    .hobby-card {
        padding: 1.5rem;
    }
    
    .contact-form {
        padding: 1.5rem 1rem;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 14px;
    }
    
    .submit-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* Touch optimization */
@media (hover: none) and (pointer: coarse) {
    .info-card,
    .skill-card,
    .hobby-card {
        cursor: default;
    }
    
    .submit-btn,
    .back-button {
        min-height: 44px;
    }
}
