/* =============================================
   RESET & GLOBALE STYLES
   ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #5b9bf5;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    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;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--text-dark);
}

h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
    line-height: 1.8;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem clamp(20px, 5vw, 100px);
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.logo h1 {
    font-size: 48px;
    font-weight: bold;
}

.logo-link {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    transition: var(--transition);
}

.logo-link:hover {
    color: var(--primary-dark);
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.navbar ul li a {
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding-bottom: 0.25rem;
}

.navbar ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.navbar ul li a:hover {
    color: var(--primary-color);
}

.navbar ul li a:hover::after {
    width: 100%;
}

.social-icons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.social-icons img {
    width: 32px;
    margin-left: 20px;
    transition: var(--transition);
    filter: brightness(0.8);
}

.social-icons a:hover img {
    filter: brightness(1);
    transform: scale(1.1);
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
    padding: 120px 20px;
    background: linear-gradient(135deg, var(--bg-light) 0%, #e8f0fe 100%);
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(26, 115, 232, 0.1);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation: float 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(91, 155, 245, 0.08);
    border-radius: 50%;
    bottom: -50px;
    left: -50px;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
}

.hero-text h1 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero .btn {
    margin-top: 1rem;
}

.hero-text a {
    display: inline-block;
    padding: 15px 30px;
    border: 2px solid #000;
    text-decoration: none;
    color: #000;
    font-size: 20px;
}

.hero-image img {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    object-fit: cover;
}

/* =============================================
   ABOUT SECTION
   ============================================= */
.about {
    padding: 80px clamp(20px, 5vw, 100px);
    background-color: var(--bg-white);
    text-align: center;
}

.about h2 {
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.about h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.about p {
    font-size: 1.05rem;
    max-width: 700px;
    margin: 1.5rem auto;
    line-height: 1.9;
}

.about a {
    display: inline-block;
    padding: 15px 30px;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    font-size: 20px;
}

/* =============================================
   TECH STACK SECTION
   ============================================= */
.tech-stack {
    padding: 80px clamp(20px, 5vw, 100px);
    background-color: var(--bg-light);
}

.tech-stack h2 {
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 1.5rem;
    margin-bottom: 1rem;
}

.tech-stack h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.tech-stack > .container > p {
    text-align: center;
    max-width: 700px;
    margin: 1.5rem auto 3rem;
}

.tech-stack-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.tech-category {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.tech-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.tech-category h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.tech-list {
    list-style: none;
}

.tech-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
    font-weight: 500;
}

.tech-list li:last-child {
    border-bottom: none;
}

.tech-stack p {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.tech-stack-container ul {
    list-style: none;
    padding: 0;
}

.tech-stack-container ul li {
    display: flex;
    align-items: center;
    font-size: 1.2em;
    margin: 10px 0;
}

.tech-stack-container ul li img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    background-color: #ccc;
    border-radius: 50%;
}

/* =============================================
   PORTFOLIO SECTION
   ============================================= */
.portfolio {
    padding: 80px clamp(20px, 5vw, 100px);
    background-color: var(--bg-white);
}

.portfolio h2 {
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 1.5rem;
    margin-bottom: 1rem;
}

.portfolio h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 1.5rem auto 3rem;
    font-size: 1.05rem;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project {
    background-color: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

.project-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project h3 {
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.project p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project .btn {
    align-self: flex-start;
    margin-top: auto;
}

/* =============================================
   CONTACT SECTION
   ============================================= */
.contact-section {
    padding: 80px clamp(20px, 5vw, 100px);
    background-color: var(--bg-light);
}

.contact-section h2 {
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 1.5rem;
    margin-bottom: 1rem;
}

.contact-section h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.contact-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.contact-details-item {
    text-align: center;
    padding: 2rem;
    background-color: var(--bg-white);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.contact-details-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-details-item p a {
    color: var(--text-dark);
    font-weight: 500;
}

.contact-details-item p a:hover {
    color: var(--primary-color);
}

.contact-form {
    max-width: 600px;
    margin: 2rem auto;
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.contact-form-group {
    margin-bottom: 1.5rem;
}

.contact-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.contact-form-group input,
.contact-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.contact-form-group input:focus,
.contact-form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.contact-form-group textarea {
    resize: vertical;
}

.contact-form .btn {
    width: 100%;
    text-align: center;
}

.contact-section {
    background-color: #F4F4F9;
    padding: 50px 20px;
}

.contact-details-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h2 {
    text-align: center;
    margin-bottom: 40px;
}

.contact-details-item h3 {
    margin-bottom: 10px;
    font-size: 1.5em;
}

button[type="submit"] {
    display: inline-block;
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #555;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
    background: linear-gradient(135deg, var(--text-dark) 0%, #2a2a2a 100%);
    color: white;
    padding: 3rem clamp(20px, 5vw, 100px);
    width: 100%;
}

.footer-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 2rem;
    max-width: 100%;
}

.footer-social-icons {
    display: flex;
    gap: 1.5rem;
    margin-right: auto;
}

.footer-social-icons a img {
    width: 32px;
    height: 32px;
    transition: var(--transition);
    filter: brightness(1) invert(1);
}

.footer-social-icons a:hover img {
    transform: scale(1.15);
}

footer p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    white-space: nowrap;
}

.social-icons img, .footer-social-icons img {
    cursor: pointer;
    height: 32px;
    width: 32px;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 20px;
    }

    .navbar ul {
        gap: 1.5rem;
        font-size: 0.9rem;
    }

    .social-icons {
        gap: 1rem;
    }

    .hero {
        padding: 60px 20px;
        min-height: auto;
    }

    .projects-container {
        grid-template-columns: 1fr;
    }

    .contact-details {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .tech-stack-container {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1rem;
    }

    .navbar ul {
        gap: 1rem;
        font-size: 0.85rem;
    }

    .hero {
        padding: 40px 15px;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* =============================================
   ANIMATIONS & TRANSITIONS
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =============================================
   PRINT STYLES
   ============================================= */
@media print {
    header,
    footer {
        display: none;
    }

    body {
        background-color: white;
    }

    .btn {
        border: 1px solid var(--text-dark);
    }
}

@media (max-width: 768px) {
    .contact-details {
        flex-direction: column;
        align-items: center;
    }

    .contact-details-item {
        margin-bottom: 20px;
    }
}