/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: 'Britti Sans';
  src: url('fonts/BrittiSansTrial-Light-BF6757bfd494951.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: 'Britti Sans';
  src: url('fonts/BrittiSansTrial-Regular-BF6757bfd47ffbf.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Britti Sans';
  src: url('fonts/BrittiSansTrial-Semibold-BF6757bfd443a8a.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'Britti Sans';
  src: url('fonts/BrittiSansTrial-Bold-BF6757bfd4a96ed.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}

:root {
  --text-primary: #1a1a1a;
  --text-secondary: #999;
  --text-muted: #bbb;
  --bg: #ffffff;
  --link-color: #1a1a1a;
  --font-main: 'Britti Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-size-base: 16px;
  --font-size-small: 15px;
  --font-size-xs: 12px;
  --font-size-large: 25px;
  --max-width: 800px;
  --padding-x: 60px;
}

html {
  cursor: crosshair;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  font-weight: 300;
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: var(--link-color);
  text-decoration: none;
  position: relative;
}

a:not(.tab):not(.work-item):not(.back-link):not(.article-item) {
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 3px;
  text-decoration-color: currentColor;
}

a:not(.tab):not(.work-item):not(.back-link):not(.article-item)::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 0.5px;
  background: currentColor;
  transition: width 0.3s ease;
}

a:not(.tab):not(.work-item):not(.back-link):not(.article-item):hover {
  text-decoration: none;
}

a:not(.tab):not(.work-item):not(.back-link):not(.article-item):hover::after {
  width: 100%;
}

a:hover {
  opacity: 1;
}

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

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 800px;
  margin: 0;
  padding: 50px 0 100px 80px;
  overflow: hidden;
}

/* ===== HEADER ===== */
.header {
  margin-bottom: 30px;
}

.header-name {
  font-size: var(--font-size-base);
  font-weight: 300;
  letter-spacing: -0.01em;
}

.header-sub {
  font-size: var(--font-size-small);
  color: var(--text-secondary);
  font-weight: 300;
}

.header-sub a {
  color: var(--text-secondary);
}

/* ===== ZEN ===== */
.zen {
  font-size: var(--font-size-base);
  font-weight: 400;
  margin-bottom: 30px;
  color: var(--text-secondary);
}

/* ===== INTRO ===== */
.intro {
  margin-bottom: 40px;
}

.intro .greeting {
  margin-bottom: 20px;
  font-size: var(--font-size-base);
}

.intro p {
  font-size: var(--font-size-base);
  font-weight: 300;
  margin-bottom: 20px;
  line-height: 1.55;
}

.intro a {
  color: var(--text-primary);
  font-weight: 300;
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 30px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.tab {
  font-size: var(--font-size-base);
  font-weight: 300;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  cursor: pointer;
}

.tab:hover {
  color: var(--text-secondary);
  opacity: 1;
}

.tab.active {
  color: var(--text-primary);
  font-weight: 300;
}

/* ===== TAB CONTENT ===== */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* ===== WORK ===== */
.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.work-item {
  text-decoration: none;
  display: block;
}

.work-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #f5f5f5;
}

.work-image img,
.work-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.work-item:hover {
  opacity: 1;
}

.work-item:hover .work-image img,
.work-item:hover .work-image video {
  transform: scale(1.03);
}

.work-overlay {
  display: none;
}

.work-label-bottom {
  font-size: var(--font-size-base);
  font-weight: 300;
  color: var(--text-primary);
  margin-top: 10px;
  display: block;
}

/* ===== PLAYGROUND ===== */
.playground-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 100px;
  row-gap: 100px;
}

.playground-item {
  overflow: hidden;
  transition: opacity 0.2s;
  cursor: pointer;
}

.playground-item:hover {
  opacity: 1;
}

.playground-image {
  aspect-ratio: 4 / 3;
  background: #f8f8f8;
  overflow: hidden;
}

.playground-image img,
.playground-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.9);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

/* ===== ARTICLES ===== */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-item {
  font-size: 16px;
  font-weight: 300;
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.article-item:hover {
  opacity: 0.6;
}

/* ===== PHOTOS ===== */
.photos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 100px;
  row-gap: 100px;
}

.photo-item {
  overflow: hidden;
  cursor: pointer;
}

.photo-item img {
  width: 100%;
  height: auto;
  transition: opacity 0.2s;
}

.photo-item:hover img {
  opacity: 1;
}

/* ===== MOVIES ===== */
.movies-grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.movie-item {
  display: flex;
  flex-direction: row;
  gap: 20px;
}

.movie-poster {
  width: 120px;
  flex-shrink: 0;
  overflow: hidden;
  background: #f5f5f5;
  display: block;
}

.movie-poster img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.2s;
}

.movie-item:hover .movie-poster img {
  opacity: 1;
}

.movie-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.movie-title {
  font-size: var(--font-size-base);
  font-weight: 400;
  line-height: 1.4;
}

.movie-year {
  font-size: var(--font-size-xs);
  font-weight: 300;
  color: var(--text-secondary);
}

.movie-rating {
  font-size: var(--font-size-xs);
  font-weight: 300;
  color: var(--text-muted);
  margin-top: 4px;
}

.movie-review {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.6;
}

.movies-link {
  margin-top: 40px;
}

.movies-link a {
  font-size: var(--font-size-base);
  font-weight: 300;
  color: var(--text-primary);
}

.empty-state {
  font-size: var(--font-size-base);
  color: var(--text-muted);
  font-weight: 300;
}

/* ===== PRICING ===== */
.pricing-cards {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.pricing-card {
  max-width: 400px;
}

.pricing-type {
  font-size: var(--font-size-base);
  font-weight: 300;
  margin-bottom: 12px;
}

.pricing-amount {
  font-size: var(--font-size-large);
  font-weight: 300;
  margin-bottom: 2px;
}

.pricing-period {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 16px;
}

.pricing-desc {
  font-size: var(--font-size-xs);
  color: var(--text-primary);
  font-weight: 300;
}

/* ===== RESUME ===== */
.resume-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 60px;
}

.resume-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.resume-logo {
  width: 40px;
  height: 40px;
  overflow: hidden;
  flex-shrink: 0;
}

.resume-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.resume-title {
  font-size: var(--font-size-base);
  font-weight: 300;
}

.resume-title a {
  color: var(--text-primary);
}

.resume-date {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  font-weight: 300;
}

.resume-single {
  margin-bottom: 60px;
}

.resume-achievements {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.achievement-title {
  font-size: var(--font-size-base);
  font-weight: 300;
}

.achievement-title a {
  color: var(--text-primary);
}

.achievement-date {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  font-weight: 300;
}

/* ===== INDEX ===== */
.index-list {
  padding: 20px 0;
}

/* ===== ARTICLE PAGE ===== */
.back-link {
  font-size: var(--font-size-base);
  font-weight: 300;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 30px;
}

.back-link:hover {
  opacity: 0.6;
}

.article-title {
  font-size: var(--font-size-base);
  font-weight: 300;
  margin-bottom: 40px;
}

.article-body {
  margin-bottom: 60px;
}

.article-body p {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 24px;
}

.article-images {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.article-images img,
.article-images video {
  width: 100%;
  border-radius: 4px;
  background: #f5f5f5;
}

.article-images-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.article-images-row img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: #f5f5f5;
}

.article-link {
  margin-top: 40px;
}

.article-link a {
  font-size: var(--font-size-base);
  font-weight: 300;
  color: var(--text-primary);
}

/* ===== PROJECT PAGE ===== */
.project-title {
  font-size: var(--font-size-base);
  font-weight: 300;
  margin-bottom: 0;
}

.project-subtitle {
  font-size: var(--font-size-small);
  font-weight: 300;
  color: var(--text-secondary);
  margin-top: 0;
  margin-bottom: 40px;
}

.project-hero {
  margin-bottom: 40px;
}

.project-hero img,
.project-hero video {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.project-body p {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 24px;
}

.project-images {
  margin-top: 60px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.project-images img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: #f5f5f5;
}

.project-images-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.project-images-row img,
.project-images-row video {
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: #f5f5f5;
}

.project-images video {
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: #f5f5f5;
}

/* ===== BOOKS ===== */
.books-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.book-item {
  display: flex;
  flex-direction: column;
}

.book-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #f5f5f5;
  margin-bottom: 10px;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s;
}

.book-item:hover .book-cover img {
  opacity: 1;
}

.book-title {
  font-size: var(--font-size-xs);
  font-weight: 400;
  line-height: 1.4;
}

.book-author {
  font-size: var(--font-size-xs);
  font-weight: 300;
  color: var(--text-secondary);
}

.book-status {
  font-size: var(--font-size-xs);
  font-weight: 300;
  color: var(--text-secondary);
  font-style: italic;
}

.book-rating {
  font-size: var(--font-size-xs);
  font-weight: 300;
  color: var(--text-muted);
  margin-top: 2px;
}


/* ===== FADE IN ANIMATION ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header,
.zen,
.intro,
.tabs,
.back-link,
.project-title,
.project-subtitle,
.project-hero,
.project-body,
.project-images,
.article-title,
.article-body,
.article-images,
.article-link {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.header { animation-delay: 0s; }
.zen { animation-delay: 0.1s; }
.intro { animation-delay: 0.2s; }
.tabs { animation-delay: 0.3s; }
.back-link { animation-delay: 0s; }
.project-title { animation-delay: 0.1s; }
.project-subtitle { animation-delay: 0.15s; }
.project-hero { animation-delay: 0.2s; }
.project-body { animation-delay: 0.3s; }
.project-images { animation-delay: 0.4s; }
.article-title { animation-delay: 0.1s; }
.article-body { animation-delay: 0.2s; }
.article-images { animation-delay: 0.3s; }
.article-link { animation-delay: 0.4s; }

/* ===== DISABLE HOVER ON TOUCH DEVICES ===== */
@media (hover: none) {
  a:not(.tab):not(.work-item):not(.back-link):not(.article-item)::after {
    display: none;
  }

  a:not(.tab):not(.work-item):not(.back-link):not(.article-item):hover {
    text-decoration: underline;
  }

  .work-item:hover .work-image img,
  .work-item:hover .work-image video {
    transform: none;
  }

  .tab:hover {
    color: var(--text-muted);
  }

  .tab.active:hover {
    color: var(--text-primary);
  }

  .article-item:hover {
    opacity: 1;
  }

  .back-link:hover {
    opacity: 1;
  }

  a:hover {
    opacity: 1;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  :root {
    --padding-x: 24px;
    --font-size-base: 16px;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding: 30px var(--padding-x) 80px;
  }

  /* Tabs: horizontal swipe */
  .tabs {
    gap: 20px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    margin-left: calc(-1 * var(--padding-x));
    margin-right: calc(-1 * var(--padding-x));
    padding-left: var(--padding-x);
    padding-right: var(--padding-x);
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Work grid */
  .work-grid {
    gap: 24px;
  }

  /* Playground */
  .playground-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Photos */
  .photos-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .photo-item:nth-child(even) {
    margin-top: 0;
  }

  /* Books */
  .books-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* Movies */
  .movie-poster {
    width: 80px;
  }

  .movie-title {
    font-size: 14px;
  }

  .movie-review {
    font-size: 12px;
  }

  /* Project page */
  .project-images-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Article page */
  .article-images-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Pricing */
  .pricing-cards {
    gap: 40px;
  }

  .pricing-card {
    max-width: 100%;
  }

  /* Resume */
  .resume-item {
    gap: 12px;
  }
}

@media (max-width: 480px) {
  :root {
    --padding-x: 20px;
    --font-size-base: 15px;
  }

  .tabs {
    gap: 16px;
  }

  .movie-poster {
    width: 70px;
  }

  .movie-item {
    gap: 14px;
  }

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

  .playground-grid {
    gap: 16px;
  }
}
