@import url("https://fonts.googleapis.com/css2?family=Gochi+Hand&family=Patrick+Hand&display=swap");

:root {
  --bg-color: #fdfbf7; /* Off-white paper color */
  --text-color: #2c2c2c; /* Pencil gray */
  --accent-color: #4a4a4a;
  --line-color: #333;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Patrick Hand", cursive; /* Handwritten font for body text */
  background-color: var(--bg-color);
  color: var(--text-color);
  background-image: radial-gradient(#e6e6e6 1px, transparent 1px);
  background-size: 20px 20px; /* Dot grid paper effect */
  min-height: 100vh;
  display: flex;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Gochi Hand", cursive; /* More expressive font for headings */
  font-weight: normal;
  color: black;
}

/* Sidebar styling - keeping layout but changing style */
.sidebar {
  width: 20%;
  padding: 20px;
  border-right: 2px solid var(--line-color);
  /* Hand-drawn line effect using border-image or clip-path is complex, 
     simplifying with a slightly irregular border radius or just a solid line for now,
     or maybe a 'sketchy' border using a background image if needed. 
     For now, let's stick to a solid border but with a 'hand-drawn' feel via font/spacing */
  background-color: transparent; /* Remove solid black background */
  min-height: 100vh;
  box-sizing: border-box;
}

.nav-links {
  list-style: none;
  padding: 0;
  margin-top: 50px;
}

.nav-links li {
  margin-bottom: 25px;
  transform: rotate(-2deg); /* Slight rotation for playfulness */
  transition: transform 0.3s ease;
}

.nav-links li:hover {
  transform: rotate(2deg) scale(1.1);
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 24px;
  font-family: "Gochi Hand", cursive;
  position: relative;
  display: inline-block;
}

/* Underline effect for links */
.nav-links a::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-color);
  border-radius: 5px;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

/* Main Content styling */
.main-content {
  width: 75%; /* Adjust width slightly */
  padding: 40px;
  box-sizing: border-box;
  animation: fadeIn 1s ease-in forwards;
}

/* Images in Main Content (like Profile Image in firstpage) */
.profile-image {
  width: 400px;
  height: auto;
  border: 10px solid white;
  border-radius: 2px;
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.2);
  transform: rotate(2deg);
  transition: transform 0.3s ease;
  background-color: white; /* Simulate polaroid frame if transparent png */
}

.profile-image:hover {
  transform: scale(1.02) rotate(0deg);
}

p {
  font-size: 1.25rem;
  line-height: 1.6;
  max-width: 800px;
}

/* Hand-drawn Box / Card Style */
.sketch-box {
  border: 2px solid var(--line-color);
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px; /* Irregular border radius */
  padding: 20px;
  margin-bottom: 20px;
  background: white;
  box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.05); /* Subtle shadow */
  transition: transform 0.3s ease;
}

.sketch-box:hover {
  transform: translateY(-5px);
}

/* Polaroid Photo Frame Style */
.polaroid {
  background: white;
  padding: 15px 15px 50px 15px; /* Extra padding at bottom for caption */
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.15);
  display: inline-block;
  transform: rotate(-2deg);
  transition: all 0.3s ease;
  border: 1px solid #ddd;
  margin: 15px;
  max-width: 300px; /* Limit width */
}

.polaroid:nth-child(even) {
  transform: rotate(3deg);
}

.polaroid:hover {
  transform: scale(1.05) rotate(0deg);
  box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.2);
  z-index: 10;
  position: relative;
}

.polaroid img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(20%) sepia(10%); /* Slight vintage filter */
}

.polaroid p,
.polaroid-caption {
  text-align: center;
  font-family: "Gochi Hand", cursive; /* Handwritten caption */
  font-size: 1.2rem;
  margin-top: 15px;
  color: #444;
}

/* Buttons */
.btn-sketch {
  display: inline-block;
  padding: 10px 25px;
  border: 2px solid var(--line-color);
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
  background: transparent;
  font-family: "Gochi Hand", cursive;
  font-size: 1.2rem;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.2s ease;
}

.btn-sketch:hover {
  background: var(--text-color);
  color: white;
  border-color: var(--text-color);
}

/* Specific overrides for existing classes to match new theme */
.welcome-container {
  /* For index.html */
  padding: 40px;
  border: 3px solid white;
  border-radius: 2% 98% 2% 98% / 98% 2% 98% 2%; /* Imperfect circle/box */
}

.welcome-text {
  font-family: "Gochi Hand", cursive;
  color: white; /* Keep white for index if bg remains black, or change if we unify index */
}
/* If index.html becomes sketch style too */
body.home-page {
  background-color: #1a1a1a;
  background-image:
    linear-gradient(#222 1px, transparent 1px),
    linear-gradient(90deg, #222 1px, transparent 1px);
  background-size: 20px 20px;
  color: #eee;
}

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

/* Common Layouts extracted from contact.html */
.section-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-top: 20px;
}

.section-text {
  flex: 1;
  min-width: 300px;
}

.hobby-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1;
  min-width: 300px;
  justify-content: center;
  align-items: flex-start;
}

.hobby-gallery .polaroid {
  max-width: 160px; /* Reduced size for compactness */
  margin: 5px;      /* Tighter spacing */
  padding: 8px 8px 30px 8px; /* Smaller frame padding */
  width: fit-content; /* Frame adapts to image width */
}

.hobby-gallery .polaroid-caption {
  font-size: 1rem;
  margin-top: 5px;
}

.social-links {
  margin-top: 20px;
}

.social-links a {
  display: inline-block;
  margin-right: 25px;
  color: var(--text-color);
  text-decoration: none;
  font-size: 26px;
  border-bottom: 2px dashed var(--line-color);
  font-family: "Gochi Hand", cursive;
  transition: transform 0.2s;
}

.social-links a:hover {
  transform: scale(1.1) rotate(-3deg);
  border-bottom-style: solid;
}

/* Works / Projects Page */
.project-card {
  /* Inherit sketch-box style but specific for cards */
  border: 2px solid var(--line-color);
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
  padding: 25px;
  margin-bottom: 25px;
  background: white;
  box-shadow: 2px 3px 10px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
  position: relative;
}

.project-card:hover {
  transform: translateY(-5px) rotate(1deg);
  box-shadow: 5px 5px 15px rgba(0,0,0,0.1);
}

.project-title {
  font-family: 'Gochi Hand', cursive;
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: black;
}

.project-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border: 5px solid white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin-bottom: 15px;
  filter: grayscale(20%);
  transition: filter 0.3s;
}

.project-card:hover .project-image {
  filter: grayscale(0%);
}

.award-card {
  border: 2px solid var(--line-color);
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
  padding: 20px;
  background: white;
  transition: transform 0.3s ease;
  position: relative;
  /* Ensure consistent height in grid if needed, or rely on content */
  height: 100%; 
  box-sizing: border-box;
}

.award-card:hover {
  transform: translateY(-5px) rotate(-1deg);
  box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
}

.project-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  font-family: 'Patrick Hand', cursive;
  font-size: 1rem;
  padding: 5px 10px;
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px; /* Mini sketch box */
  border: 1px solid var(--text-color);
  background: #fff;
  color: var(--text-color);
  z-index: 5;
}

.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

/* Ensure links don't break card layout */
.project-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.award-title {
  font-family: 'Gochi Hand', cursive;
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: black;
}

/* Award Details Page */
.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--text-color);
  text-decoration: none;
  font-size: 18px;
  font-family: 'Gochi Hand', cursive;
  border-bottom: 1px dashed var(--text-color);
}

.back-link:hover {
  border-bottom-style: solid;
}

.image-container {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
}

.image-container img {
  border: 5px solid white;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
  transform: rotate(1deg);
  transition: transform 0.3s;
  background: white;
}

.image-container img:nth-child(even) {
  transform: rotate(-1deg);
}

.image-container img:hover {
  transform: scale(1.02) rotate(0deg);
  z-index: 10;
}

.image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: white;
  border: 2px dashed #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  border-radius: 2px;
  font-family: 'Gochi Hand', cursive;
  font-size: 1.5rem;
}

.blog-link {
  margin-top: 40px;
  padding: 20px;
  border: 2px solid var(--line-color);
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
  font-size: 24px;
  display: inline-block;
  background: white;
  text-decoration: none;
  font-family: 'Gochi Hand', cursive;
  color: var(--text-color);
  transition: transform 0.3s ease;
}

.blog-link:hover {
  transform: scale(1.05) rotate(2deg);
  background: var(--text-color);
  color: white;
}

.project-description {
  font-family: 'Patrick Hand', cursive;
  font-size: 16px;
  line-height: 1.6;
}

.section-title {
  font-family: 'Gochi Hand', cursive;
  font-size: 36px;
  border-bottom: 2px dashed var(--line-color);
  padding-bottom: 10px;
  margin-bottom: 30px;
}

/* Skill list style */
.skill-list p {
  background: rgba(0,0,0,0.03);
  padding: 10px;
  border-radius: 5px 25px 5px 25px;
  margin-bottom: 10px;
}
  margin-top: 20px;
}

.social-links a {
  display: inline-block;
  margin-right: 25px;
  color: var(--text-color);
  text-decoration: none;
  font-size: 26px;
  border-bottom: 2px dashed var(--line-color);
  font-family: "Gochi Hand", cursive;
  transition: transform 0.2s;
}

.social-links a:hover {
  transform: scale(1.1) rotate(-3deg);
  border-bottom-style: solid;
}
