/*
Theme Name: Augusto Pedro Website
Author: Martim Santos
Version: 1.0
Description: Tema WordPress convertido de website HTML.
*/
:root {
  --bg: #f3f7fb;
  --surface: rgba(255, 255, 255, 0.86);
  --text: #1b2430;
  --muted: #5f6c7b;
  --blue: #1f5eff;
  --blue-dark: #0f2747;
  --blue-soft: #e1ebff;
  --line: rgba(15, 39, 71, 0.12);
  --shadow: 0 18px 45px rgba(15, 39, 71, 0.12);
  --radius-xl: 28px;
  --radius-md: 16px;
  --container: min(1180px, calc(100% - 32px));
}

/* Fix: evitar cursor de inserção em texto não-editável quando se clica */
/* Mantém o cursor visível apenas em `input`, `textarea` ou elementos com `contenteditable="true"`. */
:where(body, body *)
:not(input):not(textarea):not([contenteditable="true"]) {
  caret-color: transparent !important;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(31, 94, 255, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(15, 39, 71, 0.08), transparent 24%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 55%, #eef4fa 100%);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: clip;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.section {
  padding: 92px 0;
}

.section,
#hero {
  scroll-margin-top: 110px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -40px;
  background: var(--blue-dark);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 9999;
  transition: top .18s ease, opacity .18s ease;
  opacity: 0;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 1rem;
  opacity: 1;
  outline: 3px solid #fff;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(248, 251, 255, 0.86);
  border-bottom: 1px solid rgba(15, 39, 71, 0.08);
  transition: background-color 220ms ease, box-shadow 220ms ease, border-color 220ms ease, backdrop-filter 220ms ease;
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 84px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text strong {
  font-size: 1rem;
  line-height: 1.2;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.82rem;
}

.nav-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--blue-dark);
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: var(--blue-soft);
  color: var(--blue);
  transform: translateY(-1px);
}

.nav-links a:focus-visible,
.language-toggle:focus-visible,
.website-links a:focus-visible,
.profile-social-link:focus-visible,
.footer-links a:focus-visible,
.back-to-top:focus-visible,
.menu-toggle:focus-visible {
  outline: 3px solid rgba(31, 94, 255, 0.35);
  outline-offset: 3px;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(15, 39, 71, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: var(--blue-dark);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 10px 22px rgba(15, 39, 71, 0.08);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.language-toggle:hover,
.language-toggle:focus-visible {
  background: var(--blue-dark);
  color: #fff;
  border-color: var(--blue-dark);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(15, 39, 71, 0.1);
  background: rgba(255, 255, 255, 0.85);
}

.menu-toggle:focus-visible {
  outline: 3px solid rgba(31, 94, 255, 0.45);
}

/* Quando o utilizador fizer scroll, a header ganha mais contraste */
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 40px rgba(15, 39, 71, 0.10);
  border-bottom-color: rgba(15, 39, 71, 0.12);
  backdrop-filter: blur(10px);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--blue-dark);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  position: relative;
  overflow: clip;
  padding-top: 46px;
}

.hero-background {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(15, 39, 71, 0.08), transparent 42%),
    radial-gradient(circle at 20% 20%, rgba(31, 94, 255, 0.18), transparent 18%),
    radial-gradient(circle at 80% 10%, rgba(31, 94, 255, 0.12), transparent 16%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
}

.hero-card,
.content-card,
.stat-card,
.timeline-card,
.info-card,
.skill-card {
  border: 1px solid rgba(15, 39, 71, 0.08);
  background: var(--surface);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.glass {
  border-radius: calc(var(--radius-xl) + 6px);
  overflow: hidden;
}

.hero-banner {
  height: 210px;
  background:
    linear-gradient(180deg, rgba(15, 39, 71, 0.22), rgba(15, 39, 71, 0.5)),
    url("assets/images/Predios%20Site%20SR%20Augusto.webp") center center/cover no-repeat;
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  align-items: start;
  padding: 0 30px 34px;
}

.profile-wrap {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -84px;
  padding: 0;
  width: fit-content;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  border: 0;
}

.profile-photo-shell {
  --photo-size: clamp(124px, 18vw, 168px);
  position: relative;
  width: var(--photo-size);
  height: var(--photo-size);
  border-radius: 50%;
  display: grid;
  place-items: center;
  perspective: 1200px;
  perspective-origin: 50% 50%;
  transform-style: preserve-3d;
  z-index: 1;
}

.profile-coin {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transform-style: preserve-3d;
  will-change: transform;
}

.profile-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #ffffff;
  border: 6px solid #ffffff;
  box-shadow: 0 12px 28px rgba(15, 39, 71, 0.12);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}

.profile-face-back {
  transform: rotateY(180deg);
}

.profile-photo {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  background: #fff;
  display: block;
  transform: translateZ(0);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  color: var(--blue);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
}

.hero-copy {
  padding-top: 18px;
}

.hero-copy h1,
.section-heading h2 {
  margin: 0;
  color: var(--blue-dark);
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 1.04;
  text-wrap: balance;
}

.hero-copy h1 {
  font-size: clamp(2.6rem, 6vw, 4.75rem);
  position: relative;
  display: inline-block;
}

.hero-copy h1::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(15, 39, 71, 0), rgba(31, 94, 255, 0.85), rgba(15, 39, 71, 0));
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
}

.hero-card.is-visible .hero-copy h1::after {
  animation: heroTitleUnderline 1.15s cubic-bezier(0.2, 0.7, 0.25, 1) 0.22s forwards;
}

.headline {
  margin: 18px 0 0;
  max-width: 900px;
  font-size: 1.08rem;
  color: var(--muted);
  overflow-wrap: anywhere;
  opacity: 0;
  transform: translateY(12px);
}

.hero-card.is-visible .headline {
  animation: heroCopyRise 0.78s ease 0.14s forwards;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.hero-meta > div,
.skill-card,
.info-card,
.stat-card {
  border-radius: var(--radius-md);
}

.hero-meta > div {
  position: relative;
  overflow: hidden;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 39, 71, 0.08);
  opacity: 0;
  transform: translateY(14px) scale(0.985);
}

.hero-meta > div::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.65) 50%, rgba(255, 255, 255, 0) 80%);
  transform: translateX(-135%);
  pointer-events: none;
}

.hero-card.is-visible .hero-meta > div {
  animation: heroMetaEnter 0.72s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.hero-card.is-visible .hero-meta > div:nth-child(2) {
  animation-delay: 0.13s;
}

.hero-card.is-visible .hero-meta > div::after {
  animation: heroMetaSweep 3s ease-in-out 0.48s 1 both;
}

.hero-card.is-visible .hero-meta > div:nth-child(2)::after {
  animation-delay: 0.9s;
}

.meta-label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-meta p {
  margin: 6px 0 0;
  font-weight: 700;
  color: var(--blue-dark);
}

.website-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.website-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 39, 71, 0.05);
  color: var(--blue-dark);
  border: 1px solid rgba(15, 39, 71, 0.08);
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
  opacity: 0;
  transform: translateY(10px);
}

.hero-card.is-visible .website-links a {
  animation: heroLinkRise 0.56s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.hero-card.is-visible .website-links a:nth-child(1) {
  animation-delay: 0.22s;
}

.hero-card.is-visible .website-links a:nth-child(2) {
  animation-delay: 0.29s;
}

.hero-card.is-visible .website-links a:nth-child(3) {
  animation-delay: 0.36s;
}

.hero-card.is-visible .website-links a:nth-child(4) {
  animation-delay: 0.43s;
}

.website-links a:hover,
.website-links a:focus-visible {
  background: var(--blue-dark);
  color: #fff;
  transform: translateY(-1px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

/* Profile social - LinkedIn action button */
.profile-social {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 36px;
  align-items: flex-start;
}

.profile-social-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--blue-dark);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.profile-social-icon {
  display: inline-grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 0;
  background: transparent;
  flex: 0 0 auto;
}

.profile-social-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.profile-social-text {
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--blue-dark);
  line-height: 1;
  text-transform: none;
}

.profile-social-link:hover,
.profile-social-link:focus-visible {
  transform: translateY(-2px);
  opacity: 0.92;
}

@keyframes heroTitleUnderline {
  0% {
    transform: scaleX(0);
    opacity: 0;
  }
  35% {
    opacity: 1;
  }
  100% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes heroCopyRise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroMetaEnter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes heroMetaSweep {
  0% {
    transform: translateX(-135%);
  }

  30% {
    transform: translateX(135%);
  }

  100% {
    transform: translateX(135%);
  }
}

@keyframes heroLinkRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy h1::after,
  .headline,
  .hero-meta > div,
  .hero-meta > div::after,
  .website-links a {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 560px) {
  .profile-social {
    gap: 10px;
    margin-top: 18px;
  }

  .profile-social-link {
    gap: 6px;
  }

  .profile-social-icon {
    width: 68px;
    height: 68px;
  }
}

.two-column {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.35rem);
}

.about-section .section-heading {
  opacity: 1;
  transform: none;
}

.about-section .content-card {
  opacity: 1;
  transform: none;
}

.content-card,
.stat-card,
.timeline-card,
.info-card,
.skill-card {
  border-radius: var(--radius-xl);
}

.content-card {
  padding: 28px;
}

/* Typing animation: reserve layout using a hidden layout span and animate an overlayed span
   The paragraph keeps its final height/width via .typing-layout (visibility: hidden)
   and the animated text is absolutely positioned on top so letters appearing do not shift layout. */
.content-card p.typing-line {
  position: relative;
  min-height: 1em; /* ensure at least one line reserved */
}

.content-card p .typing-layout {
  visibility: hidden; /* occupies space but not visible */
  white-space: pre-wrap;
}

.content-card p .typing-anim {
  position: absolute;
  inset: 0; /* fill the parent */
  left: 0;
  top: 0;
  width: 100%;
  white-space: pre-wrap;
  color: var(--muted);
  pointer-events: none;
}

/* When motion is reduced, reveal instantly */
@media (prefers-reduced-motion: reduce) {
  .content-card p .typing-anim {
    position: static;
    pointer-events: auto;
  }
  .content-card p .typing-layout {
    visibility: visible;
  }
}

.content-card p {
  margin-top: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

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

.stats-section {
  padding-top: 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.stat-card {
  padding: 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(235,242,250,0.92));
}

.stat-value {
  display: block;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--blue-dark);
}

.stat-label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.timeline-card {
  position: relative;
  overflow: hidden;
  padding: 24px 24px 22px var(--timeline-content-offset);
  --timeline-image-size: clamp(120px, 14vw, 164px);
  --timeline-step-duration: 0.7s;
  --timeline-delay: 0ms;
  --timeline-content-offset: 220px;
  --timeline-line-left: 92px;
  --timeline-final-left: max(calc(var(--timeline-line-left) - (var(--timeline-image-size) * 0.85)), 8px);
}

.timeline-marker {
  display: none;
}

.timeline-card::before {
  display: none;
}

.timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-left: 20px;
}

.timeline-header h3,
.info-card h3,
.skill-card h3,
.footer-grid h3 {
  margin: 0;
  color: var(--blue-dark);
  text-wrap: balance;
}

.timeline-header p,
.timeline-body p,
.section-description,
.info-card p,
.info-card span,
.footer-copy,
.footer-links,
.timeline-body,
.timeline-extra {
  padding-left: 20px;
}

.timeline-header,
.timeline-body,
.timeline-extra {
  position: relative;
  z-index: 2;
  clip-path: inset(0 0 0 100%);
  opacity: 0;
  will-change: clip-path, opacity;
}

.timeline-card.is-sequence-active .timeline-header,
.timeline-card.is-sequence-active .timeline-body,
.timeline-card.is-sequence-active .timeline-extra {
  animation: timelineTextSweepReveal var(--timeline-step-duration) cubic-bezier(0.2, 0.78, 0.22, 1) var(--timeline-delay) both;
}

.timeline-body p,
.timeline-extra p {
  margin-bottom: 0;
}

.timeline-image-wrap {
  position: absolute;
  top: 50%;
  left: var(--timeline-final-left);
  --timeline-image-start-offset: calc(100% + 24px - var(--timeline-final-left));
  width: var(--timeline-image-size);
  aspect-ratio: 1 / 1;
  margin: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid #ffffff;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(15, 39, 71, 0.2);
  transform: translate3d(var(--timeline-image-start-offset), -50%, 0) scale(0.94);
  opacity: 0;
  z-index: 3;
  pointer-events: none;
  will-change: transform, opacity;
}

.timeline-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline-card.is-sequence-active .timeline-image-wrap {
  animation: timelineImageSweep var(--timeline-step-duration) cubic-bezier(0.2, 0.78, 0.22, 1) var(--timeline-delay) forwards;
}

@keyframes timelineTextSweepReveal {
  0% {
    clip-path: inset(0 0 0 100%);
    opacity: 0;
  }

  18% {
    opacity: 1;
  }

  100% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}

@keyframes timelineImageSweep {
  0% {
    transform: translate3d(var(--timeline-image-start-offset), -50%, 0) scale(0.92);
    opacity: 0;
  }

  12% {
    opacity: 1;
  }

  84% {
    opacity: 1;
  }

  100% {
    transform: translate3d(0, -50%, 0) scale(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .timeline-header,
  .timeline-body,
  .timeline-extra {
    clip-path: none;
    opacity: 1;
    animation: none !important;
  }

  .timeline-image-wrap {
    display: none;
  }
}

.card-grid {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.education-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.75fr);
  gap: 24px;
  align-items: stretch;
  margin-top: 24px;
}

.education-cards {
  display: grid;
  gap: 18px;
  margin-top: 0;
}

.education-cards-top,
.education-cards-bottom {
  margin-top: 0;
}

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.education-visual {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  border-radius: calc(var(--radius-xl) + 2px);
  border: 1px solid rgba(15, 39, 71, 0.08);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.education-visual img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
}

.education-feature {
  align-self: stretch;
}

.education-feature-from-right.reveal {
  opacity: 0;
  transform: translate3d(96px, 0, 0) scale(0.96);
  will-change: opacity, transform;
}

.education-feature-from-right.reveal.is-visible {
  animation: educationFeatureEnter 1.1s cubic-bezier(0.18, 1, 0.28, 1) both;
}

@keyframes educationFeatureEnter {
  0% {
    opacity: 0;
    transform: translate3d(96px, 0, 0) scale(0.96);
  }

  72% {
    opacity: 1;
    transform: translate3d(-8px, 0, 0) scale(1.01);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

#experience,
#education,
#certificates,
#skills,
#languages,
.site-footer {
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}

.site-footer {
  contain-intrinsic-size: 1px 220px;
}

.three-up,
.languages-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.certificates-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#education .section-heading.reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: none;
  will-change: transform, opacity;
}

#education .section-heading.reveal.is-visible {
  animation: certificateHeadingEnter 0.86s cubic-bezier(0.2, 0.85, 0.2, 1) both;
  animation-delay: var(--education-heading-delay, 0ms);
}

#education .education-cards .info-card.reveal {
  opacity: 0;
  transform: translate3d(0, 20px, 0) scale(0.985);
  transition: none;
  will-change: transform, opacity;
}

#education .education-cards .info-card.reveal.is-visible {
  animation: certificateCardEnter 0.84s cubic-bezier(0.2, 0.85, 0.2, 1) both;
  animation-delay: var(--education-delay, 0ms);
}

#education .info-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transform-style: preserve-3d;
  transition:
    transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.42s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.42s ease,
    background 0.42s ease;
}

#education .info-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 -14px 24px rgba(15, 39, 71, 0.06);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.42s ease;
}

#education .info-card::after {
  content: "";
  position: absolute;
  inset: -28% auto -28% -45%;
  width: 48%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.56), rgba(31, 94, 255, 0.11), transparent);
  transform: translateX(-28%) skewX(-18deg);
  opacity: 0;
}

#education .info-card h3,
#education .info-card p,
#education .info-card span {
  transition: color 0.42s ease, transform 0.42s ease, opacity 0.42s ease;
}

#education .info-card:hover,
#education .info-card:focus-within {
  transform: perspective(1200px) translate3d(0, -7px, 0) scale(1.014) rotateX(1.6deg) rotateY(-1.6deg);
  border-color: rgba(31, 94, 255, 0.18);
  box-shadow:
    0 24px 52px rgba(15, 39, 71, 0.14),
    0 0 0 1px rgba(31, 94, 255, 0.08),
    0 0 28px rgba(31, 94, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

#education .info-card:hover::before,
#education .info-card:focus-within::before {
  opacity: 1;
}

#education .info-card:hover::after,
#education .info-card:focus-within::after {
  opacity: 1;
  animation: certificateReflection 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#education .info-card:hover h3,
#education .info-card:focus-within h3 {
  color: #16325f;
  transform: translateY(-1px);
}

#education .info-card:hover p,
#education .info-card:hover span,
#education .info-card:focus-within p,
#education .info-card:focus-within span {
  color: #4f5f73;
}

#certificates .section-heading.reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: none;
  will-change: transform, opacity;
}

#certificates .section-heading.reveal.is-visible {
  animation: certificateHeadingEnter 0.86s cubic-bezier(0.2, 0.85, 0.2, 1) both;
}

#certificates .certificates-grid .certificate.reveal {
  opacity: 0;
  transform: translate3d(0, 20px, 0) scale(0.985);
  transition: none;
  will-change: transform, opacity;
}

#certificates .certificates-grid .certificate.reveal.is-visible {
  animation: certificateCardEnter 0.84s cubic-bezier(0.2, 0.85, 0.2, 1) both;
  animation-delay: var(--certificate-delay, 0ms);
}

#certificates .certificates-grid .certificate.reveal:nth-child(1).is-visible {
  --certificate-delay: 90ms;
}

#certificates .certificates-grid .certificate.reveal:nth-child(2).is-visible {
  --certificate-delay: 180ms;
}

#certificates .certificates-grid .certificate.reveal:nth-child(3).is-visible {
  --certificate-delay: 270ms;
}

#certificates .certificates-grid .certificate.reveal:nth-child(4).is-visible {
  --certificate-delay: 360ms;
}

#certificates .certificates-grid .certificate.reveal:nth-child(5).is-visible {
  --certificate-delay: 450ms;
}

#certificates .certificates-grid .certificate.reveal:nth-child(6).is-visible {
  --certificate-delay: 540ms;
}

#certificates .certificates-grid .certificate.reveal:nth-child(7).is-visible {
  --certificate-delay: 630ms;
}

#certificates .certificates-grid .certificate.reveal:nth-child(8).is-visible {
  --certificate-delay: 720ms;
}

#certificates .certificates-grid .certificate.reveal:nth-child(9).is-visible {
  --certificate-delay: 810ms;
}

.info-card {
  padding: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(236,242,250,0.92));
}

.info-card span {
  display: block;
  margin-top: 10px;
  font-size: 0.95rem;
}

#languages .section-heading.reveal {
  transition-duration: 0.82s;
  transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

#languages .languages-grid .info-card.reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0) scale(0.985);
  will-change: transform, opacity;
}

#languages .languages-grid .info-card.reveal.is-visible {
  animation: languagesCardEnter 0.86s cubic-bezier(0.2, 0.85, 0.2, 1) both;
}

#languages .languages-grid .info-card.reveal:nth-child(1).is-visible {
  animation-delay: 0ms;
}

#languages .languages-grid .info-card.reveal:nth-child(2).is-visible {
  animation-delay: 200ms;
}

#languages .languages-grid .info-card.reveal:nth-child(3).is-visible {
  animation-delay: 400ms;
}

#languages .info-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
  transition:
    transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.34s ease,
    border-color 0.34s ease,
    background 0.34s ease;
}

#languages .info-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 42%),
    radial-gradient(circle at top, rgba(31, 94, 255, 0.12), transparent 62%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    inset 0 0 0 1px rgba(31, 94, 255, 0.06);
  opacity: 0;
  transition: opacity 0.34s ease, box-shadow 0.34s ease;
}

#languages .info-card::after {
  content: "";
  position: absolute;
  inset: -24% auto -24% -44%;
  width: 48%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), rgba(31, 94, 255, 0.1), transparent);
  transform: translateX(-28%) skewX(-18deg);
  opacity: 0;
}

#languages .info-card:hover,
#languages .info-card:focus-within {
  transform: translateY(-6px) scale(1.014);
  border-color: rgba(31, 94, 255, 0.16);
  box-shadow:
    0 24px 48px rgba(15, 39, 71, 0.16),
    0 0 0 1px rgba(31, 94, 255, 0.08),
    0 0 26px rgba(31, 94, 255, 0.12);
}

#languages .info-card:hover::before,
#languages .info-card:focus-within::before {
  opacity: 1;
}

#languages .info-card:hover::after,
#languages .info-card:focus-within::after {
  opacity: 1;
  animation: languagesCardReflection 0.95s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes languagesCardEnter {
  0% {
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(0.985);
  }

  68% {
    opacity: 1;
    transform: translate3d(0, -2px, 0) scale(1.005);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes languagesCardReflection {
  0% {
    transform: translateX(-24%) skewX(-18deg);
    opacity: 0;
  }

  18% {
    opacity: 0.72;
  }

  100% {
    transform: translateX(290%) skewX(-18deg);
    opacity: 0;
  }
}

.certificate {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 22px;
  min-height: 140px;
  gap: 10px;
  border: 1px solid rgba(15, 39, 71, 0.08);
  transform-style: preserve-3d;
  transition:
    transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.42s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.42s ease,
    background 0.42s ease;
}

.certificate::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 -14px 24px rgba(15, 39, 71, 0.06);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.42s ease;
}

.certificate::after {
  content: "";
  position: absolute;
  inset: -28% auto -28% -45%;
  width: 48%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.56), rgba(31, 94, 255, 0.11), transparent);
  transform: translateX(-28%) skewX(-18deg);
  opacity: 0;
}

.certificate h3,
.certificate p,
.certificate span {
  transition: color 0.42s ease, transform 0.42s ease, opacity 0.42s ease;
}

.certificate h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--blue-dark);
  max-width: 78%;
}

.certificate:hover,
.certificate:focus-within {
  transform: perspective(1200px) translate3d(0, -7px, 0) scale(1.014) rotateX(1.6deg) rotateY(-1.6deg);
  border-color: rgba(31, 94, 255, 0.18);
  box-shadow:
    0 24px 52px rgba(15, 39, 71, 0.14),
    0 0 0 1px rgba(31, 94, 255, 0.08),
    0 0 28px rgba(31, 94, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.certificate:hover::before,
.certificate:focus-within::before {
  opacity: 1;
}

.certificate:hover::after,
.certificate:focus-within::after {
  opacity: 1;
  animation: certificateReflection 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.certificate:hover h3,
.certificate:focus-within h3 {
  color: #16325f;
  transform: translateY(-1px);
}

.certificate:hover p,
.certificate:hover span,
.certificate:focus-within p,
.certificate:focus-within span {
  color: #4f5f73;
}

@keyframes certificateHeadingEnter {
  0% {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }

  65% {
    opacity: 1;
    transform: translate3d(0, -2px, 0);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes certificateCardEnter {
  0% {
    opacity: 0;
    transform: translate3d(0, 20px, 0) scale(0.985);
  }

  68% {
    opacity: 1;
    transform: translate3d(0, -2px, 0) scale(1.004);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes certificateReflection {
  0% {
    transform: translateX(-24%) skewX(-18deg);
    opacity: 0;
  }

  18% {
    opacity: 0.7;
  }

  100% {
    transform: translateX(290%) skewX(-18deg);
    opacity: 0;
  }
}

@media (max-width: 820px) {
  .certificate h3 {
    max-width: 92%;
  }

  .education-layout {
    grid-template-columns: 1fr;
  }

  .two-up {
    grid-template-columns: 1fr;
  }

  .education-feature-from-right {
    transform: translateY(18px) scale(0.95);
  }

  .education-visual,
  .education-visual img {
    min-height: 220px;
  }

  .profile-photo-shell {
    width: min(var(--photo-size, 136px), 36vw) !important;
    height: min(var(--photo-size, 136px), 36vw) !important;
  }

  .profile-wrap {
    width: fit-content;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .profile-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
  }
}

.skill-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.skill-card {
  padding: 24px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tag-list span {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(31, 94, 255, 0.08);
  border: 1px solid rgba(31, 94, 255, 0.12);
  color: var(--blue-dark);
  font-size: 0.94rem;
  transition:
    transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.24s ease,
    background 0.24s ease,
    border-color 0.24s ease,
    color 0.24s ease,
    opacity 0.24s ease;
  will-change: transform, opacity;
}

/* Skill card entrance + tag stagger + hover micro-interactions */
.skill-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  will-change: transform, opacity;
  transition:
    transform 0.36s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.36s ease,
    box-shadow 0.32s ease,
    border-color 0.32s ease;
}

.skill-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 44%),
    radial-gradient(circle at top, rgba(31, 94, 255, 0.08), transparent 58%);
  opacity: 0;
  transition: opacity 0.32s ease;
}

.skill-card::after {
  content: "";
  position: absolute;
  inset: -30% auto -30% -45%;
  width: 48%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), rgba(31, 94, 255, 0.09), transparent);
  transform: translateX(-22%) skewX(-18deg);
  opacity: 0;
}

.skill-card.reveal {
  opacity: 0;
  transform: translateY(10px);
}

.skill-card.reveal.is-visible {
  animation: skillCardEnter 0.82s cubic-bezier(0.2, 0.85, 0.2, 1) both;
  animation-delay: var(--skill-card-delay, 0ms);
}

.skill-card:hover,
.skill-card:focus-within {
  transform: translate3d(var(--skill-parallax-x, 0px), var(--skill-parallax-y, 0px), 0) translateY(-6px) scale(1.012);
  border-color: rgba(31, 94, 255, 0.16);
  box-shadow:
    0 24px 48px rgba(15, 39, 71, 0.15),
    0 0 0 1px rgba(31, 94, 255, 0.08),
    0 0 24px rgba(31, 94, 255, 0.1);
}

.skill-card:hover::before,
.skill-card:focus-within::before {
  opacity: 1;
}

.skill-card:hover::after,
.skill-card:focus-within::after {
  opacity: 1;
  animation: skillCardReflection 1.05s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.skill-card .tag-list span {
  opacity: 0;
  transform: translateY(8px) scale(0.985);
  transition-delay: 0ms;
}

.skill-card.is-sequence-active .tag-list span {
  opacity: 1;
  animation: skillTagEnter 0.62s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--skill-card-delay, 0ms) + var(--skill-tag-delay, 0ms));
}

.tag-list span:hover,
.tag-list span:focus {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(31, 94, 255, 0.2);
  box-shadow:
    0 12px 24px rgba(15, 39, 71, 0.08),
    0 0 0 1px rgba(31, 94, 255, 0.08),
    0 0 18px rgba(31, 94, 255, 0.1);
  background: linear-gradient(90deg, rgba(31, 94, 255, 0.12), rgba(255, 255, 255, 0.93));
}

@keyframes skillCardEnter {
  0% {
    opacity: 0;
    transform: translate3d(0, 16px, 0) scale(0.985);
  }

  72% {
    opacity: 1;
    transform: translate3d(0, -2px, 0) scale(1.004);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes skillTagEnter {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }

  72% {
    opacity: 1;
    transform: translateY(-1px) scale(1.003);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes skillCardReflection {
  0% {
    transform: translateX(-22%) skewX(-18deg);
    opacity: 0;
  }

  20% {
    opacity: 0.65;
  }

  100% {
    transform: translateX(290%) skewX(-18deg);
    opacity: 0;
  }
}

@media (max-width: 820px) {
  .tag-list span { padding: 8px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .skill-card,
  .skill-card .tag-list span,
  .tag-list span {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }

  .skill-card::before,
  .skill-card::after,
  .skill-card.is-sequence-active::after,
  .skill-card.is-sequence-active .tag-list span {
    animation: none !important;
  }

  .skill-card::before,
  .skill-card::after {
    opacity: 0 !important;
  }

  #languages .section-heading.reveal,
  #languages .languages-grid .info-card.reveal,
  #languages .info-card,
  #languages .info-card::before,
  #languages .info-card::after {
    animation: none !important;
    transition: none !important;
  }

  #languages .languages-grid .info-card.reveal,
  #languages .info-card {
    opacity: 1 !important;
    transform: none !important;
  }

  #languages .info-card::before,
  #languages .info-card::after {
    opacity: 0 !important;
  }

  #certificates .section-heading.reveal,
  #certificates .certificates-grid .certificate.reveal,
  #certificates .certificate,
  #certificates .certificate::before,
  #certificates .certificate::after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }

  #certificates .section-heading.reveal,
  #certificates .certificates-grid .certificate.reveal,
  #certificates .certificate {
    opacity: 1 !important;
  }

  #certificates .certificate::before,
  #certificates .certificate::after {
    opacity: 0 !important;
  }
}


.site-footer {
  padding: 30px 0 36px;
  border-top: 1px solid rgba(15, 39, 71, 0.08);
  background: rgba(255, 255, 255, 0.65);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  align-items: start;
}

.footer-grid > div {
  min-width: 0;
}

.footer-brand {
  margin: 0 0 8px;
  font-weight: 800;
  color: var(--blue-dark);
}

.footer-copy {
  margin: 0;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: var(--muted);
  transition: color 0.2s ease;
  overflow-wrap: anywhere;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--blue);
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: linear-gradient(135deg, #0f2747, #1f5eff);
  color: #fff;
  box-shadow:
    0 16px 30px rgba(15, 39, 71, 0.22),
    0 0 0 1px rgba(31, 94, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  isolation: isolate;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.92);
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.25s ease,
    border-color 0.25s ease;
  will-change: transform, opacity;
}

.back-to-top::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 55%);
  opacity: 0.55;
  pointer-events: none;
}

.back-to-top::after {
  content: "";
  position: absolute;
  inset: -28%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 62%);
  opacity: 0;
  transform: scale(0.72);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.back-to-top span {
  position: relative;
  z-index: 1;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(15, 39, 71, 0.22);
  transition: transform 0.25s ease, filter 0.25s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  animation: backToTopFloat 2.8s ease-in-out 0.45s infinite;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  transform: translateY(-3px) scale(1.06);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow:
    0 18px 34px rgba(15, 39, 71, 0.26),
    0 0 0 1px rgba(31, 94, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 0 28px rgba(31, 94, 255, 0.22);
}

.back-to-top:hover::after,
.back-to-top:focus-visible::after {
  opacity: 1;
  transform: scale(1);
}

.back-to-top:hover span,
.back-to-top:focus-visible span {
  transform: translateY(-1px);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.25));
}

.back-to-top:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.5);
  outline-offset: 4px;
}

@keyframes backToTopFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-4px) scale(1.01);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .back-to-top,
  .back-to-top.is-visible,
  .back-to-top::after,
  .back-to-top span {
    animation: none;
    transition-duration: 0.01ms;
  }
}

@media (max-width: 1100px) {
  .nav {
    min-height: 72px;
  }

  .menu-toggle {
    display: inline-block;
  }

  .nav-panel {
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    z-index: 25;
    display: grid;
    gap: 14px;
    padding: 16px;
    border-radius: 24px;
    border: 1px solid rgba(15, 39, 71, 0.08);
    background: rgba(251, 253, 255, 0.98);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  .nav-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links {
    display: grid;
    justify-content: stretch;
  }

  .nav-links a,
  .language-toggle {
    width: 100%;
  }

  .two-column,
  .footer-grid,
  .skill-groups,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .three-up,
  .certificates-grid,
  .languages-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .profile-wrap {
    margin-top: -86px;
  }
}

@media (max-width: 820px) {
  .hero-content,
  .content-card,
  .timeline-card,
  .skill-card {
    padding-left: 22px;
    padding-right: 22px;
  }

  .hero-content {
    justify-items: center;
    padding-bottom: 26px;
  }

  .hero-copy {
    width: 100%;
    padding-top: 8px;
    text-align: center;
  }

  .hero-copy h1 {
    display: block;
    margin-inline: auto;
  }

  .hero-copy h1::after {
    left: 50%;
    right: auto;
    width: min(220px, 72vw);
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
  }

  .hero-card.is-visible .hero-copy h1::after {
    animation-name: heroTitleUnderlineCenter;
  }

  .headline {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-meta {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin-inline: auto;
  }

  .website-links {
    justify-content: center;
  }

  .profile-wrap {
    margin-inline: auto;
  }

  .profile-social {
    align-items: center;
    width: 100%;
    margin-top: 20px;
  }

  .profile-social-link {
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 260px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(15, 39, 71, 0.08);
    box-shadow: 0 12px 24px rgba(15, 39, 71, 0.08);
  }

  .profile-social-icon {
    width: 34px;
    height: 34px;
  }

  .hero-banner {
    height: 180px;
  }

  .three-up,
  .certificates-grid,
  .languages-grid,
  .two-column,
  .skill-groups,
  .stats-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .timeline-header {
    flex-direction: column;
  }
  .timeline-card {
    padding-top: 18px;
    --timeline-content-offset: 28px;
    --timeline-line-left: 34px;
  }

  .timeline-image-wrap {
    position: relative;
    top: auto;
    left: auto;
    width: min(128px, 34vw);
    margin: 0 auto 16px;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    --timeline-image-start-offset: 0;
  }

  .timeline-card.is-sequence-active .timeline-image-wrap {
    animation: none;
  }

  .timeline-header,
  .timeline-body,
  .timeline-extra {
    padding-left: 0;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 16px, 1180px);
  }

  .section {
    padding: 64px 0;
  }

  .hero {
    padding-top: 20px;
  }

  .hero-content {
    padding-inline: 16px;
    padding-bottom: 22px;
  }

  .profile-photo-shell {
    --photo-size: 124px;
  }

  .profile-wrap {
    margin-top: -66px;
  }

  .website-links,
  .hero-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .hero-meta > div {
    padding: 12px 14px;
  }

  .hero-copy h1 {
    font-size: clamp(2.15rem, 11vw, 2.9rem);
  }

  .headline {
    font-size: 0.98rem;
    line-height: 1.7;
  }

  .profile-social {
    margin-top: 16px;
  }

  .profile-social-link {
    max-width: 100%;
  }

  .hero-banner {
    height: 150px;
  }

  .content-card,
  .timeline-card,
  .skill-card,
  .info-card,
  .stat-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .content-card,
  .timeline-card,
  .skill-card,
  .info-card,
  .stat-card {
    border-radius: 22px;
  }

  .stat-card {
    padding: 20px 16px;
  }

  .stat-value {
    font-size: clamp(1.7rem, 10vw, 2.2rem);
  }

  .timeline-card {
    padding-top: 16px;
    --timeline-content-offset: 0px;
    --timeline-line-left: 0px;
  }

  .timeline-header,
  .timeline-body,
  .timeline-extra {
    padding-left: 0;
  }

  .website-links a,
  .hero-actions a {
    width: 100%;
  }

  .nav-links a,
  .language-toggle,
  .website-links a,
  .profile-social-link,
  .footer-links a,
  .back-to-top,
  .menu-toggle {
    min-height: 44px;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
  }

  .timeline-image-wrap {
    width: 104px;
    margin-bottom: 14px;
  }

  .timeline-header h3,
  .info-card h3,
  .skill-card h3,
  .footer-grid h3 {
    font-size: 1.08rem;
  }

  .certificate {
    min-height: 120px;
    padding: 22px 16px;
  }

  .certificate h3 {
    max-width: 100%;
    font-size: 1rem;
  }

  .tag-list {
    gap: 8px;
  }

  .tag-list span {
    padding: 8px 12px;
    font-size: 0.88rem;
  }

  .education-visual,
  .education-visual img {
    min-height: 180px;
  }

  .footer-grid {
    gap: 22px;
  }
}


@media (max-width: 560px) {
  .profile-photo-shell {
    width: min(var(--photo-size, 124px), 46vw) !important;
    height: min(var(--photo-size, 124px), 46vw) !important;
  }

  .profile-face img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    border-radius: inherit !important;
  }

  .profile-wrap {
    width: fit-content;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

@keyframes heroTitleUnderlineCenter {
  0% {
    transform: translateX(-50%) scaleX(0);
    opacity: 0;
  }
  35% {
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
  }
}
