/* Google Font Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

/* Root Variables */
:root {
  --forest: #1B4332;
  --mint: #B7E4C7;
  --white: #F5F5F5;
  --black: #081C15;
  --pale: #95D5B2;
  --transition: 0.4s ease-in-out;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--white);
  color: var(--black);
  overflow-x: hidden;
}
/* Loader*/
@keyframes loader {
  0% { opacity: 1; background-position: 0 0; }
  90% { opacity: 1; }
  100% { opacity: 0; pointer-events: none; }
}

/*Header & Nav*/
header {
  background: var(--forest);
  color: var(--white);
  padding: 1.5rem 5vw;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 99;
}

header h1 {
  font-size: 2rem;
  font-weight: 600;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--mint);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

nav a:hover {
  color: var(--white);
  text-shadow: 0 0 5px var(--mint);
}

/* Section Base */
section {
  padding: 6vh 5vw;
  animation: fadeInUp 1s ease-out both;
}

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

h2 {
  font-size: 2rem;
  color: var(--forest);
  margin-bottom: 1rem;
}

p {
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/*Home Section*/
#home {
  background: linear-gradient(to right, var(--pale), var(--mint));
  text-align: center;
  padding-top: 10vh;
}

#home img {
  width: 60vw;
  max-width: 300px;
  border-radius: 1rem;
  box-shadow: 0 0 30px rgba(0,0,0,0.1);
  animation: float 6s ease-in-out infinite;
}

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

/*Typing Effect */
#home h2::after {
  content: '|';
  animation: typing 2s steps(22) 1s forwards, blink 0.6s step-end infinite;
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
  vertical-align: bottom;
}



@keyframes blink {
  50% { opacity: 0; }
}

/*Skills Section*/
.card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 2rem;
  margin: 2rem 0;
  transition: var(--transition);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  perspective: 1000px;
}

.card:hover {
  transform: scale(1.02) rotateX(1deg) rotateY(1deg);
}

.card h3 {
  color: var(--forest);
}

/*Projects Section*/
#projects a {
  background: var(--forest);
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  display: inline-block;
  margin-top: 1rem;
  color: #1abc9c;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

#projects a:hover {
  background: var(--mint);
  color: var(--black);
  transform: scale(1.05);
}


/*Contact Form */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input, textarea {
  padding: 1rem;
  border: 2px solid var(--mint);
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
  background: #fff;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 5px var(--forest);
}

button {
  background: var(--forest);
  color: var(--white);
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

button:hover {
  animation: pulse 1s infinite;
  background: var(--pale);
  color: var(--black);
}

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

/*Aside*/
aside {
  background: var(--pale);
  padding: 4vh 5vw;
  text-align: center;
}

aside a {
  color: var(--forest);
  font-weight: 600;
}

/*Footer*/
footer {
  background: var(--forest);
  color: var(--white);
  text-align: center;
  padding: 2vh;
  font-size: 0.9rem;
}

/*Responsive Design */
@media (max-width: 768px) {
  header, nav ul {
    flex-direction: column;
    align-items: center;
  }

  #home img {
    width: 80vw;
  }

  nav ul {
    gap: 1rem;
    margin-top: 1rem;
  }

  section, aside {
    padding: 4vh 3vw;
  }

  h2 {
    font-size: 1.6rem;
  }
}

/* Mobile Hamburger Menu Styling*/
#menu-toggle {
  display: none;
}

.hamburger {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--mint);
}

/* Keep nav links horizontal */
.nav-links {
  display: flex;
  gap: 2rem;
}

/* Responsive Header */
@media (max-width: 768px) {
  header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }

  .hamburger {
    display: block;
    z-index: 1001;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--forest);
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0;
    transform: translateY(-200%);
    transition: transform 0.4s ease-in-out;
    z-index: 1000;
  }

  #menu-toggle:checked + .hamburger + nav .nav-links {
    transform: translateY(0%);
  }
}

/* Section headers with button */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0 1rem;
}

.section-header h2 {
  font-size: 1.8rem;
  color: #081C15;
}

.btn-download {
  background: #52B788;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
}

.btn-download:hover {
  background: #40916C;
}

/* Grid layout */
.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Flip card */
.flip-card {
  perspective: 1000px;
  cursor: pointer;
  height: 200px;
}

.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.flip-card:hover .flip-inner,
.flip-card:focus .flip-inner {
  transform: rotateY(180deg);
}

.flip-front, .flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 1rem;
  border-radius: 1rem;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.flip-front {
  background: #D8F3DC;
  color: #081C15;
}

.flip-back {
  background: #B7E4C7;
  transform: rotateY(180deg);
  color: #1B4332;
}

/* Projects Section */
#projects {
  padding: 4rem 2rem;
  background-color: #fdfdfd;
  text-align: center;
}

#projects h2 {
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 1.5rem;
}

#projects article > p {
  font-size: 1rem;
  margin-bottom: 2rem;
}


.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  padding: 0 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.project-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.project-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.project-card h3 {
  font-size: 1.25rem;
  color: #333333;
  margin-bottom: 0.5rem;
}

.project-card a {
  display: inline-block;
  margin-top: 0.5rem;
  color: #3498db;
  font-weight: bold;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.project-card a:hover {
  color: #2980b9;
  border-bottom: 2px solid #2980b9;
}

/* Splash Screen Styling */
#splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #f7f7f7;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeOut 1s ease-in-out 0.8s forwards;
}

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

#splash img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
}

#splash h1 {
  font-size: 1.8rem;
  color: #444;
}

/* Animation to hide splash */
@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.typewriter-container {
  width: 90%;
  max-width: 700px;
  margin: 40px auto;
  padding: 1rem;
  font-family: 'Courier New', Courier, monospace;
  text-align: center;
}

.typewriter {
  display: inline-block;
  overflow: hidden;
  white-space: normal;
  border-right: 2px solid black;
  width: 0;
  animation: typing 8s steps(120, end) forwards;
  font-size: 2rem;
  font-weight: bold;
  color: #2c3e50;
  line-height: 1.6;
  word-wrap: break-word;
}


/* Typing animation  */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* Responsive font sizes */
@media (max-width: 768px) {
  .typewriter {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .typewriter {
    font-size: 1.2rem;
  }
}






