/* Reset some default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
  --primary-blue: #2563eb;
  --primary-blue-dark: #1d4ed8;
  --primary-blue-light: #3b82f6;
  --secondary-blue: #60a5fa;
  --accent-blue: #93c5fd;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --white: #ffffff;
  --black: #000000;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    padding-top: 70px; /* to offset fixed navbar */
    background-color: #f9f9f9; /* light neutral background */
    color: #111; /* dark text */
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  left: 0;
  right: 0;
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: var(--transition-normal);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  margin: auto;
  max-width: 1100px;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-blue);
  text-decoration: none;
  transition: var(--transition-fast);
}

.logo span {
  font-weight: bold;
  font-size: 24px;
  color: var(--white);
  padding: 2px 6px;
  background-color: var(--primary-blue);
  border-radius: 4px;
  position: relative;
  display: inline-block;
}

.logo:hover {
  color: var(--primary-blue-dark);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-blue);
  transition: width var(--transition-fast);
}

.nav-links a:hover {
  color: var(--primary-blue);
}

.nav-links a:hover::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--gray-800);
  margin: 4px 0;
  transition: var(--transition-fast);
  border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
  top: 0px;
  left: 5px;
}
.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
  width: 0%;
}
.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  top: 28px;
  left: 5px;
}

@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    flex-direction: column;
    background-color: var(--white);
    display: none;
    padding: 20px 0;
    text-align: center;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    margin: 1px 0;
  }

  .mobile-menu-toggle {
    display: flex;
  }
}


/* Home Section */
.home {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    background: #e6f0ff; /* light techy blue */
}

.hero-image {
  margin: 0 20px 20px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  max-width: 1100px;
  flex-wrap: wrap;
}

.hero-image img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #007bff;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {

  .home {
    flex-direction: column;       /* stack image on top */
    text-align: center;  
    padding: 40px 20px;
  }

  .hero-image {
    margin: 0 0 20px 0 !important;
    width: 100%;
    display: flex;
    justify-content: center;
    order: -1;                    /* image goes above the text */
  }

  .hero-image img {
    width: 200px !important;
    height: 200px !important;
    margin: 0 auto 20px auto;
  }

  .home .container {
    width: 100%;
    padding: 0 20px;
  }

  .home h1 {
    font-size: 2.2rem !important;
    line-height: 1.1 !important;
    margin-bottom: 8px;
    text-align: center;
  }

.hero-subtitle {
    font-size: 1rem !important;
    line-height: 1.1 !important;
    font-weight: 600;
    margin-bottom: 6px;
    text-align: center;
    display: block;
  }

.tagline {
    font-size: 0.95rem;       /* reduced so it stays on one line */
    line-height: 1.2;
    margin-bottom: 12px;
  }

  .intro {
    font-size: 0.95rem;
    line-height: 1.3;
    margin-top: 10px;
  }

  #typewriter {
    font-size: inherit;
  }

  .footer {
    font-size: 14px;
    padding: 1rem 0;
  }
}


.home h1 {
    font-size: 3rem;
    font-weight: bold;
    color: #003366; /* dark blue */
}

.home .highlight {
  color: var(--primary-blue);
  font-weight: bold;
  position: relative;
  display: inline-block;
}

.hero-subtitle {
  font-size: 24px;
  font-weight: 600 !important;
  color: var(--gray-800);
  color: var(--gray-700);
  font-weight: 500;
  margin-bottom: 8px;
}

.home .tagline {
    font-size: 18px;
    font-weight: 300;
    color: var(--primary-blue-dark); /* medium blue */
    margin: 0.5rem 0;
}

.btn {
  padding: 12px 32px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-fast);
  display: inline-block;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--primary-blue);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--primary-blue-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-blue);
  border-color: var(--primary-blue);
}

.btn-secondary:hover {
  background-color: var(--primary-blue);
  color: var(--white);
  transform: translateY(-2px);
}

.home .intro {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 1rem auto;
    color: #111;
}

.cursor {
  display: inline-block;
  animation: blink 0.7s infinite;
  color: #007bff;
}

@keyframes blink {
  50% { opacity: 0; }
}

.social-links {
  display: flex;
  margin-top: 1.5rem;
  gap: 20px;
  justify-content: center;
}

.social-links a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-100);
    border-radius: 50%;
    margin: 0 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
    transition: all var(--transition-fast);
    transition: color 0.3s;
}

.social-links a:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    transform: translateY(-4px);
}
/* Skills Section */
.skills {
    padding: 4rem 2rem;
    background: #f7f9fc;
    text-align: center;
}

.skills h2 {
    font-size: 2.5rem;
    color: #003366;
    margin-bottom: 2rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.skill {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.skill:hover {
    transform: translateY(-8px);
}

.skill h3 {
    color: #0055cc;
    margin-bottom: 0.5rem;
}

.skill p {
    color: #333;
    font-size: 0.95rem;
}
/* Projects Section */
.projects {
    padding: 4rem 2rem;
    background: #fff;
    text-align: center;
}

.projects h2 {
    font-size: 2.5rem;
    color: #003366;
    margin-bottom: 2rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.project {
    background: #f7f9fc;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.project:hover {
    transform: translateY(-8px);
}

.project img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project h3 {
    color: #0055cc;
    margin-top: 1rem;
}

.project .status {
    display: inline-block;
    margin: 0.5rem 0;
    padding: 0.25rem 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    font-size: 1.1rem;
}

.project p {
    padding: 0 1rem;
    color: #333;
    font-size: 0.95rem;
}

.project a {
    display: inline-block;
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    background: #0055cc;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s;
}

.project a:hover {
    background: #003366;
}
/* Contact Section */
.contact {
    padding: 4rem 2rem;
    background: #f7f9fc;
    text-align: center;
}

.contact h2 {
    font-size: 2.5rem;
    color: #003366;
    margin-bottom: 1rem;
}

.contact p {
    color: #333;
    margin-bottom: 2rem;
}

form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1rem;
}

input, textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

button {
    background: #0055cc;
    background: linear-gradient(90deg, #0055cc, #003366);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

button:hover {
    background: #003366;
    background: linear-gradient(90deg, #003366, #0055cc);
    transform: scale(1.03);
}

.alt-contact {
    margin-top: 1.5rem;
    font-size: 0.95rem;
}
footer {
  background:#003366;
  color:#fff;
  text-align:center;
  padding:1.5rem 0;
  margin-top:3rem;
}

footer .socials a {
  color:#fff;
  margin:0 10px;
  text-decoration:none;
  font-weight:500;
}

footer .socials a:hover {
  text-decoration:underline;
}
/* Responsive adjustments */
@media (max-width:768px) {
  .skills .skill-grid,
  .projects .project-grid {
    grid-template-columns:1fr;
  }

  header h1 {
    font-size:2rem;
  }

  nav ul {
    flex-direction:column;
    gap:0.5rem;
  }
}
/* Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* Smooth hover transitions */
* {
  transition: all 0.3s ease;
}
/* Preloader styles */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #003366;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loader {
  width: 50px;
  height: 50px;
  border: 6px solid #fff;
  border-top-color: #0099ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Hide body during loading */
body.loading {
  overflow: hidden;
}
body.loading #preloader {
  display: flex;
}
