:root {
  --bg: #f7f5ef;
  --surface: #ffffff;
  --ink: #18211f;
  --muted: #5c6760;
  --line: #dde2d8;
  --accent: #126b63;
  --accent-strong: #0f4e49;
  --warm: #c65f3d;
  --gold: #d4a72c;
  --blue: #4667b1;
  --shadow: 0 24px 70px rgba(22, 38, 35, 0.12);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 12% 18%, rgba(212, 167, 44, 0.2), transparent 28%),
    linear-gradient(140deg, #f7f5ef 0%, #eef4f1 54%, #f9eee8 100%);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  margin: 0;
  padding: 18px max(20px, calc((100% - 1120px) / 2));
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: blur(18px); /* Safari support */
  backdrop-filter: blur(18px);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    padding 180ms ease,
    box-shadow 180ms ease;
}

.site-header.scrolled {
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom-color: rgba(24, 33, 31, 0.1);
  background: rgba(247, 245, 239, 0.86);
  box-shadow: 0 12px 40px rgba(22, 38, 35, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 60px;
  height: 60px;
  object-fit: contain;
}


.footer-nav-icon {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(24, 33, 31, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  transition: opacity 180ms ease, transform 180ms ease;
  -webkit-backdrop-filter: blur(20px); /* Safari support */
  backdrop-filter: blur(20px);
}

.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active {
  background: var(--ink);
  color: #fff;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(24, 33, 31, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.nav-toggle img {
  display: block;
  width: 18px;
  height: 18px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon {
  content: url("assets/external-favicons/chevron-right.svg");
  transform: rotate(90deg);
}

.site-header.scrolled .nav-toggle {
  display: inline-grid;
}

.site-header.scrolled .site-nav {
  position: absolute;
  top: calc(100% + 10px);
  right: max(20px, calc((100% - 1120px) / 2));
  display: none;
  width: min(280px, calc(100vw - 40px));
  flex-direction: column;
  align-items: stretch;
  border-radius: 12px;
  padding: 10px;
  border: 1px solid rgba(24, 33, 31, 0.16);
  background: rgba(247, 245, 239, 0.97);
  box-shadow: 0 20px 60px rgba(22, 38, 35, 0.18);
  backdrop-filter: blur(20px);
}

.site-header.scrolled .site-nav.open {
  display: flex;
  animation: menu-drop 180ms ease both;
}

.site-header.scrolled .site-nav a {
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  font-weight: 800;
}

.site-header.scrolled .site-nav a:hover,
.site-header.scrolled .site-nav a.active {
  background: rgba(18, 107, 99, 0.12);
  color: var(--accent-strong);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  width: min(1120px, calc(100% - 40px));
  min-height: calc(100svh - 92px);
  margin: 0 auto;
  padding: 56px 0 72px;
}

.hero-copy {
  animation: rise-in 620ms ease both;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(1.5rem, 8vw, 3rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.25;
}

h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
}

.hero h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
}

.hero-text {
  max-width: 640px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.hero-actions,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 0;
  border-radius: 0;
  padding: 8px 10px;
  overflow: visible;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  margin-right: -0.08em; 
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.button * {
  position: relative;
  z-index: 2;
}

.button::before {
  position: absolute;
  bottom: 8px;
  left: 2px;
  right: 2px;              
  z-index: 1;
  height: 28%;
  border-radius: 999px;
  background: rgba(212, 167, 44, 0.24);
  content: "";
  
  -webkit-transform: scaleX(0.82) skewX(-12deg) translateZ(0);
  transform: scaleX(0.82) skewX(-12deg) translateZ(0);
  transform-origin: center;
  transition:
    background-color 180ms ease,
    left 180ms ease,
    right 180ms ease,
    transform 220ms ease,
    opacity 220ms ease,
    filter 220ms ease;
  opacity: 0.9;
  filter: blur(0.2px);
}

.button:hover {
  transform: translateY(-2px);
}

.button:hover::before {
  -webkit-transform: scaleX(1) skewX(-6deg) translateZ(0);
  transform: scaleX(1) skewX(-6deg) translateZ(0);
  background: rgba(212, 167, 44, 0.5); 
}

.button.primary {
  color: var(--warm);
}

.button.primary:hover {
  color: #a54326;
}

.button.secondary {
  color: var(--ink);
}

.button.secondary::before {
  background: rgba(18, 107, 99, 0.18);
}

.button.secondary:hover::before {
  background: rgba(18, 107, 99, 0.35);
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 520px;
}

.hero-visual img {
  display: block;
  width: min(100%, 560px);
  height: auto;
  animation: float-in 760ms 120ms ease both, soft-float 5s 950ms ease-in-out infinite;
}

.feature-kicker {
  display: block;
  margin-bottom: 14px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-band,
.page-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.section-band {
  padding: 76px 0 96px;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 30px;
}

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

.feature-card,
.sidebar-panel {
  border: 1px solid rgba(24, 33, 31, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 48px rgba(22, 38, 35, 0.08);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 32px;
  align-items: start;
  margin-bottom: 36px;
}

@media (max-width: 860px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .about-photo-card {
    max-width: 100%;
  }

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

@media (max-width: 560px) {
  .about-layout {
    gap: 18px;
  }

  .about-photo-card {
    max-width: none;
  }

  .photo-carousel-track {
    grid-template-columns: 1fr;
  }

  .photo-carousel-controls {
    justify-content: flex-start;
  }
}

.about-copy {
  display: grid;
  gap: 16px;
}

.about-copy h2 {
  margin-bottom: 4px;
}

.about-copy b,
.about-copy strong {
  color: var(--accent-strong);
  font-weight: 800;
}

.about-photo-card {
  border: 1px solid rgba(24, 33, 31, 0.12);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 22px 58px rgba(22, 38, 35, 0.12);
}

.about-photo-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.feature-card {
  position: relative;
  min-height: 200px;
  padding: 24px;
  overflow: hidden;
  text-decoration: none;
  transition:
    transform 240ms ease,
    box-shadow 240ms ease,
    border-color 240ms ease,
    background-color 240ms ease;
}

.feature-card::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(18, 107, 99, 0.08), rgba(212, 167, 44, 0.12));
  opacity: 0;
  content: "";
  transition: opacity 240ms ease;
}

.feature-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(18, 107, 99, 0.28);
  box-shadow: 0 24px 56px rgba(22, 38, 35, 0.12);
  background: rgba(255, 255, 255, 0.9);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card > * {
  position: relative;
  z-index: 1;
}

.feature-card,
.button {
  will-change: transform;
}

.feature-card .feature-kicker {
  color: var(--warm);
}

.feature-card p,
.page-hero p,
.content-main p,
.sidebar-panel p,
.timeline-body p,
.resume-entry p,
.resume-entry li,
.role-entry li,
.company-header p {
  color: var(--muted);
}

.timeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.page-shell {
  padding: 64px 0 96px;
}

.page-hero {
  max-width: 860px;
  margin-bottom: 38px;
}

.page-hero.compact {
  max-width: 760px;
}

.page-hero h1,
.resume-hero h1 {
  margin-bottom: 12px;
  font-size: clamp(2.25rem, 5vw, 3.4rem);
  line-height: 1;
}

.content-grid,
.resume-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}

.content-main {
  display: grid;
  gap: 18px;
}

.content-main h2:not(:first-child) {
  margin-top: 24px;
}

.value-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.value-pills span {
  border: 1px solid rgba(18, 107, 99, 0.18);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(18, 107, 99, 0.08);
  color: var(--accent-strong);
  font-size: 0.95rem;
  font-weight: 700;
}

.about-personal-section {
  margin-top: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.photo-carousel {
  margin-top: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  width: 100%;
}

.photo-carousel-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.photo-carousel-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(24, 33, 31, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.photo-carousel-button:hover {
  transform: translateY(-1px);
  background: rgba(18, 107, 99, 0.1);
  box-shadow: 0 8px 20px rgba(22, 38, 35, 0.08);
}

.photo-carousel-button.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.photo-carousel-button.is-disabled:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: none;
}

.photo-carousel-card {
  display: grid !important; /* Force layout to stay active so it animations smoothly */
  gap: 10px;
  align-content: start;
  flex-shrink: 0;
  
  /* Desktop sizing (3 items visible: 100% width divided by 3, accounting for gap fractions) */
  width: calc((100% - (14px * 2)) / 3); 
  
  min-height: 260px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(24, 33, 31, 0.08);
  background: linear-gradient(135deg, rgba(18, 107, 99, 0.09), rgba(212, 167, 44, 0.14));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.photo-carousel-track {
  display: flex;
  gap: 14px;
  width: 100%;
  transition: transform 450ms cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

@media (max-width: 860px) {
  .photo-carousel-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-carousel-card {
    /* Tablet viewport (2 items visible) */
    width: calc((100% - 14px) / 2);
  }
}

@media (max-width: 560px) {
  .photo-carousel-track {
    grid-template-columns: 1fr;
  }

  .photo-carousel-controls {
    justify-content: flex-start;
  }

  .photo-carousel-card {
    /* Mobile viewport (1 item visible) */
    width: 100%;
    min-height: 220px;
  }
}

.photo-carousel-card img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  border-radius: 12px;
}

.photo-carousel-label {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.photo-carousel-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.sidebar-panel {
  padding: 24px;
}

.detail-list {
  display: grid;
  gap: 18px;
  margin: 0;
}

.detail-list div {
  display: grid;
  gap: 3px;
}

.detail-list dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
  font-weight: 700;
}

.timeline {
  display: grid;
  gap: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  padding: 28px;
  border: 1px solid rgba(24, 33, 31, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.timeline-meta {
  display: grid;
  align-content: start;
  gap: 5px;
}

.timeline-meta span {
  color: var(--warm);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timeline-meta strong {
  font-size: 1.35rem;
}

.timeline-body a,
.detail-list a {
  color: var(--accent-strong);
  font-weight: 800;
}

.resume-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.resume-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 20px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.resume-entry > span {
  color: var(--muted);
  font-weight: 800;
}

.resume-entry ul {
  grid-column: 1 / -1;
  margin: 0;
  padding-left: 20px;
}

.compact-entry {
  align-items: start;
}

.company-group {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.company-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 8px;
}

.company-header h3 {
  margin-bottom: 4px;
  font-size: 1.55rem;
}

.company-header p {
  margin: 0;
}

.company-header > span,
.role-heading span {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.role-entry {
  display: grid;
  gap: 10px;
  padding: 18px 0 22px 22px;
  border-left: 2px solid rgba(18, 107, 99, 0.18);
}

.role-entry + .role-entry {
  border-top: 1px solid rgba(24, 33, 31, 0.08);
}

.role-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.role-entry ul {
  margin: 0;
  padding-left: 20px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.tag-list span {
  border: 1px solid rgba(18, 107, 99, 0.22);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(18, 107, 99, 0.08);
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 800;
}

.mini-list {
  display: grid;
  gap: 18px;
  margin-bottom: 30px;
}

.mini-list article {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.mini-list h3 {
  margin-bottom: 6px;
  font-size: 0.96rem;
}

.mini-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 42px;
  border-top: 1px solid rgba(24, 33, 31, 0.12);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.footer-links a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

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

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(18px) rotate(-1.5deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

@keyframes soft-float {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-8px) rotate(0.6deg);
  }
}

@keyframes menu-drop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
  }

  .nav-toggle {
    display: inline-grid;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: max(14px, calc((100% - 1120px) / 2));
    display: none;
    width: min(280px, calc(100vw - 40px));
    flex-direction: column;
    align-items: stretch;
    border-radius: 12px;
    padding: 10px;
    border: 1px solid rgba(24, 33, 31, 0.16);
    background: rgba(247, 245, 239, 0.97);
    box-shadow: 0 20px 60px rgba(22, 38, 35, 0.18);
    backdrop-filter: blur(20px);
  }

  .site-nav.open {
    display: flex;
    animation: menu-drop 180ms ease both;
  }

  .site-nav a {
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--ink);
    font-weight: 800;
  }

  .site-nav a:hover,
  .site-nav a.active {
    background: rgba(18, 107, 99, 0.12);
    color: var(--accent-strong);
  }

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

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .hero-visual {
    min-height: 420px;
  }

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

  .resume-hero {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .hero,
  .section-band,
  .page-shell,
  .site-footer {
    width: min(100% - 28px, 1120px);
  }

  .site-header {
    width: 100%;
  }

  h1 {
    font-size: clamp(2.55rem, 15vw, 4.2rem);
  }

  .brand span:last-child {
    display: none;
  }

  .hero-visual {
    min-height: 360px;
  }

  .hero-visual img {
    width: 100%;
  }

  .timeline-item,
  .resume-entry {
    grid-template-columns: 1fr;
  }

  .company-header,
  .role-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .role-entry {
    padding-left: 16px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* LOADING ANIMATION */
.spinner-wrapper {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: #FFFEFC;
    display:flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.spinner {
    width: 40px;
    height: 40px;
    position: relative;
    margin: auto;
}
  
.double-bounce1, .double-bounce2 {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #FF2E00;
    opacity: 0.6;
    position: absolute;
    top: 0;
    left: 0;

    -webkit-animation: sk-bounce 2.0s infinite ease-in-out;
    animation: sk-bounce 2.0s infinite ease-in-out;
}
  
.double-bounce2 {
    -webkit-animation-delay: -1.0s;
    animation-delay: -1.0s;
}
  
@-webkit-keyframes sk-bounce {
    0%, 100% { -webkit-transform: scale(0.0) }
    50% { -webkit-transform: scale(1.0) }
}
  
@keyframes sk-bounce {
    0%, 100% { 
      transform: scale(0.0);
      -webkit-transform: scale(0.0);
    } 50% { 
      transform: scale(1.0);
      -webkit-transform: scale(1.0);
    }
}