/* ---------------------------------------------------------
   Ângelo Pinheiro — Engineering Portfolio
   Design system: dark, technical, minimal.
--------------------------------------------------------- */

:root {
  --bg: #060810;
  --bg-alt: #0a0d17;
  --surface: #0d1119;
  --surface-2: #10151f;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e7eaf1;
  --text-dim: #9aa2b3;
  --text-faint: #616a7d;

  --blue: #5b8cff;
  --blue-dim: rgba(91, 140, 255, 0.14);
  --purple: #8f7bff;
  --purple-dim: rgba(143, 123, 255, 0.14);
  --amber: #ffb454;
  --amber-dim: rgba(255, 180, 84, 0.4);
  --blue-border: rgba(91, 140, 255, 0.4);
  --purple-border: rgba(143, 123, 255, 0.4);
  --blue-glow: rgba(91, 140, 255, 0.6);
  --blue-glow-soft: rgba(91, 140, 255, 0.12);
  --grid-line: rgba(255, 255, 255, 0.025);
  --nav-bg: rgba(6, 8, 16, 0.82);
  --overlay-bg: rgba(6, 8, 16, 0.98);
  --card-shadow: none;
  --card-shadow-hover: none;
  --scrollbar-track: var(--bg-alt);

  --mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --container: 1180px;
  --radius: 10px;
  --radius-sm: 6px;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-alt: #eceef4;
  --surface: #ffffff;
  --surface-2: #f1f3f8;
  --border: rgba(15, 20, 35, 0.30);
  --border-strong: rgba(15, 20, 35, 0.45);
  --card-shadow: 0 1px 2px rgba(15, 20, 35, 0.04), 0 10px 24px rgba(15, 20, 35, 0.06);
  --card-shadow-hover: 0 4px 8px rgba(15, 20, 35, 0.06), 0 16px 32px rgba(15, 20, 35, 0.09);
  --text: #11131c;
  --text-dim: #4c5468;
  --text-faint: #7c849a;

  --blue: #3457d5;
  --blue-dim: rgba(52, 87, 213, 0.10);
  --purple: #6a4fd6;
  --purple-dim: rgba(106, 79, 214, 0.10);
  --amber: #a3670d;
  --amber-dim: rgba(163, 103, 13, 0.28);
  --blue-border: rgba(52, 87, 213, 0.35);
  --purple-border: rgba(106, 79, 214, 0.35);
  --blue-glow: rgba(52, 87, 213, 0.45);
  --blue-glow-soft: rgba(52, 87, 213, 0.10);
  --grid-line: rgba(15, 20, 35, 0.045);
  --nav-bg: rgba(246, 247, 251, 0.82);
  --overlay-bg: rgba(246, 247, 251, 0.97);

  color-scheme: light;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.mono { font-family: var(--mono); }

/* ---------- Section scaffolding ---------- */

section { position: relative; padding: 120px 0; }
section.tight { padding: 90px 0; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 56px;
}

.section-index {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--blue);
  letter-spacing: 0.08em;
}

.section-title {
  font-family: var(--sans);
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent);
}

.section-kicker {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-kicker::before {
  content: '';
  width: 8px;
  height: 1px;
  background: var(--blue);
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* ---------- Navbar ---------- */

.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.navbar.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo .dot {
  width: 7px; height: 7px;
  border-radius: 1px;
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: attr(data-num);
  position: absolute;
  left: -18px;
  top: 4px;
  font-size: 10px;
  color: var(--blue);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.nav-links a:hover::after { opacity: 1; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-cta {
  border: 1px solid var(--border-strong);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.nav-cta:hover { border-color: var(--blue); background: var(--blue-dim); }

.nav-cta-ghost {
  border-color: transparent;
  color: var(--text-dim);
}
.nav-cta-ghost:hover { border-color: var(--border-strong); background: transparent; color: var(--text); }

.lang-toggle {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.lang-toggle:hover { border-color: var(--blue); background: var(--blue-dim); color: var(--text); }

.mobile-menu .lang-toggle {
  align-self: flex-start;
  margin-top: 16px;
  font-size: 14px;
  padding: 10px 16px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.theme-toggle:hover { border-color: var(--blue); background: var(--blue-dim); color: var(--text); }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: inline-block; }

.mobile-menu-toggles {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.mobile-menu-toggles .lang-toggle { margin-top: 0; }
.mobile-menu .theme-toggle {
  width: auto;
  height: auto;
  padding: 10px 14px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 68px 0 0 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(10px);
  z-index: 99;
  display: flex;
  flex-direction: column;
  padding: 40px 32px;
  gap: 4px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.mobile-menu.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.mobile-menu a {
  font-family: var(--mono);
  font-size: 22px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  display: flex;
  justify-content: space-between;
}
.mobile-menu a span { color: var(--text-faint); font-size: 14px; }
.mobile-menu a.mobile-cv-link {
  font-size: 16px;
  color: var(--text-dim);
  margin-top: 12px;
  border-bottom: none;
}
.mobile-menu a.mobile-cv-link span { color: var(--blue); font-size: 16px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 68px;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, black 40%, transparent 90%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--blue);
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}
.hero-eyebrow .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 0 var(--blue-glow);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--blue-glow); }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero h1 {
  font-family: var(--sans);
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--blue), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-role {
  font-family: var(--mono);
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  color: var(--text-dim);
  margin-bottom: 28px;
  letter-spacing: 0.01em;
}
.hero-role .sep { color: var(--text-faint); margin: 0 8px; }

.hero-lede {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-dim);
  max-width: 560px;
  margin-bottom: 44px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--mono);
  font-size: 13.5px;
  letter-spacing: 0.02em;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
}
.btn-primary:hover { background: var(--blue); color: #fff; transform: translateY(-1px); }
.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--blue); background: var(--blue-dim); }
.btn-arrow { transition: transform 0.2s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  z-index: 2;
}
.hero-scroll::after {
  content: '';
  width: 1px; height: 34px;
  background: linear-gradient(var(--text-faint), transparent);
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 72px;
  align-items: start;
}

.about-text p {
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 20px;
  max-width: 56ch;
}
.about-text strong { color: var(--text); font-weight: 600; }

.flow-line {
  font-family: var(--mono);
  font-size: 1.05rem;
  color: var(--text);
  margin: 28px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.flow-line span.node {
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}
.flow-line span.arrow { color: var(--blue); }

.about-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
  padding: 20px;
}

.profile-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  max-width: 280px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
}
.profile-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 18%;
}
.profile-corners {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  stroke: var(--blue);
  stroke-width: 1.6;
  fill: none;
  opacity: 0.8;
  pointer-events: none;
}

.profile-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  font-size: 12.5px;
  letter-spacing: 0.02em;
}
.profile-caption .dim { color: var(--text-faint); }

.about-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
  padding: 28px;
  position: relative;
}
.about-panel-title {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
}
.about-panel-title .lights { display: flex; gap: 6px; }
.about-panel-title .lights span { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }
.about-panel-title .lights span:first-child { background: var(--amber); }

.interest-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.interest-list li {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.interest-list li:hover { border-color: var(--purple); color: var(--text); }

/* Engineering mindset flow */
.mindset {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  padding-top: 48px;
}
.mindset-steps {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 8px;
}
.mindset-step {
  flex: 1;
  min-width: 130px;
  text-align: center;
  padding: 20px 10px;
  position: relative;
}
.mindset-step .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  margin-bottom: 10px;
}
.mindset-step .dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  margin: 0 auto 14px;
  background: var(--bg);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.mindset-step.active .dot,
.mindset-steps:hover .mindset-step:hover .dot {
  background: var(--blue);
  box-shadow: 0 0 14px var(--blue-glow);
}
.mindset-step .label {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
}
.mindset-connector {
  flex: 0 0 40px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--border-strong) 0 6px, transparent 6px 12px);
  margin-top: -34px;
}

/* ---------- Projects ---------- */

.project-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  margin-bottom: 28px;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.project-feature:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

.project-feature .media {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  border-right: 1px solid var(--border);
}
.project-feature .media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}
.project-feature:hover .media img { transform: scale(1.04); }

.project-feature .content {
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
}
.tag.blue { border-color: var(--blue-border); color: var(--blue); background: var(--blue-dim); }
.tag.purple { border-color: var(--purple-border); color: var(--purple); background: var(--purple-dim); }

.project-feature .flag {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--amber);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.context-label {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.project-feature h3 {
  font-family: var(--sans);
  font-size: 1.9rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.project-feature p {
  color: var(--text-dim);
  margin-bottom: 22px;
  max-width: 46ch;
}

.project-link {
  font-family: var(--mono);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 3px;
  width: fit-content;
  transition: border-color 0.2s ease, color 0.2s ease, gap 0.2s ease;
}
.project-link:hover { color: var(--blue); border-color: var(--blue); gap: 12px; }

.projects-secondary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.projects-more {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

.project-card .media { position: relative; aspect-ratio: 16/10; overflow: hidden; border-bottom: 1px solid var(--border); }
.project-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.project-card:hover .media img { transform: scale(1.05); }

.project-card .content { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.project-card h4 { font-family: var(--sans); font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; }
.project-card p { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 18px; flex: 1; }
.project-card .tag-row { margin-bottom: 12px; }

/* ---------- Experience timeline ---------- */

.timeline { position: relative; padding-left: 40px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(var(--border-strong), var(--border) 80%, transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 56px;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -40px; top: 6px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--blue);
}
.timeline-item.current::before {
  background: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-dim);
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.timeline-date {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--blue);
  letter-spacing: 0.03em;
}
.timeline-badge {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--amber);
  border: 1px solid var(--amber-dim);
  padding: 2px 8px;
  border-radius: 999px;
}

.timeline-item h3 {
  font-family: var(--sans);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.timeline-org {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.timeline-item ul { margin-bottom: 16px; }
.timeline-item ul li {
  color: var(--text-dim);
  font-size: 0.96rem;
  padding-left: 18px;
  position: relative;
  margin-bottom: 8px;
  max-width: 62ch;
}
.timeline-item ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--purple);
}

/* ---------- Skills ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.skill-category {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.skill-category:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}
.skill-category-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.skill-category-head .icon-box {
  width: 32px; height: 32px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
  flex-shrink: 0;
}
.skill-category-head h4 { font-family: var(--sans); font-size: 1.05rem; font-weight: 600; }

.chip-row { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.chip:hover { border-color: var(--blue); color: var(--text); }

.languages-row {
  display: flex;
  gap: 40px;
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.language-item .lang-name { font-family: var(--sans); font-weight: 600; margin-bottom: 4px; }
.language-item .lang-level { font-family: var(--mono); font-size: 12px; color: var(--text-faint); }

/* ---------- Education ---------- */

.education-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.education-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.education-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}
.education-card .grade {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--blue);
  border: 1px solid var(--blue-border);
  background: var(--blue-dim);
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.education-card .date { font-family: var(--mono); font-size: 12px; color: var(--text-faint); margin-bottom: 10px; }
.education-card h4 { font-family: var(--sans); font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; line-height: 1.35; }
.education-card .org { font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); margin-bottom: 16px; }
.education-card ul { flex: 1; }
.education-card ul li {
  font-size: 0.88rem;
  color: var(--text-dim);
  padding-left: 16px;
  position: relative;
  margin-bottom: 8px;
}
.education-card ul li::before { content: '·'; position: absolute; left: 0; color: var(--purple); font-weight: 700; }

/* ---------- Contact ---------- */

.contact-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
  padding: 64px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.contact-panel::before {
  content: '';
  position: absolute;
  top: -40%; left: 50%;
  width: 700px; height: 700px;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--blue-glow-soft), transparent 65%);
  pointer-events: none;
}
.contact-panel h2 {
  font-family: var(--sans);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 600;
  margin-bottom: 18px;
  position: relative;
}
.contact-panel p {
  color: var(--text-dim);
  max-width: 50ch;
  margin: 0 auto 36px;
  position: relative;
}
.contact-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
}
.contact-link {
  font-family: var(--mono);
  font-size: 13.5px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 14px 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.contact-link:hover { border-color: var(--blue); background: var(--blue-dim); transform: translateY(-2px); }
.contact-link .k { color: var(--text-faint); }

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------- Project detail page ---------- */

.detail-hero {
  padding: 150px 0 60px;
  border-bottom: 1px solid var(--border);
}
.back-link {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
  transition: color 0.2s ease, gap 0.2s ease;
}
.back-link:hover { color: var(--blue); gap: 12px; }

.detail-hero h1 {
  font-family: var(--sans);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 600;
  margin-bottom: 16px;
  max-width: 16ch;
}
.detail-hero .subtitle {
  color: var(--text-dim);
  font-size: 1.15rem;
  max-width: 60ch;
  margin-bottom: 28px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 24px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.detail-meta .item .k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.detail-meta .item .v { font-family: var(--sans); font-weight: 600; font-size: 0.98rem; }

.search-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--card-shadow);
  padding: 14px 18px;
  margin-top: 40px;
}
.search-bar svg { color: var(--text-faint); flex-shrink: 0; }
.search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
}
.search-bar input::placeholder { color: var(--text-faint); }
.search-count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  white-space: nowrap;
}

.all-projects-grid {
  margin-top: 40px;
}
.all-projects-grid .project-card[style*="display: none"] { display: none; }

.detail-hero-media {
  margin-top: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.detail-body {
  padding: 80px 0;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
}

.detail-section { margin-bottom: 56px; }
.detail-section:last-child { margin-bottom: 0; }
.detail-section h2 {
  font-family: var(--sans);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.detail-section h2::before {
  content: '';
  width: 20px; height: 1px;
  background: var(--blue);
}
.detail-section p { color: var(--text-dim); max-width: 68ch; margin-bottom: 16px; }
.detail-section ul li {
  color: var(--text-dim);
  padding-left: 20px;
  position: relative;
  margin-bottom: 12px;
  max-width: 64ch;
}
.detail-section ul li::before { content: '›'; position: absolute; left: 0; color: var(--purple); }

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.gallery-grid img {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.gallery-note {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 12px;
}

.detail-sidebar { position: sticky; top: 100px; align-self: start; }
.side-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
  padding: 24px;
  margin-bottom: 20px;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.side-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}
.side-card .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.side-card .chip-row { gap: 8px; }

.reference-list { display: flex; flex-direction: column; gap: 10px; }
.reference-list li { list-style: none; }
.reference-list a {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease;
}
.reference-list a::before {
  content: '\2197';
  color: var(--purple);
  flex-shrink: 0;
}
.reference-list a:hover { color: var(--text); }

.flow-mini {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.flow-mini .step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  position: relative;
}
.flow-mini .step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 5px; top: 30px;
  width: 1px; height: 16px;
  background: var(--border-strong);
}
.flow-mini .step .dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 2px solid var(--purple);
  background: var(--bg);
  flex-shrink: 0;
}
.flow-mini .step span { font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .projects-secondary { grid-template-columns: 1fr 1fr; }
  .education-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .detail-body { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
}

@media (max-width: 720px) {
  .nav-links, .nav-actions { display: none; }
  .nav-toggle { display: flex; }
  section { padding: 80px 0; }
  .container { padding: 0 22px; }
  .project-feature { grid-template-columns: 1fr; }
  .project-feature .media { min-height: 220px; border-right: none; border-bottom: 1px solid var(--border); }
  .project-feature .content { padding: 30px; }
  .projects-secondary { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .contact-panel { padding: 40px 24px; }
  .contact-links { flex-direction: column; }
  .gallery-grid { grid-template-columns: 1fr; }
  .mindset-steps { flex-direction: column; align-items: stretch; }
  .mindset-connector { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
