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

:root {
    --primary: #059669;
    --secondary: #10b981;
    --accent: #6ee7b7;
    --dark: #064e3b;
    --dark-green: #047857;
    --light: #f0fdf4;
    --card-bg: #ffffff;
    --text: #065f46;
    --text-light: #6b7280;
}

html {
    scroll-behavior: smooth;
}

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

/* Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(5, 150, 105, 0.1);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark);
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.menu-toggle {
    display: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Hero Section */
#home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-green) 100%);
    padding: 6rem 2rem 4rem;
}

.hero-content {
    max-width: 1200px;
    display: flex;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-text {
    flex: 1;
    min-width: 300px;
    color: white;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-text h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-image {
    flex: 0 0 300px;
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

.profile-pic {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    border: 6px solid var(--accent);
    object-fit: cover;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--accent);
    color: var(--dark);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(110, 231, 183, 0.4);
}

/* Section Styles */
section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    color: var(--dark);
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    margin: 1rem auto;
    border-radius: 2px;
}

/* About Section */
#about {
    background: white;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.about-photo {
    flex: 0 0 300px;
}

.about-pic {
    width: 350px;
    height: 425px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(5, 150, 105, 0.2);
    border: 4px solid var(--accent);
}

.about-text {
    flex: 1;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.skill-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(5, 150, 105, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid transparent;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(5, 150, 105, 0.15);
    border-color: var(--accent);
}

.skill-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    position: relative;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

/* hover percentage */
.skill-tag::after {
    content: attr(data-percent);
    position: absolute;
    top: -38px;
    left: 50%;
    transform: translateX(-50%);
    background: #065f46;
    color: #ecfdf5;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: 0.25s ease;
}

.skill-tag:hover::after {
    opacity: 1;
}


/* Projects Section */
#projects {
    background: white;
}

.tech-projects-title {
    text-align: center;
    font-size: 1.8rem;
    color: var(--dark-green);
    margin-bottom: 2rem;
    font-weight: 600;
}


.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(5, 150, 105, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid transparent;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(5, 150, 105, 0.15);
    border-color: var(--accent);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.project-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

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

.tech-tag {
    background: var(--secondary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    transition: color 0.3s;
}

.project-link:hover {
    color: var(--secondary);
}

.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
}

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

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

/* Life Skill Card - Horizontal Layout */
.horizontal-card {
    display: flex;
    flex-direction: row;
    /* Image left, Content right */
    width: 100%;
    max-width: 900px;
    /* Card size konjam adjust panniruken */
    margin: 0 auto;
    align-items: stretch;
    /* Image and Content ore height-la irukka */
    overflow: hidden;
    background: var(--card-bg);
}

.horizontal-card .project-image {
    flex: 0 0 40%;
    /* Image-ku 40% space */
    height: auto;
    min-height: 250px;
}

.horizontal-card .project-content {
    flex: 1;
    /* Content-ku balance space */
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Content-ai center-la veikkum */
    text-align: left;
}



/* Tag & Link */
.status-tag {
    display: inline-block;
    background: #00c98e;
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    margin: 15px 0;
}

.view-btn {
    display: block;
    color: #1a735c;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
}

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

.contact-content>p {
    color: var(--text-light);
    font-size: 1.1rem;
}

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

.contact-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(5, 150, 105, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid transparent;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(5, 150, 105, 0.15);
    border-color: var(--accent);
}

.contact-item a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.social-link {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-motto {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--light);
    font-style: italic;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--accent);
}

.copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
/* Background Animation */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.15;
    /* Subtlest transparency */
}

.floating-symbol {
    position: absolute;
    color: var(--primary);
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    white-space: nowrap;
    animation: floatAround linear infinite;
}

@keyframes floatAround {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translate(100px, -100px) rotate(360deg);
        opacity: 0;
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text h2 {
        font-size: 1.2rem;
    }

    .profile-pic {
        width: 380px;
        height: 380px;
    }

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

    /* About Section Mobile */
    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-photo {
        flex: 0 0 auto;
    }

    .about-pic {
        width: 300px;
        height: 350px;
    }
}

/* Mobile Specific Design (Phones - 480px and below) */
@media (max-width: 480px) {
    .nav-links {
        gap: 0.5rem;
        flex-direction: column;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }

    .hero-text h2 {
        font-size: 1rem;
    }

    .profile-pic {
        width: 280px;
        height: 280px;
    }

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

    .about-content {
        padding: 0 20px;
    }

    .about-pic {
        width: 250px;
        height: auto;
    }

    .about-text {
        font-size: 0.9rem;
        line-height: 1.5;
    }
}


@media (max-width: 768px) {
    .tech-projects-title {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: auto-fit;
    }
}

@media (max-width: 768px) {
    .horizontal-card {
        flex-direction: column;
    }

    .horizontal-card .project-image {
        flex: 0 0 100%;
        height: 200px;
    }
}

/* Typewriter Effect */
.typing-text {
    color: var(--accent);
    font-weight: bold;
    position: relative;
}

.typing-text::after {
    content: "|";
    position: absolute;
    right: -8px;
    animation: blink 0.7s infinite;
    color: var(--accent);
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Button Container */
.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

/* Secondary CTA Button (View Resume) */
.secondary-cta {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}

.secondary-cta:hover {
    background: var(--accent);
    color: var(--dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(110, 231, 183, 0.4);
}

/* Download CTA Button */
.download-cta {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.download-cta:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(5, 150, 105, 0.4);
}

/* Hobbies Section */
.hobby-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hobby-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(5, 150, 105, 0.1);
    text-align: center;
    border: 2px solid transparent;
    transition: transform 0.3s, border-color 0.3s;
    min-width: 200px;
    width: 250px;
}

.hobby-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
}

.hobby-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hobby-card h3 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.hobby-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

@media (max-width: 480px) {
    .secondary-cta {
        margin-left: 0;
        margin-top: 1rem;
        display: block;
        text-align: center;
    }
}

/* Back to Top Button */
#backToTop {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    font-size: 20px;
    border: none;
    outline: none;
    background-color: var(--primary);
    color: white;
    cursor: pointer;
    padding: 12px 18px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s, transform 0.3s;
}

#backToTop:hover {
    background-color: var(--dark-green);
    transform: translateY(-5px);
}

/* Why Hire Me Section */
.why-hire-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.why-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(5, 150, 105, 0.08);
    /* Lighter shadow */
    text-align: center;
    border: 1px solid rgba(5, 150, 105, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.why-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(5, 150, 105, 0.15);
    border-color: var(--accent);
}

.icon-box {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--light);
    width: 70px;
    height: 70px;
    line-height: 70px;
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
}

.why-card h3 {
    color: var(--dark);
    margin-bottom: 0.8rem;
    font-size: 1.25rem;
}

.why-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 992px) {
    .nav-container {
        padding: 1rem;
    }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
    }

    .hero-text {
        min-width: unset;
    }

    .profile-pic {
        width: 280px;
        height: 280px;
    }

    .cta-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {

    /* Mobile Menu Toggle */
    .menu-toggle {
        display: block;
        cursor: pointer;
        z-index: 1001;
    }

    .menu-toggle .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        background-color: var(--dark);
        transition: all 0.3s ease-in-out;
    }

    /* Active State for Burger to X */
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 60px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        padding: 2rem 0;
        gap: 1.5rem;
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    /* Stacking for sections */
    .skills-grid,
    .why-hire-grid,
    .projects-grid,
    .hobby-grid {
        grid-template-columns: 1fr !important;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-pic {
        width: 200px;
        height: 200px;
    }

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

    .cta-buttons {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .cta-button {
        width: 100%;
        text-align: center;
        margin: 0 !important;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.8rem;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }

    .hero-text h2 {
        font-size: 1.1rem;
    }

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

    .about-text {
        padding: 0 0.5rem;
    }
}