/* Design Thinking Skills — Hand-Drawn Sketchbook Style */

@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@400;700&family=Patrick+Hand&display=swap');

:root {
  --bg: #fdfbf7;
  --fg: #2d2d2d;
  --muted: #e5e0d8;
  --accent: #ff4d4d;
  --border: #2d2d2d;
  --secondary: #2d5da1;
  --card: #ffffff;
  --code-bg: #f3efe8;
  --postit: #fff9c4;

  --space: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  --wobbly: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --wobbly-md: 15px 225px 15px 255px / 255px 15px 225px 15px;
  --wobbly-sm: 125px 10px 115px 10px / 10px 115px 10px 125px;

  --shadow: 4px 4px 0px 0px var(--border);
  --shadow-lg: 8px 8px 0px 0px var(--border);
  --shadow-sm: 3px 3px 0px 0px rgba(45, 45, 45, 0.1);
  --shadow-hover: 2px 2px 0px 0px var(--border);
}

* { box-sizing: border-box; }

html {
  font-size: 18px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Patrick Hand', cursive;
  background-color: var(--bg);
  background-image: radial-gradient(var(--muted) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--fg);
  min-height: 100vh;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: var(--space);
  left: var(--space);
  padding: var(--space) var(--space-lg);
  background: var(--accent);
  color: var(--bg);
  font-family: 'Kalam', cursive;
  font-weight: 700;
  border: 3px solid var(--border);
  border-radius: var(--wobbly-sm);
  text-decoration: none;
  z-index: 1000;
  transform: translateY(-120%);
  transition: transform 0.15s ease;
}
.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid var(--secondary);
  outline-offset: 2px;
}

/* Links */
a {
  color: var(--secondary);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.1s ease;
  background-image: linear-gradient(to right, var(--secondary) 50%, transparent 50%);
  background-size: 200% 2px;
  background-position: 100% 100%;
  background-repeat: no-repeat;
  padding-bottom: 1px;
}
a:hover {
  color: var(--accent);
  background-position: 0% 100%;
  background-image: linear-gradient(to right, var(--accent) 50%, transparent 50%);
}
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 2px;
}

/* Container */
.container {
  max-width: 820px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}

/* ===================== */
/*     HERO SECTION      */
/* ===================== */
.hero {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 3px dashed var(--border);
  position: relative;
}

.hero-badge {
  display: inline-block;
  font-family: 'Kalam', cursive;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--card);
  background: var(--secondary);
  border: 2px solid var(--border);
  border-radius: var(--wobbly-sm);
  padding: 0.2em 0.75em;
  margin: 0 0 var(--space-lg);
  box-shadow: var(--shadow-hover);
  transform: rotate(-1deg);
}

.hero-title {
  font-family: 'Kalam', cursive;
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 var(--space);
  position: relative;
}

.hero-tagline {
  font-size: 1.2rem;
  color: var(--fg);
  margin: 0 0 var(--space-lg);
  max-width: 44ch;
  line-height: 1.6;
  opacity: 0.8;
}

/* ===================== */
/*   COPYABLE LINES      */
/* ===================== */
.copyable-line {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.copyable-label {
  font-size: 0.95rem;
  opacity: 0.7;
}

.copyable-code {
  font-family: 'Patrick Hand', cursive;
  font-size: 0.95em;
  background: var(--postit);
  padding: 0.2em 0.6em;
  border: 2px solid var(--border);
  border-radius: var(--wobbly-sm);
  box-shadow: 2px 2px 0px 0px rgba(45,45,45,0.08);
  word-break: break-all;
}

.copy-btn-inline {
  font-family: 'Patrick Hand', cursive;
  font-size: 0.85rem;
  padding: 0.2em 0.65em;
  min-height: 36px;
  min-width: 36px;
  cursor: pointer;
  background: var(--card);
  color: var(--fg);
  border: 2px solid var(--border);
  border-radius: var(--wobbly-sm);
  box-shadow: 2px 2px 0px 0px var(--border);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease, color 0.1s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.copy-btn-inline:hover {
  background: var(--secondary);
  color: var(--card);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px 0px var(--border);
}
.copy-btn-inline:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}
.copy-btn-inline.copied {
  background: var(--accent);
  color: var(--card);
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* Skill URL row inside cards */
.skill-url-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: var(--space);
  border-top: 2px dashed var(--muted);
  margin-top: auto;
}

/* ===================== */
/*    SKILLS GRID        */
/* ===================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.skill-card {
  background: var(--card);
  border: 3px solid var(--border);
  border-radius: var(--wobbly-md);
  padding: var(--space-xl);
  position: relative;
  box-shadow: var(--shadow);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  cursor: pointer;
}

.skill-card:hover {
  transform: rotate(-1deg) translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Featured card — tape decoration */
.skill-card-featured {
  border-color: var(--accent);
}
.skill-card-featured::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(2deg);
  width: 80px;
  height: 20px;
  background: rgba(45, 45, 45, 0.12);
  border-radius: 2px;
  z-index: 1;
}

.skill-badge {
  display: inline-block;
  font-family: 'Kalam', cursive;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--card);
  background: var(--accent);
  border: 2px solid var(--border);
  border-radius: var(--wobbly-sm);
  padding: 0.15em 0.55em;
  position: absolute;
  top: var(--space);
  right: var(--space);
  box-shadow: 2px 2px 0px 0px var(--border);
  transform: rotate(2deg);
}

.skill-card .skill-title {
  font-family: 'Kalam', cursive;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
}

.skill-card .skill-title a {
  background: none;
  background-image: none;
  color: var(--fg);
  padding-bottom: 0;
}
.skill-card .skill-title a:hover {
  color: var(--accent);
  background-image: none;
  text-decoration: none;
}

.skill-card .skill-desc {
  font-size: 1rem;
  color: var(--fg);
  opacity: 0.75;
  margin: 0 0 var(--space-lg);
  line-height: 1.55;
}

.skill-url {
  font-family: 'Patrick Hand', cursive;
  font-size: 0.9rem;
  color: var(--secondary);
  word-break: break-all;
  display: inline-block;
  background: none;
  background-image: none;
  padding-bottom: 0;
}
.skill-url:hover {
  color: var(--accent);
  background-image: none;
}

/* ===================== */
/*   HOW TO USE SECTION  */
/* ===================== */
.how-to-use {
  padding-top: var(--space-2xl);
  border-top: 3px dashed var(--border);
}

.how-to-use-title {
  font-family: 'Kalam', cursive;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg);
  margin: 0 0 var(--space-lg);
  opacity: 0.7;
}

.how-to-use-cards {
  display: grid;
  gap: var(--space-lg);
}

.how-card {
  background: var(--postit);
  border: 2px solid var(--border);
  border-radius: var(--wobbly-sm);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transform: rotate(0.5deg);
  transition: transform 0.1s ease;
}
.how-card:nth-child(2) {
  transform: rotate(-0.5deg);
}
.how-card:hover {
  transform: rotate(0deg) translateY(-2px);
}

.how-card strong {
  display: block;
  font-family: 'Kalam', cursive;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--fg);
}

.how-card p {
  margin: 0;
  font-size: 1rem;
  color: var(--fg);
  opacity: 0.8;
  line-height: 1.55;
}

.how-card code {
  font-family: 'Patrick Hand', cursive;
  font-size: 0.95em;
  background: rgba(255,255,255,0.6);
  padding: 0.15em 0.4em;
  border: 1px solid var(--border);
  border-radius: 4px;
  word-break: break-all;
}

/* ===================== */
/*   INNER PAGES         */
/* ===================== */
.page-header {
  margin-bottom: var(--space-xl);
}

.page-header .back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'Patrick Hand', cursive;
  font-size: 1rem;
  margin-bottom: var(--space-lg);
  padding: 0.6rem 1.2rem;
  background: var(--card);
  border: 3px solid var(--border);
  border-radius: var(--wobbly-sm);
  color: var(--fg);
  text-decoration: none;
  background-image: none;
  box-shadow: var(--shadow-hover);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease, color 0.1s ease;
  min-height: 48px;
}
.page-header .back:hover {
  background: var(--accent);
  background-image: none;
  color: var(--card);
  transform: translate(2px, 2px);
  box-shadow: none;
}

.page-header .skill-url-line {
  font-size: 0.95rem;
  color: var(--fg);
  margin: var(--space) 0 var(--space-lg);
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.skill-url-code {
  font-family: 'Patrick Hand', cursive;
  font-size: 0.95em;
  word-break: break-all;
  background: var(--postit);
  padding: 0.2em 0.6em;
  border: 2px solid var(--border);
  border-radius: var(--wobbly-sm);
  box-shadow: 2px 2px 0px 0px rgba(45,45,45,0.08);
}

.copy-btn {
  padding: 0.3rem 0.75rem;
  min-height: 40px;
  min-width: 40px;
  font-family: 'Patrick Hand', cursive;
  font-size: 0.9rem;
  cursor: pointer;
  background: var(--card);
  color: var(--fg);
  border: 2px solid var(--border);
  border-radius: var(--wobbly-sm);
  box-shadow: 2px 2px 0px 0px var(--border);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease, color 0.1s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.copy-btn:hover {
  background: var(--secondary);
  color: var(--card);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px 0px var(--border);
}
.copy-btn:active, .copy-btn.copied {
  background: var(--accent);
  color: var(--card);
  transform: translate(2px, 2px);
  box-shadow: none;
}

.page-header h1 {
  font-family: 'Kalam', cursive;
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0;
  position: relative;
  display: inline-block;
}
/* Wavy underline on page titles */
.page-header h1::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 4px;
  background: var(--accent);
  border-radius: 50% 20% 50% 20%;
}

/* ===================== */
/*   MARKDOWN CONTENT    */
/* ===================== */
.skill-content {
  font-size: 1.05rem;
  line-height: 1.75;
}

.skill-content h1 {
  font-family: 'Kalam', cursive;
  font-size: 1.7rem;
  font-weight: 700;
  margin: 2em 0 0.6em;
  padding-bottom: 0.3em;
  border-bottom: 3px dashed var(--muted);
}
.skill-content h1:first-child { margin-top: 0; }

.skill-content h2 {
  font-family: 'Kalam', cursive;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 1.5em 0 0.5em;
  color: var(--secondary);
}

.skill-content h3 {
  font-family: 'Kalam', cursive;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.2em 0 0.4em;
}

.skill-content p { margin: 0 0 0.85em; }

.skill-content ul, .skill-content ol {
  margin: 0 0 0.85em;
  padding-left: 1.5em;
}
.skill-content li { margin-bottom: 0.35em; }

.skill-content code {
  font-family: 'Patrick Hand', cursive;
  font-size: 0.95em;
  background: var(--postit);
  padding: 0.15em 0.4em;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.skill-content pre {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--wobbly-sm);
  padding: var(--space-lg);
  overflow-x: auto;
  margin: 0 0 1.2em;
  box-shadow: var(--shadow-sm);
}
.skill-content pre code {
  background: none;
  padding: 0;
  border: none;
}

.skill-content hr {
  border: none;
  border-top: 3px dashed var(--muted);
  margin: 2em 0;
}

.skill-content blockquote {
  margin: 0 0 1.2em;
  padding: var(--space) var(--space-lg);
  border-left: 5px solid var(--accent);
  background: rgba(255, 77, 77, 0.05);
  border-radius: 0 var(--wobbly-sm) var(--wobbly-sm) 0;
  font-style: italic;
}

.skill-content strong {
  color: var(--fg);
}

/* Persona sections — alternate tilt for visual interest */
.skill-content h2:nth-of-type(odd) {
  transform: rotate(-0.3deg);
}
.skill-content h2:nth-of-type(even) {
  transform: rotate(0.3deg);
}

/* ===================== */
/*    FOOTER AREA        */
/* ===================== */
.footer-note {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 3px dashed var(--muted);
  font-size: 0.9rem;
  opacity: 0.6;
  text-align: center;
}

/* ===================== */
/*    RESPONSIVE         */
/* ===================== */
@media (max-width: 640px) {
  html { font-size: 16px; }
  .container { padding: var(--space-xl) var(--space); }
  .skills-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: clamp(1.8rem, 8vw, 2.5rem); }
  .skill-card:hover { transform: none; }
  .how-card, .how-card:nth-child(2) { transform: none; }
  .skill-content h2:nth-of-type(odd),
  .skill-content h2:nth-of-type(even) { transform: none; }
}
