/* Font Face Declarations */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(../fonts/inter-300.ttf) format('truetype');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/inter-400.ttf) format('truetype');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/inter-500.ttf) format('truetype');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/inter-600.ttf) format('truetype');
}

@font-face {
  font-family: 'Libre Caslon Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/libre-caslon-text-400.ttf) format('truetype');
}

@font-face {
  font-family: 'Libre Caslon Text';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/libre-caslon-text-400-italic.ttf) format('truetype');
}

/* Custom Theme Colors */
:root {
  --surface: #f9f9f9;
  --background: #f9f9f9;
  --on-background: #1a1c1c;
  --on-surface: #1a1c1c;
  --primary: #000000;
  --on-primary: #ffffff;
  --primary-container: #1b1b1b;
  --on-primary-container: #848484;
  --primary-fixed: #e2e2e2;
  --primary-fixed-dim: #c6c6c6;
  --on-primary-fixed: #1b1b1b;
  --on-primary-fixed-variant: #474747;
  --secondary: #5e5e5e;
  --on-secondary: #ffffff;
  --secondary-container: #e1dfdf;
  --on-secondary-container: #626262;
  --secondary-fixed: #e4e2e2;
  --secondary-fixed-dim: #c7c6c6;
  --on-secondary-fixed: #1b1c1c;
  --on-secondary-fixed-variant: #464747;
  --tertiary: #000000;
  --on-tertiary: #ffffff;
  --tertiary-container: #002109;
  --on-tertiary-container: #009844;
  --tertiary-fixed: #6bff8f;
  --tertiary-fixed-dim: #4ae176;
  --on-tertiary-fixed: #002109;
  --on-tertiary-fixed-variant: #005321;
  --error: #ba1a1a;
  --on-error: #ffffff;
  --error-container: #ffdad6;
  --on-error-container: #93000a;
  --surface-dim: #dadada;
  --surface-bright: #f9f9f9;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #f3f3f3;
  --surface-container: #eeeeee;
  --surface-container-high: #e8e8e8;
  --surface-container-highest: #e2e2e2;
  --on-surface-variant: #4c4546;
  --outline: #7e7576;
  --outline-variant: #cfc4c5;
  --inverse-surface: #2f3131;
  --inverse-on-surface: #f1f1f1;
  --inverse-primary: #c6c6c6;
  --surface-tint: #5e5e5e;
  --surface-variant: #e2e2e2;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--surface);
  color: var(--on-background);
  -webkit-font-smoothing: antialiased;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Libre Caslon Text", serif;
  font-weight: 400;
}

h2 {
  margin-bottom: 0.25rem;
}

p, a, span {
  font-family: "Inter", sans-serif;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

/* Scrollbar Utilities */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scroll-mask {
  mask-image: linear-gradient(to right, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
}

/* Selection Styling */
::selection {
  background-color: var(--primary-fixed);
  color: var(--primary);
}

/* Main Layout */
main {
  padding-bottom: 8rem;
}

/* Typography */
.font-headline {
  font-family: "Libre Caslon Text", serif;
}

.font-body,
.font-label {
  font-family: "Inter", sans-serif;
}

.text-xs {
  font-size: 0.75rem;
}

.text-sm {
  font-size: 0.875rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.875rem;
}

.text-\[10px\] {
  font-size: 10px;
}

.leading-relaxed {
  line-height: 1.625;
}

.leading-snug {
  line-height: 1.375;
}

.leading-tight {
  line-height: 1.25;
}

.tracking-tighter {
  letter-spacing: -0.05em;
}

.tracking-widest {
  letter-spacing: 0.1em;
}

.tracking-\[0\.15em\],
.text-\[0\.15em\] {
  letter-spacing: 0.15em;
}

.tracking-\[0\.2em\],
.text-\[0\.2em\] {
  letter-spacing: 0.2em;
}

.uppercase {
  text-transform: uppercase;
}

ul > li:before {
  content: "– ";
}

ul > li {
  padding-left: 1rem;
  text-indent: -0.75rem;
  list-style: none;
}

li {
  margin-bottom: 0.125rem;
}

/* Color Utilities */
.text-primary {
  color: var(--primary);
}

.text-secondary {
  color: var(--secondary);
}

.text-on-secondary-fixed {
  color: var(--on-secondary-fixed);
}

.bg-surface-container-low {
  background-color: var(--surface-container-low);
}

.bg-surface-container-lowest {
  background-color: var(--surface-container-lowest);
}

.bg-background {
  background-color: var(--background);
}

.bg-gradient-to-l {
  background-image: linear-gradient(to left, var(--background), transparent);
}

.hover\:text-secondary:hover {
  color: var(--secondary);
}

.hover\:text-primary:hover {
  color: var(--primary);
}

.decoration-outline-variant {
  text-decoration-color: var(--outline-variant);
}

.decoration-outline-variant\/30 {
  text-decoration-color: rgba(207, 196, 197, 0.3);
}

/* Transitions */
.transition-colors {
  transition-property: color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* Spacing Utilities */
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-12 {
  margin-bottom: 3rem;
}

.mb-24 {
  margin-bottom: 6rem;
}

.mb-32 {
  margin-bottom: 8rem;
}

.mb-40 {
  margin-bottom: 10rem;
}

.mb-60 {
  margin-bottom: 15rem;
}

.mt-24 {
  margin-top: 6rem;
}

.mt-80 {
  margin-top: 20rem;
}

.mr-6 {
  margin-right: 1.5rem;
}

.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.pb-4 {
  padding-bottom: 1rem;
}

.pb-8 {
  padding-bottom: 2rem;
}

.pb-32 {
  padding-bottom: 8rem;
}

.pr-12 {
  padding-right: 3rem;
}

.pt-20 {
  padding-top: 5rem;
}

.pt-32 {
  padding-top: 8rem;
}

.pt-40 {
  padding-top: 10rem;
}

.pt-64 {
  padding-top: 16rem;
}

/* Width Utilities */
.w-full {
  width: 100%;
}

.w-16 {
  width: 4rem;
}

.w-32 {
  width: 8rem;
}

.w-64 {
  width: 16rem;
}

/* Height Utilities */
.h-full {
  height: 100%;
}

/* Aspect Ratio */
.aspect-square {
  aspect-ratio: 1 / 1;
}

.aspect-\[4\/5\] {
  aspect-ratio: 4 / 5;
}

.aspect-\[3\/2\] {
  aspect-ratio: 3 / 2;
}

/* Display and Layout */
.block {
  display: block;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-nowrap {
  flex-wrap: nowrap;
}

.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: 1fr;
}

.items-start {
  align-items: flex-start;
}

.justify-between {
  justify-content: space-between;
}

.gap-12 {
  gap: 3rem;
}

.gap-x-12 {
  column-gap: 3rem;
}

.gap-y-24 {
  row-gap: 6rem;
}

.space-y-6 > * + * {
  margin-top: 1.5rem;
}

/* Sizing and Flex */
.shrink-0 {
  flex-shrink: 0;
}

/* Max Width Utilities */
.max-w-md {
  max-width: 28rem;
}

.max-w-lg {
  max-width: 32rem;
}

.max-w-2xl {
  max-width: 42rem;
}

.max-w-4xl {
  max-width: 56rem;
}

.max-w-5xl {
  max-width: 64rem;
}

/* Position Utilities */
.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.top-0 {
  top: 0;
}

.right-0 {
  right: 0;
}

/* Overflow Utilities */
.overflow-hidden {
  overflow: hidden;
}

.overflow-x-auto {
  overflow-x: auto;
}

.overflow-y-hidden {
  overflow-y: hidden;
}

/* Border Radius */
.rounded-md {
  border-radius: 0.375rem;
}

.rounded-lg {
  border-radius: 0.5rem;
}

/* Border Utilities */
.border {
  border: 1px solid;
}

.border-t {
  border-top: 1px solid;
}

.border-outline-variant {
  border-color: var(--outline-variant);
}

.border-outline-variant\/10 {
  border-color: rgba(207, 196, 197, 0.1);
}

.border-outline-variant\/20 {
  border-color: rgba(207, 196, 197, 0.2);
}

/* Scroll Utilities */
.snap-x {
  scroll-snap-type: x mandatory;
}

.snap-mandatory {
  scroll-snap-type: x mandatory;
}

.snap-start {
  scroll-snap-align: start;
}

.scroll-smooth {
  scroll-behavior: smooth;
}

/* Effects */
.backdrop-blur-\[2px\] {
  backdrop-filter: blur(2px);
}

.\[mask-image\:linear-gradient\(to_right\,transparent\,black\)\] {
  mask-image: linear-gradient(to right, transparent, black);
  -webkit-mask-image: linear-gradient(to right, transparent, black);
}

/* Image Styling */
.object-cover {
  object-fit: cover;
}

/* Text Decoration */
.underline {
  text-decoration: underline;
}

.underline-offset-8 {
  text-underline-offset: 0.25rem;
}

/* Opacity and Interaction */
.opacity {
  opacity: 0.1;
}

.pointer-events-none {
  pointer-events: none;
}

.group {
  position: relative;
}

.group:hover .text-secondary {
  color: var(--secondary);
}

/* Light Mode */
html.light {
  color-scheme: light;
}

/* Responsive Design */
@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md\:text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
  }

  .md\:text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }

  .md\:mt-24 {
    margin-top: 6rem;
  }
}

@media (max-width: 767px) {
  .gallery-stagger {
    align-items: stretch;
  }

  .gallery-item--up,
  .gallery-item--down {
    margin-top: 0;
    margin-bottom: 0;
  }

  #experience-scroll {
    gap: 1.5rem !important;
  }
}

/* Gallery Styling */
.gallery-stagger {
  align-items: flex-end;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Scrollable Container */
.scrollable-container {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

#experience-scroll {
  scroll-behavior: smooth;
  cursor: grab;
}

#experience-scroll:active {
  cursor: grabbing;
}

/* Smooth Scroll Preference */
@media (prefers-reduced-motion: no-preference) {
  #experience-scroll {
    scroll-behavior: smooth;
  }
}

/* Language Switcher */
.lang-switch {
            display: flex;
            gap: 12px;
            align-items: center;
        }
        .lang-link {
            cursor: pointer;
            transition: color 0.2s;
        }
        .lang-link.active {
            text-decoration: underline;
            text-decoration-color: currentColor;
            text-underline-offset: 4px;
        }
        .lang-link:not(.active) {
            text-decoration: none;
        }
        .lang-link:not(.active):hover {
            color: var(--md-sys-color-secondary);
        }