:root {
  --bg: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --text: #ededed;
  --text-secondary: #888888;
  --text-tertiary: #555555;
  --accent: #ffffff;
  --border: #222222;
  --border-hover: #333333;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
  --max-width: 720px;
  --max-width-wide: 1080px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  transition: transform var(--transition), opacity var(--transition);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  z-index: 99;
  flex-direction: column;
  gap: 12px;
}

.mobile-menu a {
  font-size: 16px;
  color: var(--text-secondary);
  padding: 8px 0;
}

.mobile-menu.open {
  display: flex;
}

/* Main content */
.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 100px 24px 80px;
}

/* Hero */
.hero {
  padding: 60px 0 80px;
}

.hero-greeting {
  margin-bottom: 16px;
}

.hero-wave {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-title .hero-name {
  background: linear-gradient(135deg, #ffffff 0%, #999999 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: normal;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.hero-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: opacity var(--transition), transform var(--transition);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: var(--bg);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: border-color var(--transition), color var(--transition);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

/* Sections */
.section {
  padding: 60px 0;
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 32px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.section-link {
  font-size: 13px;
  color: var(--text-tertiary);
  transition: color var(--transition);
}

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

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

a.skill-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.skill-card:hover {
  color: inherit;
}

.skill-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), background var(--transition);
}

.skill-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-secondary);
}

.skill-icon {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.skill-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  font-weight: 400;
  margin-bottom: 8px;
}

.skill-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Project Cards */
.projects-preview {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.project-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--bg);
  transition: background var(--transition);
}

.project-card:hover {
  background: var(--bg-secondary);
}

.project-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  font-weight: 400;
  margin-bottom: 4px;
}

.project-card p {
  font-size: 13px;
  color: var(--text-secondary);
}

.project-tags {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.tag {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  color: var(--text-secondary);
}

.project-arrow {
  color: var(--text-tertiary);
  font-size: 18px;
  transition: transform var(--transition);
}

.project-card:hover .project-arrow {
  transform: translateX(4px);
}

/* Page styles */
.page-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.page-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.page-header .section-title {
  margin-bottom: 12px;
}

/* Post page */
.post-page {
  max-width: var(--max-width);
}

.post-header {
  margin-bottom: 48px;
}

.post-header {
  text-align: center;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.post-date {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  display: block;
  margin-bottom: 16px;
}

.post-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.post-description {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 12px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.post-content {
  font-size: 16px;
  line-height: 1.8;
  margin-top: 48px;
}

.post-content p,
.post-content span,
.post-content div,
.post-content a,
.post-content b,
.post-content strong,
.post-content i,
.post-content em,
.post-content li,
.post-content ul,
.post-content ol,
.post-content article {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 16px !important;
  line-height: 1.8 !important;
}

.post-content [style] {
  text-align: left !important;
  padding-left: 0 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: revert !important;
  line-height: 1.3 !important;
}

.post-content code,
.post-content pre,
.post-content pre *,
.post-content code * {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
}

.post-content code {
  background: var(--bg-tertiary);
  padding: 3px 7px;
  border-radius: 4px;
  color: var(--text);
  display: inline;
  word-break: break-word;
}

.post-content img {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
}

.post-content .article,
.post-content .articlecolumn,
.post-content .main {
  all: unset;
  display: block;
}

.post-content br + br {
  display: none;
}

.post-content img[style] {
  width: 100% !important;
  height: auto !important;
  padding: 0 !important;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin: 24px 0;
}

.post-content a {
  color: var(--text) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--text-tertiary);
}

.post-content a:hover {
  text-decoration-color: var(--text);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: 'Playfair Display', Georgia, serif !important;
  margin-top: 40px;
  margin-bottom: 16px;
  font-weight: 400;
  letter-spacing: -0.3px;
}

.post-content h1 { font-size: 32px !important; }
.post-content h2 { font-size: 26px !important; }
.post-content h3 { font-size: 20px !important; }
.post-content h4 { font-size: 18px !important; }

.post-content p {
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.post-content a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-content img {
  border-radius: var(--radius-sm);
  margin: 32px 0;
}

.post-content code {
  font-size: 13px;
  padding: 2px 6px;
  background: var(--bg-tertiary);
  border-radius: 4px;
}

.post-content pre {
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 24px 0;
}

.post-content pre code {
  padding: 0;
  background: none;
}

.post-content blockquote {
  border-left: 2px solid var(--border);
  padding-left: 20px;
  margin: 24px 0;
  color: var(--text-secondary);
  font-style: italic;
}

.post-content ul,
.post-content ol {
  margin: 16px 0;
  padding-left: 24px;
  color: var(--text-secondary);
}

.post-content li {
  margin-bottom: 8px;
}

/* Project page (editorial) */
.project-page-header {
  text-align: center;
  padding: 40px 0 48px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.project-page-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  display: block;
  margin-bottom: 16px;
}

.project-page-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.project-page-description {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

.project-page-content {
  font-size: 16px;
  line-height: 1.8;
}

.project-page-content h1,
.project-page-content h2,
.project-page-content h3,
.project-page-content h4 {
  font-family: 'Playfair Display', Georgia, serif;
  margin-top: 40px;
  margin-bottom: 16px;
  font-weight: 400;
  letter-spacing: -0.3px;
}

.project-page-content h1 { font-size: 32px; }
.project-page-content h2 { font-size: 26px; }
.project-page-content h3 { font-size: 20px; }

.project-page-content p {
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.project-page-content a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-page-content img {
  border-radius: var(--radius);
  margin: 32px 0;
  border: 1px solid var(--border);
}

.project-page-content code {
  font-size: 13px;
  padding: 2px 6px;
  background: var(--bg-tertiary);
  border-radius: 4px;
}

.project-page-content pre {
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 24px 0;
}

.project-page-content pre code {
  padding: 0;
  background: none;
}

.project-page-content blockquote {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 20px;
  border-left: 2px solid var(--border);
  padding-left: 24px;
  margin: 32px 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.project-page-content ul,
.project-page-content ol {
  margin: 16px 0;
  padding-left: 24px;
  color: var(--text-secondary);
}

.project-page-content li {
  margin-bottom: 8px;
}

/* Work page */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  background: var(--bg);
  transition: background var(--transition);
}

.project-item:hover {
  background: var(--bg-secondary);
}

.project-item-info h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  font-weight: 400;
  margin-bottom: 4px;
}

.project-item-info p {
  font-size: 13px;
  color: var(--text-secondary);
}

.project-item-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
  margin-left: 24px;
}

/* Words page */
.posts-list {
  display: flex;
  flex-direction: column;
}

.post-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  transition: opacity var(--transition);
}

.post-item:first-child {
  border-top: 1px solid var(--border);
}

.post-item:hover {
  opacity: 0.7;
}

.post-item-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  font-weight: 400;
}

.post-item-date {
  font-size: 13px;
  color: var(--text-tertiary);
  white-space: nowrap;
  margin-left: 24px;
}

/* Gallery */
.gallery-section {
  margin-bottom: 64px;
}

.gallery-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  font-size: 12px;
  color: white;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-item:hover .gallery-item-caption {
  opacity: 1;
}

/* Videos */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.video-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}

.video-card:hover {
  border-color: var(--border-hover);
}

.video-card iframe {
  width: 100%;
  aspect-ratio: 16/9;
  display: block;
}

.video-card-info {
  padding: 16px;
}

.video-card-info h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 15px;
  font-weight: 400;
  margin-bottom: 4px;
}

.video-card-info p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Shelf */
.book-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.book-item {
  padding: 24px;
  background: var(--bg);
  transition: background var(--transition);
}

.book-item:hover {
  background: var(--bg-secondary);
}

.book-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.book-item h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  font-weight: 400;
}

.book-item-author {
  font-size: 13px;
  color: var(--text-tertiary);
}

.book-item-review {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.book-rating {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 8px;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 32px;
}

.contact-info h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition);
}

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

.contact-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Lightbox */
.lightbox {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: pointer;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 48px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease, transform 0.2s ease;
  padding: 16px;
  line-height: 1;
  user-select: none;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-prev:active,
.lightbox-next:active {
  transform: translateY(-50%) scale(0.9);
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  font-variant-numeric: tabular-nums;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
}

.footer-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-tertiary);
  transition: color var(--transition);
}

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

.footer-copy {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Page load */
body {
  opacity: 0;
  transition: opacity 0.4s ease;
}

body.loaded {
  opacity: 1;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children in grids */
.skills-grid .reveal:nth-child(1) { transition-delay: 0ms; }
.skills-grid .reveal:nth-child(2) { transition-delay: 60ms; }
.skills-grid .reveal:nth-child(3) { transition-delay: 120ms; }
.skills-grid .reveal:nth-child(4) { transition-delay: 180ms; }

.gallery-grid .reveal:nth-child(4n+1) { transition-delay: 0ms; }
.gallery-grid .reveal:nth-child(4n+2) { transition-delay: 50ms; }
.gallery-grid .reveal:nth-child(4n+3) { transition-delay: 100ms; }
.gallery-grid .reveal:nth-child(4n+4) { transition-delay: 150ms; }

/* Hero entrance */
.hero-content {
  animation: heroIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

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

/* Nav scroll effect */
.nav {
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.95);
  border-bottom-color: var(--border-hover);
}

/* Enhanced hover states */
.skill-card {
  transition: border-color var(--transition), background var(--transition), transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.project-card,
.project-item {
  transition: background var(--transition), transform 0.2s ease;
}

.project-card:hover,
.project-item:hover {
  transform: translateX(4px);
}

.contact-link {
  transition: color var(--transition), transform 0.2s ease;
}

.contact-link:hover {
  transform: translateX(4px);
}

/* Video card lift */
.video-card {
  transition: border-color var(--transition), transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* Gallery hover scale */
.gallery-item {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover {
  transform: scale(1.02);
  z-index: 2;
}

/* Button press effect */
.btn-primary:active,
.btn-secondary:active {
  transform: scale(0.97) !important;
}

/* Nav link underline animation */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Page header entrance */
.page-header {
  animation: heroIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s both;
}

/* Post header entrance */
.post-header {
  animation: heroIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s both;
}

/* Project page header entrance */
.project-page-header {
  animation: heroIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s both;
}

/* Lightbox animation */
.lightbox {
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.15s ease;
}

.lightbox.open img {
  transform: scale(1);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

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

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

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

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

  .hero {
    padding: 40px 0 60px;
  }

  .post-item {
    flex-direction: column;
    gap: 4px;
  }

  .post-item-date {
    margin-left: 0;
  }

  .project-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .project-item-meta {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 32px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }
}

/* Syntax highlighting */
.highlight {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-x: auto;
  margin: 24px 0;
  font-size: 13px;
}
