/* Main Stylesheet - Sandro Siefert Portfolio */
/* All styles combined for optimal loading performance */

/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */

:root {
  /* ===== COLORS ===== */
  /* Minimal palette - black, white, subtle grays */
  --color-black: #1a1a1a;
  --color-white: #ffffff;
  --color-gray-50: #fafafa;
  --color-gray-100: #f5f5f5;
  --color-gray-200: #e5e5e5;
  --color-gray-300: #d4d4d4;
  --color-gray-400: #a3a3a3;
  --color-gray-500: #737373;
  --color-gray-600: #525252;
  --color-gray-700: #404040;
  --color-gray-800: #262626;
  --color-gray-900: #171717;

  /* Semantic colors */
  --color-text: var(--color-gray-600);
  --color-text-heading: var(--color-black);
  --color-text-muted: var(--color-gray-500);
  --color-text-light: var(--color-gray-400);
  --color-background: var(--color-white);
  --color-background-alt: var(--color-gray-50);
  --color-border: var(--color-gray-200);
  --color-link: var(--color-black);
  --color-link-hover: var(--color-gray-600);

  /* ===== TYPOGRAPHY ===== */
  /* Font Stack - Titillium Web for main text */
  --font-sans: "Titillium Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, Cambria, "Times New Roman", Times, serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, monospace;

  /* Type Scale - Classic modular scale 1.25 */
  --text-xs: 0.64rem;     /* 10.24px */
  --text-sm: 0.8rem;      /* 12.8px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 1.875rem;   /* 30px */
  --text-4xl: 2.25rem;    /* 36px */
  --text-5xl: 3rem;       /* 48px */

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* ===== SPACING ===== */
  /* Spacing scale - 4px base */
  --space-0: 0;
  --space-1: 0.25rem;     /* 4px */
  --space-2: 0.5rem;      /* 8px */
  --space-3: 0.75rem;     /* 12px */
  --space-4: 1rem;        /* 16px */
  --space-5: 1.25rem;     /* 20px */
  --space-6: 1.5rem;      /* 24px */
  --space-8: 2rem;        /* 32px */
  --space-10: 2.5rem;     /* 40px */
  --space-12: 3rem;       /* 48px */
  --space-16: 4rem;       /* 64px */
  --space-20: 5rem;       /* 80px */
  --space-24: 6rem;       /* 96px */
  --space-32: 8rem;       /* 128px */

  /* ===== LAYOUT ===== */
  --max-width-content: 720px;
  --max-width-wide: 1000px;
  --max-width-full: 1200px;
  
  /* Container padding */
  --container-padding: var(--space-6);
  --container-padding-lg: var(--space-12);

  /* ===== BORDERS ===== */
  --border-width: 1px;
  --border-width-2: 2px;
  --border-radius-sm: 0.125rem;
  --border-radius: 0.25rem;
  --border-radius-md: 0.375rem;
  --border-radius-lg: 0.5rem;

  /* ===== SHADOWS ===== */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* ===== TRANSITIONS ===== */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* ===== Z-INDEX ===== */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
}

/* Responsive adjustments */
@media (min-width: 768px) {
  :root {
    --container-padding: var(--space-8);
  }
}

@media (min-width: 1024px) {
  :root {
    --container-padding: var(--space-12);
  }
}

/* ==========================================================================
   CSS RESET
   ========================================================================== */

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin and padding */
* {
  margin: 0;
  padding: 0;
}

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Remove default list styles */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
html,
body {
  min-height: 100%;
}

body {
  line-height: var(--leading-normal, 1.5);
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

/* Make images easier to work with */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Remove button styles */
button {
  background: none;
  border: none;
  cursor: pointer;
}

/* Remove fieldset styles */
fieldset {
  border: none;
}

/* Ensure hidden elements are hidden */
[hidden] {
  display: none !important;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

/* ===== DOCUMENT ===== */
html {
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-light);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  background-color: var(--color-background);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-normal);
  line-height: var(--leading-tight);
  color: var(--color-text-heading);
  margin-bottom: var(--space-4);
}

h1 {
  font-size: var(--text-3xl);
  letter-spacing: var(--tracking-tight);
}

h2 {
  font-size: var(--text-2xl);
}

h3 {
  font-size: var(--text-xl);
}

h4 {
  font-size: var(--text-lg);
}

h5, h6 {
  font-size: var(--text-base);
}

p {
  margin-bottom: var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}

/* ===== LINKS ===== */
a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover,
a:focus {
  color: var(--color-link-hover);
}

/* ===== LISTS ===== */
ul, ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

li {
  margin-bottom: var(--space-2);
}

li:last-child {
  margin-bottom: 0;
}

/* ===== IMAGES ===== */
img {
  height: auto;
}

figure {
  margin-bottom: var(--space-6);
}

figcaption {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

/* ===== BLOCKQUOTE ===== */
blockquote {
  border-left: var(--border-width-2) solid var(--color-border);
  padding-left: var(--space-4);
  margin: var(--space-6) 0;
  font-style: italic;
  color: var(--color-text-muted);
}

/* ===== CODE ===== */
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background-color: var(--color-gray-100);
  padding: 0.125em 0.25em;
  border-radius: var(--border-radius-sm);
}

pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background-color: var(--color-gray-100);
  padding: var(--space-4);
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin-bottom: var(--space-4);
}

pre code {
  background: none;
  padding: 0;
}

/* ===== HORIZONTAL RULE ===== */
hr {
  border: none;
  border-top: var(--border-width) solid var(--color-border);
  margin: var(--space-8) 0;
}

/* ===== TABLES ===== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-6);
}

th, td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: var(--border-width) solid var(--color-border);
}

th {
  font-weight: var(--font-medium);
  color: var(--color-text-heading);
}

/* ===== SELECTION ===== */
::selection {
  background-color: var(--color-black);
  color: var(--color-white);
}

/* ===== FOCUS STYLES ===== */
:focus-visible {
  outline: 2px solid var(--color-black);
  outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  @page {
    margin: 2cm;
  }
}

/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: var(--max-width-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container--narrow {
  max-width: var(--max-width-content);
}

.container--wide {
  max-width: var(--max-width-full);
}

/* ===== PAGE LAYOUT ===== */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page__main {
  flex: 1;
  padding-top: var(--space-12);
  padding-bottom: var(--space-16);
}

/* ===== SECTION ===== */
.section {
  margin-bottom: var(--space-16);
}

.section:last-child {
  margin-bottom: 0;
}

.section__title {
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  color: var(--color-text-heading);
  margin-bottom: var(--space-6);
  text-transform: capitalize;
}

/* ===== TWO COLUMN LAYOUT ===== */
.two-column {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .two-column {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: start;
  }

  .two-column--reverse {
    direction: rtl;
  }

  .two-column--reverse > * {
    direction: ltr;
  }
}

/* ===== GRID ===== */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ===== FLEX UTILITIES ===== */
.flex {
  display: flex;
}

.flex--center {
  align-items: center;
  justify-content: center;
}

.flex--between {
  align-items: center;
  justify-content: space-between;
}

.flex--column {
  flex-direction: column;
}

.flex--wrap {
  flex-wrap: wrap;
}

.flex--gap-2 {
  gap: var(--space-2);
}

.flex--gap-4 {
  gap: var(--space-4);
}

.flex--gap-6 {
  gap: var(--space-6);
}

/* ===== SPACING UTILITIES ===== */
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }

.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.py-12 { padding-top: var(--space-12); padding-bottom: var(--space-12); }

/* ===== TEXT UTILITIES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }

.text-muted { color: var(--color-text-muted); }
.text-light { color: var(--color-text-light); }

.font-normal { font-weight: var(--font-normal); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }

/* ===== VISIBILITY ===== */
.sr-only,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 767px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .hide-desktop {
    display: none !important;
  }
}

/* ==========================================================================
   COMPONENTS
   ========================================================================== */

/* ===== TOPBAR ===== */
.topbar {
  padding: var(--space-12) 0 var(--space-4) 0;
  border-bottom: none;
  /* Outer margins increased by 400% - matching page-wrapper */
  margin-left: 96px;
  margin-right: 96px;
}

/* Tablet topbar */
@media (max-width: 1024px) {
  .topbar {
    margin-left: 48px;
    margin-right: 48px;
    padding: var(--space-8) 0 var(--space-4) 0;
  }
  
  .topbar__brand {
    padding-left: 40px;
  }
}

/* Mobile topbar */
@media (max-width: 767px) {
  .topbar {
    margin-left: var(--space-4);
    margin-right: var(--space-4);
    padding: var(--space-6) 0 var(--space-3) 0;
  }
  
  .topbar__brand {
    padding-left: var(--space-4);
  }
  
  .topbar__logo {
    display: none;
  }
  
  .topbar__name {
    font-size: var(--text-sm);
  }
}

/* Small mobile topbar */
@media (max-width: 480px) {
  .topbar {
    margin-left: var(--space-2);
    margin-right: var(--space-2);
    padding: var(--space-4) 0 var(--space-2) 0;
  }
  
  .topbar__brand {
    padding-left: var(--space-2);
  }
  
  .topbar__logo {
    display: none;
  }
  
  .topbar__name {
    font-size: var(--text-xs);
  }
}

.topbar .container {
  padding-left: 0;
  padding-right: 0;
  max-width: none;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  text-decoration: none;
  color: var(--color-text-heading);
  /* Logo at far left edge, name aligns with sidebar menu - matches sidebar left padding */
  padding-left: 80px;
}

.topbar__logo {
  display: block;
  width: 40px;
  height: auto;
  flex-shrink: 0;
}

/* Hide logo on mobile - placed after base styles for proper cascade */
@media (max-width: 767px) {
  .topbar__logo {
    display: none !important;
  }
}

.topbar__name {
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  letter-spacing: 0.02em;
}

.topbar__lang {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.lang-switch {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.lang-switch:hover,
.lang-switch:focus {
  color: var(--color-text-heading);
}

.lang-switch--active {
  color: var(--color-text-heading);
  font-weight: var(--font-medium);
}

.lang-divider {
  color: var(--color-text-light);
  font-size: var(--text-sm);
}

/* ===== PAGE WRAPPER ===== */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 60px);
  /* Outer margins increased by 400% - from ~24px to ~96px */
  margin-left: 96px;
  margin-right: 96px;
}

/* ===== PAGE LAYOUT WITH SIDEBAR ===== */
.page-layout {
  display: flex;
  flex: 1;
}

.sidebar {
  width: 280px;
  flex-shrink: 0;
  padding: 32px 80px;
  border-right: none;
  position: sticky;
  top: 32px;
  align-self: flex-start;
  height: fit-content;
}

.sidebar-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.sidebar-nav__link {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
  display: block;
}

.sidebar-nav__link:hover,
.sidebar-nav__link:focus {
  color: var(--color-text-heading);
}

.sidebar-nav__link--active {
  color: var(--color-text-heading);
}

.main-content {
  flex: 1;
  padding: 32px 48px;
  max-width: calc(100% - 280px);
}

/* Tablet: Reduced margins and sidebar */
@media (max-width: 1024px) {
  .page-wrapper {
    margin-left: 48px;
    margin-right: 48px;
  }
  
  .sidebar {
    width: 220px;
    padding: 32px 40px;
  }
  
  .main-content {
    max-width: calc(100% - 220px);
    padding: 32px 32px;
  }
}

/* Mobile: Sidebar becomes horizontal menu */
@media (max-width: 767px) {
  .page-wrapper {
    margin-left: var(--space-4);
    margin-right: var(--space-4);
  }
  
  .page-layout {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: none;
    padding: var(--space-4) var(--space-6);
    position: static; /* Remove sticky on mobile - becomes horizontal nav */
    top: auto;
  }
  
  .sidebar-nav__list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-4);
  }
  
  .sidebar-nav__link {
    font-size: var(--text-sm);
  }
  
  .main-content {
    max-width: 100%;
    padding: var(--space-4) var(--space-4);
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .page-wrapper {
    margin-left: var(--space-2);
    margin-right: var(--space-2);
  }
  
  .sidebar {
    padding: var(--space-3) var(--space-4);
  }
  
  .sidebar-nav__list {
    gap: var(--space-3);
  }
  
  .sidebar-nav__link {
    font-size: var(--text-xs);
  }
  
  .main-content {
    padding: var(--space-3) var(--space-3);
  }
}

/* ===== OLD HEADER (kept for reference) ===== */
.header {
  padding: var(--space-6) 0;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text-heading);
}

.header__logo {
  display: block;
  width: 40px;
  height: auto;
  flex-shrink: 0;
}

.header__name {
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  letter-spacing: 0.02em;
}

/* ===== NAVIGATION ===== */
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.nav__link:hover,
.nav__link:focus,
.nav__link--active {
  color: var(--color-text-heading);
}

.nav__lang {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  text-decoration: none;
  padding-left: var(--space-4);
  border-left: var(--border-width) solid var(--color-border);
  transition: color var(--transition-fast);
}

.nav__lang:hover,
.nav__lang:focus {
  color: var(--color-text-heading);
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  width: 24px;
  height: 24px;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle__line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text-heading);
  transition: transform var(--transition-fast);
}

@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

  .nav__list {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-8);
    background-color: var(--color-background);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
    z-index: var(--z-modal);
  }

  .nav__list.is-open {
    opacity: 1;
    visibility: visible;
  }

  .nav__link {
    font-size: var(--text-xl);
  }

  .nav__lang {
    position: fixed;
    top: var(--space-6);
    right: var(--space-6);
    border: none;
    padding: 0;
    z-index: calc(var(--z-modal) + 1);
  }
}

/* ===== FOOTER ===== */
.footer {
  padding: var(--space-6) 48px;
  border-top: var(--border-width) solid var(--color-border);
  margin-top: auto;
  margin-left: 280px;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: flex-start;
}

@media (min-width: 768px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer__contact {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.footer__divider {
  color: var(--color-text-light);
  font-size: var(--text-sm);
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer__link:hover,
.footer__link:focus {
  color: var(--color-text-heading);
}

.footer__copyright {
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

/* Tablet footer */
@media (max-width: 1024px) {
  .footer {
    margin-left: 220px;
    padding: var(--space-5) 32px;
  }
}

/* Mobile footer */
@media (max-width: 767px) {
  .footer {
    margin-left: 0;
    padding: var(--space-4) var(--space-4);
  }
  
  .footer__contact {
    flex-wrap: wrap;
  }
  
  .footer__link,
  .footer__copyright {
    font-size: var(--text-xs);
  }
}

/* Small mobile footer */
@media (max-width: 480px) {
  .footer {
    padding: var(--space-3) var(--space-3);
  }
  
  .footer__inner {
    gap: var(--space-2);
  }
}

/* ===== LANDING PAGE ===== */
.landing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-8);
  background-color: var(--color-white);
}

.landing__logo {
  width: 221px;
  height: auto;
  cursor: pointer;
  transition: transform var(--transition-fast), opacity 0.6s ease-out;
  transform-origin: center center;
}

.landing__logo:hover {
  transform: scale(1.02);
}

.landing__logo:active,
.landing__logo.is-pressed {
  transform: scale(0.95);
}

.landing__logo.is-dissolving {
  opacity: 0;
  transform: scale(1.1);
  pointer-events: none;
}

/* Dissolve animation for the entire landing page */
.landing.is-transitioning {
  animation: fadeOut 0.6s ease-out forwards;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@media (min-width: 768px) {
  .landing__logo {
    width: 316px;
  }
}

@media (min-width: 1024px) {
  .landing__logo {
    width: 395px;
  }
}

/* ===== PAGE HEADER ===== */
.page-header {
  margin-bottom: var(--space-8);
}

.page-header__title {
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  color: var(--color-text-heading);
  margin-bottom: 0;
}

/* ===== ABOUT PAGE ===== */
.about__content {
  max-width: 520px;
}

.about__text {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}

.about__text p {
  margin-bottom: var(--space-4);
}

.about__text em {
  font-style: italic;
}

.about__image {
  width: 100%;
  max-width: 400px;
}

.about__image img {
  width: 100%;
  height: auto;
  filter: grayscale(100%);
}

/* ===== CV PAGE ===== */
.cv-section {
  margin-bottom: var(--space-10);
}

.cv-section:last-child {
  margin-bottom: 0;
}

.cv-section__title {
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  color: var(--color-text-heading);
  margin-bottom: var(--space-4);
}

.cv-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cv-item {
  margin-bottom: var(--space-3);
  color: var(--color-text);
  line-height: var(--leading-normal);
  padding: var(--space-2) var(--space-3);
  margin-left: calc(-1 * var(--space-3));
  margin-right: calc(-1 * var(--space-3));
  border-radius: 4px;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}

.cv-item:hover {
  background-color: var(--color-background-alt, #f8f8f8);
}

.cv-item:last-child {
  margin-bottom: 0;
}

.cv-item--current {
  color: var(--color-text-heading);
}

.cv-item__title {
  display: inline;
}

.cv-item__location {
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

.cv-item:hover .cv-item__location {
  color: var(--color-text);
}

/* ===== AWARDS PAGE ===== */
.awards-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.award-item {
  margin-bottom: var(--space-3);
  color: var(--color-text);
  line-height: var(--leading-normal);
  padding: var(--space-2) var(--space-3);
  margin-left: calc(-1 * var(--space-3));
  margin-right: calc(-1 * var(--space-3));
  border-radius: 4px;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}

.award-item:hover {
  background-color: var(--color-background-alt, #f8f8f8);
}

.award-item:last-child {
  margin-bottom: 0;
}

/* ===== PUBLICATIONS PAGE ===== */
.publication {
  display: grid;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
  .publication {
    grid-template-columns: 1fr auto;
    gap: var(--space-8);
  }
}

.publication:last-child {
  margin-bottom: 0;
}

.publication__text {
  color: var(--color-text);
  line-height: var(--leading-relaxed);
}

.publication__title {
  font-weight: var(--font-medium);
}

.publication__image {
  width: 120px;
  flex-shrink: 0;
}

.publication__image img {
  width: 100%;
  height: auto;
  box-shadow: var(--shadow-md);
}

/* ===== PROJECTS PAGE ===== */
.projects-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.project-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.project-card__image {
  aspect-ratio: 4/3;
  overflow: hidden;
  margin-bottom: var(--space-3);
  background-color: var(--color-gray-100);
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card:hover .project-card__image img {
  transform: scale(1.05);
}

.project-card__title {
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  color: var(--color-text-heading);
  margin-bottom: var(--space-1);
}

.project-card__meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ===== PROJECT DETAIL ===== */
.project-header {
  margin-bottom: var(--space-8);
}

.project-header__title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-2);
}

.project-header__meta {
  color: var(--color-text-muted);
}

.project-gallery {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.project-gallery img {
  width: 100%;
  height: auto;
}

.project-content {
  max-width: var(--max-width-content);
}

/* ===== PROJECT DETAIL PAGE ===== */
.project-detail {
  max-width: 900px;
}

.project-detail__back {
  display: inline-block;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  margin-bottom: var(--space-6);
  transition: color var(--transition-fast);
}

.project-detail__back:hover {
  color: var(--color-text-heading);
}

/* Project Abstract */
.project-abstract {
  margin-bottom: var(--space-8);
  max-width: 800px;
}

.project-abstract p {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-body);
  margin-bottom: var(--space-4);
}

.project-abstract p:last-child {
  margin-bottom: 0;
}

/* Project Credits */
.project-credits {
  margin-bottom: var(--space-10);
  padding: var(--space-6) 0;
  border-top: var(--border-width) solid var(--color-border);
  border-bottom: var(--border-width) solid var(--color-border);
}

.project-credits__title {
  font-size: var(--text-lg);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-4);
  color: var(--color-text-heading);
}

.project-credits__list {
  display: grid;
  gap: var(--space-3);
}

.project-credits__item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--space-4);
}

.project-credits__role {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.project-credits__name {
  font-size: var(--text-sm);
  color: var(--color-text-body);
}

/* Project Gallery */
.project-gallery {
  margin-top: var(--space-8);
}

.project-gallery__grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.project-gallery__item {
  margin: 0;
}

.project-gallery__image {
  width: 100%;
  height: auto;
  display: block;
}

/* Video Embed */
.project-gallery__item--video {
  width: 100%;
}

.video-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-placeholder {
  background-color: var(--color-gray-100);
  padding: var(--space-10);
  text-align: center;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-placeholder p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* Local Video */
.video-local {
  width: 100%;
}

.video-local video,
.project-gallery__video {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
}

/* Project Card Enhancements */
.project-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.project-card__image-wrapper {
  aspect-ratio: 4/3;
  overflow: hidden;
  margin-bottom: var(--space-3);
  background-color: var(--color-gray-100);
}

.project-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card__link:hover .project-card__image {
  transform: scale(1.05);
}

.project-card__content {
  padding: var(--space-2) 0;
}

.project-card__description {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  margin-top: var(--space-2);
}

/* Tablet responsive adjustments */
@media (max-width: 1024px) {
  .project-header__title {
    font-size: var(--text-3xl);
  }
  
  .project-abstract {
    max-width: 100%;
  }
  
  .project-credits__item {
    grid-template-columns: 140px 1fr;
  }
}

/* Mobile responsive adjustments */
@media (max-width: 767px) {
  .project-header {
    margin-bottom: var(--space-4);
  }
  
  .project-header__title {
    font-size: var(--text-2xl);
  }
  
  .project-header__meta {
    font-size: var(--text-sm);
  }
  
  .project-abstract {
    margin-bottom: var(--space-6);
  }
  
  .project-abstract p {
    font-size: var(--text-sm);
  }
  
  .project-credits {
    margin-bottom: var(--space-6);
    padding: var(--space-4) 0;
  }
  
  .project-credits__title {
    font-size: var(--text-base);
  }
  
  .project-credits__item {
    grid-template-columns: 1fr;
    gap: var(--space-1);
  }
  
  .project-credits__role,
  .project-credits__name {
    font-size: var(--text-xs);
  }
  
  .project-gallery {
    margin-top: var(--space-4);
  }
  
  .project-gallery__grid {
    gap: var(--space-4);
  }
  
  .project-detail__back {
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
  }
}

/* Small mobile responsive adjustments */
@media (max-width: 480px) {
  .project-header__title {
    font-size: var(--text-xl);
  }
  
  .project-gallery__grid {
    gap: var(--space-3);
  }
}

/* ==========================================================================
   Lightbox
   ========================================================================== */

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.lightbox--active {
  opacity: 1;
  visibility: visible;
}

.lightbox__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  color: var(--color-white);
  font-size: 2.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-base), transform var(--transition-base);
  z-index: 1001;
  line-height: 1;
}

.lightbox__close:hover {
  opacity: 0.7;
  transform: scale(1.1);
}

.lightbox__content {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

/* Lightbox trigger button styling */
.project-card__lightbox-trigger {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
  width: 100%;
}

.project-card__lightbox-trigger:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Responsive lightbox */
@media (max-width: 767px) {
  .lightbox__close {
    top: var(--space-2);
    right: var(--space-2);
    width: 40px;
    height: 40px;
    font-size: 2rem;
  }
  
  .lightbox__content {
    max-width: 95vw;
    max-height: 85vh;
  }
}
