:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-tint: #f3f7fd;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --text: #1f2937;
  --muted: #526173;
  --line: #dbe3ec;
  --accent: #2f6fed;
  --accent-strong: #2459bf;
  --accent-soft: #eaf1ff;
  --secondary: #7b8ca6;
  --secondary-soft: #eef2f8;
  --shadow: 0 16px 38px rgba(31, 41, 55, 0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max-width: 1180px;
  --ease-premium: cubic-bezier(0.22, 1, 0.36, 1);
  --reveal-duration: 0.5s;
  --reveal-offset: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(47, 111, 237, 0.05), transparent 26%),
    linear-gradient(180deg, var(--bg) 0%, #fcfdff 100%);
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

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

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding-bottom: 4rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(123, 140, 166, 0.14);
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.04);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.15rem;
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 0.95rem 0.65rem 0.95rem 1.1rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--accent);
  border: 1px solid rgba(47, 111, 237, 0.14);
  box-shadow: var(--shadow);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1.25rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(123, 140, 166, 0.16);
  box-shadow: var(--shadow);
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  color: var(--muted);
  font-size: 0.95rem;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  color: var(--accent);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  transform: translateY(-1px);
}

.hero,
.content-section {
  padding-top: 4rem;
}

.hero-copy {
  position: relative;
  max-width: 42rem;
}

.hero-glow {
  position: absolute;
  inset: -4rem auto auto -3rem;
  width: min(32rem, 76vw);
  height: min(32rem, 76vw);
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(47, 111, 237, 0.14) 0%, rgba(47, 111, 237, 0.08) 35%, transparent 72%);
  filter: blur(18px);
  pointer-events: none;
  z-index: -1;
}

.hero-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.hero-copy .eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

.content-section {
  margin-top: 1.75rem;
  padding: 3rem 2rem;
  border-radius: 36px;
  background: var(--surface-strong);
}

.content-section:nth-of-type(even) {
  background: var(--bg-soft);
}

.hero {
  min-height: calc(100vh - 5rem);
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) minmax(220px, 0.58fr);
  align-items: center;
  gap: 2.25rem;
  margin-top: 0;
  padding: 3.25rem 0 2.6rem;
  padding-bottom: 2rem;
  isolation: isolate;
}

.hero-copy h1,
.section-heading h2,
.project-card h3,
.skill-card h3,
.experience-card h3 {
  margin: 0;
}

.eyebrow,
.section-label,
.project-kicker,
.panel-label,
.meta-label,
.contact-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--accent);
}

.section-label {
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.section-label::before {
  content: "";
  width: 1.5rem;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

.hero-copy h1 {
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  letter-spacing: -0.05em;
  line-height: 0.95;
  margin-top: 0.35rem;
}

.hero-sequence,
.hero-panel-card {
  opacity: 0;
  will-change: transform, opacity;
}

.hero-sequence {
  transform: translateY(var(--reveal-offset));
}

.hero-sequence-strong {
  transform: translateY(30px);
}

.hero-panel-card {
  transform: translateY(26px) scale(0.985);
}

body.page-ready .hero-sequence {
  animation: heroReveal var(--reveal-duration) var(--ease-premium) forwards;
  animation-delay: var(--hero-delay, 0s);
}

body.page-ready .hero-panel-card {
  animation: heroPanelReveal 0.72s var(--ease-premium) forwards;
  animation-delay: var(--panel-delay, 0.3s);
}

.hero-headline {
  margin: 1.2rem 0 0;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 700;
  color: var(--accent-strong);
}

.hero-tagline {
  max-width: 42rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.button:hover,
.button:focus-visible,
.project-toggle:hover,
.project-toggle:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(47, 111, 237, 0.24);
  position: relative;
}

.button-secondary {
  background: var(--secondary-soft);
  border-color: rgba(123, 140, 166, 0.18);
  color: var(--text);
}

.hero-actions .button-primary {
  padding-inline: 1.55rem;
  box-shadow:
    0 16px 36px rgba(47, 111, 237, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.hero-actions .button-primary::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--accent-strong);
  box-shadow: 0 14px 32px rgba(36, 89, 191, 0.26);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: #e6edf7;
  border-color: rgba(47, 111, 237, 0.2);
  color: var(--accent-strong);
}

.hero-panel {
  display: grid;
  gap: 1rem;
}

.hero-portrait-card {
  padding: 0;
  overflow: hidden;
  align-self: center;
  justify-self: start;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(31, 41, 55, 0.12);
  width: min(100%, 272px);
  margin-left: 0.35rem;
}

.hero-portrait-shell {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(234, 241, 255, 0.92) 0%, rgba(255, 255, 255, 0.98) 100%);
  aspect-ratio: 1 / 1.12;
}

.hero-portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 9%;
}

.panel-card,
.section-card,
.project-card,
.skill-card,
.experience-card,
.contact-card,
.contact-form {
  background: var(--surface);
  border: 1px solid rgba(123, 140, 166, 0.14);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.panel-card {
  padding: 1.3rem;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 100%);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.panel-card strong {
  display: block;
  margin-top: 0.55rem;
  line-height: 1.6;
  font-size: 1.02rem;
}

.section-heading {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.85rem;
}

.section-heading h2 {
  max-width: 42rem;
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  line-height: 1.1;
  color: var(--text);
}

.section-heading h2,
.skill-card h3,
.experience-card h3 {
  letter-spacing: -0.02em;
}

.section-card {
  padding: 1.75rem;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.section-card p,
.project-summary,
.project-details p,
.experience-card p,
.contact-form label,
.contact-card a,
.contact-card p {
  line-height: 1.8;
  color: var(--muted);
}

.projects-grid,
.skills-grid,
.experience-grid,
.contact-grid {
  display: grid;
  gap: 1.25rem;
}

.projects-intro {
  display: grid;
  gap: 1.1rem;
  margin-bottom: 1.5rem;
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--bg-tint) 0%, #f8fbff 100%);
  border: 1px solid rgba(47, 111, 237, 0.12);
  box-shadow: var(--shadow);
}

.projects-intro p {
  margin: 0;
  max-width: 52rem;
  color: var(--muted);
  line-height: 1.75;
}

.projects-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.highlight-pill {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(123, 140, 166, 0.14);
}

.highlight-value {
  color: var(--accent-strong);
  font-weight: 800;
}

.highlight-label {
  color: var(--muted);
  font-size: 0.88rem;
}

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

.project-card {
  padding: 1.7rem;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  border-top: 4px solid transparent;
  overflow: hidden;
  min-width: 0;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.project-card-featured {
  grid-column: span 2;
  background: linear-gradient(180deg, #f7faff 0%, #eef4ff 100%);
  border-color: rgba(47, 111, 237, 0.2);
  border-top-color: var(--accent);
  box-shadow: 0 22px 50px rgba(47, 111, 237, 0.12);
}

.project-card:hover,
.project-card:focus-within,
.skill-card:hover,
.skill-card:focus-within,
.experience-card:hover,
.experience-card:focus-within,
.contact-card:hover,
.contact-card:focus-within,
.panel-card:hover,
.panel-card:focus-within {
  transform: translateY(-2px);
  border-color: rgba(47, 111, 237, 0.22);
  box-shadow: 0 22px 46px rgba(31, 41, 55, 0.1);
}

.project-card:hover,
.project-card:focus-within {
  border-top-color: rgba(47, 111, 237, 0.7);
}

.project-card h3 {
  color: var(--accent-strong);
  font-size: 1.45rem;
  line-height: 1.15;
}

.project-overview {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.project-summary {
  margin: 0;
  font-size: 1.02rem;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.project-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: var(--secondary-soft);
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 700;
  border: 1px solid rgba(123, 140, 166, 0.16);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 0.25rem;
}

.project-meta-card {
  padding: 1.05rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(123, 140, 166, 0.14);
}

.impact-card {
  background: linear-gradient(180deg, #edf4ff 0%, #f4f8ff 100%);
  border-color: rgba(47, 111, 237, 0.16);
}

.meta-grid p {
  margin: 0.4rem 0 0;
  color: var(--text);
  font-weight: 600;
  line-height: 1.6;
}

.process-visual {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(234, 241, 255, 0.9) 0%, rgba(248, 251, 255, 0.98) 100%);
  border: 1px dashed rgba(47, 111, 237, 0.3);
}

.process-visual-frame {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 1.4rem;
  border-radius: calc(var(--radius-md) - 4px);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.96)),
    repeating-linear-gradient(
      135deg,
      rgba(47, 111, 237, 0.05) 0,
      rgba(47, 111, 237, 0.05) 12px,
      rgba(255, 255, 255, 0.5) 12px,
      rgba(255, 255, 255, 0.5) 24px
    );
  border: 1px solid rgba(47, 111, 237, 0.12);
}

.process-visual-frame-media {
  padding: 0.9rem;
  gap: 0.8rem;
}

.project-image-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: calc(var(--radius-md) - 6px);
  background: transparent;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 260ms var(--ease-premium),
    box-shadow 260ms var(--ease-premium);
}

.project-image-button:hover,
.project-image-button:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 24px 42px rgba(31, 41, 55, 0.18);
}

.project-image-button:focus-visible {
  outline: 2px solid rgba(47, 111, 237, 0.3);
  outline-offset: 3px;
}

.project-image-button-main {
  max-width: 100%;
}

.project-visual-gallery .project-image-button {
  flex: 0 0 280px;
  width: 280px;
}

.project-visual-main {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: top center;
  border-radius: calc(var(--radius-md) - 8px);
  border: 1px solid rgba(123, 140, 166, 0.18);
  background: #ffffff;
  transition: transform 320ms var(--ease-premium);
}

.project-visual-gallery {
  display: flex;
  align-items: stretch;
  gap: 0.85rem;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(47, 111, 237, 0.4) rgba(47, 111, 237, 0.08);
}

.project-visual-thumb {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: top center;
  border-radius: calc(var(--radius-md) - 6px);
  border: 1px solid rgba(123, 140, 166, 0.18);
  background: #ffffff;
  transition: transform 320ms var(--ease-premium);
}

.project-visual-gallery .project-image-button,
.project-visual-gallery .project-visual-thumb {
  scroll-snap-align: start;
}

.project-image-button:hover .project-visual-main,
.project-image-button:focus-visible .project-visual-main,
.project-image-button:hover .project-visual-thumb,
.project-image-button:focus-visible .project-visual-thumb {
  transform: scale(1.015);
}

.project-image-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: end;
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(10, 16, 30, 0.02) 18%, rgba(10, 16, 30, 0.72) 100%);
  color: #ffffff;
  opacity: 0;
  transition:
    opacity 220ms ease,
    transform 260ms var(--ease-premium);
  transform: translateY(10px);
  pointer-events: none;
}

.project-image-button:hover .project-image-overlay,
.project-image-button:focus-visible .project-image-overlay {
  opacity: 1;
  transform: translateY(0);
}

.project-image-overlay-copy {
  display: -webkit-box;
  overflow: hidden;
  max-width: 100%;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  text-wrap: balance;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.project-visual-gallery::-webkit-scrollbar {
  height: 10px;
}

.project-visual-gallery::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(47, 111, 237, 0.08);
}

.project-visual-gallery::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(47, 111, 237, 0.35);
}

.process-visual-frame strong {
  display: block;
  font-size: 1.1rem;
  color: var(--accent-strong);
}

.process-visual-frame p {
  max-width: 28rem;
  margin: 0.6rem 0 0;
  color: var(--muted);
}

.process-visual-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.8rem;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  background: rgba(47, 111, 237, 0.1);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.process-visual-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.process-visual-steps span {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(123, 140, 166, 0.16);
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 700;
}

.project-toggle {
  margin-top: 1.2rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    background-color 180ms ease;
}

.project-toggle:hover,
.project-toggle:focus-visible {
  color: var(--accent-strong);
  border-color: rgba(47, 111, 237, 0.32);
  background: #f8fbff;
}

.project-details {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  min-width: 0;
  transition:
    grid-template-rows 0.42s var(--ease-premium),
    opacity 0.32s ease,
    margin-top 0.45s var(--ease-premium),
    padding-top 0.45s var(--ease-premium);
}

.project-details-inner {
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  transform: translateY(-8px);
  transition: transform 0.45s var(--ease-premium);
}

.project-details-inner .project-visual-gallery {
  margin-top: 1.2rem;
}

.project-details-inner p {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

.project-details.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  padding-top: 1rem;
}

.project-details.is-open .project-details-inner {
  transform: translateY(0);
}

.project-toggle[aria-expanded="true"] {
  color: var(--accent-strong);
  border-color: rgba(47, 111, 237, 0.28);
  background: #f8fbff;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.image-modal[hidden] {
  display: none;
}

.image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 15, 28, 0.66);
  backdrop-filter: blur(10px);
}

.image-modal-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  width: min(1100px, 100%);
  max-height: min(92vh, 860px);
  padding: 1rem;
  border-radius: 28px;
  background: rgba(247, 250, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 36px 100px rgba(9, 15, 28, 0.28);
  overflow: hidden;
  transform: translateY(18px) scale(0.985);
  opacity: 0;
  transition:
    transform 300ms var(--ease-premium),
    opacity 220ms ease;
}

.image-modal.is-open .image-modal-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.image-modal-media-shell {
  min-height: 0;
  overflow: auto;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f2f7ff 100%);
  border: 1px solid rgba(123, 140, 166, 0.14);
}

.image-modal-media {
  display: block;
  width: 100%;
  height: auto;
}

.image-modal-copy {
  display: grid;
  gap: 0.45rem;
  padding: 0.25rem 0.2rem 0.15rem;
}

.image-modal-kicker {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.image-modal-copy h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  color: var(--text);
}

.image-modal-copy p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.image-modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid rgba(123, 140, 166, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.image-modal-close:hover,
.image-modal-close:focus-visible {
  transform: translateY(-1px);
  background: #ffffff;
  border-color: rgba(47, 111, 237, 0.28);
}

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

.skill-card,
.experience-card,
.contact-card,
.contact-form {
  padding: 1.6rem;
}

.skill-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.skill-card h3 {
  color: var(--accent-strong);
  font-size: 1.3rem;
}

.skill-card ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.7rem;
  color: var(--muted);
}

.skill-card li {
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(219, 227, 236, 0.9);
}

.skill-card li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

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

.experience-head {
  margin-bottom: 0.75rem;
}

.experience-head p {
  margin: 0.35rem 0 0;
  color: var(--accent-strong);
  font-weight: 700;
}

.experience-card h3 {
  font-size: 1.28rem;
}

.contact-card,
.contact-form {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.contact-grid {
  grid-template-columns: 0.8fr 0.8fr 1.4fr;
  align-items: start;
}

.contact-card a {
  display: inline-block;
  margin-top: 0.25rem;
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(47, 111, 237, 0.24);
  text-underline-offset: 0.18rem;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.contact-card a:hover,
.contact-card a:focus-visible {
  color: var(--accent);
  text-decoration-color: rgba(47, 111, 237, 0.5);
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.contact-form label {
  display: grid;
  gap: 0.45rem;
  color: var(--text);
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1rem;
  background: #ffffff;
  color: var(--text);
}

.reveal-section {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.35s var(--ease-premium),
    transform 0.35s var(--ease-premium);
  transition-delay: var(--section-delay, 0s);
  will-change: transform, opacity;
}

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

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(var(--reveal-offset));
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroPanelReveal {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.985);
  }

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

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(47, 111, 237, 0.16);
  border-color: rgba(47, 111, 237, 0.4);
}

.form-note {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero,
  .projects-grid,
  .skills-grid,
  .experience-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .project-card-featured {
    grid-column: auto;
  }

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

  .hero-portrait-card {
    max-width: 16rem;
    margin-left: 0;
  }

  .hero-copy {
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 1.2rem), var(--max-width));
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    width: min(calc(100% - 1.2rem), var(--max-width));
  }

  .site-nav {
    justify-content: center;
    gap: 0.65rem 1rem;
    padding: 0.8rem;
  }

  .hero,
  .content-section {
    padding-top: 2.75rem;
  }

  .hero {
    min-height: auto;
    margin-top: 0;
    padding: 2.35rem 0 2rem;
    gap: 1.4rem;
  }

  .hero-panel {
    gap: 0.9rem;
  }

  .hero-portrait-card {
    width: min(16rem, 100%);
    max-width: none;
    justify-self: center;
    margin-left: 0;
  }

  .hero-portrait {
    object-position: center 10%;
  }

  .hero-glow {
    inset: -2.5rem auto auto -1.5rem;
    width: min(24rem, 88vw);
    height: min(24rem, 88vw);
  }

  .hero-copy h1 {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .button,
  .project-toggle {
    width: 100%;
  }

  .content-section {
    padding: 2.2rem 1.1rem;
    border-radius: 28px;
  }

  .project-card,
  .skill-card,
  .experience-card,
  .contact-card,
  .contact-form {
    padding: 1.25rem;
  }

  .projects-intro {
    padding: 1.1rem;
  }

  .process-visual-frame {
    min-height: 180px;
    padding: 1rem;
  }

  .project-visual-main {
    max-height: 320px;
  }

  .project-visual-gallery {
    gap: 0.75rem;
  }

  .project-visual-thumb {
    height: 168px;
  }

  .project-visual-gallery .project-image-button {
    flex-basis: min(78vw, 240px);
    width: min(78vw, 240px);
  }

  .image-modal {
    padding: 0.85rem;
  }

  .image-modal-dialog {
    max-height: min(90vh, 820px);
    padding: 0.8rem;
    border-radius: 22px;
  }

  .image-modal-close {
    top: 0.7rem;
    right: 0.7rem;
  }

  .project-details {
    margin-top: 0.85rem;
  }

  .contact-actions {
    display: grid;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-sequence,
  .hero-panel-card,
  .reveal-section {
    opacity: 1 !important;
    transform: none !important;
  }

  .project-details {
    transition: none;
  }
}
