@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #475569;
    --primary-dark: #334155;
    --primary-light: #64748b;
    --text: #1a1a1a;
    --text-light: #666;
    --bg: #ffffff;
    --bg-secondary: #f8f9fa;
    --border: #e1e8ed;
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-hover: rgba(0, 0, 0, 0.12);
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.8;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* Scroll-triggered animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

header.scrolled {
    box-shadow: 0 2px 20px var(--shadow);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 25px 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-social {
    display: flex;
    gap: 15px;
}

.nav-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-links li:nth-child(4) a {
    color: #333;
}

.nav-links li:nth-child(4) a:hover {
    background: #333;
    color: white;
    transform: translateY(-2px);
}

.nav-links li:nth-child(5) a {
    color: #0A66C2;
}

.nav-links li:nth-child(5) a:hover {
    background: #0A66C2;
    color: white;
    transform: translateY(-2px);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: var(--text);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 150px 60px 100px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(71, 85, 105, 0.15) 0%, transparent 70%);
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 100px;
    width: 100%;
}

.hero-text {
    flex: 1;
}

.hero-image {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.hero-image img {
    width: 380px;
    height: 380px;
    border-radius: 50%;
    object-fit: cover;
    border: 8px solid white;
    box-shadow: 0 20px 60px rgba(71, 85, 105, 0.2);
    animation: fadeInRight 0.8s ease;
    transition: all 0.4s ease;
    cursor: pointer;
}

.hero-image img:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 25px 70px rgba(71, 85, 105, 0.4);
    border-color: var(--primary);
}

.hero-image .typing-container {
    height: 50px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-image .typing {
    font-size: 1.5rem;
    color: var(--text-light);
    font-weight: 500;
    opacity: 0;
    text-align: center;
}

.hero-image .typing.active {
    opacity: 1;
}

.hero-image .typing::after {
    content: '|';
    animation: blink 1s infinite;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-text h1 {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    animation: fadeInUp 0.8s ease;
}

@media (min-width: 769px) {
    .hero-text h1 {
        white-space: nowrap;
    }
}

.hero .accent {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 650px;
    margin-bottom: 40px;
    line-height: 1.9;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.btn-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.3s both;
    justify-content: flex-start;
}

.btn {
    padding: 12px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.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.5s ease, height 0.5s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(71, 85, 105, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(71, 85, 105, 0.5);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.btn-secondary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    padding: 2px;
    background: var(--primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sections */
section {
    padding: 120px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    display: block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: var(--primary);
    border-radius: 2px;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.skill-card {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.skill-card:hover::before {
    opacity: 0.05;
}

.skill-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.2);
    border-color: var(--primary);
}

.skill-card h3 {
    font-size: 1.15rem;
    color: var(--text);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.skill-card:hover h3 {
    color: var(--primary);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 40px;
}

.project-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border);
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-10px) rotateX(2deg);
    box-shadow: 0 20px 40px rgba(71, 85, 105, 0.25);
    border-color: transparent;
}

.project-content {
    padding: 40px;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text);
    line-height: 1.4;
    transition: all 0.3s ease;
}

.project-card:hover h3 {
    color: var(--primary);
}

.project-card p {
    color: var(--text-light);
    margin-bottom: 25px;
    line-height: 1.8;
    font-size: 1.05rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
}

.tag {
    padding: 8px 16px;
    background: rgba(71, 85, 105, 0.08);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(71, 85, 105, 0.2);
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

.project-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s ease;
}

.project-link:hover {
    gap: 12px;
}

/* Contact Section */
#contact {
    background: var(--bg-secondary);
    text-align: center;
}

.contact-content {
    text-align: center;
}

.contact-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 50px;
    line-height: 1.8;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 40px;
}

.social-links a {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid var(--border);
    position: relative;
}

.social-links a::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 2px;
    background: var(--primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-links a:nth-child(1) {
    color: #333;
}

.social-links a:nth-child(2) {
    color: #0A66C2;
}

.social-links a:hover {
    transform: translateY(-5px) scale(1.1);
}

.social-links a:hover::before {
    opacity: 1;
}

.social-links a:nth-child(1):hover {
    background: #333;
    color: white;
    border-color: #333;
}

.social-links a:nth-child(2):hover {
    background: #0A66C2;
    color: white;
    border-color: #0A66C2;
}

/* Footer */
footer {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 40px 60px;
}

footer p {
    opacity: 0.95;
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        padding: 20px 30px;
        justify-content: space-between;
    }

    .nav-social {
        display: none;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 250px;
        height: calc(100vh - 80px);
        background: white;
        flex-direction: column;
        padding: 40px;
        box-shadow: -2px 0 10px var(--shadow);
        transition: right 0.3s ease;
        gap: 25px;
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-menu {
        display: flex;
    }

    .hero {
        padding: 120px 30px 80px;
    }

    .hero-content {
        flex-direction: column-reverse;
        gap: 50px;
    }

    .hero-image img {
        width: 280px;
        height: 280px;
    }

    .hero-image .typing {
        font-size: 1.3rem;
    }

    .hero-image .typing-container {
        min-height: 45px;
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-text .typing {
        font-size: 1.4rem;
    }

    .hero-text p {
        font-size: 1.1rem;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    section {
        padding: 80px 30px;
    }

    .section-title {
        font-size: 2.2rem;
        margin-bottom: 50px;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 20px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .project-content {
        padding: 30px;
    }
}

/* About Page Styles */

.nav-links a.active {
    color: var(--primary);
}

.nav-links a.active::after {
    width: 100%;
}

/* Projects Hero Section */
.projects-hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 180px 60px 80px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.projects-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(71, 85, 105, 0.15) 0%, transparent 70%);
    animation: float 20s infinite ease-in-out;
}

.projects-hero-content {
    position: relative;
    z-index: 1;
}

.projects-hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 15px;
    animation: fadeInUp 0.8s ease;
}

.projects-hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* All Projects Section */
.all-projects {
    padding: 80px 60px 120px;
    background: white;
}

/* About Hero Section */
.about-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 200px 60px 80px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.about-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -30%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(71, 85, 105, 0.25) 0%, transparent 60%);
    animation: float 20s infinite ease-in-out;
}

.about-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -30%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(71, 85, 105, 0.2) 0%, transparent 60%);
    animation: floatReverse 25s infinite ease-in-out;
    z-index: 0;
}

@keyframes floatReverse {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-30px, 30px) rotate(-120deg); }
    66% { transform: translate(20px, -20px) rotate(-240deg); }
}

.about-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.about-hero-text h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0;
    animation: fadeInUp 0.8s ease;
    white-space: nowrap;
}

.about-hero-image {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.about-hero-image img {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid white;
    box-shadow: 0 15px 40px rgba(71, 85, 105, 0.2);
    animation: fadeInRight 0.8s ease;
    transition: all 0.4s ease;
}

.about-hero-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 50px rgba(71, 85, 105, 0.4);
}

/* Detailed About Section */
.about-detailed {
    padding: 80px 60px;
    background: white;
}

.about-container {
    max-width: 1400px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
}

.about-main h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text);
    position: relative;
    display: inline-block;
}

.about-main h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.about-main p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
}

.expertise-list {
    list-style: none;
    padding: 0;
}

.expertise-list li {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
    padding-left: 25px;
    position: relative;
}

.expertise-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.expertise-list strong {
    color: var(--text);
    display: block;
    margin-bottom: 5px;
}

/* Sidebar Cards */
.about-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--primary);
    transition: height 0.3s ease;
}

.info-card:hover {
    box-shadow: 0 8px 25px rgba(71, 85, 105, 0.15);
    transform: translateX(5px);
}

.info-card:hover::before {
    height: 100%;
}

.info-card h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text);
}

.facts-list {
    list-style: none;
    padding: 0;
}

.facts-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.facts-list li:last-child {
    border-bottom: none;
}

.fact-label {
    font-weight: 600;
    color: var(--text);
}

.fact-value {
    color: var(--text-light);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    padding: 8px 16px;
    background: rgba(71, 85, 105, 0.08);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(71, 85, 105, 0.2);
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: var(--primary);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

.interests-list {
    list-style: none;
    padding: 0;
}

.interests-list li {
    font-size: 1.05rem;
    color: var(--text-light);
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.interests-list li:hover {
    padding-left: 10px;
    color: var(--primary);
}

.interests-list li:last-child {
    border-bottom: none;
}

/* CTA Section */
.cta-section {
    padding: 100px 60px;
    background: var(--primary);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-section .btn-primary {
    background: white;
    color: var(--primary);
}

.cta-section .btn-primary:hover {
    background: var(--bg-secondary);
    transform: translateY(-2px) scale(1.05);
}

.cta-section .btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cta-section .btn-secondary:hover {
    background: white;
    color: var(--primary);
}

/* Contact Section Title Fix */
#contact .section-title {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

#contact .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Responsive - About Page */
@media (max-width: 768px) {
    .about-hero {
        padding: 120px 30px 60px;
        min-height: 40vh;
    }

    .about-hero-content {
        flex-direction: column;
        gap: 30px;
    }

    .about-hero-text h1 {
        font-size: 2.5rem;
        white-space: normal;
        text-align: center;
    }

    .about-hero-image img {
        width: 200px;
        height: 200px;
    }

    .about-detailed {
        padding: 60px 30px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-main h2 {
        font-size: 1.8rem;
    }

    .cta-section {
        padding: 60px 30px;
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cta-buttons .btn {
        width: 100%;
    }
}
/* FIX: Skills section title alignment */
.skills-section .section-title {
    text-align: left;
    display: inline-block;
}

.skills-section .section-title::after {
    left: 0;
    transform: none;
}
/* FIX: Education section title alignment */
.education-section .section-title {
    text-align: left;
    display: inline-block;
}
.education-section .section-title::after {
    left: 0;
    transform: none;
}

/* FINAL FIX: Education title underline precision */
.education-section .section-title {
    display: inline-block;
    width: fit-content;
}

.education-section .section-title::after {
    left: 0;
    transform: none;
}



