/* ==========================
   PORTFOLIO STYLES
   Edit colors and fonts here
   ========================== */

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

body {
  font-family: 'Georgia', serif;
  overflow: hidden;
  background: #120309;
  cursor: grab;
}

body:active {
  cursor: grabbing;
}

.container {
  display: flex;
  height: 100vh;
  transition: transform 0.3s ease-out;
  will-change: transform;
}

.page {
  min-width: 100vw;
  height: 100vh;
  padding: 60px 80px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
}

.page.light {
  background: #f9f7f4;
  color: #120309;
}

.page.dark {
  background: #2E0F15;
  color: #f9f7f4;
}

.page.dark .meta {
  color: #AD9B9A;
}

.page.dark .publication-item {
  border-bottom: 1px solid rgba(173, 155, 154, 0.3);
}

.page.dark .accent-bar {
  background: #AD9B9A;
}

.page.dark .timeline-item {
  border-left-color: #AD9B9A;
}

.page.cover {
  background: linear-gradient(135deg, #2E0F15 0%, #120309 100%);
  color: #f9f7f4;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.page.cover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('https://images.unsplash.com/photo-1481627834876-b7833e8f5570?w=1200&q=80') center/cover;
  opacity: 0.15;
  z-index: 0;
}

.cover-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.cover-content h1 {
  font-size: 80px;
  font-family: 'Times New Roman', serif;
  font-style: italic;
  margin-bottom: 20px;
  color: #AD9B9A;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.cover-content .issue {
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #9F8082;
  margin-bottom: 40px;
}

.cover-content .tagline {
  font-size: 24px;
  font-style: italic;
  color: #8D918B;
  line-height: 1.6;
}

.menu-hint {
  position: absolute;
  top: 40px;
  right: 100px;
  color: #AD9B9A;
  font-size: 14px;
  font-family: 'Arial', sans-serif;
  text-align: right;
  z-index: 1;
  animation: fadeInBounce 2s ease-out;
}

.menu-hint-text {
  margin-top: 10px;
  font-style: italic;
}

.curved-arrow {
  width: 80px;
  height: 60px;
  margin-left: auto;
}

@keyframes fadeInBounce {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  60% {
    opacity: 1;
    transform: translateY(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.masthead {
  text-align: center;
  border-bottom: 3px solid currentColor;
  padding-bottom: 15px;
  margin-bottom: 40px;
}

.masthead h1 {
  font-family: 'Times New Roman', serif;
  font-size: 48px;
  font-weight: normal;
  letter-spacing: 2px;
  font-style: italic;
}

.masthead .subtitle {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 8px;
  font-family: 'Arial', sans-serif;
}

.section-title {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-family: 'Arial', sans-serif;
  border-bottom: 1px solid currentColor;
  padding-bottom: 8px;
  margin-bottom: 25px;
  font-weight: bold;
}

.content-block {
  margin-bottom: 30px;
}

.content-block h2 {
  font-size: 24px;
  font-weight: normal;
  margin-bottom: 10px;
  font-style: italic;
}

.content-block h3 {
  font-size: 18px;
  font-weight: normal;
  margin-bottom: 8px;
}

.content-block p {
  line-height: 1.6;
  margin-bottom: 12px;
  text-align: justify;
}

.content-block a {
  color: #9F8082;
  text-decoration: none;
}

.content-block a:hover {
  text-decoration: underline;
}

.meta {
  font-size: 12px;
  opacity: 0.7;
  font-style: italic;
  margin-bottom: 8px;
}

.two-column {
  column-count: 2;
  column-gap: 40px;
  text-align: justify;
}

.page-indicator {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 1000;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(173, 155, 154, 0.4);
  transition: background 0.3s;
  cursor: pointer;
}

.dot.active {
  background: #AD9B9A;
}

.publication-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.publication-item:last-child {
  border-bottom: none;
}

.publication-item h3 {
  font-size: 16px;
  font-weight: normal;
  margin-bottom: 8px;
}

.publication-links {
  font-size: 12px;
  margin-top: 10px;
}

.publication-links a {
  color: #AD9B9A;
  text-decoration: none;
  margin-right: 15px;
}

.publication-links a:hover {
  text-decoration: underline;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.gallery-item {
  aspect-ratio: 1;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.1);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intro-text {
  font-size: 20px;
  line-height: 1.5;
  text-align: center;
  max-width: 700px;
  margin: 60px auto;
}

.timeline-item {
  margin-bottom: 25px;
  padding-left: 20px;
  border-left: 2px solid #9F8082;
}

.news-item {
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.page.dark .news-item {
  border-bottom: 1px solid rgba(173, 155, 154, 0.3);
}

.news-item:last-child {
  border-bottom: none;
}

.news-date {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #9F8082;
  margin-bottom: 8px;
}

.page.dark .news-date {
  color: #AD9B9A;
}

.featured-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  margin: 20px 0;
  border: 1px solid rgba(0,0,0,0.1);
}

.accent-bar {
  width: 60px;
  height: 3px;
  background: #9F8082;
  margin: 30px auto;
}

.pull-quote {
  font-size: 28px;
  font-style: italic;
  text-align: center;
  padding: 40px;
  color: #AD9B9A;
  line-height: 1.4;
  border-top: 1px solid rgba(173, 155, 154, 0.3);
  border-bottom: 1px solid rgba(173, 155, 154, 0.3);
  margin: 30px 0;
}

.image-page {
  padding: 0;
  background: #120309;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.image-page img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
}

.image-caption {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  color: #8D918B;
  font-size: 12px;
  font-style: italic;
  text-align: center;
  max-width: 600px;
}

.menu-button {
  position: fixed;
  top: 30px;
  right: 30px;
  width: 40px;
  height: 40px;
  background: rgba(173, 155, 154, 0.9);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.menu-button:hover {
  background: #AD9B9A;
  transform: scale(1.05);
}

.menu-button span {
  width: 24px;
  height: 2px;
  background: #120309;
  transition: all 0.3s ease;
}

.menu-button.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.menu-button.active span:nth-child(2) {
  opacity: 0;
}

.menu-button.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.toc-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(18, 3, 9, 0.95);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toc-overlay.active {
  opacity: 1;
  visibility: visible;
}

.toc-content {
  max-width: 600px;
  width: 90%;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.toc-overlay.active .toc-content {
  transform: translateY(0);
}

.toc-title {
  font-family: 'Times New Roman', serif;
  font-size: 42px;
  font-style: italic;
  color: #AD9B9A;
  text-align: center;
  margin-bottom: 40px;
  letter-spacing: 1px;
}

.toc-list {
  list-style: none;
}

.toc-item {
  margin-bottom: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  padding-left: 20px;
}

.toc-item:hover {
  border-left-color: #9F8082;
  transform: translateX(5px);
}

.toc-item-number {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8D918B;
  font-family: 'Arial', sans-serif;
  margin-bottom: 5px;
}

.toc-item-title {
  font-size: 24px;
  color: #f9f7f4;
  font-family: 'Georgia', serif;
  font-style: italic;
}

/* Blog Styles */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.blog-list-item {
  display: flex;
  gap: 25px;
  padding: 30px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.blog-list-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border-color: #9F8082;
}

.blog-thumbnail {
  flex-shrink: 0;
  width: 200px;
  height: 150px;
  overflow: hidden;
  border-radius: 6px;
}

.blog-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-list-item:hover .blog-thumbnail img {
  transform: scale(1.05);
}

.blog-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-date {
  font-size: 12px;
  color: #8D918B;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  font-family: 'Arial', sans-serif;
}

.blog-title {
  font-size: 28px;
  font-family: 'Georgia', serif;
  font-style: italic;
  color: #120309;
  margin-bottom: 12px;
  line-height: 1.3;
}

.blog-excerpt {
  color: #555;
  line-height: 1.6;
  margin-bottom: 15px;
  flex: 1;
}

.read-more {
  color: #9F8082;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
  align-self: flex-start;
}

.read-more:hover {
  color: #7A5F61;
}

/* Blog Post Page */
.blog-post-page {
  padding: 60px 120px !important;
}

.blog-post-header {
  margin-bottom: 40px;
}

.back-to-blog-list {
  color: #9F8082;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.2s ease;
  display: inline-block;
}

.back-to-blog-list:hover {
  color: #7A5F61;
}

.blog-post {
  max-width: 800px;
  margin: 0 auto;
}

.blog-post-date {
  font-size: 13px;
  color: #8D918B;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 15px;
  font-family: 'Arial', sans-serif;
}

.blog-post-title {
  font-size: 48px;
  font-family: 'Times New Roman', serif;
  font-style: italic;
  color: #120309;
  margin-bottom: 30px;
  line-height: 1.2;
}

.blog-post-featured-image {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 40px;
}

.blog-post-content {
  font-size: 18px;
  line-height: 1.8;
  color: #333;
}

.blog-post-content p {
  margin-bottom: 20px;
}

.blog-post-content h3 {
  font-size: 28px;
  font-family: 'Georgia', serif;
  margin-top: 40px;
  margin-bottom: 15px;
  color: #120309;
}

.blog-post-content h4 {
  font-size: 22px;
  font-family: 'Georgia', serif;
  margin-top: 30px;
  margin-bottom: 12px;
  color: #120309;
}

.blog-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 25px 0;
}

.blog-post-content ul,
.blog-post-content ol {
  margin: 20px 0;
  padding-left: 30px;
}

.blog-post-content li {
  margin-bottom: 10px;
  line-height: 1.7;
}

.blog-post-content a {
  color: #9F8082;
  text-decoration: underline;
}

.blog-post-content a:hover {
  color: #7A5F61;
}

.blog-post-content strong {
  font-weight: 600;
  color: #120309;
}

.blog-post-content em {
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    cursor: auto;
    overflow-y: auto;
    overflow-x: hidden;
  }

  body:active {
    cursor: auto;
  }

  .container {
    display: block;
    height: auto;
    transform: none !important;
    transition: none !important;
  }

  .page {
    padding: 30px 20px 60px 20px;
    min-height: 100vh;
    height: auto;
    overflow: visible;
    min-width: 100vw;
    max-width: 100vw;
    width: 100vw;
    box-sizing: border-box;
  }

  .page > * {
    max-width: 100%;
    box-sizing: border-box;
  }

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

  .cover-content h1 {
    font-size: 40px;
  }

  .cover-content {
    padding: 20px;
  }

  .issue {
    font-size: 10px;
  }

  .tagline {
    font-size: 14px;
  }

  .two-column {
    column-count: 1;
  }

  .gallery {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .masthead h1 {
    font-size: 32px;
  }

  .masthead .subtitle {
    font-size: 9px;
  }

  .section-title {
    font-size: 28px;
  }

  .pull-quote {
    font-size: 18px;
    padding: 25px 15px;
  }

  .menu-button {
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
  }

  .menu-button span {
    width: 20px;
  }

  .toc-content {
    padding: 40px 20px;
  }

  .toc-title {
    font-size: 32px;
  }

  .toc-item {
    padding: 20px 0;
  }

  .toc-item-title {
    font-size: 20px;
  }

  .timeline-item,
  .publication-item,
  .skill-category {
    margin-bottom: 25px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .image-caption {
    font-size: 12px;
    padding: 15px;
  }

  .page-indicator {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
  }

  /* Prevent horizontal overflow on all elements */
  .content-block,
  .section-title,
  .masthead,
  .intro-text,
  .pull-quote,
  p, h1, h2, h3, h4, h5, h6,
  ul, ol, li {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
  }

  /* Ensure featured images fit properly */
  .featured-image {
    width: 100%;
    height: auto;
    max-width: 100%;
  }

  /* Fix for image pages */
  .image-page img {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: cover;
  }

  /* Blog mobile styles */
  .blog-list-item {
    flex-direction: column;
    padding: 20px;
  }

  .blog-thumbnail {
    width: 100%;
    height: 200px;
  }

  .blog-title {
    font-size: 24px;
  }

  .blog-post-page {
    padding: 40px 20px !important;
  }

  .blog-post-title {
    font-size: 32px;
  }

  .blog-post-content {
    font-size: 16px;
  }

  .blog-post-content h3 {
    font-size: 24px;
  }

  .blog-post-content h4 {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 20px 15px;
  }

  .cover-content h1 {
    font-size: 32px;
  }

  .masthead h1 {
    font-size: 24px;
  }

  .section-title {
    font-size: 24px;
  }

  .menu-button {
    top: 10px;
    right: 10px;
  }

  .blog-list-item {
    padding: 15px;
  }

  .blog-title {
    font-size: 22px;
  }

  .blog-post-page {
    padding: 30px 15px !important;
  }

  .blog-post-title {
    font-size: 28px;
  }
}