/* ==========================================================================
   Portfolio Stylesheet - Merged & Cleaned
   ========================================================================== */

/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
  --gradient-opacity: 1;
  
  /* Color System */
  --color-primary: #2C2C2C;
  --color-secondary: #949494;
  --color-primary-hover: rgba(44, 44, 44, 0.5);
  --color-white: #fff;
  
  /* Background Colors */
  --bg-light: #f2f2f2;
  --bg-border: #e3e3e3;

  /* Project cards (hover + accents) */
  --project-hover-zoom: 1.008;
  --project-arrow-bg: #FFF6A5;
  --project-arrow-bg-hover: #FFF6A5;
  --project-stroke: #000;
  --project-stroke-gradient: linear-gradient(
    135deg,
    #8FA8FF 0%,
    #6B5CFF 20%,
    #FF6FB1 45%,
    #FF9F3F 70%,
    #FFC86B 100%
  );
  
  /* Typography - Font Sizes */
  --text-xs: 0.75rem;     /* 12px - badges, small labels */
  --text-sm: 0.875rem;    /* 14px - buttons, dates */
  --text-base: 1rem;      /* 16px - body text */
  --text-md: 1.125rem;    /* 18px - large body mobile */
  --text-lg: 1.25rem;     /* 20px - project titles */
  --text-xl: 1.5rem;      /* 24px - h2, sections */
  --text-2xl: 2rem;       /* 32px - footer CTA */
  --text-3xl: 2.5rem;     /* 40px - hero name */
  
  /* Typography - Font Weights */
  --font-light: 350;
  --font-normal: 400;
  --font-medium: 500;
  --font-bold: 700;
  
  /* Typography - Line Heights */
  --leading-tight: 1.3;
  --leading-normal: 1.5;
  
  /* Spacing */
  --space-3xs: .25rem;
  --space-2xs: .5rem;
  --space-xs: .75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2rem;
  --space-xl: 2.5rem;
  --space-2xl: 5rem;
  --space-3xl: 7rem;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
}

body {
  background-color: var(--bg-light);
  color: var(--color-primary);
  font-family: 'Inter', sans-serif;
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Animated Gradient Background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(143, 168, 255, 0.28) 0%,
    rgba(160, 130, 200, 0.25) 10%,
    rgba(107, 92, 255, 0.22) 18%,
    rgba(255, 111, 177, 0.22) 30%,
    rgba(245, 242, 232, 0.35) 42%,
    rgba(255, 159, 63, 0.25) 58%,
    rgba(255, 200, 100, 0.25) 68%,
    rgba(245, 235, 170, 0.28) 78%,
    rgba(160, 130, 200, 0.22) 100%
  );
  z-index: -1;
  background-size: 400% 400%;
  animation: gradientAnimation 30s ease infinite;
  filter: blur(100px);
  opacity: var(--gradient-opacity);
  transition: opacity 0.5s ease-out;
}

@keyframes gradientAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ==========================================================================
   Typography - Base Elements
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-md); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

p {
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  margin: 0;
}

a {
  color: var(--color-primary);
  line-height: var(--leading-tight);
  text-decoration: none;
}

ul, ol {
  padding-left: var(--space-l);
  gap: var(--space-s);
  font-size: var(--text-base);
  line-height: var(--leading-tight);
  flex-direction: column;
  margin: 0;
  display: flex;
}

img {
  vertical-align: middle;
  max-width: 100%;
  display: inline-block;
}

button, [type="button"], [type="reset"] {
  cursor: pointer;
  -webkit-appearance: button;
  appearance: button;
  border: 0;
}

blockquote {
  border-left: 5px solid var(--bg-border);
  margin: 0 0 10px;
  padding: 10px 20px;
  font-size: var(--text-md);
  line-height: var(--leading-normal);
}

figure {
  margin: 0 0 10px;
}

/* ==========================================================================
   Typography - Display Classes
   ========================================================================== */
.display-2xl {
  font-size: var(--text-3xl);
  line-height: var(--leading-normal);
  font-weight: var(--font-bold);
  margin-bottom: 15px;
}

.display-xl {
  font-size: var(--text-xl);
  line-height: var(--leading-tight);
  font-weight: var(--font-medium);
}

.body-l {
  font-size: var(--text-base);
  font-weight: var(--font-light);
  line-height: var(--leading-tight);
}

.body-index-l {
  font-size: var(--text-lg);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--color-primary);
}

/* ==========================================================================
   Layout
   ========================================================================== */
.w-inline-block {
  max-width: 100%;
  display: inline-block;
}

.w-layout-vflex {
  flex-direction: column;
  align-items: flex-start;
  display: flex;
  margin-bottom: 100px;
}

.w-layout-grid {
  grid-row-gap: 16px;
  grid-column-gap: 16px;
  grid-template-rows: auto auto;
  grid-template-columns: 1fr 1fr;
  grid-auto-columns: 1fr;
  display: grid;
}

.w-layout-hflex {
  flex-direction: row;
  align-items: flex-start;
  display: flex;
}

.container {
  padding: 0 var(--space-xl);
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
}

.container.container-nav {
  justify-content: space-between;
  align-items: center;
  display: flex;
}

.container.container-l {
  max-width: 1540px;
}

.container.container-center {
  flex-flow: column;
  justify-content: center;
  align-items: center;
  display: flex;
}

.grid {
  grid-column-gap: var(--space-s);
  grid-row-gap: var(--space-s);
  grid-template-rows: auto;
  grid-template-columns: repeat(12, minmax(.5rem, 1fr));
  width: 100%;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  z-index: 2;
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
  gap: var(--space-2xl);
  background-color: transparent;
  flex-direction: column;
  display: flex;
  position: relative;
}

.section.section-hero {
  background-color: transparent;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 100vh;
  padding-top: 0;
}

/* About page footer spacing: use the same global footer spacing as index.html */

.section.section-projects {
  padding-top: 0;
  padding-bottom: 0;
}

/* Give the sticky story pill room before the footer starts */
.section.section-projects .projects-carousel {
  padding-bottom: var(--space-2xl);
}

/* Projects carousel: remove global container side padding (40px on desktop) so next/prev can peek */
.section.section-projects > .container {
  padding-left: 0;
  padding-right: 0;
  max-width: none;
}

.section.section-hero-project {
  gap: var(--space-2xl);
  background-color: transparent;
  justify-content: flex-start;
  align-items: flex-start;
  padding-top: 0;
  padding-bottom: 0;
}

.section.section-project-images {
  padding-top: 0;
}

.section.section-hero-admin {
  padding-top: 0;
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--bg-border);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.w-nav {
  z-index: 1000;
  position: relative;
}

.nav {
  background-color: transparent;
  align-items: center;
  width: 100%;
  min-height: 6rem;
        display: flex;
  position: relative;
  z-index: 10;
    }

.w-nav-brand {
  float: left;
  color: var(--color-primary);
  text-decoration: none;
  position: relative;
}

.nav-brand {
  color: var(--color-primary);
  font-weight: var(--font-medium);
}

.nav-brand-logo {
  width: 4rem;
}

.w-nav-menu {
  float: right;
  position: relative;
}

.nav-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.nav-logo-v {
  width: 40px;
  height: 40px;
  transition: transform 0.4s ease;
}

.nav-logo-link:hover .nav-logo-v {
  transform: rotate(45deg);
  }

.nav-menu {
  display: flex;
  gap: 3rem;
  margin-left: auto;
}

.nav-menu a[aria-current="page"] {
  text-decoration: line-through;
}

/* ==========================================================================
   Buttons & Links
   ========================================================================== */
.button {
  padding: 0.5rem 0;
  pointer-events: auto;
  color: var(--color-primary);
  font-size: var(--text-sm);
  line-height: var(--leading-tight);
  justify-content: center;
  align-items: center;
  font-weight: var(--font-medium);
  display: flex;
  position: relative;
  transition: color 0.3s ease;
  text-decoration: none;
}

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

.scramble-text {
  display: inline-block;
  min-width: max-content;
}

.button.button-form {
  border-radius: var(--space-3xs);
}

.link {
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--color-secondary);
  padding-bottom: .1em;
  transition: color 0.3s ease;
}

.link:hover {
  color: var(--color-primary-hover);
}

.nav-photo-link svg path,
.nav-photo-link img {
  transition: stroke-width 0.3s ease, opacity 0.3s ease;
}

.button:hover .nav-photo-link img,
.button:hover img.nav-photo-link {
  opacity: 0.5;
  transform: translate(2px, -2px);
}

.nav-photo-link {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.title-m {
  width: 100%;
  max-width: 50rem;
}

.title-s {
  width: 100%;
  max-width: 25rem;
}

.title-xl {
  width: 100%;
  max-width: 40rem;
}

.title-l {
  width: 100%;
  max-width: 45rem;
}

.title-xs {
  width: 100%;
  max-width: 20rem;
}

.hero-heading-wrapper {
  position: relative;
}

.hero-heading-text-wrapper {
  overflow: hidden;
}

.hero-icon {
  width: 4.5rem;
  position: absolute;
  top: -40%;
  bottom: auto;
  left: auto;
  right: 16%;
  transform: rotate(25deg);
}

.hero-link-group {
  margin-top: var(--space-s);
  gap: 16px;
  justify-content: center;
  align-items: center;
  display: flex;
}

/* Avatar */
.avatar-inline {
  border-radius: 18px;
  object-fit: cover;
  vertical-align: middle;
  margin: 0 8px;
  background: #ddd;
  border: none;
  box-shadow: none;
}

/* ==========================================================================
   Social Badges
   ========================================================================== */
.social-badge-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #fbfbfb;
  color: var(--color-primary);
  padding: 8px 16px;
  border-radius: 24px;
  font-size: var(--text-xs);
  font-weight: var(--font-normal);
  transition: opacity 0.3s ease;
  white-space: nowrap;
  opacity: 0.85;
}

.social-badge-link:hover {
  opacity: 0.6;
  cursor: url('../assets/icons/arrow-up-right.svg') 12 0, pointer;
}

.twitter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fbfbfb;
  padding: 8px 16px;
  border-radius: 24px;
  transition: opacity 0.3s ease;
  opacity: 1;
  height: 34.2px;
}

.twitter-badge:hover {
  opacity: 0.6;
  cursor: url('../assets/icons/arrow-up-right.svg') 12 0, pointer;
}

.twitter-badge img {
  transition: none;
  height: 16px;
  width: auto;
  filter: brightness(0) saturate(100%) invert(31%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(95%);
}

/* ==========================================================================
   Project Cards
   ========================================================================== */
.projects-carousel {
  width: 100%;
  position: relative;
}

.projects-track {
  --projects-track-inset: 16px;
  --projects-card-width: min(1248px, calc(100vw - 64px));
  --projects-side-spacer: max(0px, calc((100vw - var(--projects-card-width)) / 2 - var(--projects-track-inset)));

  display: flex;
  flex-direction: row;
  gap: var(--space-l);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding: calc(var(--projects-track-inset) + var(--projects-side-spacer));
  padding: 12px var(--projects-track-inset) 0;
  -webkit-overflow-scrolling: touch;
}

.projects-track.is-animating {
  scroll-snap-type: none;
}

.projects-track::before,
.projects-track::after {
  content: "";
  flex: 0 0 var(--projects-side-spacer);
}

.projects-track::-webkit-scrollbar {
  height: 0;
}

.projects-list-item {
  scroll-snap-align: center;
  /* softer snapping (avoid the hard "lock" feeling) */
  scroll-snap-stop: normal;
  flex: 0 0 auto;
}

/* Card sizing for carousel feel */
.projects-track .project-card {
  width: min(1248px, calc(100vw - 64px));
}

/* Tablet: ensure a clear peek of next/prev cards */
@media screen and (min-width: 768px) and (max-width: 991px) {
  .projects-track {
    --projects-track-inset: 24px;
    --projects-card-width: 92vw;

    padding: 12px var(--projects-track-inset) 0;
    gap: 16px;
  }

  .projects-track .project-card {
    width: 92vw;
  }
}

@media screen and (min-width: 992px) {
  .projects-track {
    --projects-track-inset: 32px;
    --projects-card-width: min(1368px, 80vw);

    padding: 16px var(--projects-track-inset) 0;
    gap: 32px;
  }

  .projects-track .project-card {
    /* Desktop: slightly narrower so adjacent cards always peek */
    width: min(1368px, 80vw);
  }
}

/* Mobile: show a peek of prev/next cards to hint horizontal scroll */
@media screen and (max-width: 767px) {
  .projects-track {
    --projects-track-inset: 18px;
    --projects-card-width: 92vw;

    padding: 12px var(--projects-track-inset) 0;
    gap: 10px;
  }

  .projects-track .project-card {
    width: 92vw;
  }
}

@media screen and (max-width: 479px) {
  .projects-track {
    --projects-track-inset: 16px;
    --projects-card-width: 94vw;

    padding: 12px var(--projects-track-inset) 0;
  }

  .projects-track .project-card {
    width: 94vw;
  }
}

/* Footer spacing */
.section.section-footer {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
}

@media screen and (max-width: 767px) {
  .section.section-footer {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
  }
}

.projects-story {
  display: flex;
  justify-content: center;
  margin-top: var(--space-m);
  position: static;
  pointer-events: none;
}

.story-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 0;
  pointer-events: auto;
}

.story-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(44, 44, 44, 0.22);
  cursor: pointer;
  border: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.story-dot[aria-selected="true"] {
  width: 46px;
  height: 8px;
  background: rgba(44, 44, 44, 0.14);
}

.story-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: rgba(44, 44, 44, 0.92);
}

/* Progress animation is JS-driven (prevents visual glitches on dot switch) */

.story-action {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.story-action svg {
  width: 16px;
  height: 16px;
  fill: rgba(0, 0, 0, 0.78);
}

/* Story pill: responsive sizing */
@media screen and (max-width: 767px) {
  .story-pill {
    gap: 8px;
    padding: 8px 10px;
  }

  .story-dot {
    width: 6px;
    height: 6px;
  }

  .story-dot[aria-selected="true"] {
    width: 36px;
    height: 6px;
  }

  .story-action {
    width: 32px;
    height: 32px;
  }
}

@media screen and (max-width: 479px) {
  .story-pill {
    gap: 7px;
    padding: 7px 9px;
  }

  .story-dot[aria-selected="true"] {
    width: 32px;
  }
}

.project-card {
  position: relative;
  cursor: pointer;
  touch-action: manipulation;
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 22px;
  overflow: hidden;
  width: 100%;
  transform: translateZ(0);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  border: 0;
}

/* (removed) gradient stroke */

.project-card-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 16px;
}

.project-card-image {
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 2;
  position: relative;
  transform: scale(1);
  opacity: 1;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Make project cards taller on desktop (height is driven by aspect-ratio) */
@media screen and (min-width: 992px) {
  .projects-track .project-card-image {
    aspect-ratio: 1.65;
  }
}

.project-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-color: rgba(0, 0, 0, 0);
  color: rgba(255, 255, 255, 0);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: var(--text-xl);
  text-align: center;
  opacity: 1;
  pointer-events: none;
  transition:
    background-color 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    color 0.25s ease;
}

.project-card[data-active="true"]:hover .project-card-overlay {
  background-color: rgba(0, 0, 0, 0.40);
  color: var(--color-white);
  pointer-events: auto;
}

/* Gentle hover zoom (image only) */
.project-card:hover .project-card-image {
  transform: scale(var(--project-hover-zoom));
}

/* Corner badge removed */

.project-card-overlay-text-wrapper {
  overflow: visible;
}

.project-card-overlay-text-inner-wrapper {
  position: relative;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project-card[data-active="true"]:hover .project-card-overlay-text-inner-wrapper {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile/touch: never show hover-reveal overlay content (tap should open instantly) */
@media (hover: none) and (pointer: coarse) {
  .project-card[data-active="true"]:hover .project-card-overlay {
    background-color: rgba(0, 0, 0, 0);
    color: rgba(255, 255, 255, 0);
    pointer-events: none;
  }

  .project-card[data-active="true"]:hover .project-card-overlay-text-inner-wrapper {
    opacity: 0;
    transform: translateY(4px);
  }
}

.project-title {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  margin: 0 0 0.2rem;
}

.project-company {
  font-size: var(--text-base);
}

.project-date {
  font-size: var(--text-sm);
}

.project-platform {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: var(--text-xs);
}

.platform-badge {
  display: inline-block;
  background: rgba(0, 0, 0, 0.5);
  color: var(--color-white);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: var(--text-xs);
  font-weight: var(--font-normal);
  line-height: var(--leading-tight);
}

.project-images-list {
  gap: var(--space-xl);
  flex-flow: column;
  display: flex;
}

/* ==========================================================================
   Modal & Carousel
   ========================================================================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0);
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
  touch-action: pan-y;
}

.modal.show {
  background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
  max-width: 90%;
  max-height: 90vh;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease, opacity 0.15s ease;
  cursor: pointer;
}

.modal-content.show {
  opacity: 1;
  transform: scale(1);
}

.modal-content.fade-out {
  opacity: 0;
}

.carousel-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  width: 28px;
  height: 28px;
  cursor: pointer;
  z-index: 1001;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  border-radius: 50%;
}

.carousel-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 1);
  border-color: rgba(255, 255, 255, 0.3);
}

.carousel-nav svg {
  width: 16px;
  height: 16px;
}

.carousel-prev {
  left: 30px;
}

.carousel-next {
  right: 30px;
}

.carousel-nav.show {
  display: flex;
}

.carousel-indicators {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  gap: 10px;
  z-index: 1001;
}

.carousel-indicators.show {
  display: flex;
}

.carousel-indicator {
  width: 8.5px;
  height: 8.5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.carousel-indicator:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: scale(1.02);
}

.carousel-indicator.active {
  background: white;
  transform: scale(1.105);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer-content {
  gap: var(--space-l);
  flex-flow: column;
  justify-content: center;
  align-items: center;
  display: flex;
  position: relative;
}

.footer-content h2 a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

.footer-content h2 a:hover {
  color: var(--color-primary-hover);
}

.footer-meta {
  gap: var(--space-m);
  flex-flow: column;
  display: flex;
}

/* ==========================================================================
   About Page
   ========================================================================== */
.about-two-columns {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 4rem;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
}

.about-copy p + p {
  margin-top: var(--space-m);
}

.profile-column {
  position: sticky;
  top: 2rem;
}

.profile-image-wrapper {
  margin-top: 0;
}

.profile-image {
  width: 230px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.blink {
  animation: blink-animation 1.25s steps(1) infinite;
}

@keyframes blink-animation {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}

/* Status Dot Animation */
.status-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  vertical-align: middle;
}

.dot-inner {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #dc2626;
  border-radius: 50%;
  z-index: 2;
}

.dot-outer {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid #dc2626;
  border-radius: 50%;
  animation: pulsate-ring 1.5s ease-out infinite;
  opacity: 0;
}

@keyframes pulsate-ring {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

/* ==========================================================================
   Scroll Arrow
   ========================================================================== */
.scroll-down-arrow {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--text-lg);
  animation: gentle-float 3s ease-in-out infinite;
  cursor: default;
}

.scroll-down-arrow span {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #FFF6A5;
  color: var(--color-primary);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: var(--text-base);
  transition: transform 0.2s;
  overflow: visible;
}

.scroll-down-arrow.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes gentle-float {
  0%, 100% { 
    transform: translateY(0);
    opacity: 1;
  }
  50% { 
    transform: translateY(-6px);
    opacity: 0.7;
  }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */
.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 34px;
  height: 34px;
  background-color: #FFF6A5;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-base);
  color: var(--color-primary);
  padding: 0;
  overflow: visible;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.2s ease, visibility 0.3s ease;
  z-index: 100;
}

.scroll-to-top:hover {
  transform: translateY(-2px);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.skip-to-main-content {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 1em;
  background-color: var(--color-white);
  color: var(--color-primary);
  text-decoration: none;
}

.skip-to-main-content:focus {
  left: 50%;
  transform: translateX(-50%);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.w-hidden {
  display: none;
}

.w-dyn-hide, .w-dyn-bind-empty, .w-condition-invisible {
  display: none !important;
}

.w-dyn-empty {
  background-color: rgba(255, 255, 255, 0.3);
  padding: 10px;
}

.icon-m {
  width: 1.5rem;
  max-height: 1.5rem;
}

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

/* ==========================================================================
   Media Queries
   ========================================================================== */

/* Desktop (992px+) */
@media screen and (min-width: 992px) {
  .avatar-inline {
    width: 57px;
    height: 70px;
  }
  
  .display-2xl {
    white-space: nowrap;
  }
  
  .hero-link-group {
    margin-top: 3rem;
  }
}

/* Tablet (768px - 991px) */
@media screen and (min-width: 768px) and (max-width: 991px) {
  .avatar-inline {
    width: 57px;
    height: 70px;
  }
  
  .hero-link-group {
    margin-top: 2.5rem;
  }
}

@media screen and (max-width: 991px) {
  .grid {
    grid-template-columns: repeat(8, minmax(.5rem, 1fr));
  }

  .nav {
    min-height: 5rem;
  }

  .about-two-columns {
    grid-template-columns: 1fr;
    gap: 0;
    display: flex;
    flex-direction: column;
    min-height: auto;
  }

  .profile-column {
    position: static;
    order: -1;
  }

  .profile-image-wrapper {
    margin-top: 0;
    margin-bottom: 2rem;
    text-align: center;
  }

  .profile-image {
    width: 175px;
  }
}

/* Mobile (max 767px) */
@media screen and (max-width: 767px) {
  h1 { font-size: var(--text-xl); }
  h2 { font-size: var(--text-lg); }
  h3 { font-size: var(--text-md); }
  h4 { font-size: var(--text-base); }
  h5 { font-size: var(--text-sm); }

  blockquote {
    padding: var(--space-m);
  }

  .section {
    gap: 7rem;
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .section.section-hero {
    padding-bottom: var(--space-xl);
    min-height: 75vh;
  }

  /* About page on mobile - remove forced height and padding */
  .section.section-hero:has(.about-two-columns) {
    min-height: auto;
    justify-content: flex-start;
    padding-top: 0;
    padding-bottom: 0;
  }
  
  /* Remove large margin on about page mobile */
  .section.section-hero:has(.about-two-columns) .w-layout-vflex {
    margin-bottom: 0;
  }
  
  /* About page footer spacing on mobile: match global footer spacing (XL) */
  .section.section-hero:has(.about-two-columns) + .section-footer {
    margin-top: 0;
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
  }
  
  /* Footer on mobile - all pages */
  .footer-content {
    gap: var(--space-s);
    align-items: center;
  }
  
  .section.section-project-images {
    padding-bottom: var(--space-xl);
  }

  .container {
    padding: 0 var(--space-m);
  }
  
  .container.container-center {
    justify-content: center;
    align-items: center;
  }

  .grid {
    grid-template-columns: repeat(4, minmax(.5rem, 1fr));
  }

  .grid.grid-admin {
    grid-row-gap: 3.5rem;
  }
  
  .display-2xl {
    font-size: var(--text-2xl);
  }

  .display-xl {
    font-size: var(--text-lg);
  }
  
  .body-l, .body-index-l, .rich-text-content p {
    font-size: var(--text-md);
  }

  /* About page: body copy in main content uses body-m on mobile */
  .section.section-hero:has(.about-two-columns) #main-content p {
    font-size: var(--text-md);
  }

  .about-copy p + p {
    margin-top: var(--space-s);
  }

  .nav {
    min-height: 4rem;
  }

  .nav-brand {
    padding-left: 0;
  }

  .w-nav-brand {
    padding-left: 10px;
  }

  .projects-list {
    gap: var(--space-m);
  }

  .hero-icon {
    width: 3.5rem;
    top: -72%;
  }
  
  .hero-link-group {
    margin-top: 1.65rem !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    justify-content: flex-start !important;
  }
  
  .avatar-inline {
    width: 40px !important;
    height: 51px !important;
    margin-left: 4px !important;
    margin-right: 4px !important;
  }
  
  .social-badge-link {
    padding: 4px 10px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
  }
  
  .twitter-badge {
    padding: 0 !important;
    height: 22.3px !important;
    width: 48px !important;
    min-width: auto !important;
    display: inline-flex !important;
  }
  
  .twitter-badge img {
    height: 11px !important;
    width: 11px !important;
  }
  
  .footer-content {
    justify-content: center;
    align-items: center;
  }

  .footer-content h2 {
    white-space: nowrap;
  }

  .project-images-list {
    gap: var(--space-m);
  }

  .fixed-footer {
    padding-top: var(--space-xl);
  }

  .scroll-down-arrow {
    display: none !important;
  }

  .carousel-nav {
    width: 28px;
    height: 28px;
  }

  .carousel-prev {
    left: 10px;
  }

  .carousel-next {
    right: 10px;
  }
}

/* Small Mobile (max 479px) */
@media screen and (max-width: 479px) {
  .section.section-hero {
    min-height: 50vh;
  }

  .section.section-hero-project {
    gap: var(--space-xl);
  }

  .display-2xl {
    font-size: var(--text-xl);
  }

  .button.button-form {
    width: 100%;
  }

  .nav {
    min-height: 4rem;
  }

  .hero-icon {
    width: 3rem;
  }
}
