* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --accent: #4895ef;
    --bg: #f8f9fa;
    --dark: #121212;
    --light: #f8f9fa;
    --card-bg: #ffffff;
    --text: #121212;
    --text-light: #f8f9fa;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body.dark-mode {
    --primary: #4895ef;
    --secondary: #4361ee;
    --accent: #3f37c9;
    --bg: #1e1e1e;
    --dark: #121212;
    --light: #1e1e1e;
    --card-bg: #252525;
    --text: #f8f9fa;
    --text-light: #ffffff;
}

body {
    font-family: "Poppins", sans-serif;
    background-color: var(--light);
    color: var(--text);
    transition: var(--transition);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

section {
    padding: 80px 0;
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
}

section.animated {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    color: var(--primary);
    opacity: 0;
    transform: translateY(-20px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

.section-title.animate {
    opacity: 1;
    transform: translateY(0);
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    backdrop-filter: none;
    padding: 8px 0;
    box-shadow: none;
    transition: var(--transition);
    transform: translateY(0);
    opacity: 1;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    padding: 6px 0;
}

.dark-mode .navbar.scrolled {
    background-color: rgba(30, 30, 30, 0.95);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.25);
}

.navbar.hide {
    transform: translateY(-100%);
    opacity: 0;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    position: relative;
    display: inline-block;
    overflow: hidden;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.navbar.scrolled .logo {
    color: var(--primary);
}

.logo::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: translateX(-101%);
    transition: transform 0.4s ease;
}

.logo:hover::after {
    transform: translateX(0);
}

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

.nav-links li {
    margin-left: 20px;
    position: relative;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: var(--transition);
    display: inline-block;
    font-size: 0.95rem;
}

.navbar.scrolled .nav-links a {
    color: var(--text);
    font-size: 0.95rem;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: var(--transition);
    border-radius: 2px;
}

.navbar.scrolled .nav-links a::after {
    background: var(--primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: rgba(255, 255, 255, 0.8);
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    transition: var(--transition);
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    perspective: 500px;
}

.navbar.scrolled .dark-mode-toggle {
    color: var(--text);
}

.dark-mode-toggle::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    opacity: 0;
    border-radius: 50%;
    transition: var(--transition);
    z-index: -1;
}

.dark-mode-toggle:hover::before {
    opacity: 0.1;
}

.dark-mode-toggle .icon-wrapper {
    position: relative;
    width: 20px;
    height: 20px;
    transform-style: preserve-3d;
    transform: rotate(0deg);
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.dark-mode-toggle .moon-icon,
.dark-mode-toggle .sun-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        opacity 0.4s ease,
        transform 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    font-size: 1rem;
}

.dark-mode-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.dark-mode-toggle .sun-icon {
    opacity: 0;
    transform: rotate(90deg);
}

body.dark-mode .dark-mode-toggle .moon-icon {
    opacity: 0;
    transform: rotate(-90deg);
}

body.dark-mode .dark-mode-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.dark-mode-toggle:hover .icon-wrapper {
    transform: rotate(20deg);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    position: relative;
    z-index: 1000;
    padding: 0;
    transition: var(--transition);
}

.menu-toggle .bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: white;
    border-radius: 2px;
    margin: 4px auto;
    transition: var(--transition);
    position: relative;
}

.navbar.scrolled .menu-toggle .bar {
    background-color: var(--text);
}

.dark-mode .menu-toggle .bar {
    background-color: var(--text-light);
}

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

.navbar.scrolled .menu-toggle.active .bar:nth-child(1) {
    background-color: var(--primary);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

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

.navbar.scrolled .menu-toggle.active .bar:nth-child(3) {
    background-color: var(--primary);
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    margin-bottom: -5px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
    width: 100%;
}

.hero-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0px);
    }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
    animation: fadeInDown 1s ease;
}

.hero p {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    animation: fadeInUp 1s ease;
}

.typing-text {
    min-height: 60px;
    margin-bottom: 30px;
}

#typing {
    font-size: 1.8rem;
    font-weight: 500;
    color: white;
    display: inline-block;
    border-right: 3px solid white;
    padding-right: 5px;
    animation: blink 0.7s infinite;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: white;
    color: var(--primary);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transition: width 0.5s ease;
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    color: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.about-text p {
    margin-bottom: 20px;
}

.about-list {
    list-style: none;
    margin-bottom: 30px;
}

.about-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateX(-20px);
    transition:
        opacity 0.5s ease,
        transform 0.5s ease;
}

.about-list.animate li {
    opacity: 1;
    transform: translateX(0);
}

.about-list li:nth-child(1) {
    transition-delay: 0.1s;
}
.about-list li:nth-child(2) {
    transition-delay: 0.2s;
}
.about-list li:nth-child(3) {
    transition-delay: 0.3s;
}
.about-list li:nth-child(4) {
    transition-delay: 0.4s;
}

.about-list li::before {
    content: "✓";
    color: var(--accent);
    font-weight: bold;
    margin-right: 10px;
    font-size: 1.2rem;
}

.about-img {
    position: relative;
    opacity: 0;
    transform: scale(0.9);
    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
    max-width: 100%;
    display: flex;
    justify-content: center;
}

.about-img.animate {
    opacity: 1;
    transform: scale(1);
}

.photo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.wave-background {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 15px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        var(--primary) 30%,
        var(--secondary) 70%
    );
    overflow: hidden;
    width: 450px;
    height: 450px;
    animation: float 6s ease-in-out infinite;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.wave-background::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle,
        rgba(67, 97, 238, 0.5) 30%,
        rgba(63, 55, 201, 0.5) 70%
    );
    clip-path: path("M0,100 C50,150 150,50 200,100 L200,0 L0,0 Z");
    z-index: 0;
    animation: float 8s ease-in-out infinite;
}

.wave-background img {
    margin-top: 60px;
    position: relative;
    z-index: 1;
    width: 95%;
    height: 95%;
    display: block;
    object-fit: cover;
    border-radius: 50%;
    transition: var(--transition);
}

.about-img.animate:hover .wave-background {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.about-img.animate:hover .wave-background img {
    transform: scale(1.05);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.skill-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

.skill-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.dark-mode .skill-card {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.skill-icon {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 20px;
    transition: var(--transition);
}

.skill-card:hover .skill-icon {
    transform: scale(1.1);
    color: var(--primary);
}

.skill-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.skill-bar {
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
}

.dark-mode .skill-bar {
    background-color: #333;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0;
    transition: width 1.5s ease-in-out;
    border-radius: 5px;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.skill-percent {
    font-weight: 600;
    color: var(--primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.dark-mode .project-card {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-img {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.project-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.project-category {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.project-content p {
    margin-bottom: 20px;
    flex: 1;
}

.project-links {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.project-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    transition: var(--transition);
    text-decoration: none;
}

.project-link:hover {
    background-color: var(--accent);
    transform: translateY(-5px);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background-color: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.contact-info {
    padding: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    position: relative;
    overflow: hidden;
}

.contact-info::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%
    );
    transform: rotate(30deg);
}

.contact-title {
    font-size: 2rem;
    margin-bottom: 30px;
    color: white;
    position: relative;
}

.contact-detail {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    position: relative;
    opacity: 0;
    transform: translateX(-20px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

.contact-detail.animate {
    opacity: 1;
    transform: translateX(0);
}

.contact-detail:nth-child(1) {
    transition-delay: 0.1s;
}
.contact-detail:nth-child(2) {
    transition-delay: 0.2s;
}
.contact-detail:nth-child(3) {
    transition-delay: 0.3s;
}

.contact-icon {
    font-size: 1.5rem;
    margin-right: 15px;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-text h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    position: relative;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: white;
    color: var(--primary);
    font-size: 1.5rem;
    transition: var(--transition);
    text-decoration: none;
}

.social-link:hover {
    background-color: var(--accent);
    color: white;
    transform: translateY(-5px);
}

.contact-form {
    padding: 50px;
}

.form-group {
    margin-bottom: 25px;
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

.form-group.animate {
    opacity: 1;
    transform: translateY(0);
}

.form-group:nth-child(1) {
    transition-delay: 0.1s;
}
.form-group:nth-child(2) {
    transition-delay: 0.2s;
}
.form-group:nth-child(3) {
    transition-delay: 0.3s;
}
.form-group:nth-child(4) {
    transition-delay: 0.4s;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: "Poppins", sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    background-color: transparent;
    color: var(--text);
}

.dark-mode .form-control {
    border-color: #444;
    background-color: rgba(0, 0, 0, 0.1);
}

.form-control:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.submit-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    transition: width 0.5s ease;
    z-index: -1;
}

.submit-btn:hover::before {
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    left: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 2000;
    opacity: 0;
    transform: translateX(100%);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    background-color: #4caf50;
    color: white;
}

.notification.error {
    background-color: #f44336;
    color: white;
}

.notification .icon {
    font-size: 1.2rem;
}

.footer {
    background-color: var(--dark);
    color: var(--text-light);
    padding: 60px 0 30px;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 15px;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.footer-logo::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: translateX(-101%);
    transition: transform 0.4s ease;
}

.footer-logo:hover::after {
    transform: translateX(0);
}

.footer-about {
    font-size: 0.95rem;
    line-height: 1.7;
    opacity: 0.8;
}

.footer-title {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
    opacity: 0.8;
    display: inline-block;
}

.footer-links a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: var(--transition);
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-links a:hover {
    color: var(--accent);
    opacity: 1;
    transform: translateX(5px);
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.footer-contact i {
    margin-right: 10px;
    color: var(--accent);
    min-width: 20px;
}

.footer-bottom {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.7;
}

.social-footer {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.social-footer a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.1rem;
    transition: var(--transition);
    text-decoration: none;
}

.social-footer a:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-90deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

@keyframes rotateOut {
    from {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
    to {
        opacity: 0;
        transform: rotate(90deg) scale(0.5);
    }
}

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 999;
}

.scroll-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
}

.hero-wave-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    overflow: hidden;
    line-height: 0;
    z-index: 1;
}

.hero-wave {
    width: 100%;
    height: 100%;
    display: block;
}

@media (max-width: 992px) {
    .about-content,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .contact-info {
        padding: 30px;
    }

    .contact-form {
        padding: 30px;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero p {
        font-size: 1.3rem;
    }

    .hero-img {
        width: 170px;
        height: 170px;
    }

    #typing {
        font-size: 1.5rem;
    }

    .wave-background {
        width: 450px;
        height: 450px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--card-bg);
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 25px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        transition:
            transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
            opacity 0.4s,
            visibility 0.4s;
        z-index: 999;
        opacity: 0;
        visibility: hidden;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links.closing {
        transform: translateY(-150%);
        opacity: 0;
        visibility: hidden;
    }

    .nav-links li {
        margin: 10px 0;
        width: 100%;
        border-bottom: 1px solid #ccc;
        padding-bottom: 10px;
        opacity: 0;
        transform: translateX(-20px);
        transition:
            opacity 0.3s ease,
            transform 0.3s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
        transition-delay: 0.1s;
    }

    .nav-links.closing li {
        opacity: 0;
        transform: translateX(-20px);
        transition:
            opacity 0.2s ease,
            transform 0.2s ease;
    }

    .nav-links li:nth-child(1) {
        transition-delay: 0.1s;
    }
    .nav-links li:nth-child(2) {
        transition-delay: 0.2s;
    }
    .nav-links li:nth-child(3) {
        transition-delay: 0.3s;
    }
    .nav-links li:nth-child(4) {
        transition-delay: 0.4s;
    }
    .nav-links li:nth-child(5) {
        transition-delay: 0.5s;
    }

    .nav-links li:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .nav-links a {
        width: 100%;
        padding: 8px 0;
        font-size: 0.95rem;
        display: flex;
        align-items: center;
        color: var(--text);
    }

    .nav-links a::before {
        content: "";
        display: inline-block;
        width: 6px;
        height: 6px;
        background-color: var(--accent);
        border-radius: 50%;
        margin-right: 10px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    .section-title::after {
        width: 60px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    section {
        padding: 50px 0;
    }

    .hero-img {
        width: 150px;
        height: 150px;
    }

    #typing {
        font-size: 1.3rem;
    }

    .btn {
        padding: 10px 25px;
        font-size: 0.95rem;
    }

    .wave-background {
        width: 330px;
        height: 330px;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-img {
        width: 130px;
        height: 130px;
    }

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

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        gap: 25px;
    }

    .about-text h2 {
        font-size: 1.8rem;
    }

    .skill-card,
    .project-card {
        padding: 20px;
    }

    .contact-wrapper {
        gap: 0;
    }

    .contact-info,
    .contact-form {
        padding: 20px;
    }

    .contact-title {
        font-size: 1.5rem;
    }

    .contact-detail {
        margin-bottom: 15px;
    }

    .footer-container {
        padding: 0 15px;
    }

    .footer-title {
        font-size: 1rem;
    }

    #typing {
        font-size: 1.1rem;
    }

    .btn {
        padding: 10px 25px;
        font-size: 0.95rem;
    }

    .projects-grid {
        gap: 20px;
    }

    .project-card {
        padding: 0;
        border-radius: 12px;
    }

    .project-img {
        height: auto;
    }

    .project-img img {
        height: auto;
        max-height: 200px;
        object-fit: cover;
        border-radius: 0;
    }

    .project-content {
        padding: 15px;
        text-align: left;
    }

    .project-title {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }

    .project-category {
        font-size: 0.8rem;
        padding: 3px 10px;
        margin-bottom: 10px;
    }

    .project-content p {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 15px;
    }

    .project-links {
        justify-content: flex-start;
    }

    .project-link {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .dark-mode-toggle {
        width: 40px;
        height: 40px;
    }

    .wave-background {
        width: 290px;
        height: 290px;
    }
}
