/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(120deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  color: #232946;
  line-height: 1.6;
}
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Navbar */
#navbar {
  position: sticky;
  top: 0;
  background: linear-gradient(120deg, #f5f7fa 0%, #c3cfe2 100%);
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}
.logo img {
  height: 40px;
  width: auto;
  filter: none;
  transition: filter 0.3s;
}
body.dark-mode .logo img {
  filter: drop-shadow(0 0 2px #fff) brightness(1.5) contrast(1.2);
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}
.nav-links a {
  text-decoration: none;
  color: #222;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: #0077ff;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  overflow: hidden;
  gap: 3rem;
  padding: 0 5vw;
  background: linear-gradient(120deg, #f5f7fa 0%, #c3cfe2 100%);
}
.hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(120deg, #e0c3fc 0%, #8ec5fc 100%);
  z-index: 0;
  opacity: 0.7;
}
@keyframes bgMove {
  0% { filter: blur(0px) brightness(1); }
  100% { filter: blur(8px) brightness(1.1); }
}
.hero-content {
  position: relative;
  z-index: 1;
  color: #232946;
  flex: 1 1 340px;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 260px;
}
.hero-content h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}
.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
}
.hero-animation {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  height: 320px;
}
.cta-buttons {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}
.btn {
  background: #fff;
  color: #0077ff;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn:hover {
  background: #0077ff;
  color: #fff;
  transform: translateY(-3px) scale(1.05);
}
.btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}
.btn-secondary:hover {
  background: #fff;
  color: #0077ff;
}

/* Projects Section */
.projects {
  padding: 5rem 0 3rem 0;
}
.projects h2 {
  text-align: center;
  margin-bottom: 2rem;
}
.project-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}
@media (max-width: 800px) {
  .project-cards {
    grid-template-columns: 1fr;
  }
}
.project-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
  padding: 2rem 1rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  opacity: 0;
  transform: translateY(40px);
}
.project-card img {
  width: 100%;
  max-width: 220px;
  border-radius: 10px;
  margin-bottom: 1rem;
}
.project-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 8px 32px rgba(0,119,255,0.12);
}
.btn-small {
  padding: 0.5rem 1.2rem;
  font-size: 0.95rem;
}

/* About Section */
.about {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
  padding: 5rem 0 3rem 0;
}
.about-img {
  flex: 1 1 220px;
  text-align: center;
}
.about-img img {
  width: 180px;
  border-radius: 50%;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.about-text {
  flex: 2 1 320px;
}
.about-text h2 {
  margin-bottom: 1rem;
}

/* Contact Section */
.contact {
  padding: 5rem 0 3rem 0;
}
.contact h2 {
  text-align: center;
  margin-bottom: 2rem;
}
#contact-form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  background: #fff;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
  opacity: 1;
  transform: none;
}
body.dark-mode #contact-form {
  background: #232946;
  box-shadow: 0 4px 24px rgba(0,0,0,0.22);
  border: 1.5px solid #393e5c;
}
#contact-form input,
#contact-form textarea {
  padding: 0.8rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  resize: none;
  background: rgba(255,255,255,0.85);
}
body.dark-mode #contact-form input,
body.dark-mode #contact-form textarea {
  background: #232946;
  color: #fff;
  border: 1px solid #393e5c;
}
#contact-form button {
  align-self: flex-end;
}
.contact-flex {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
.contact-info {
  flex: 1 1 260px;
  background: transparent;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: 0 4px 24px rgba(140, 197, 252, 0.08);
  margin-bottom: 1.5rem;
  border: 1.5px solid #e0c3fc;
}
.contact-info h3 {
  margin-bottom: 1.2rem;
  font-size: 1.25rem;
  color: var(--primary, #232946);
  letter-spacing: 0.5px;
}
.contact-info ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}
.contact-info li {
  margin-bottom: 1rem;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.contact-info a {
  color: var(--primary, #232946);
  text-decoration: none;
}
.contact-social {
  display: flex;
  gap: 1.2rem;
  margin-top: 0.7rem;
}
.contact-social-large a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f7f7f7;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(140, 197, 252, 0.08);
  transition: background 0.2s, box-shadow 0.2s;
}
.contact-social-large a:hover {
  background: #e0c3fc;
  box-shadow: 0 4px 16px rgba(140, 197, 252, 0.18);
}
.contact-social-large img {
  width: 24px;
  height: 24px;
}
.contact-form {
  flex: 1 1 340px;
  background: #f7f7f7;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: 0 4px 24px rgba(140, 197, 252, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  border: 1.5px solid #e0c3fc;
}
.contact-form h3 {
  margin-bottom: 1.2rem;
  font-size: 1.25rem;
  color: var(--primary, #232946);
  letter-spacing: 0.5px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.contact-form input, .contact-form textarea {
  font-size: 1rem;
  border-radius: 8px;
  border: 1.5px solid #8ec5fc;
  padding: 0.9rem 1.2rem;
  background: #fff;
  color: #232946;
  transition: border 0.2s;
}
.contact-form input:focus, .contact-form textarea:focus {
  border: 1.5px solid #ffd803;
  outline: none;
}
.contact-form textarea {
  min-height: 110px;
  resize: vertical;
}
.contact-form button {
  font-size: 1rem;
  border-radius: 8px;
  padding: 0.9rem 1.5rem;
  background: linear-gradient(90deg, #8ec5fc 0%, #e0c3fc 100%);
  color: #232946;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.contact-form button:hover {
  background: #ffd803;
  color: #232946;
}
@media (max-width: 900px) {
  .contact-flex {
    flex-direction: column;
    gap: 2rem;
  }
  .contact-info, .contact-form {
    width: 100%;
    margin-bottom: 0;
    padding: 2rem 1rem;
  }
  .contact-social-large a {
    width: 40px;
    height: 40px;
  }
}
@media (max-width: 600px) {
  .contact-info, .contact-form {
    padding: 1.2rem 0.5rem;
    border-radius: 10px;
  }
  .contact-social-large {
    gap: 0.7rem;
  }
  .contact-social-large a {
    width: 34px;
    height: 34px;
  }
  .contact-social-large img {
    width: 18px;
    height: 18px;
  }
  .contact-info h3, .contact-form h3 {
    font-size: 1.1rem;
  }
  .contact-form button {
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
  }
}
/* Footer */
footer {
  background: #f1f5f9;
  padding: 2rem 0 1rem 0;
  text-align: center;
}
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.footer-content .logo img {
  height: 32px;
}
.social-icons {
  display: flex;
  gap: 1.2rem;
}
.social-icons img {
  width: 28px;
  height: 28px;
  filter: grayscale(1) brightness(0.7);
  transition: filter 0.2s;
}
.social-icons a:hover img {
  filter: none;
}
footer p {
  font-size: 0.95rem;
  color: #888;
}
.footer-content .social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.2s;
  margin-right: 0.5rem;
}
.footer-content .social-icons a:last-child {
  margin-right: 0;
}
.footer-content .social-icons img {
  width: 24px;
  height: 24px;
  display: block;
  filter: none;
}
body.dark-mode .footer-content .social-icons img {
  filter: invert(80%) sepia(10%) saturate(200%) hue-rotate(0deg) brightness(1.5) contrast(1.2);
}

/* Animations for scroll reveal */
.reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1), transform 0.7s cubic-bezier(.4,0,.2,1);
}

/* Go to Top Button */
#goTopBtn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: linear-gradient(120deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #232946;
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  font-size: 2rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, background 0.2s;
  z-index: 1200;
}
#goTopBtn:hover {
  background: #c3cfe2;
}
#goTopBtn.show {
  opacity: 1;
  pointer-events: auto;
}

/* Dark Mode Button */
#darkModeBtn {
  position: fixed;
  bottom: 96px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: linear-gradient(120deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #232946;
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  font-size: 1.7rem;
  cursor: pointer;
  opacity: 0.85;
  transition: background 0.2s, color 0.2s;
  z-index: 1200;
}
#darkModeBtn:hover {
  background: #c3cfe2;
  color: #fff;
}

/* Dark Mode Styles */
body.dark-mode {
  background: linear-gradient(120deg, #181823 0%, #232946 100%);
  color: #f4f4f4;
}
body.dark-mode .hero {
  background: linear-gradient(120deg, #181823 0%, #232946 100%);
  color: #fff;
}
body.dark-mode .hero-bg {
  background: linear-gradient(120deg, #232946 0%, #181823 100%);
  opacity: 0.85;
}
body.dark-mode #navbar {
  background: linear-gradient(120deg, #232946 0%, #181823 100%);
}
body.dark-mode .hero-content {
  color: #fff;
}
body.dark-mode .hero-animation svg circle {
  stroke: #ffd803;
  fill: #232946;
}
body.dark-mode .hero-animation svg circle:nth-child(2) {
  stroke: #fff;
  fill: #181823;
}
body.dark-mode .hero-animation svg #hero-dot {
  fill: #ffd803;
}
body.dark-mode .projects,
body.dark-mode .about,
body.dark-mode .contact {
  background: #232946;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.22);
  color: #f4f4f4;
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: 2rem 1rem;
}
body.dark-mode .project-card {
  background: #282e4a;
  color: #f4f4f4;
  box-shadow: 0 4px 24px rgba(0,0,0,0.28);
}
body.dark-mode .about-img img {
  box-shadow: 0 4px 24px rgba(0,0,0,0.28);
}
body.dark-mode .footer-content {
  background: #181823;
  border-radius: 12px;
  color: #f4f4f4;
}
body.dark-mode footer {
  background: #181823;
}
body.dark-mode .btn-secondary {
  background: transparent;
  color: #f4f4f4;
  border: 2px solid #f4f4f4;
}
body.dark-mode .btn-secondary:hover {
  background: #f4f4f4;
  color: #232946;
}
body.dark-mode .hero,
body.dark-mode .projects,
body.dark-mode .about,
body.dark-mode .contact,
body.dark-mode .project-card,
body.dark-mode .footer-content,
body.dark-mode footer,
body.dark-mode .hero-content,
body.dark-mode .about-text,
body.dark-mode .project-card h3,
body.dark-mode .project-card p,
body.dark-mode .contact h2,
body.dark-mode .about-text h2,
body.dark-mode .about-text p {
  color: #fff !important;
}
body.dark-mode .nav-links a {
  color: #fff !important;
}
body.dark-mode .nav-links a:hover {
  color: #ffd803 !important;
}
body.dark-mode .contact-info img.contact-icon,
body.dark-mode .contact-info .contact-icon {
  filter: invert(1) brightness(1.6) contrast(1.2);
}
.contact-info .contact-icon {
  filter: none;
  /* Default for light mode: dark icon */
}
body.dark-mode .contact-info .contact-icon {
  filter: invert(80%) sepia(10%) saturate(200%) hue-rotate(0deg) brightness(1.5) contrast(1.2);
}
body.dark-mode .contact-info,
body.dark-mode .contact-info h3,
body.dark-mode .contact-info ul,
body.dark-mode .contact-info li,
body.dark-mode .contact-info a,
body.dark-mode .contact-form,
body.dark-mode .contact-form h3,
body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea,
body.dark-mode .contact-form label {
  color: #fff !important;
  background: #232946 !important;
  border-color: #393e5c !important;
}
body.dark-mode .contact-info a {
  text-decoration: underline;
}
body.dark-mode .contact-info strong {
  color: #ffd803 !important;
}
body.dark-mode .contact-form input::placeholder,
body.dark-mode .contact-form textarea::placeholder {
  color: #bfc4d1 !important;
}

/* Responsive Styles */
@media (max-width: 900px) {
  .about {
    flex-direction: column;
    text-align: center;
  }
  .project-cards {
    grid-template-columns: 1fr 1fr;
  }
  .project-detail-flex {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem 2vw;
  }
  .hero-animation {
    width: 100%;
    height: 180px;
    margin-top: 2rem;
  }
  .hero-content {
    max-width: 100%;
    min-width: 0;
  }
  .hero-content h1 {
    font-size: 2rem;
  }
}
@media (max-width: 700px) {
  .nav-links {
    gap: 1rem;
  }
  .container {
    width: 96%;
  }
  .projects, .about, .contact, .hero {
    padding: 2rem 0 1rem 0;
  }
  .project-cards {
    grid-template-columns: 1fr;
  }
  .footer-content {
    flex-direction: column;
    gap: 1rem;
  }
}
@media (max-width: 500px) {
  .hero-content h1 {
    font-size: 1.5rem;
  }
  .about-img img {
    width: 90px;
  }
  .project-card img {
    max-width: 90px;
  }
  .btn, .btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  #goTopBtn, #darkModeBtn {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
    bottom: 16px;
    right: 16px;
  }
}

/* --- Responsive Professional Polish Additions --- */
@media (max-width: 400px) {
  .container {
    width: 99%;
    padding: 0 2vw;
  }
  .logo img, .footer-content .logo img {
    height: 24px;
    max-width: 90vw;
  }
  .nav-links {
    gap: 0.5rem;
    font-size: 0.95rem;
  }
  .footer-content .social-icons a {
    width: 32px;
    height: 32px;
  }
  .footer-content .social-icons img {
    width: 18px;
    height: 18px;
  }
  .contact-info, .contact-form {
    padding: 0.7rem 0.2rem;
    font-size: 0.97rem;
  }
  .contact-form button {
    padding: 0.5rem 0.7rem;
    font-size: 0.9rem;
  }
  .contact-info ul {
    font-size: 0.95rem;
  }
  .contact-info li {
    gap: 0.3rem;
  }
  .about-img img {
    width: 60px;
  }
  .project-card img {
    max-width: 60px;
  }
}

/* --- Extra Responsive Polish for index.html --- */
@media (max-width: 900px) {
  .hero-animation { min-width: 0 !important; width: 100% !important; height: 180px !important; }
  .hero-content { max-width: 100% !important; min-width: 0 !important; }
  .project-cards { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 700px) {
  .container { width: 98% !important; }
  .projects, .about, .contact, .hero { padding: 1.2rem 0.2rem !important; }
  .project-cards { grid-template-columns: 1fr !important; }
  .footer-content { flex-direction: column !important; gap: 1rem !important; }
}
@media (max-width: 500px) {
  .hero-content h1 { font-size: 1.3rem !important; }
  .about-img img { width: 70px !important; }
  .project-card img { max-width: 70px !important; }
  .btn, .btn-small { padding: 0.5rem 1rem !important; font-size: 0.9rem !important; }
  #goTopBtn, #darkModeBtn { width: 34px !important; height: 34px !important; font-size: 1.1rem !important; bottom: 12px !important; right: 12px !important; }
}
@media (max-width: 400px) {
  .logo img, .footer-content .logo img { height: 22px !important; max-width: 90vw !important; }
  .nav-links { gap: 0.3rem !important; font-size: 0.93rem !important; }
  .footer-content .social-icons a { width: 28px !important; height: 28px !important; }
  .footer-content .social-icons img { width: 16px !important; height: 16px !important; }
  .contact-info, .contact-form { padding: 0.5rem 0.1rem !important; font-size: 0.95rem !important; }
  .contact-form button { padding: 0.4rem 0.7rem !important; font-size: 0.88rem !important; }
  .about-img img { width: 50px !important; }
  .project-card img { max-width: 50px !important; }
}
img { max-width: 100% !important; height: auto !important; display: block !important; }
body, html { overflow-x: hidden !important; }
#navbar, .footer-content, .projects, .about, .contact, .hero { box-sizing: border-box !important; }
