/* Flip card core */
.fc-section {
  perspective: 1200px;
  -webkit-perspective: 1200px;
}

.fc-wrap {
  height: 450px;
  cursor: pointer;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.fc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.fc-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0.2, 0.2, 1);
  border-radius: 1rem;
  -webkit-transform-style: preserve-3d;
}

.fc-wrap.flipped .fc-inner {
  transform: rotateY(180deg);
}

.fc-front,
.fc-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 1rem;
  overflow: hidden;
}

/* Front face */
.fc-front {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  color: #fff;
}

.fc-front.fc-work {
  background: linear-gradient(145deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  justify-content: flex-start;
}

.fc-front.fc-edu {
  background: linear-gradient(145deg, #1b2838 0%, #1e3a5f 60%, #1a5276 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  justify-content: flex-start;
}

.fc-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 0.75rem;
  align-self: flex-start;
}
.fc-work .fc-badge {
  background: rgba(99, 179, 237, 0.18);
  color: #90cdf4;
}
.fc-edu .fc-badge {
  background: rgba(154, 230, 180, 0.18);
  color: #9ae6b4;
}

.fc-logo {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.fc-company {
  font-size: 1.2rem;
  line-height: 1.2;
  margin-bottom: 0.2rem;
  color: #fff;
}

.fc-role {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.5rem;
}

.fc-period {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
}

.fc-desc {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  margin-top: 0.6rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fc-hint {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.3);
  margin-top: auto;
  padding-top: 0.5rem;
  letter-spacing: 0.05em;
}

/* Back face */
.fc-back {
  transform: rotateY(180deg);
  background: #0d0d0d;
}

.fc-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  display: block;
}

.fc-back-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
}

.fc-back-label {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.05em;
}

/* Section headings */
.fc-header-heading {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  color: #1a5276;
  margin-bottom: 0;
  animation: popIn 0.8s ease-out 0.1s both;
  margin-top: 10vh;
  text-align: center;
}

.fc-header-divider {
  width: 40px;
  height: 2px;
  background: #1b2838;
  margin: 1.25rem auto;
  animation: popIn 0.8s ease-out 0.15s both;
}

/* ── Page header ────────────────────────────── */
.pf-header {
  padding: 120px 0 60px;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.pf-header-label {
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #1e3a5f;
  margin-bottom: 0.75rem;
  display: block;
  animation: popIn 0.8s ease-out forwards;
}

.pf-header-heading {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  color: #1a5276;
  margin-bottom: 0;
  animation: popIn 0.8s ease-out 0.1s both;
}

.pf-header-divider {
  width: 40px;
  height: 2px;
  background: #1b2838;
  margin: 1.25rem auto;
  animation: popIn 0.8s ease-out 0.15s both;
}

.pf-header-sub {
  font-size: 0.95rem;
  color: rgba(30, 58, 95, 0.55);
  font-weight: 300;
  line-height: 1.7;
  animation: popIn 0.8s ease-out 0.2s both;
}

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

/* Animation for the page*/
@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.fc-section-title {
  animation: popIn 0.5s ease-out 0.05s forwards;
  opacity: 0;
}

.fc-wrap {
  animation: popIn 0.6s ease-out forwards;
  opacity: 0;
}

/* Stagger — these now correctly target .fc-wrap only */
.fc-wrap:nth-child(1) {
  animation-delay: 0.08s;
}
.fc-wrap:nth-child(2) {
  animation-delay: 0.18s;
}
.fc-wrap:nth-child(3) {
  animation-delay: 0.28s;
}
.fc-wrap:nth-child(4) {
  animation-delay: 0.38s;
}

/* Skill Set section */
#skills {
  padding: 100px 0 120px;
}

.skills-label {
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #1e3a5f;
  margin-bottom: 0.75rem;
  display: block;
}

.skills-heading {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.15;
  color: #1a5276;
  margin-bottom: 0;
}

.skills-divider {
  width: 40px;
  height: 2px;
  background: #1b2838;
  margin: 1.25rem 0 2rem;
}

/* Filter bar */
.skills-filter-bar {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2rem;
}

.skills-filter-btn {
  font-size: 0.72rem;
  padding: 5px 16px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid #1a5276;
  color: #1a5276;
  cursor: pointer;
  -webkit-transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
  letter-spacing: 0.03em;
}
.skills-filter-btn:hover {
  background: rgba(30, 58, 95, 0.06);
}
.skills-filter-btn.active {
  background: #1e3a5f;
  color: #fff;
  border-color: #1e3a5f;
}

/* Card grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.85rem;
}

@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
  }
}

/* Individual skill card */
.skill-card {
  background: linear-gradient(145deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
  border: 1px solid rgba(30, 58, 95, 0.18);
  border-radius: 1rem;
  padding: 1.1rem 0.6rem 0.9rem;
  text-align: center;
  cursor: default;
  -webkit-transition:
    border-color 0.25s ease,
    -webkit-transform 0.25s ease,
    box-shadow 0.25s ease,
    opacity 0.25s ease;
  transition:
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease,
    opacity 0.25s ease;
}

.skill-card:hover {
  border-color: #7fa6d6;
  -webkit-transform: translateY(-4px);
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(30, 58, 95, 0.18);
}

/* Filtered out state */
.skill-card.filtered-out {
  opacity: 0;
  pointer-events: none;
  -webkit-transform: scale(0.92);
  transform: scale(0.92);
}

/* Hidden — removed from layout entirely after transition */
.skill-card.hidden {
  display: none;
}

.skill-icon {
  font-size: 22px;
  line-height: 1;
  display: block;
  margin: 0 auto 0.5rem;
  width: 26px;
  height: 26px;
  text-align: center;
}

.skill-name {
  font-size: 0.72rem;
  font-weight: 500;
  color: #90cdf4;
  line-height: 1.3;
  margin-bottom: 3px;
}

.skill-cat-tag {
  font-size: 0.6rem;
  color: rgba(144, 205, 244, 0.5);
  letter-spacing: 0.04em;
  line-height: 1;
}

/* Result count */
.skills-count {
  font-size: 0.72rem;
  color: rgba(30, 58, 95, 0.45);
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}

/* Ticker wrapper */
#Awardscontainer {
  margin-bottom: 10vh;
  border: #1e3a5f 5px solid;
  border-radius: 1rem;
  padding: 1.5rem;
}

#awards-ticker {
  display: block;
  position: relative;
  overflow: hidden;
  height: 320px;
  isolation: isolate;
  /* Fade top & bottom edges */
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 18%,
    black 82%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 18%,
    black 82%,
    transparent 100%
  );
}

/* Scrolling track */
.ticker-track {
  display: flex;
  flex-direction: column;
  will-change: transform;
  animation: ticker-scroll linear infinite;
  -webkit-animation: ticker-scroll linear infinite;
  -webkit-animation-duration: var(--ticker-duration, 18s);
  animation-duration: var(--ticker-duration, 18s);
}

/* Pause on hover */
#awards-ticker:hover .ticker-track {
  -webkit-animation-play-state: paused;
  animation-play-state: paused;
}

@-webkit-keyframes ticker-scroll {
  0% {
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
  100% {
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
  }
}
@keyframes ticker-scroll {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50%);
  }
}

/* Individual award item */
.ticker-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-left: 2px solid transparent;
  transition:
    border-color 0.2s,
    background 0.2s;
  border-radius: 0.5rem;
  margin-bottom: 0.25rem;
  flex-shrink: 0;
}
.ticker-item:hover {
  border-left-color: #1e3a5f;
  background: rgba(30, 58, 95, 0.04);
}

.ticker-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.ticker-body {
  flex: 1;
  min-width: 0;
}

.ticker-award {
  font-size: 1rem;
  color: #1a1a2e;
  line-height: 1.3;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticker-org {
  font-size: 0.75rem;
  color: #888;
  letter-spacing: 0.03em;
}

.ticker-year {
  font-size: 0.7rem;
  color: #bbb;
  margin-left: auto;
  flex-shrink: 0;
  padding-top: 3px;
}

/* Section label */
.ticker-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 0.75rem;
}
