* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --creamy: #fef3b3;
    --light-creamy: #fffefe;
    --dark-bg: #101319;
    --dark-card: #16181f;
    --dark-text: #282727;
    --accent-blue: #00a2ff;
    --bright-blue: #0095ff;
    --dark-grey: #27272a;
    --button-bg: #101319;
    --button-text: #2f8be6;
}

body {
    background: linear-gradient(to right, var(--creamy) 0%, var(--light-creamy) 60%);
    color: var(--dark-text);
    line-height: 1.6;
    min-height: 100vh;
    padding: 0;
}

/* Header & Navigation */
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.95); /* semi-transparent */
    padding: 1rem 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0;               /* start hidden */
    pointer-events: none;     /* unclickable when hidden */
    transition: opacity 0.5s ease;
    z-index: 1000;
}

/* visible header */
.header-visible {
    opacity: 1;
    pointer-events: auto;     /* clickable */
}


body:not(.home) header {
    opacity: 1;
    pointer-events: auto;
}

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

.header-left h1 {
    margin: 0;
    font-size: 1.2rem;
}

.header-right {
    font-size: 1rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.logo a {
    color: var(--dark-text);
    text-decoration: none;
}

.logo i {
    margin-right: 0.5rem;
    color: var(--bright-blue);
}

.nav-item{
    text-decoration: none;
     display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  font-size: 0.9rem;
  color: inherit;
}

.nav-icon-box{
  width: 60px;
  height: 60px;
  
  border-radius: 16px; /* rounded rectangle */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  margin-right: 15px;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.nav-icon-box.about {
  background-color: #ff6f61; /* soft red */
}

.nav-icon-box.portfolio {
  background-color: #6a5acd; /* slate blue */
}
.nav-icon-box.services {
   background-color: #3a57f4; /* blue box */
}
.nav-icon-box.contact {
  background-color: #ffb347; /* soft orange */
}


.nav-icon-img {
  width: 45px;  /* control icon size */
  height: 45px;
}

.nav-icon-box.about:hover {
    background-color: #e85c50; /* darker soft red on hover */
    transform: scale(1.05);
}
.nav-icon-box.portfolio:hover {
    background-color: #5548b0; /* darker slate blue on hover */
    transform: scale(1.05);
}
.nav-icon-box.services:hover {
    background-color: #2a3fa0; /* darker blue on hover */
    transform: scale(1.05);
}
.nav-icon-box.contact:hover {
    background-color: #e6a23c; /* darker soft orange on hover */
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2 rem;
    justify-content: center;
}

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


.nav-social {
    display: flex;
    gap: 1rem;
    margin-left: 2rem;
}

.nav-social a {
    color: var(--dark-text);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.nav-social a:hover {
    color: var(--bright-blue);
    transform: translateY(-3px);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--dark-text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 2rem;
    
    position: relative;
    color: var(--dark-text);
}

.hero::before {
  content: "";
  position: absolute;
  width: 100vh;
    height: 100vh;
   border: 10px solid var(--bright-blue);
    min-width: 300px;
    min-height: 300px;
  border-radius: 50%;
  background: transparent; /* grey circle */
  top: 75%;        /* move it up */
  left: 50%; 
  transform: translate(-50%, -50%);      /* move it left */
  z-index: -1;        /* keep it behind the text */
}

.circle-bg {
    position: absolute;
    width: 80vh;
    height: 80vh;
    max-width: 800px;
    max-height: 800px;
    min-width: 300px;
    min-height: 300px;
    border-radius: 50%;
    background: #ff2d2d;
    top: 75%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    
    -webkit-background-clip: text;
    background-clip: text;
    color: var(--dark-text);
    display: inline-block;
    line-height: 1.2;
}

.hero h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
    opacity: 0.9;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    background-color: var(--button-bg);
    color: var(--button-text);
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--bright-blue);
    font-size: 1.1rem;
    box-shadow: 0 0 15px rgba(0, 149, 255, 0.4);
}

.btn:hover {
    background-color: var(--bright-blue);
    color: var(--dark-bg);
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(0, 149, 255, 0.6);
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

section {
    margin-bottom: 6rem;
    scroll-margin-top: 80px;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.8rem;
    margin-bottom: 1.2rem;
    position: relative;
    display: inline-block;
    color: var(--dark-text);
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--bright-blue);
    border-radius: 2px;
}

.section-title p {
    color: var(--dark-text);
    opacity: 0.8;
    font-size: 1.2rem;
}

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

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 350px;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1.8rem;
    color: var(--bright-blue);
}

.about-text p {
    margin-bottom: 1.8rem;
    color: var(--dark-text);
    line-height: 1.8;
    font-size: 1.1rem;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-top: 2.5rem;
}

.skill {
    background-color: var(--dark-card);
    color: var(--dark-text);
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    font-weight: 500;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid var(--bright-blue);
}

.skill:hover {
    background-color: var(--bright-blue);
    color: var(--dark-bg);
    transform: translateY(-3px);
}

.about-image {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.5s ease;
    border: 2px solid var(--bright-blue);
}

.about-image:hover {
    transform: scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.portfolio-item {
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    height: 280px;
    transition: all 0.3s ease;
    border: 2px solid var(--bright-blue);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 149, 255, 0.85), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    color: var(--dark-text);
    opacity: 0;
    transition: all 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    margin-bottom: 0.8rem;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background-color: var(--dark-card);
    border-radius: 15px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: 2px solid var(--bright-blue);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 149, 255, 0.3);
}

.service-icon {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    color: var(--bright-blue);
}

.service-card h3 {
    font-size: 1.7rem;
    margin-bottom: 1.5rem;
    color: var(--dark-text);
}

.service-card p {
    color: var(--dark-text);
    line-height: 1.7;
    opacity: 0.9;
}

/* Footer */
footer {
    background-color: var(--dark-card);
    color: var(--dark-text);
    text-align: center;
    padding: 3rem 2rem;
    border-top: 2px solid var(--bright-blue);
}

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

.footer-content .logo a {
    color: var(--dark-text);
    font-size: 2.2rem;
}

.footer-content p {
    margin: 1.5rem 0;
    font-size: 1.2rem;
    opacity: 0.9;
}

.back-to-top {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    background-color: var(--dark-card);
    color: var(--dark-text);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.8rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
    border: 2px solid var(--bright-blue);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--bright-blue);
    color: var(--dark-bg);
    transform: translateY(-5px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--dark-card);
        flex-direction: column;
        align-items: center;
        padding: 2rem;
        gap: 1.5rem;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: all 0.4s ease;
        border-top: 2px solid var(--bright-blue);
    }
    
    .nav-menu.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    
    .nav-social {
        margin-left: 0;
        justify-content: center;
    }
    
    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--dark-text);
        cursor: pointer;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .section-title h2 {
        font-size: 2.3rem;
    }
}

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

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

