/* ═══════════════════════════════════════════════════════════════
   EXCALIDRAW PORTFOLIO — STYLE SHEET
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset & Base ──────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --paper:       #f8f4ed;
  --ink:         #2d2d2d;
  --ink-light:   #8a8a8a;
  --card-bg:     #fcf9f2;
  --blue:        #4a7d9c;
  --orange:      #e27b3d;
  --sticky:      #fef3d6;
  --sticky-fold: #f5ecc0;
  --shadow:      rgba(45, 45, 45, 0.06);

  --font-hand: 'Shadows Into Light', 'Comic Neue', 'Chalkboard', sans-serif;
  --font-body: 'Comic Neue', 'Chalkboard', sans-serif;

  --max-width: 960px;
  --card-radius: 4px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='64' height='64' filter='url(%23n)' fill='none'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 64px 64px;
  line-height: 1.7;
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

p {
  font-family: 'Comic Neue', 'Chalkboard', sans-serif;
  font-weight: 600;
}

img, svg { max-width: 100%; }
a { color: var(--ink); text-decoration-color: var(--blue); }

/* ── Typography ────────────────────────────────────────────── */

.handwritten {
  font-family: var(--font-hand);
  font-weight: 700;
  letter-spacing: 0.06em;
}

h1, h2, h3, .handwritten {
  font-family: var(--font-hand);
}

.section-label {
  font-size: 1.6rem;
  color: var(--ink);
  margin-bottom: 1.2rem;
  padding-bottom: 0.4rem;
  position: relative;
  display: inline-block;
}

/* ── Board Layout ──────────────────────────────────────────── */

.board {
  width: 100%;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.board:target {
  animation: board-pulse 0.4s ease-out;
}

@keyframes board-pulse {
  0%   { background-color: rgba(226, 123, 61, 0.06); }
  100% { background-color: transparent; }
}

/* ── Sketch Cards ──────────────────────────────────────────── */

.sketch-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--ink-light);  /* subtle fallback */
  box-shadow:
    2px 3px 6px var(--shadow),
    -1px 1px 4px var(--shadow);
  padding: 1.8rem;
  width: 100%;
  max-width: var(--max-width);
}

/* wobbly border layer — behind the card text, no text warping */
.sketch-card::before {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  bottom: -2px;
  left: -2px;
  border: 2px solid var(--ink);
  filter: url(#sketch);
  pointer-events: none;
  border-radius: 2px;
}

.sketch-card > *:last-child {
  margin-bottom: 0;
}

/* ── Hero ──────────────────────────────────────────────────── */

.hero-card {
  text-align: center;
  padding: 2.5rem 2rem;
  position: relative;
}

.hero-badge {
  font-size: 2.8rem;
  margin-bottom: 0.6rem;
  opacity: 0.7;
}

.hero-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin-bottom: 0.8rem;
}

.hero-first {
  font-size: 2.8rem;
  line-height: 1.1;
}

.hero-last {
  font-size: 2.8rem;
  line-height: 1.1;
  color: var(--blue);
}

.hero-tagline {
  font-size: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
  color: var(--ink-light);
}

.hero-tagline .handwritten {
  color: var(--ink);
}

.sep {
  color: var(--ink-light);
  font-size: 0.9rem;
}

.hero-desc {
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink);
  max-width: 540px;
  margin: 0 auto 1.6rem;
}

/* doodle underline */
.doodle-underline {
  position: relative;
  display: inline-block;
}

.doodle-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  border-bottom: 2px solid currentColor;
  filter: url(#wobble);
}

/* ── Buttons ────────────────────────────────────────────────── */

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.sketch-btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  font-family: var(--font-hand);
  font-size: 1rem;
  color: var(--card-bg);
  background: var(--ink);
  border: 2px solid var(--ink);
  text-decoration: none;
  border-radius: 3px;
  transition: transform 0.2s ease;
  position: relative;
}

/* wobbly border behind button text */
.sketch-btn::before {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  bottom: -2px;
  left: -2px;
  border: 2px solid var(--ink);
  filter: url(#sketch);
  pointer-events: none;
  border-radius: 4px;
}

.sketch-btn--outline {
  color: var(--ink);
  background: transparent;
}

.sketch-btn:hover {
  transform: scale(1.03) rotate(-0.5deg);
}

/* ── Sticky Note ────────────────────────────────────────────── */

.sticky-note {
  position: absolute;
  top: -18px;
  right: 24px;
  background: var(--sticky);
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  max-width: 180px;
  box-shadow:
    3px 4px 8px rgba(0,0,0,0.08),
    -1px -1px 4px rgba(0,0,0,0.04);
  transform: rotate(2deg);
  z-index: 2;
}

.sticky-fold {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  background: var(--sticky-fold);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  opacity: 0.6;
}

/* ── About ──────────────────────────────────────────────────── */

.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.about-text p {
  margin-bottom: 0.8rem;
  font-size: 0.98rem;
  line-height: 1.6;
}

.about-text .about-lead {
  font-size: 1.15rem;
  font-weight: 500;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-num {
  font-size: 2.2rem;
  color: var(--orange);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--ink-light);
  margin-top: 0.2rem;
}

.hr-squiggle {
  display: block;
  margin: 1.2rem 0;
}

.about-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

/* ── Tool Badges ────────────────────────────────────────────── */

.tool-badge {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  font-size: 0.82rem;
  font-family: var(--font-body);
  background: var(--card-bg);
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  color: var(--ink);
  white-space: nowrap;
}

/* ── Skills ─────────────────────────────────────────────────── */

.skills-card {
  padding: 1.8rem;
}

.skills-group {
  margin-bottom: 1rem;
}

.skills-group:last-child {
  margin-bottom: 0;
}

.skills-group-label {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
  color: var(--ink);
  opacity: 0.8;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ── Projects Grid ──────────────────────────────────────────── */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: var(--max-width);
  width: 100%;
}

.project-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.project-pin {
  font-size: 1.2rem;
  align-self: flex-start;
  margin-bottom: 0.2rem;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.project-header h3 {
  font-size: 1.25rem;
}

.project-desc {
  font-size: 0.92rem;
  line-height: 1.5;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.project-tags span {
  font-size: 0.78rem;
  padding: 0.15rem 0.5rem;
  background: transparent;
  border: 1px solid var(--ink-light);
  border-radius: 2px;
  color: var(--ink-light);
  font-family: var(--font-body);
}

/* ── Timeline ───────────────────────────────────────────────── */

.timeline {
  position: relative;
  max-width: var(--max-width);
  width: 100%;
}

.timeline-card {
  padding: 1.5rem 1.8rem 1.5rem 2.2rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.timeline-card:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -6px;
  top: 1.8rem;
  width: 14px;
  height: 14px;
  background: var(--card-bg);
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  z-index: 1;
}

/* wobbly timeline vine (via pseudo-element) */
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--ink);
  filter: url(#wobble);
  opacity: 0.5;
}

.timeline-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.timeline-header h3 {
  font-size: 1.15rem;
}

.timeline-org {
  font-size: 0.85rem;
  color: var(--ink-light);
  font-family: var(--font-body);
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--ink-light);
  font-family: var(--font-body);
  white-space: nowrap;
}

.timeline-content p {
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 0.4rem;
}

.timeline-content p:last-child {
  margin-bottom: 0;
}

.roman-list {
  list-style: lower-roman;
  padding-left: 1.8rem;
  margin: 0.4rem 0;
}

.roman-list li {
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 0.6rem;
}

.roman-list li:last-child {
  margin-bottom: 0;
}

.roman-list li::marker {
  font-weight: 700;
}

/* ── Learning & Side Projects ───────────────────────────────── */

.learning-card,
.side-card {
  padding: 1.5rem 1.8rem;
}

.learning-intro {
  font-size: 1.15rem;
  margin-bottom: 0.8rem;
}

.learning-list,
.side-list {
  padding-left: 1.2rem;
}

.learning-list li,
.side-list li {
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 0.4rem;
}

.learning-list li:last-child,
.side-list li:last-child {
  margin-bottom: 0;
}

/* ── Education ──────────────────────────────────────────────── */

.edu-card {
  padding: 1.5rem 1.8rem;
}

.edu-row {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.edu-icon {
  font-size: 2rem;
}

.edu-info h3 {
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}

.edu-spec {
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.edu-school {
  font-size: 0.85rem;
  color: var(--ink-light);
}

.edu-date {
  font-size: 0.82rem;
  color: var(--ink-light);
  font-family: var(--font-body);
}

/* ── Contact ────────────────────────────────────────────────── */

.contact-card {
  text-align: center;
  padding: 2rem;
}

.contact-intro {
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.contact-link:hover {
  border-bottom-color: var(--blue);
}

.contact-icon {
  font-size: 1.2rem;
}

/* ── Doodles ────────────────────────────────────────────────── */

.doodle {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  opacity: 0.6;
}

.doodle--star.tl {
  top: 1.5rem;
  left: 2rem;
  font-size: 1.8rem;
  color: var(--ink);
}

.doodle--star.tr {
  top: 1.2rem;
  right: 1.5rem;
  font-size: 2.2rem;
  color: var(--ink);
}

.doodle--squiggle.br {
  bottom: 1.5rem;
  right: 1.5rem;
}

.doodle--arrow.bl {
  bottom: 0.8rem;
  left: 1.2rem;
}

.doodle--clip {
  top: 0.5rem;
  left: 0.5rem;
  opacity: 0.35;
}

.doodle--bracelet {
  position: absolute;
  right: -20px;
  top: 30%;
  opacity: 0.5;
}

.doodle--circle {
  position: absolute;
  right: 0.5rem;
  bottom: 2rem;
}

.doodle--stamp {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
}

/* side decorations */
.doodle--brace-left {
  position: absolute;
  left: 0.5rem;
  top: 20%;
  opacity: 0.35;
  font-size: 2.4rem;
  color: var(--ink-light);
  transform: scaleX(-1);
}

.doodle--brace-right {
  position: absolute;
  right: 0.5rem;
  top: 25%;
  opacity: 0.35;
  font-size: 2.4rem;
  color: var(--ink-light);
}

.doodle--tab-left {
  position: absolute;
  left: -8px;
  top: 12%;
  width: 16px;
  height: 30px;
  background: var(--sticky);
  opacity: 0.4;
  border-radius: 0 4px 4px 0;
}

.doodle--dots-right {
  position: absolute;
  right: 0.3rem;
  top: 40%;
  font-size: 1.8rem;
  color: var(--ink-light);
  opacity: 0.3;
  line-height: 1;
}

.doodle--pencil-left {
  position: absolute;
  left: 0.5rem;
  bottom: 10%;
  font-size: 2rem;
  color: var(--ink-light);
  opacity: 0.3;
  transform: rotate(-15deg);
}

.doodle--check-right {
  position: absolute;
  right: 0.8rem;
  bottom: 15%;
  font-size: 1.6rem;
  color: var(--orange);
  opacity: 0.4;
}

/* ── Footer ─────────────────────────────────────────────────── */

footer.board {
  padding: 2rem 1.5rem;
  text-align: center;
}

.footer-content p {
  font-size: 0.95rem;
}

.footer-doodles {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.doodle-char {
  font-size: 1.3rem;
  opacity: 0.5;
  color: var(--ink-light);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

/* tablet — hide side doodles, narrower padding */
@media (max-width: 1023px) {
  .board {
    padding: 2.5rem 1.2rem;
  }

  .sketch-card {
    padding: 1.4rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    flex-direction: row;
    justify-content: center;
  }

  .stat-num {
    font-size: 1.8rem;
  }

  .doodle--bracelet,
  .doodle--circle,
  .doodle--stamp,
  .doodle--clip,
  .doodle--brace-left,
  .doodle--tab-left,
  .doodle--pencil-left,
  .doodle--dots-right,
  .doodle--check-right {
    display: none;
  }
}

/* mobile — 1 column, hide all doodles, compact everything */
@media (max-width: 767px) {
  .board {
    padding: 2rem 1rem;
  }

  .section-label {
    font-size: 1.3rem;
  }

  .hero-first,
  .hero-last {
    font-size: 2.2rem;
  }

  .hero-tagline {
    font-size: 1rem;
  }

  .hero-desc {
    font-size: 0.92rem;
  }

  .hero-desc br {
    display: none;
  }

  .sketch-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .sticky-note {
    top: -14px;
    right: 12px;
    padding: 0.5rem 0.7rem;
    font-size: 0.82rem;
    max-width: 130px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .stat-num {
    font-size: 1.5rem;
  }

  .timeline-card {
    padding: 1.2rem 1.4rem 1.2rem 1.8rem;
  }

  .timeline-dot {
    width: 11px;
    height: 11px;
    left: -4px;
    top: 1.4rem;
  }

  .timeline::before {
    left: 6px;
    width: 2px;
  }

  .sketch-card {
    padding: 1.2rem;
  }

  .doodle {
    display: none !important;
  }

  .project-pin {
    font-size: 1rem;
  }

  .contact-link {
    font-size: 0.85rem;
  }

  .edu-row {
    flex-direction: column;
    text-align: left;
  }

  .edu-icon {
    font-size: 1.6rem;
  }
}

/* small phone */
@media (max-width: 480px) {
  .board {
    padding: 1.5rem 0.8rem;
  }

  .hero-first,
  .hero-last {
    font-size: 1.8rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .sketch-btn {
    width: 100%;
    text-align: center;
  }

  .stat-num {
    font-size: 1.3rem;
  }

  .project-header h3 {
    font-size: 1.05rem;
  }

  .project-desc {
    font-size: 0.85rem;
  }
}

/* ── Reduced motion preference ──────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .sketch-btn:hover {
    transform: none;
  }
}

/* ── Print ──────────────────────────────────────────────────── */

@media print {
  .doodle { display: none !important; }
  .sticky-note { display: none !important; }
  .board { padding: 1rem; }
  .sketch-card { filter: none; border: 1px solid #999; box-shadow: none; }
}