/* Styles — João Brito's portfolio
   Art direction: hand-inked field notebook, recolored to match the CV: navy ink, one blue accent, white paper. */

:root {
  --paper: #f7f9fc;
  --paper-2: #eef2fb;
  --card: #ffffff;
  --ink: #0e1f38;
  --ink-soft: #33465f;
  --muted: #6b7a90;
  --rust: #114fa1;
  --rust-2: #2e6fd9;
  --teal: #114fa1;
  --line: #cdd7e8;
  --mark: #d8e6fa;
  --radius: 14px;
  --shadow-flat: 5px 5px 0 rgba(14, 31, 56, 0.9);
  --shadow-flat-lg: 8px 8px 0 rgba(14, 31, 56, 0.9);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Shantell Sans', 'Segoe Print', 'Comic Sans MS', cursive, sans-serif;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  line-height: 1.65;
  cursor: none;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font: inherit; cursor: none; border: none; background: none; }

@media (hover: none) {
  body, button, a { cursor: auto; }
  .ink-cursor { display: none; }
}

/* ---------- Preloader ---------- */
body.is-loading { overflow: hidden; }

.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vh, 20px);
  background: var(--paper);
  transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.5s ease;
}
.loader.is-hidden { opacity: 0; visibility: hidden; transform: scale(1.03); pointer-events: none; }

/* Faint ruled-paper lines behind the mark, echoing .notebook-lines in the hero
   so the loader reads as part of the same notebook, not a blank error screen. */
.loader-paper {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 38px,
    rgba(14, 31, 56, 0.06) 39px
  );
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 78%);
}

.loader-mark {
  --size: clamp(80px, 24vmin, 112px);
  position: relative;
  z-index: 1;
  width: var(--size);
  height: var(--size);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.loader-ring-track { fill: none; stroke: var(--line); stroke-width: 4; }
.loader-ring-draw {
  fill: none;
  stroke: var(--rust);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 327; /* driven live by JS as real load progress (fonts + window load), not a decorative loop */
  filter: drop-shadow(0 0 6px rgba(17, 79, 161, 0.35));
}
.loader-badge {
  width: calc(var(--size) * 0.6);
  height: calc(var(--size) * 0.6);
  border-radius: calc(var(--size) * 0.145);
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(14, 31, 56, 0.28);
  animation: badge-bounce 1.6s ease-in-out infinite;
}
.loader-badge span { font-family: Arial, Helvetica, sans-serif; font-weight: 800; font-size: calc(var(--size) * 0.136); color: #fff; letter-spacing: -1px; }
@keyframes badge-bounce {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-5px) rotate(2deg); }
}

.loader-caption {
  position: relative;
  z-index: 1;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(0.75rem, 2.6vw, 0.85rem);
  letter-spacing: 0.02em;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: min(88vw, 320px);
  text-align: center;
  padding: 0 12px;
}
#loaderJoke { display: inline-block; }
#loaderJoke.is-changing { animation: joke-pop 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes joke-pop {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.loader-percent { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .loader-badge { animation: none; }
  #loaderJoke.is-changing { animation: none; }
}

/* Page rises into view as the loader clears — expo ease-out, no bounce */
.reveal-on-load {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
body.is-loading .reveal-on-load { opacity: 0; transform: translateY(18px) scale(0.985); }

@media (prefers-reduced-motion: reduce) {
  .reveal-on-load, body.is-loading .reveal-on-load { transition: none; transform: none; opacity: 1; }
}

/* ---------- Grain overlay ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 3000;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 1s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0,0); }
  25% { transform: translate(-2%,1%); }
  50% { transform: translate(1%,-2%); }
  75% { transform: translate(-1%,-1%); }
  100% { transform: translate(0,0); }
}

/* ---------- Custom cursor ---------- */
/* single soft blob, mix-blend-mode inverts it over any background so one element works everywhere */
.ink-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 22px; height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 4000;
  will-change: transform;
}

/* ---------- Call FAB ---------- */
.call-fab {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 950;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--rust);
  border: 2.5px solid var(--ink);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-flat);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.call-fab svg { width: 26px; height: 26px; }
.call-fab:hover {
  transform: translate(-3px, -3px) rotate(-6deg);
  box-shadow: var(--shadow-flat-lg);
}
.call-fab-pulse {
  position: absolute;
  inset: -2.5px;
  border-radius: 50%;
  border: 2.5px solid var(--rust);
  animation: call-pulse 2.4s ease-out infinite;
}
@keyframes call-pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.7); opacity: 0; }
}
@media (max-width: 480px) {
  .call-fab { right: 18px; bottom: 18px; width: 52px; height: 52px; }
  .call-fab svg { width: 22px; height: 22px; }
}

/* ---------- Progress bar ---------- */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 4px;
  width: 0%;
  background: var(--rust);
  z-index: 2000;
  transition: width 0.1s ease-out;
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--paper);
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  padding: 20px 0;
}
.navbar.scrolled {
  border-bottom-color: var(--ink);
  padding: 12px 0;
  box-shadow: 0 4px 0 rgba(14,31,56,0.05);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  font-family: 'Shantell Sans', cursive;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--ink);
  letter-spacing: 0.5px;
}
.logo-dot { color: var(--rust); }

.nav-links {
  display: flex;
  gap: 30px;
}
.nav-link {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  padding: 4px 2px;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: -4px; right: -4px; bottom: -2px;
  height: 9px;
  background: var(--mark);
  border-radius: 3px;
  z-index: -1;
  transform: scaleX(0) rotate(-1deg);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1) rotate(-1deg); }
.nav-social { display: none; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  color: var(--ink);
  transition: all 0.2s ease;
}
.icon-btn:hover {
  background: var(--ink);
  color: var(--paper);
  transform: rotate(-8deg);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  font-family: 'Shantell Sans', cursive;
  border: 2.5px solid var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--rust);
  color: #ffffff;
  box-shadow: var(--shadow-flat);
}
.btn-primary:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 rgba(14,31,56,0.9);
}
.btn-outline {
  border: 2.5px solid var(--ink);
  color: var(--ink);
  box-shadow: var(--shadow-flat);
}
.btn-outline:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 rgba(14,31,56,0.9);
  background: var(--ink);
  color: var(--paper);
}

.dl-wrap { position: relative; }
.dl-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: var(--shadow-flat);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px) rotate(-1deg);
  pointer-events: none;
  transition: all 0.2s ease;
  min-width: 160px;
}
.dl-wrap.open .dl-menu {
  opacity: 1;
  transform: translateY(0) rotate(-1deg);
  pointer-events: auto;
}
.dl-menu a {
  display: block;
  padding: 12px 18px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s;
}
.dl-menu a:hover { background: var(--mark); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 30px;
}
.burger span {
  height: 3px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--paper);
  overflow: hidden;
  padding: 140px 24px 70px;
}
.notebook-lines {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 38px,
    rgba(14, 31, 56, 0.07) 39px
  );
  mask-image: radial-gradient(ellipse at center, black 45%, transparent 85%);
}

.hero-inner {
  text-align: center;
  max-width: 720px;
  position: relative;
  z-index: 2;
}

.polaroid {
  display: inline-block;
  background: #fff;
  padding: 14px 14px 34px;
  border-radius: 4px;
  box-shadow: var(--shadow-flat-lg);
  transform: rotate(-4deg);
  position: relative;
  margin-bottom: 30px;
  transition: transform 0.35s ease;
}
.polaroid:hover { transform: rotate(0deg) scale(1.03); }
.tape {
  position: absolute;
  top: -16px; left: 50%;
  width: 90px; height: 30px;
  margin-left: -45px;
  background: rgba(46, 111, 217, 0.22);
  border: 1px solid rgba(14,31,56,0.15);
  transform: rotate(-3deg);
}
.hero-photo {
  width: 190px;
  height: 190px;
  object-fit: cover;
  display: block;
}
.polaroid-cap {
  position: absolute;
  bottom: 8px; left: 0; right: 0;
  text-align: center;
  font-family: 'Shantell Sans', cursive;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.eyebrow {
  color: var(--rust);
  font-weight: 700;
  font-family: 'Space Mono', monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 10px;
}
.hero-name {
  font-family: 'Shantell Sans', cursive;
  font-size: clamp(2.6rem, 9vw, 5.4rem);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.08;
}
.accent-wrap {
  color: var(--rust);
  position: relative;
  display: inline-block;
}
.squiggle {
  position: absolute;
  left: 0; right: 0; bottom: -0.14em;
  width: 100%;
  height: 0.3em;
  overflow: visible;
}
.squiggle path {
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  transition: stroke-dashoffset 1.1s ease 0.4s;
}
.hero-inner.in-view .squiggle path,
.hero-name .squiggle path { }
.squiggle.drawn path { stroke-dashoffset: 0; }

.hero-role {
  margin-top: 16px;
  font-family: 'Space Mono', monospace;
  font-size: clamp(1rem, 2.6vw, 1.3rem);
  color: var(--ink-soft);
  font-weight: 700;
  min-height: 2em;
}
.cursor {
  animation: blink 1s step-end infinite;
  color: var(--rust);
}
@keyframes blink { 50% { opacity: 0; } }

.hero-tagline {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 1.08rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.hero-tagline strong { color: var(--rust); }

.hero-actions {
  margin-top: 34px;
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-cue {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}
.wheel-doodle { animation: wheel-slide 1.6s ease infinite; }
@keyframes wheel-slide {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(10px); }
}

/* ---------- Marquee ---------- */
.marquee {
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  padding: 14px 0;
}
.marquee-track {
  display: flex;
  gap: 18px;
  white-space: nowrap;
  width: max-content;
  animation: marquee-scroll 22s linear infinite;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
}
.marquee-track span:nth-child(odd) { color: var(--rust-2); }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Sections ---------- */
.section { padding: 110px 24px; position: relative; }
.section-alt { background: var(--paper-2); }
.section-inner { max-width: 1100px; margin: 0 auto; }

.section-title {
  font-family: 'Shantell Sans', cursive;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  margin-bottom: 50px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.doodle-icon {
  display: inline-flex;
  width: 38px; height: 38px;
  color: var(--rust);
  flex-shrink: 0;
}
.doodle-icon svg { width: 100%; height: 100%; }

/* reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(30px) rotate(-1deg);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2,.8,.2,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0) rotate(0deg);
}
.reveal-pop {
  opacity: 0;
  transform: scale(0.8) rotate(-10deg);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(.34,1.56,.64,1);
}
.reveal-pop.visible {
  opacity: 1;
  transform: rotate(-4deg);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
}
.about-card {
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-flat);
  font-size: 1.08rem;
  color: var(--ink-soft);
  transform: rotate(-0.6deg);
}
.about-card p + p { margin-top: 16px; }
.hl {
  color: var(--ink);
  font-weight: 700;
  background: linear-gradient(120deg, transparent 0%, transparent 4%, var(--mark) 4%, var(--mark) 96%, transparent 96%);
  padding: 0 2px;
}

.strengths {
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-flat);
  transform: rotate(0.8deg);
}
.strength-item {
  color: var(--ink);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background 0.25s ease, transform 0.25s ease;
}
.strength-item:hover {
  background: var(--paper-2);
  transform: translateX(6px) rotate(-1deg);
}
.s-ico { width: 24px; height: 24px; flex-shrink: 0; color: var(--teal); }
.s-ico svg { width: 100%; height: 100%; }

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 34px;
}
.skill-group {
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-flat);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}
.skew-a { transform: rotate(-1.2deg); }
.skew-b { transform: rotate(1.4deg); }
.skill-group:hover {
  transform: rotate(0deg) translateY(-6px);
  box-shadow: var(--shadow-flat-lg);
}
.pin {
  position: absolute;
  top: -9px; left: 50%;
  margin-left: -8px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--rust);
  border: 2px solid var(--ink);
}
.skill-group h4 {
  font-family: 'Space Mono', monospace;
  color: var(--teal);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 18px;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  background: var(--paper-2);
  color: var(--ink);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 2px solid var(--ink);
  transition: all 0.2s ease;
  display: inline-block;
}
.tag:hover {
  background: var(--rust);
  color: #ffffff;
  transform: translateY(-3px) rotate(-3deg);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 36px;
}
.tl-line {
  position: absolute;
  left: 6px; top: 0; bottom: 0;
  width: 3px;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--ink) 0, var(--ink) 3px, transparent 3px, transparent 6px
  );
  background-size: 3px 100%;
}
.tl-item { position: relative; margin-bottom: 54px; }
.tl-item:last-child { margin-bottom: 0; }
.tl-dot {
  position: absolute;
  left: -37px;
  top: 6px;
  width: 18px; height: 18px;
  border-radius: 50% 45% 50% 48%;
  background: var(--rust);
  border: 2.5px solid var(--ink);
}
.tl-card {
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-flat);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}
.tl-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-flat-lg);
}
.paperclip {
  position: absolute;
  top: -14px; left: 24px;
  width: 22px; height: 40px;
  border: 3px solid var(--muted);
  border-radius: 50% 50% 0 0 / 60% 60% 0 0;
  border-bottom: none;
  transform: rotate(-8deg);
  opacity: 0.8;
}
.tl-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.tl-head h4 { font-size: 1.3rem; font-weight: 800; }
.tl-company { color: var(--rust); font-weight: 700; margin-top: 2px; font-family: 'Shantell Sans', cursive; }
.tl-date {
  background: #ffffff;
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 6px 14px;
  border-radius: 999px;
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  transform: rotate(-2deg);
  display: inline-block;
}
.tl-list { margin-bottom: 20px; }
.tl-list li {
  position: relative;
  padding-left: 24px;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.tl-list li::before {
  content: "✦";
  position: absolute;
  left: 0; top: 0;
  color: var(--teal);
  font-size: 0.85em;
}

/* Education */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}
.edu-card {
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow-flat);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.edu-card:nth-child(odd) { transform: rotate(-1deg); }
.edu-card:nth-child(even) { transform: rotate(1.2deg); }
.edu-card:hover {
  transform: rotate(0deg) translateY(-6px);
  box-shadow: var(--shadow-flat-lg);
}
.edu-ico {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  color: var(--rust);
  background: var(--paper-2);
  border: 2px solid var(--ink);
  border-radius: 14px;
  margin-bottom: 18px;
}
.edu-ico svg { width: 30px; height: 30px; }
.edu-card h4 { color: var(--ink); font-size: 1.08rem; margin-bottom: 10px; font-weight: 800; }
.edu-card p { color: var(--ink-soft); margin-bottom: 16px; }
.edu-meta { color: var(--muted); font-family: 'Space Mono', monospace; font-size: 0.8rem; font-weight: 700; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.contact-card {
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-flat);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.contact-card:not(.no-link):hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--shadow-flat-lg);
}
.c-ico { width: 30px; height: 30px; flex-shrink: 0; color: var(--rust); }
.c-ico svg { width: 100%; height: 100%; }
.contact-card strong { display: block; font-family: 'Space Mono', monospace; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.contact-card p { font-weight: 700; margin-top: 2px; word-break: break-word; }

/* Footer */
.footer {
  background: var(--ink);
  color: rgba(242, 233, 216, 0.75);
  padding: 40px 24px 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}
.footer p { display: flex; align-items: center; gap: 8px; }
.torn-edge {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 10px;
  background: var(--paper);
  clip-path: polygon(0% 100%, 4% 0%, 8% 100%, 12% 0%, 16% 100%, 20% 0%, 24% 100%, 28% 0%, 32% 100%, 36% 0%, 40% 100%, 44% 0%, 48% 100%, 52% 0%, 56% 100%, 60% 0%, 64% 100%, 68% 0%, 72% 100%, 76% 0%, 80% 100%, 84% 0%, 88% 100%, 92% 0%, 96% 100%, 100% 0%, 100% 100%, 0 100%);
}
.coffee-ring {
  position: absolute;
  right: 60px; bottom: -20px;
  width: 90px; height: 90px;
  border: 6px solid rgba(242, 233, 216, 0.08);
  border-radius: 50%;
}
.foot-coffee { color: var(--rust-2); flex-shrink: 0; }
.to-top {
  position: absolute;
  right: 104px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--rust);
  border: 2.5px solid var(--paper);
  color: #ffffff;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s ease;
}
.to-top:hover { transform: translateY(-50%) translateY(-4px) rotate(-8deg); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    height: 100vh;
    width: min(75vw, 320px);
    background: var(--paper);
    border-left: 3px solid var(--ink);
    flex-direction: column;
    padding: 100px 32px;
    gap: 26px;
    transition: right 0.35s ease;
  }
  .nav-links.open { right: 0; }
  .nav-social {
    display: block;
    margin-top: 10px;
    padding-top: 22px;
    border-top: 2px solid var(--line);
    color: var(--rust);
  }
  .burger { display: flex; }
  .nav-actions .icon-btn { display: none; }
  .nav-actions { gap: 10px; }
  .section { padding: 80px 20px; }
  .to-top { position: static; transform: none; margin-top: 10px; }
  .footer { flex-direction: column; }
}

@media (max-width: 480px) {
  .nav-inner { padding: 0 18px; }
  .btn { padding: 10px 16px; font-size: 0.85rem; }
  .hero { padding: 120px 18px 50px; }
  .hero-photo { width: 140px; height: 140px; }
  .polaroid { padding: 10px 10px 26px; }
}
