/* Soft dark canvas + light cards + bright accents (lightly dark, not full night mode) */

:root {
  --color-bg: #1e293b;
  --color-bg-muted: #334155;
  --tint-sky: #e0f2fe;
  --tint-lilac: #ede9fe;
  --tint-peach: #ffedd5;
  --tint-cyan: #cffafe;
  --color-surface: #f8fafc;
  --color-surface-elevated: #f1f5f9;
  --color-text: #0f172a;
  --color-text-muted: #5b6472;
  --color-ink: #134e4a;
  --color-accent: #0d9488;
  --color-accent-hover: #0f766e;
  --color-mint: #34d399;
  --color-purple: #a78bfa;
  --color-orange: #fb923c;
  --color-blue: #38bdf8;
  --color-line: linear-gradient(90deg, #34d399, #38bdf8, #a78bfa, #fb923c);
  --color-line-solid: #2dd4bf;
  --color-line-soft: rgba(45, 212, 191, 0.5);
  /* Slightly dimmed color wash — readable light type on hero */
  --color-hero-overlay: linear-gradient(
    125deg,
    rgba(30, 41, 59, 0.72) 0%,
    rgba(15, 118, 110, 0.45) 35%,
    rgba(49, 46, 129, 0.5) 65%,
    rgba(15, 23, 42, 0.78) 100%
  );
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 16px 48px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.35);
  --font-sans: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --space-section: clamp(3.25rem, 9vw, 6rem);
  --container-max: 70rem;
  --text-root-pct: 103%;
  --text-root-pct-md: 106.25%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
  font-size: var(--text-root-pct);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img,
video,
canvas {
  max-width: 100%;
  height: auto;
}

@media (min-width: 768px) {
  html {
    font-size: var(--text-root-pct-md);
  }
}

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

  body {
    background-attachment: scroll !important;
  }

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

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.68;
  color: #cbd5e1;
  background: linear-gradient(185deg, #0f172a 0%, #1e293b 35%, #1a1b2e 65%, #172033 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  min-height: 100dvh;
}

h1,
h2,
h3,
h4,
h5,
h6,
figure {
  font-family: var(--font-sans);
  color: var(--color-text);
}

a {
  color: #5eead4;
}

a:hover,
a:focus-visible {
  color: #99f6e4;
}

::selection {
  background: rgba(45, 212, 191, 0.35);
  color: #f8fafc;
}

#page {
  overflow-x: clip;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
}

/* ——— Hero ——— */
#fh5co-header.fh5co-cover {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  height: auto !important;
  background: none !important;
  background-image: none !important;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #1e3a5f;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: scroll;
  transform: translateZ(0);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-bg {
    will-change: transform;
  }
}

@media (min-aspect-ratio: 21/9) {
  .hero-bg {
    background-position: center 22%;
  }
}

#fh5co-header .overlay {
  z-index: 1;
  background: var(--color-hero-overlay);
}

#fh5co-header > .container {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}

#fh5co-header .container > .row {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#fh5co-header .container > .row > [class*="col-"] {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#fh5co-header .display-t {
  display: flex !important;
  flex: 1 1 auto;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

#fh5co-header .display-tc.hero-inner {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: auto !important;
  padding-top: max(clamp(2rem, 8vmin, 4rem), env(safe-area-inset-top, 0px));
  padding-bottom: max(clamp(2rem, 8vmin, 4rem), env(safe-area-inset-bottom, 0px));
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  box-sizing: border-box;
}

.fh5co-cover:not(#fh5co-header) {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #c4b5fd;
  margin: 0 0 1.25rem;
  opacity: 0.95;
}

#fh5co-header .display-tc h1,
.fh5co-cover .display-tc h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
}

#fh5co-header .display-tc h1 span,
.fh5co-cover .display-tc h1 span {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.85rem, 5.5vw + 0.5rem, 3.65rem);
  letter-spacing: -0.01em;
  line-height: 1.12;
  padding: 0;
  display: inline-block;
  color: #f8fafc;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.hero-tagline {
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  font-weight: 400;
  color: rgba(226, 232, 240, 0.92);
  max-width: 26rem;
  margin: 0.35rem 0 0;
  line-height: 1.55;
  text-align: center;
}

#fh5co-header .display-tc h3,
.fh5co-cover .display-tc h3 {
  color: rgba(226, 232, 240, 0.88);
}

.hero-social-wrap {
  margin-top: 1.75rem;
}

#fh5co-header .display-tc .profile-thumb,
.fh5co-cover .display-tc .profile-thumb,
#fh5co-header .profile-thumb,
.fh5co-cover .profile-thumb {
  width: clamp(124px, 26vw, 156px) !important;
  height: clamp(124px, 26vw, 156px) !important;
  max-width: 156px;
  max-height: 156px;
  box-sizing: border-box;
  border: 3px solid rgba(248, 250, 252, 0.95);
  outline: 2px solid rgba(167, 139, 250, 0.65);
  outline-offset: 3px;
  border-radius: 50%;
  overflow: hidden;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.35rem;
  flex-shrink: 0;
  aspect-ratio: 1;
  background: transparent none !important;
  background-image: none !important;
  background-size: unset !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  padding: 0;
}

#fh5co-header .display-tc .profile-thumb img,
.fh5co-cover .display-tc .profile-thumb img,
#fh5co-header .profile-thumb img,
.fh5co-cover .profile-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 22%;
}

#fh5co-header .display-tc .fh5co-social-icons li a,
.fh5co-cover .display-tc .fh5co-social-icons li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-full);
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.35);
  margin: 0 0.3rem;
  color: #e2e8f0;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#fh5co-header .display-tc .fh5co-social-icons li a:hover,
#fh5co-header .display-tc .fh5co-social-icons li a:focus-visible,
.fh5co-cover .display-tc .fh5co-social-icons li a:hover,
.fh5co-cover .display-tc .fh5co-social-icons li a:focus-visible {
  background: rgba(13, 148, 136, 0.35);
  border-color: rgba(45, 212, 191, 0.55);
  color: #fff;
  transform: translateY(-2px);
}

#fh5co-header .display-tc .fh5co-social-icons li a i,
.fh5co-cover .display-tc .fh5co-social-icons li a i {
  font-size: 1.15rem !important;
}

/* ——— Sections ——— soft-dark bands (still colorful, not flat black) */
#fh5co-about {
  padding: var(--space-section) 0;
  background: linear-gradient(165deg, #14231f 0%, #1a2e28 45%, #1e293b 100%) !important;
  clear: both;
  border-top: 1px solid rgba(52, 211, 153, 0.2);
  border-bottom: 1px solid rgba(15, 23, 42, 0.5);
}

#fh5co-projects {
  padding: var(--space-section) 0;
  background: linear-gradient(165deg, #1f1a2e 0%, #252043 40%, #1e293b 100%) !important;
  clear: both;
  border-top: 1px solid rgba(167, 139, 250, 0.22);
  border-bottom: 1px solid rgba(15, 23, 42, 0.5);
}

#fh5co-resume.fh5co-bg-color {
  background: linear-gradient(180deg, #152535 0%, #1a3044 50%, #1e293b 100%) !important;
  padding: var(--space-section) 0;
  clear: both;
  border-top: 1px solid rgba(56, 189, 248, 0.22);
  border-bottom: 1px solid rgba(15, 23, 42, 0.5);
}

#fh5co-skills {
  padding: var(--space-section) 0;
  background: linear-gradient(175deg, #2a2218 0%, #352a1c 50%, #2d2419 100%) !important;
  clear: both;
  border-top: 1px solid rgba(251, 146, 60, 0.22);
  border-bottom: 1px solid rgba(15, 23, 42, 0.5);
}

#fh5co-started {
  padding: var(--space-section) 0;
  background: linear-gradient(180deg, #122a32 0%, #163540 45%, #1e293b 100%) !important;
  clear: both;
  border-top: 1px solid rgba(34, 211, 238, 0.25);
  position: relative;
  float: none;
  width: 100%;
}

#fh5co-about .container,
#fh5co-resume .container,
#fh5co-skills .container,
#fh5co-projects .container,
#fh5co-started .container {
  max-width: var(--container-max);
}

.section-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0 0 0.65rem;
}

.section-eyebrow--on-dark {
  color: #5eead4;
  opacity: 0.9;
}

#fh5co-about .section-eyebrow {
  color: #6ee7b7;
}

#fh5co-projects .section-eyebrow {
  color: #d8b4fe;
}

#fh5co-resume .section-eyebrow--on-dark {
  color: #7dd3fc;
}

#fh5co-skills .section-eyebrow {
  color: #fdba74;
}

#fh5co-started .section-eyebrow--on-dark {
  color: #67e8f9;
}

.fh5co-heading {
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.fh5co-heading h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.85rem, 3.6vw, 2.5rem);
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin: 0;
  line-height: 1.2;
}

#fh5co-about .fh5co-heading h2,
#fh5co-projects .fh5co-heading h2,
#fh5co-resume .fh5co-heading h2,
#fh5co-skills .fh5co-heading h2,
#fh5co-started .fh5co-heading h2 {
  color: #f1f5f9;
}

.fh5co-heading h2::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 3px;
  margin: 1.1rem auto 0;
  background: var(--color-line);
  border-radius: 3px;
}

/* About */
#fh5co-about .info {
  float: none;
  width: 100%;
  max-width: 100%;
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius-md);
  padding: clamp(1.35rem, 4vw, 1.85rem);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(148, 163, 184, 0.2);
  margin-bottom: 0;
}

#fh5co-about .info li {
  display: grid;
  grid-template-columns: minmax(0, 36%) 1fr;
  gap: 0.65rem 1rem;
  align-items: baseline;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  float: none;
}

#fh5co-about .info li:last-child {
  border-bottom: 0;
}

#fh5co-about .info li .first-block,
#fh5co-about .info li .second-block {
  float: none;
  width: auto;
  display: block;
}

#fh5co-about .info li .first-block {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

#fh5co-about .info li .second-block {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#fh5co-about .about-content {
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius-md);
  padding: clamp(1.35rem, 4vw, 2.1rem);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

#fh5co-about .about-content p {
  color: #475569;
}

#fh5co-about .about-content h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--color-ink);
}

.role-list {
  margin-top: 0;
  padding-left: 1.2rem;
  color: var(--color-text-muted);
}

.role-list li {
  margin-bottom: 0.5rem;
}

#fh5co-about .fh5co-social-icons {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

#fh5co-about .fh5co-social-icons li {
  display: block;
  margin: 0;
  padding: 0;
}

#fh5co-about .fh5co-social-icons li a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0 !important;
  box-sizing: border-box;
  border-radius: var(--radius-full);
  background: linear-gradient(180deg, #fffef8, #ecfdf5) !important;
  color: #059669 !important;
  border: 1px solid rgba(52, 211, 153, 0.55);
  transition: box-shadow 0.25s ease, background 0.25s ease, transform 0.25s ease;
  zoom: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#fh5co-about .fh5co-social-icons li a:hover,
#fh5co-about .fh5co-social-icons li a:focus-visible {
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.25);
  background: linear-gradient(135deg, #34d399, #22d3ee) !important;
  border-color: transparent !important;
  color: #fff !important;
  outline: none;
}

#fh5co-about .fh5co-social-icons li a i {
  font-size: 19px;
  line-height: 1;
  display: block;
  text-rendering: geometricPrecision;
}

/* Timeline — light band */
.timeline:before {
  background: var(--color-line-soft);
}

.timeline .timeline-heading > div h3 {
  background: linear-gradient(135deg, #fff, #e0f2fe);
  color: #0369a1;
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: var(--radius-sm);
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-family: var(--font-sans);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.timeline > li > .timeline-panel {
  background: #fff;
  padding: clamp(1.15rem, 3vw, 1.5rem);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: var(--radius-md);
}

.timeline-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: 1.08rem;
  color: var(--color-ink);
}

.company {
  color: var(--color-text-muted) !important;
  font-size: 0.88rem;
  margin-bottom: 0.65rem !important;
  font-weight: 500;
}

.timeline-body > p {
  color: var(--color-text-muted);
  font-size: 0.93rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.timeline > li > .timeline-badge {
  background: #fff;
  color: var(--color-accent);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(34, 211, 238, 0.5);
}

/* Skills — unified palette */
#fh5co-skills .progress-wrap h3 {
  font-weight: 600;
  font-size: 0.82rem;
  color: #e2e8f0;
  letter-spacing: 0.02em;
}

#fh5co-skills .progress {
  height: 6px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

#fh5co-skills .progress-bar {
  height: 6px;
  border-radius: var(--radius-full);
  transition: width 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

#fh5co-skills .progress-bar.progress-bar-1 {
  background: linear-gradient(90deg, #34d399, #6ee7b7) !important;
}

#fh5co-skills .progress-bar.progress-bar-2 {
  background: linear-gradient(90deg, #a78bfa, #c4b5fd) !important;
}

#fh5co-skills .progress-bar.progress-bar-3 {
  background: linear-gradient(90deg, #fb923c, #fdba74) !important;
}

#fh5co-skills .progress-bar.progress-bar-4 {
  background: linear-gradient(90deg, #38bdf8, #7dd3fc) !important;
}

#fh5co-skills .progress-bar.progress-bar-5 {
  background: linear-gradient(90deg, #22d3ee, #67e8f9) !important;
}

#fh5co-skills .progress-bar.progress-bar-6 {
  background: linear-gradient(90deg, #2dd4bf, #5eead4) !important;
}

#fh5co-skills .progress-bar.progress-bar-7 {
  background: linear-gradient(90deg, #818cf8, #a5b4fc) !important;
}

#fh5co-skills .progress-bar.progress-bar-8 {
  background: linear-gradient(90deg, #f472b6, #fbcfe8) !important;
}

/* Projects */
#fh5co-projects .fh5co-heading {
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

.projects-lede {
  margin: 0.75rem auto 0;
  max-width: 34rem;
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  font-weight: 400;
}

#fh5co-projects .projects-lede {
  color: #cbd5e1;
}

.projects-grid {
  margin-top: 0.25rem;
}

.projects-grid > [class*="col-"] {
  margin-bottom: 1.5rem;
}

.project-card {
  height: 100%;
  background: var(--color-surface);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-md);
  padding: clamp(1.35rem, 3vw, 1.65rem);
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .project-card:hover {
    box-shadow: 0 16px 40px rgba(124, 58, 237, 0.15);
    border-color: rgba(167, 139, 250, 0.45);
    transform: translateY(-3px);
  }
}

.project-card-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
  color: var(--color-ink);
}

.project-card-desc {
  margin: 0 0 1.15rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.project-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6d28d9 !important;
  text-decoration: none;
}

.project-card-link:hover,
.project-card-link:focus-visible {
  color: #7c3aed !important;
  text-decoration: none;
}

.project-card-cta {
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.75;
}

/* Contact — soft glow on dark cyan band */
#fh5co-started::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 12% 25%, rgba(167, 139, 250, 0.12), transparent 55%),
    radial-gradient(ellipse 65% 50% at 88% 70%, rgba(251, 146, 60, 0.1), transparent 50%);
  pointer-events: none;
}

#fh5co-started .container {
  position: relative;
  z-index: 1;
}

#fh5co-started .overlay {
  display: none;
}

#fh5co-started .btn.btn-default,
#fh5co-started .btn.btn-lg {
  border-radius: var(--radius-sm) !important;
  font-weight: 600;
  font-size: 0.82rem !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fffef8, #ecfeff) !important;
  color: #0e7490 !important;
  padding: 1rem 2.5rem !important;
  min-height: 2.75rem;
  height: auto !important;
  border: 2px solid rgba(34, 211, 238, 0.55) !important;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.2) !important;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

#fh5co-started .btn:hover,
#fh5co-started .btn:focus-visible {
  transform: none;
  background: linear-gradient(135deg, #22d3ee, #38bdf8) !important;
  border-color: #0891b2 !important;
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(8, 145, 178, 0.35) !important;
}

/* Footer */
#fh5co-footer {
  background: linear-gradient(90deg, #1a2e22 0%, #2a1f45 40%, #162d45 100%) !important;
  padding: 2rem 0;
  padding-bottom: max(2rem, calc(2rem + env(safe-area-inset-bottom, 0px)));
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

#fh5co-footer p {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #a5b4fc;
  opacity: 0.95;
}

/* Back to top */
.gototop {
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  right: max(1.25rem, env(safe-area-inset-right, 0px));
}

.gototop a {
  border-radius: var(--radius-sm);
  background: rgba(30, 41, 59, 0.92) !important;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-md);
  color: #e2e8f0 !important;
  min-width: 2.75rem;
  min-height: 2.75rem;
}

.gototop a:hover {
  filter: none;
  background: linear-gradient(145deg, #0d9488, #0891b2) !important;
  border-color: #14b8a6 !important;
  color: #fff !important;
}

.gototop a i {
  color: inherit !important;
}

/* Loader */
.fh5co-loader {
  background: linear-gradient(135deg, #0f172a, #1e293b, #1e1b2e);
}

/* Match Bootstrap md breakpoint (992px) + template timeline rules */
@media (max-width: 992px) {
  #fh5co-about .row > [class*="col-"] {
    margin-bottom: 1.5rem;
  }

  #fh5co-about .row > [class*="col-"]:last-child {
    margin-bottom: 0;
  }

  ul.timeline:before {
    left: 1.25rem;
    margin-left: 0;
  }

  ul.timeline > li > .timeline-badge {
    left: 1.25rem;
    margin-left: -22px;
  }

  ul.timeline > li > .timeline-panel {
    width: calc(100% - 3.5rem) !important;
    max-width: calc(100% - 3.5rem);
    float: right !important;
    text-align: left !important;
    box-sizing: border-box;
  }

  ul.timeline > li.timeline-unverted,
  ul.timeline > li.timeline-inverted {
    text-align: left;
  }

  ul.timeline > li.timeline-inverted > .timeline-panel {
    float: right !important;
  }

  .timeline .timeline-heading.text-center {
    text-align: left !important;
    padding-left: min(3.5rem, 18vw);
    padding-right: 0.5rem;
  }

  .timeline .timeline-heading > div h3 {
    margin-left: 0;
  }
}

/* Tablet: comfortable gutters, full-width stacked sections */
@media (max-width: 991px) {
  .container {
    padding-left: clamp(1rem, 4vw, 1.5rem);
    padding-right: clamp(1rem, 4vw, 1.5rem);
  }

  #fh5co-about .row > [class*="col-"],
  #fh5co-skills .row > [class*="col-"] {
    width: 100%;
    float: none;
  }

  #fh5co-skills .row > [class*="col-"] + [class*="col-"] {
    margin-top: 0.5rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }

  #fh5co-started .contact-info .btn {
    width: 100%;
    max-width: 20rem;
  }

  #fh5co-about .info li {
    grid-template-columns: 1fr;
    gap: 0.35rem 0;
  }

  #fh5co-about .info li .first-block {
    margin-bottom: 0.1rem;
  }
}

@media (max-width: 380px) {
  ul.timeline > li > .timeline-panel {
    width: calc(100% - 3rem) !important;
    max-width: calc(100% - 3rem);
  }

  ul.timeline:before {
    left: 1rem;
  }

  ul.timeline > li > .timeline-badge {
    left: 1rem;
    margin-left: -20px;
  }

  .timeline .timeline-heading.text-center {
    padding-left: 2.75rem;
  }
}

/*
 * Scroll stability (mobile): `background-attachment: fixed` and `100dvh` repaint when
 * the URL bar shows/hides and during overscroll — feels like vibration at the bottom.
 * This block is last so it wins over earlier `#page` / hero rules. Large touch devices
 * included via (hover: none) even when width > 1024px.
 */
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  html {
    scroll-behavior: auto;
  }

  body {
    background-attachment: scroll !important;
    min-height: 100svh;
  }

  #page {
    min-height: 100svh;
  }

  #fh5co-header.fh5co-cover {
    min-height: 100svh;
  }
}
