/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #0f172a;
    --text: #334155;
    --text-light: #64748b;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --border: #e2e8f0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 16px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--secondary);
    text-decoration: none;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.hamburger {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--secondary);
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 60px;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-greeting {
    color: var(--primary);
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 12px;
}

.hero-name {
    font-size: 56px;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.1;
    margin-bottom: 12px;
}

.hero-role {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 24px;
}

.hero-desc {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 32px;
    max-width: 560px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.btn-outline {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-small {
    padding: 8px 20px;
    font-size: 14px;
    margin-top: 16px;
}

.hero-social {
    display: flex;
    gap: 16px;
}

.hero-social a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    color: var(--secondary);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.hero-social a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* =========================================
   PHOTO & IMAGE WRAPPER (FIXED)
   ========================================= */
.hero-image-wrapper {
    width: 100%;
    aspect-ratio: 1;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden; /* Photo එක රවුමට කපන්න */
    box-shadow: 0 20px 60px rgba(37, 99, 235, 0.3);
    border: 4px solid white;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hero-image-wrapper:hover {
    transform: scale(1.03);
    box-shadow: 0 24px 70px rgba(37, 99, 235, 0.4);
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;      /* Photo එක stretch නොවී හරියට fit වෙන්න */
    object-position: center 15%; /* මූණ උඩට ගන්න මේක දැම්මා (ඔබේ මූණ උඩ තියෙනවා නම් 15% හොඳයි) */
    display: block;
}

/* Sections */
section {
    padding: 100px 0;
}

.section-title {
    font-size: 40px;
    font-weight: 800;
    color: var(--secondary);
    text-align: center;
    margin-bottom: 60px;
}

.section-title span {
    color: var(--primary);
}

/* About */
.about {
    background: var(--bg);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.about-card {
    background: var(--bg-alt);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.about-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    border-color: var(--primary);
}

.about-card i {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 16px;
}

.about-card h3 {
    font-size: 20px;
    color: var(--secondary);
    margin-bottom: 12px;
}

.about-card p {
    color: var(--text-light);
    font-size: 15px;
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text p {
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 16px;
}

/* Skills */
.skills {
    background: var(--bg-alt);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.skill-category {
    background: white;
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.skill-category h3 {
    font-size: 20px;
    color: var(--secondary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.skill-category h3 i {
    color: var(--primary);
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    padding: 8px 0;
    color: var(--text-light);
    font-size: 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
}

.skill-category li::before {
    content: "▹";
    color: var(--primary);
    font-weight: bold;
    margin-right: 12px;
}

.skill-category li:last-child {
    border-bottom: none;
}

/* Experience */
.experience {
    background: var(--bg);
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 40px;
}

.timeline-dot {
    position: absolute;
    left: 12px;
    top: 8px;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.timeline-content {
    background: var(--bg-alt);
    padding: 28px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.timeline-date {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.timeline-content h3 {
    font-size: 20px;
    color: var(--secondary);
    margin-bottom: 4px;
}

.timeline-content h4 {
    font-size: 15px;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 16px;
}

.timeline-content ul {
    list-style: none;
}

.timeline-content li {
    padding: 6px 0 6px 24px;
    position: relative;
    color: var(--text-light);
    font-size: 15px;
}

.timeline-content li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* Projects */
.projects {
    background: var(--bg-alt);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.project-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.project-cta {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: var(--primary);
}

.project-icon {
    width: 56px;
    height: 56px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.project-icon i {
    font-size: 24px;
    color: var(--primary);
}

.project-card h3 {
    font-size: 20px;
    color: var(--secondary);
    margin-bottom: 6px;
}

.project-client {
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 12px;
}

.project-card > p {
    color: var(--text-light);
    font-size: 15px;
    margin-bottom: 16px;
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.project-tags span {
    background: var(--bg-alt);
    color: var(--text);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--border);
}

/* Education */
.education {
    background: var(--bg);
}

.edu-card {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-alt);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.edu-icon {
    width: 64px;
    height: 64px;
    min-width: 64px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edu-icon i {
    font-size: 28px;
    color: var(--primary);
}

.edu-content h3 {
    font-size: 22px;
    color: var(--secondary);
    margin-bottom: 4px;
}

.edu-content h4 {
    font-size: 16px;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 8px;
}

.edu-date {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.edu-content p {
    color: var(--text-light);
    font-size: 15px;
}

/* Contact */
.contact {
    background: var(--bg-alt);
}

.contact-intro {
    text-align: center;
    color: var(--text-light);
    font-size: 16px;
    margin-top: -40px;
    margin-bottom: 48px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    border-color: var(--primary);
}

.contact-card i {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 16px;
}

.contact-card h3 {
    font-size: 18px;
    color: var(--secondary);
    margin-bottom: 8px;
}

.contact-card p {
    color: var(--text-light);
    font-size: 14px;
    word-break: break-word;
}

/* Footer */
.footer {
    background: var(--secondary);
    color: white;
    text-align: center;
    padding: 24px 0;
}

.footer p {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-image {
        order: -1;
    }
    .hero-image-wrapper {
        max-width: 280px;
    }
    .hero-buttons, .hero-social {
        justify-content: center;
    }
    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }
    .about-content,
    .skills-grid,
    .projects-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .hero-name {
        font-size: 40px;
    }
    .section-title {
        font-size: 32px;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    }
    .nav-links.active {
        display: flex;
    }
    .hamburger {
        display: block;
    }
    .edu-card {
        flex-direction: column;
    }
}