@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@700;900&display=swap');

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

:root {
    --primary: #0d3955;
    --secondary: #00669d;
    --accent: #1e90ff;
    --dark: #0a1e2e;
    --light: #f8fafc;
}


body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    overflow-x: hidden;
    scroll-behavior: smooth;
    background: var(--light);
}

body::-webkit-scrollbar{
    width: 0;
}

html {
  color-scheme: light;
}

/* ========== ANIMATED BACKGROUND ========== */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0d3955 0%, #1a5f7a 50%, #00669d 100%);
    overflow: hidden;
}

.animated-bg::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveGrid 20s linear infinite;
}

@keyframes moveGrid {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

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

/* ========== NAVIGATION ========== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    z-index: 1000;
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(13, 57, 85, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

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

/* ========== HERO SECTION ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 5%;
    position: relative;
    background: transparent;
}

.hero-content {
    max-width: 900px;
    z-index: 1;
    text-align: center;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease;
}

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

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 900;
    color: white;
    margin-bottom: 1rem;
    line-height: 1;
    animation: fadeInUp 1s ease 0.2s both;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.hero-typing {
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease 0.4s both;
}

.typed-text {
    color: var(--accent);
    font-weight: 700;
    display: inline-block;
    min-width: 150px;
    text-align: left;
}

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

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    animation: fadeInUp 1s ease 0.6s both;
}

.social-links a {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-decoration: none;
}

.social-links a:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-10px) rotate(360deg);
    box-shadow: 0 10px 30px rgba(30, 144, 255, 0.5);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-20px); }
    60% { transform: translateX(-50%) translateY(-10px); }
}

.scroll-indicator::before {
    content: '';
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    position: relative;
}

.scroll-indicator::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    transform: translateX(-50%);
    animation: scrollDot 2s infinite;
}

@keyframes scrollDot {
    0% { transform: translateX(-50%) translateY(0); opacity: 1; }
    100% { transform: translateX(-50%) translateY(20px); opacity: 0; }
}

/* ========== SECTION STYLES ========== */
section {
    position: relative;
    background: white;
}

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

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: var(--primary);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 2px;
}

.section-subtitle {
    color: var(--primary);
    opacity: 0.7;
    font-size: 1.1rem;
}

/* ========== ABOUT SECTION ========== */
.about {
    padding: 6rem 5%;
    background: linear-gradient(180deg, white 0%, var(--light) 100%);
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--primary);
    opacity: 0.85;
}

.about-text strong {
    color: var(--primary);
    font-weight: 600;
}

.about-text .highlight {
    color: var(--secondary);
    font-weight: 600;
    position: relative;
}

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

.skill-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(13, 57, 85, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 102, 157, 0.15);
    border-color: var(--accent);
}

.skill-icon {
    width: 60px;
    height: 60px;
    border-radius: 20%;
    padding: .7rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    fill: var(--light);
    position: relative;
    overflow: hidden;
}

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

.skill-card p {
    color: var(--primary);
    opacity: 0.7;
    font-size: 0.9rem;
}

/* ========== PROJECTS SECTION ========== */
.projects {
    background: white;
}

.projects-grid {
    width: 100vw;
    min-height: 60vh;
    padding: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 100px;
    flex-wrap: wrap;
}

.project-card {
    min-width: 350px;
    max-width: 400px;
    width: 30%;
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 70px rgba(0, 102, 157, 0.2);
}

.project-image {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem;
    fill: var(--light);
    position: relative;
    overflow: hidden;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.project-content {
    padding: 2rem;
}

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

.project-card p {
    color: var(--primary);
    opacity: 0.7;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    padding: 0.4rem 1rem;
    background: rgba(30, 144, 255, 0.1);
    color: var(--secondary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-btn {
    flex: 1;
    padding: 0.8rem;
    text-align: center;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--accent);
    transform: scale(1.05);
}

.btn-secondary {
    background: rgba(13, 57, 85, 0.05);
    color: var(--primary);
}

.btn-secondary:hover {
    background: rgba(13, 57, 85, 0.1);
}

/* ========== CONTACT SECTION ========== */
.contact {
    padding: 6rem 5%;
    background: linear-gradient(180deg, white 0%, var(--light) 100%);
}

.contact-container {
    max-width: 1500px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--primary);
    opacity: 0.7;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.info-card {
    max-width: 450px;
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 30px rgba(0, 102, 157, 0.15);
}

.info-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.contact-form {
    background: white;
    padding: 3rem;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(13, 57, 85, 0.05);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full {
    grid-column: 1 / -1;
}

label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

input, textarea {
    padding: 1rem 1.2rem;
    border: 2px solid rgba(13, 57, 85, 0.1);
    border-radius: 15px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(30, 144, 255, 0.1);
    transform: translateY(-2px);
}

textarea {
    resize: vertical;
    min-height: 150px;
    max-height: 200px;
}

.error {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.4rem;
}

.error-input {
    border-color: #ef4444 !important;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.char-count {
    text-align: right;
    font-size: 0.85rem;
    color: rgba(13, 57, 85, 0.4);
    margin-top: 0.4rem;
}

.submit-btn {
    width: 100%;
    padding: 1.2rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1.5rem;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.submit-btn:hover::before {
    width: 300px;
    height: 300px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 102, 157, 0.4);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.alert {
    padding: 1.2rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    animation: slideInDown 0.5s ease;
}

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

.alert-error {
    background: linear-gradient(135deg, #fee, #fcc);
    color: #c00;
    border: 2px solid #faa;
}

/* ========== SUCCESS ANIMATION ========== */
.success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.4s ease;
}

.success-overlay.active {
    display: flex;
}

.success-animation {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    animation: scaleIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes scaleIn {
    from {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

.success-circle {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #4ade80 0%, #10b981 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 30px 90px rgba(74, 222, 128, 0.6);
    position: relative;
}

.success-circle::before {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.3) 0%, transparent 70%);
    animation: ripple 2s infinite;
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.success-checkmark {
    width: 100px;
    height: 100px;
    stroke: white;
    stroke-width: 4;
    fill: none;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawCheck 0.8s ease 0.3s forwards;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

.success-text {
    margin: 20px;
    position: relative;
    text-align: center;
    color: white;
    animation: fadeIn 0.8s ease 0.6s both;
}

.success-text h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.success-text p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.sparkle {
    position: absolute;
    font-size: 1.5rem;
    animation: sparkle 1.2s ease forwards;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

@keyframes sparkle {
    0% {
        transform: translate(0, 0) scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y)) scale(1.5) rotate(360deg);
        opacity: 0;
    }
}

/* ========== FOOTER ========== */
footer {
    background: var(--primary);
    color: white;
    padding: 3rem 5%;
    text-align: center;
}

footer p {
    opacity: 0.8;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .about-container,
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .nav-links {
        display: none;
    }
}

@media (max-width: 768px) {
    .form-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (prefers-color-scheme: dark) {
  html {
    color: var(--primary) !important;
    filter: invert(0) !important;
  }

  img, video, iframe, svg {
    filter: invert(0) !important;
  }
}