/* =======================================================
   YURI PINHEIRO TEIXEIRA — PORTFOLIO
   ======================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  min-width: 320px;
  background: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a,
button,
input,
textarea {
  font: inherit;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

button,
a,
input,
textarea {
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary-soft);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 1rem;
  z-index: 2000;
  padding: 0.65rem 1rem;
  border-radius: 0.5rem;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding-inline: 2rem;
}

.text-gradient {
  background: linear-gradient(110deg, var(--primary-soft), #d8b4fe 52%, #67e8f9);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.overline {
  display: block;
  margin-bottom: 1rem;
  color: var(--primary);
  font-family: var(--font-code);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ambient-glow {
  position: fixed;
  top: -24rem;
  right: -16rem;
  z-index: -1;
  width: 42rem;
  height: 42rem;
  background: radial-gradient(circle, var(--primary-glow), transparent 68%);
  opacity: 0.34;
  pointer-events: none;
}

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

.navbar.scrolled {
  padding: 0.7rem 0;
  border-bottom-color: var(--border);
}

.nav-container {
  display: flex;
  min-height: 3.2rem;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-main);
  text-decoration: none;
}

.nav-links,
.mobile-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

.theme-btn,
.mobile-menu-btn {
  display: flex;
  cursor: pointer;
}

.theme-btn {
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.mobile-menu-btn {
  display: none;
  border: 0;
  background: transparent;
  color: var(--text-main);
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  z-index: 999;
  display: flex;
  width: min(100%, 25rem);
  height: 100dvh;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--border);
  background: var(--nav-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-inner {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  justify-content: space-between;
}

.hero {
  position: relative;
  display: flex;
  min-height: min(900px, 100vh);
  align-items: center;
  padding: 8rem 0 5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr);
  gap: 4rem;
  align-items: center;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.hero-visual {
  display: flex;
  width: 100%;
  min-height: 34rem;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
}

.tech-card-3d {
  position: relative;
  width: 100%;
  max-width: 35rem;
  aspect-ratio: 1.08 / 1;
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
}

.layer-code {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform: translateZ(0);
}

.code-header {
  display: flex;
  align-items: center;
}

.dot {
  display: block;
  flex: 0 0 auto;
  border-radius: 50%;
}

.dot.red { background: #f87171; }
.dot.yellow { background: #facc15; }
.dot.green { background: #4ade80; }

.scanning-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-soft), transparent);
  animation: scan 3s linear infinite;
  opacity: 0.5;
}

@keyframes scan {
  from { top: 0; }
  to { top: 100%; }
}

.layer-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateZ(40px);
  pointer-events: none;
}

.core-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-glow), transparent 70%);
  animation: pulse 4s infinite ease-in-out;
}

.layer-ui {
  position: absolute;
  z-index: 2;
  transform: translateZ(80px);
  border: 1px solid var(--border);
  border-top-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
}

.ui-header,
.ui-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ui-header {
  gap: 0.5rem;
}

.ui-graph {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3rem;
}

.bar {
  flex: 1;
  height: var(--h);
  border-radius: 2px 2px 0 0;
  background: var(--primary);
  opacity: 0.3;
  animation: barHeight 2s infinite ease-in-out alternate;
}

.bar.active {
  background: linear-gradient(to top, var(--primary), var(--accent));
  box-shadow: 0 0 10px var(--primary-glow);
  opacity: 1;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.blink {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1s infinite;
}

.floating-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--primary);
  border-radius: 50px;
  color: var(--primary-soft);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.section-header {
  max-width: 45rem;
  margin: 0 auto 3.2rem;
  text-align: center;
}

.section-header h2 {
  color: var(--text-main);
  font-family: var(--font-heading);
}

.section-header p {
  line-height: 1.7;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
}

.card {
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--bg-card);
  padding: 1.75rem;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.13);
  transform: translateY(-0.3rem);
}

.card h3 {
  color: var(--text-main);
  font-family: var(--font-heading);
}

.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.contact-grid {
  display: grid;
}

footer {
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  color: var(--text-main);
  font-family: var(--font-code);
  font-size: 0.72rem;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.footer-social a i {
  font-size: 1.2rem;
  line-height: 1;
  color: var(--primary-soft);
}

.footer-social a:hover {
  border-color: color-mix(in srgb, var(--primary-soft) 55%, var(--border));
  background: color-mix(in srgb, var(--primary-soft) 12%, var(--bg-card));
  color: var(--primary-soft);
}

.reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes barHeight {
  from { transform: scaleY(0.8); }
  to { transform: scaleY(1.1); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.1); }
}

@media (max-width: 1024px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-menu-btn {
    display: flex;
  }
}

@media (max-width: 1100px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
    gap: 2rem;
  }

  .timeline::before { left: 7.8rem; }
  .timeline-marker { left: 7.48rem; }
}
/* Keep the portfolio rules last so the original agency styles cannot override them. */
:root {
  --bg-color: #07070a;
  --bg-card: rgba(255, 255, 255, 0.045);
  --text-main: #f6f7fb;
  --text-muted: #9ba3b4;
  --primary: #8b5cf6;
  --primary-soft: #a78bfa;
  --primary-glow: rgba(139, 92, 246, 0.28);
  --accent: #34d399;
  --border: rgba(255, 255, 255, 0.11);
  --nav-bg: rgba(7, 7, 10, 0.82);
  --input-bg: rgba(255, 255, 255, 0.045);
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-code: 'Fira Code', monospace;
  --content-width: 1240px;
}

[data-theme='light'] {
  --bg-color: #f7f7fb;
  --bg-card: rgba(255, 255, 255, 0.88);
  --text-main: #13131a;
  --text-muted: #5c6474;
  --primary: #6d42db;
  --primary-soft: #7c52e8;
  --primary-glow: rgba(109, 66, 219, 0.16);
  --accent: #059669;
  --border: rgba(19, 19, 26, 0.11);
  --nav-bg: rgba(247, 247, 251, 0.86);
  --input-bg: rgba(19, 19, 26, 0.035);
}

body {
  background:
    radial-gradient(circle at 75% 12%, var(--primary-glow), transparent 23rem),
    var(--bg-color);
}

.container { max-width: var(--content-width); }

.navbar {
  padding: 1rem 0;
  background: var(--nav-bg);
  border-bottom-color: transparent;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.navbar.scrolled {
  padding: 0.7rem 0;
  border-bottom-color: var(--border);
}

.logo { gap: 0.75rem; color: var(--text-main); text-decoration: none; }

.monogram {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid rgba(167, 139, 250, 0.65);
  border-radius: 0.75rem;
  background: linear-gradient(145deg, var(--primary), #4c1d95);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.08em;
  box-shadow: 0 0 2rem var(--primary-glow);
}

.monogram--small { width: 2rem; height: 2rem; border-radius: 0.55rem; font-size: 0.72rem; }
.logo-copy { display: flex; flex-direction: column; gap: 0.08rem; }
.logo-name { font-family: var(--font-heading); font-size: 0.9rem; font-weight: 700; white-space: nowrap; }
.logo-role { color: var(--text-muted); font-family: var(--font-code); font-size: 0.58rem; white-space: nowrap; }

.nav-links { gap: 1.7rem; }
.nav-links,
.mobile-links { position: relative; }
.nav-links::after,
.mobile-links::after {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--nav-indicator-width, 0px);
  height: 2px;
  border-radius: 2px;
  background: var(--primary-soft);
  content: '';
  pointer-events: none;
  transform: translate(var(--nav-indicator-x, 0px), var(--nav-indicator-y, 0px));
  transition: transform 0.3s ease, width 0.3s ease;
}
.nav-links a { position: relative; display: inline-block; padding: 0.45rem 0; color: var(--text-muted); font-size: 0.78rem; text-decoration: none; transition: color 0.3s ease; }
.nav-links a:hover { color: var(--text-main); }
.nav-links a.active { color: var(--primary-soft); }

.nav-actions { gap: 0.9rem; }
.language-switch { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text-muted); font-family: var(--font-code); font-size: 0.68rem; }
.lang-btn { padding: 0.25rem 0.1rem; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; font-size: inherit; }
.lang-btn:hover,
.lang-btn.active { color: var(--primary-soft); }
.theme-btn { width: 2.25rem; height: 2.25rem; border-color: var(--border); background: transparent; color: var(--text-main); font-size: 1rem; }
.theme-btn:hover { background: var(--bg-card); border-color: var(--primary); color: var(--primary-soft); }
.mobile-menu-btn { align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border: 1px solid var(--border); border-radius: 0.55rem; font-size: 1.25rem; }

.mobile-menu {
  width: min(100%, 25rem);
  padding: 6rem 2rem 2rem;
  background: var(--nav-bg);
  border-left-color: var(--border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.mobile-menu-inner { display: flex; height: 100%; flex-direction: column; justify-content: space-between; }
.mobile-links { gap: 1.15rem; text-align: left; }
.mobile-link { display: inline-block; padding: 0.25rem 0; font-size: 1.7rem; text-decoration: none; transition: color 0.3s ease; }
.mobile-link.btn { padding: 0.8rem 1.2rem; font-size: 0.95rem; text-align: center; }
.mobile-link.active { color: var(--primary-soft); }
.mobile-link.btn.active { color: #fff; }
.mobile-menu-controls { display: flex; flex-direction: column; gap: 0.8rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.mobile-menu-hint { color: var(--text-muted); font-size: 0.75rem; }

.hero { min-height: min(900px, 100vh); padding: 8rem 0 5rem; }
.hero-grid { grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr); gap: 4rem; }
.hero-content { max-width: 38rem; }
.badge { margin-bottom: 1.4rem; padding: 0.45rem 0.85rem; background: rgba(255, 255, 255, 0.018); font-family: var(--font-code); font-size: 0.62rem; }
h1 { max-width: 39rem; margin-bottom: 1.45rem; font-size: clamp(2.9rem, 5.2vw, 4.8rem); letter-spacing: -0.075em; line-height: 1.02; }
.hero-sub { max-width: 36rem; margin-bottom: 1.1rem; font-size: 1.03rem; line-height: 1.8; }
.hero-buttons { margin-bottom: 2.8rem; }
.btn { min-height: 2.9rem; padding: 0.75rem 1.15rem; border-radius: 0.6rem; font-size: 0.82rem; }
.btn-primary { background: linear-gradient(135deg, var(--primary), #6d28d9); box-shadow: 0 0.8rem 2rem var(--primary-glow); }
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-soft), var(--primary)); box-shadow: 0 1rem 2.5rem var(--primary-glow); }
.btn-ghost { border: 1px solid var(--border); color: var(--text-main); }
.btn-ghost:hover { border-color: var(--primary); background: var(--bg-card); color: var(--text-main); }
.hero-metrics { display: flex; gap: 1.8rem; padding-top: 1.35rem; border-top: 1px solid var(--border); }
.metric { display: flex; flex-direction: column; gap: 0.12rem; }
.metric strong { color: var(--text-main); font-family: var(--font-heading); font-size: 1.35rem; line-height: 1.1; }
.metric-suffix { color: var(--primary-soft); font-size: 0.85rem; }
.metric span:not(.metric-suffix) { color: var(--text-muted); font-size: 0.68rem; line-height: 1.35; }

.hero-visual { min-height: 34rem; }
.tech-card-3d { max-width: 35rem; aspect-ratio: 1.08 / 1; }
.layer-code { padding: 1.35rem; border-color: rgba(167, 139, 250, 0.24); border-radius: 1.15rem; background: rgba(12, 12, 18, 0.76); }
[data-theme='light'] .layer-code { background: rgba(255, 255, 255, 0.78); }
.code-content { color: #b1b6c8; font-family: var(--font-code); font-size: clamp(0.57rem, 1vw, 0.72rem); line-height: 1.9; }
.code-content .kwd { color: #c084fc; }
.code-content .cls { color: #67e8f9; }
.code-content .func { color: #86efac; }
.code-content .prop { color: #f9a8d4; }
.code-content .num,
.code-content .op { color: #fcd34d; }
.code-content .comment { color: #6b7280; }
.code-content .indent { padding-left: 1.2rem; }
.code-content .indent-2 { padding-left: 2.4rem; }
.filename { margin-left: 0.45rem; color: var(--text-muted); font-family: var(--font-code); font-size: 0.64rem; }
.layer-core { z-index: 3; }
.core-glow { width: 11rem; height: 11rem; }
.monogram--hero { position: relative; z-index: 1; width: 5.2rem; height: 5.2rem; border-radius: 1.3rem; font-size: 1.55rem; }
.layer-ui { right: -1.5rem; bottom: -1.5rem; width: 15.5rem; padding: 1rem; border-radius: 0.9rem; background: rgba(19, 19, 28, 0.82); }
[data-theme='light'] .layer-ui { background: rgba(255, 255, 255, 0.9); }
.ui-title { font-size: 0.72rem; }
.live-indicator { font-family: var(--font-code); font-size: 0.55rem; }
.ui-graph { height: 3.8rem; margin-bottom: 0.8rem; }
.stat-item .label { color: var(--text-muted); font-family: var(--font-code); font-size: 0.53rem; text-transform: uppercase; }
.stat-item .value { font-size: 0.74rem; }
.floating-badge { z-index: 4; padding: 0.45rem 0.72rem; background: var(--nav-bg); font-family: var(--font-code); font-size: 0.62rem; }
.badge-top { top: 2rem; right: -1.5rem; }
.badge-bottom { bottom: 2rem; left: -1.5rem; }

.section { padding: 7rem 0; }
.section-header h2 { margin-bottom: 0.85rem; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.06em; line-height: 1.08; }
.section-header p { color: var(--text-muted); font-size: 0.97rem; }
.section-header--split { display: grid; max-width: none; grid-template-columns: minmax(0, 1fr) minmax(16rem, 25rem); gap: 3rem; align-items: end; text-align: left; }
.section-header--split p { margin-bottom: 0.2rem; }
.expertise { border-top: 1px solid var(--border); }
.expertise-card { display: flex; flex-direction: column; min-height: 100%; }
.expertise-card > i { display: block; margin-bottom: 1.3rem; color: var(--primary-soft); font-size: 2rem; }
.expertise-card h3 { margin-bottom: 0.7rem; font-size: 1.25rem; }
.expertise-card p { min-height: 3.2rem; line-height: 1.65; }

.feature-list,
.project-list,
.timeline-list { display: flex; flex-direction: column; gap: 0.65rem; margin: 1.25rem 0; padding: 0; list-style: none; }
.feature-list li,
.project-list li,
.timeline-list li { position: relative; padding-left: 1.15rem; color: var(--text-muted); font-size: 0.78rem; line-height: 1.55; }
.feature-list li::before,
.project-list li::before,
.timeline-list li::before { position: absolute; top: 0.55rem; left: 0; width: 0.35rem; height: 0.35rem; border-radius: 50%; background: var(--primary-soft); content: ''; }
.hero-highlights { margin: 0 0 1.8rem; text-align: left; }
.hero-highlights li { font-size: 0.86rem; }
.tech-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; padding-top: 1rem; }
.chip { display: inline-flex; align-items: center; min-height: 1.65rem; padding: 0.25rem 0.55rem; border: 1px solid var(--border); border-radius: 0.35rem; background: rgba(139, 92, 246, 0.07); color: var(--text-muted); font-family: var(--font-code); font-size: 0.58rem; white-space: nowrap; }

.project-card--featured {
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.13), transparent 38%), var(--bg-card);
  border-color: rgba(167, 139, 250, 0.4);
}

.timeline { position: relative; max-width: 62rem; margin: 0 auto; }
.timeline::before { position: absolute; top: 0.6rem; bottom: 0.6rem; left: 8.4rem; width: 1px; background: linear-gradient(var(--primary), var(--border), transparent); content: ''; }
.timeline-item { position: relative; display: grid; grid-template-columns: 7rem 1fr; gap: 3rem; padding-bottom: 3.5rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker { position: absolute; top: 0.4rem; left: 8.08rem; z-index: 1; width: 0.68rem; height: 0.68rem; border: 2px solid var(--bg-color); border-radius: 50%; background: var(--primary-soft); box-shadow: 0 0 0 4px var(--primary-glow); }
.timeline-period { padding-top: 0.1rem; color: var(--text-muted); font-family: var(--font-code); font-size: 0.64rem; line-height: 1.5; }
.timeline-body { padding: 1.45rem; border: 1px solid var(--border); border-radius: 0.9rem; background: var(--bg-card); }
.timeline-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: 0.7rem; }
.timeline-heading h3 { margin-bottom: 0.25rem; font-family: var(--font-heading); font-size: 1.3rem; letter-spacing: -0.035em; }
.timeline-heading h3 a { color: var(--text-main); text-decoration: none; }
.timeline-heading h3 a:hover { color: var(--primary-soft); }
.timeline-heading h3 i { color: var(--primary-soft); font-size: 0.85em; }
.timeline-role { color: var(--primary-soft); font-family: var(--font-code); font-size: 0.64rem; }
.timeline-type { flex: 0 0 auto; padding: 0.3rem 0.55rem; border: 1px solid var(--border); border-radius: 0.3rem; color: var(--text-muted); font-family: var(--font-code); font-size: 0.55rem; text-transform: uppercase; }
.timeline-body > p { color: var(--text-muted); font-size: 0.82rem; line-height: 1.7; }
.timeline-list { margin: 1rem 0; }
.timeline-project { margin-top: 1.4rem; }
.timeline-project h4 { color: var(--text-main); font-family: var(--font-heading); font-size: 0.95rem; line-height: 1.5; }
.timeline-project .timeline-list { margin-top: 0.6rem; }
.timeline-body .tech-chips { margin-top: 0; padding-top: 0.8rem; border-top: 1px solid var(--border); }

.contact { padding-bottom: 8rem; }
.contact-grid { grid-template-columns: minmax(0, 0.9fr) minmax(20rem, 0.8fr); gap: 5rem; align-items: start; }
.contact-info h2 { margin-bottom: 1.1rem; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.06em; line-height: 1.08; }
.contact-info > p { max-width: 31rem; color: var(--text-muted); font-size: 0.9rem; line-height: 1.75; }
.contact-methods { display: flex; flex-direction: column; align-items: stretch; gap: 0.5rem; margin-top: 2rem; }
.method { display: flex; align-items: center; gap: 0.9rem; width: fit-content; padding: 0.55rem 0; color: var(--text-main); text-decoration: none; }
.method > i,
.contact-location > i { color: var(--primary-soft); font-size: 1.45rem; width: 1.5rem; text-align: center; }
.method > span { display: flex; flex-direction: column; gap: 0.08rem; }
.method small { color: var(--text-muted); font-family: var(--font-code); font-size: 0.57rem; text-transform: uppercase; }
.method strong { font-size: 0.78rem; font-weight: 500; }
.method:hover strong { color: var(--primary-soft); }
.contact-location { display: flex; align-items: center; gap: 0.9rem; padding-top: 0.55rem; color: var(--text-muted); font-size: 0.76rem; }
.direct-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.direct-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: color-mix(in srgb, var(--bg-card) 80%, transparent);
  color: var(--text-main);
  font-family: var(--font-code);
  font-size: 0.78rem;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.direct-links a i { font-size: 1.35rem; line-height: 1; color: var(--primary-soft); }
.direct-links a:hover {
  border-color: color-mix(in srgb, var(--primary-soft) 55%, var(--border));
  background: color-mix(in srgb, var(--primary-soft) 12%, var(--bg-card));
  color: var(--primary-soft);
}
footer { margin-top: 0; padding: 2.3rem 0; border-top-color: var(--border); }
.footer-content { align-items: center; }
.footer-brand-mark { display: flex; align-items: center; gap: 0.6rem; }
.footer-brand p { margin-top: 0.55rem; color: var(--text-muted); font-size: 0.7rem; }
.copyright { color: var(--text-muted); font-size: 0.65rem; }

@media (max-width: 1024px) {
  .nav-actions .theme-btn { display: flex; }
  .hero { min-height: auto; padding-top: 8.5rem; }
  .hero-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
  .hero-content { max-width: 43rem; }
  .hero-visual { min-height: 31rem; }
  .tech-card-3d { margin-inline: auto; }
  .section-header--split { display: block; text-align: center; }
  .section-header--split p { max-width: 40rem; margin: 1rem auto 0; }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .contact-info { align-items: flex-start; text-align: left; }
}

@media (max-width: 720px) {
  .container { padding-inline: 1.25rem; }
  .logo-role { display: none; }
  .nav-actions > .language-switch { display: none; }
  .hero { padding-top: 7.5rem; padding-bottom: 3rem; }
  .hero-content,
  .section-header,
  .contact-info { align-items: center; text-align: center; }
  h1 { font-size: clamp(2.55rem, 12vw, 3.7rem); }
  .hero-sub { font-size: 0.92rem; }
  .hero-buttons { width: 100%; flex-direction: column; }
  .hero-buttons .btn { width: 100%; }
  .hero-metrics { width: 100%; justify-content: space-between; gap: 0.75rem; text-align: left; }
  .hero-visual { min-height: 25rem; padding-inline: 0.35rem; }
  .tech-card-3d { width: 100%; max-width: 35rem; aspect-ratio: 1 / 0.96; transform: none; }
  .layer-code { padding: 1rem; }
  .code-content { font-size: clamp(0.48rem, 1.65vw, 0.65rem); }
  .layer-ui { right: -0.45rem; bottom: -1.2rem; width: 13.5rem; }
  .badge-top { top: 1.5rem; right: -0.35rem; }
  .badge-bottom { bottom: 2rem; left: -0.35rem; }
  .section { padding: 5rem 0; }
  .section-header { margin-bottom: 2.4rem; }
  .section-header h2,
  .contact-info h2 { font-size: 2.2rem; }
  .grid-3 { grid-template-columns: 1fr; }
  .timeline::before { left: 0.3rem; }
  .timeline-item { display: block; padding-left: 1.4rem; padding-bottom: 2rem; }
  .timeline-marker { top: 0.35rem; left: 0; }
  .timeline-period { margin-bottom: 0.7rem; padding-left: 0.2rem; }
  .timeline-heading { align-items: start; flex-direction: column; }
  .timeline-type { order: -1; }
  .contact-info > p { max-width: 34rem; }
  .contact-methods { align-items: flex-start; text-align: left; }
  .direct-links { justify-content: center; }
  .footer-content { gap: 1.3rem; }
}

@media (max-width: 420px) {
  .monogram--nav { width: 2.35rem; height: 2.35rem; }
  .logo-name { font-size: 0.8rem; }
  .hero-metrics { gap: 0.45rem; }
  .metric strong { font-size: 1.15rem; }
  .metric span:not(.metric-suffix) { max-width: 5.5rem; font-size: 0.59rem; }
  .hero-visual { min-height: 21rem; }
  .layer-ui { width: 11.5rem; padding: 0.75rem; }
  .ui-title { font-size: 0.62rem; }
  .floating-badge { padding: 0.38rem 0.55rem; font-size: 0.53rem; }
}


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

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Executive content and final layout corrections. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border: 1px solid transparent;
  color: var(--text-main);
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  color: #fff;
}

.btn-ghost {
  text-decoration: none;
}

.timeline-lead {
  margin: 1rem 0;
  padding-left: 0.85rem;
  border-left: 2px solid var(--primary-soft);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.65;
}

.contact-direct-wrapper {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  align-items: flex-start;
  padding: 2.4rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background:
    linear-gradient(145deg, rgba(139, 92, 246, 0.14), transparent 55%),
    var(--bg-card);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.13);
}

.contact-direct-wrapper h3 {
  margin-bottom: 0.8rem;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.contact-direct-wrapper > p {
  max-width: 28rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.75;
}

.direct-email-cta {
  margin-top: 1.6rem;
}

.direct-email-address {
  margin-top: 0.9rem;
  color: var(--primary-soft);
  font-family: var(--font-code);
  font-size: 0.7rem;
  text-decoration: none;
}

.direct-email-address:hover {
  color: var(--text-main);
}

.direct-links--card {
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 1.6rem;
}

@media (max-width: 720px) {
  .contact-direct-wrapper {
    align-items: center;
    padding: 1.6rem 1.25rem;
    text-align: center;
  }

  .contact-direct-wrapper > p {
    max-width: 30rem;
  }

  .direct-links--card {
    justify-content: center;
  }
}
