/* ===== Fonts ===== */

@font-face {
  font-family: "Neue Haas Grotesk Display";
  src: url("/fonts/NeueHaasDisplayRoman.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Grotesk Display";
  src: url("/fonts/NeueHaasDisplayRomanItalic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Grotesk Display";
  src: url("/fonts/NeueHaasDisplayMediu.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Grotesk Display";
  src: url("/fonts/NeueHaasDisplayBold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Grotesk Display";
  src: url("/fonts/NeueHaasDisplayBoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* ===== Reset & Base ===== */

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

html {
  font-family: "Neue Haas Grotesk Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: #D8304D;
  color: #FFB3B3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== Header / Nav ===== */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 8vw;
}

.logo-img {
  height: clamp(32px, 5vw, 60px);
  width: auto;
}

.nav-icons {
  display: flex;
  gap: clamp(0.75rem, 2vw, 2rem);
  align-items: center;
}

.nav-icons[hidden] {
  display: none;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFB3B3;
  transition: color 0.3s ease, transform 0.3s ease;
}

.nav-icon svg {
  height: clamp(20px, 3vw, 30px);
  width: clamp(20px, 3vw, 30px);
}

.nav-icon:hover {
  color: #FFFFFF;
  transform: scale(1.15);
}

/* ===== Text Nav Links (inner pages) ===== */

.nav-links {
  display: flex;
  gap: clamp(0.75rem, 2vw, 2rem);
  align-items: center;
}

.nav-links[hidden] {
  display: none;
}

.nav-link {
  font-size: clamp(0.65rem, 1.2vw, 0.875rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #FFB3B3;
  opacity: 0.7;
  transition: color 0.3s ease, opacity 0.3s ease, letter-spacing 0.3s ease;
}

.nav-link:hover {
  color: #FFFFFF;
  opacity: 1;
  letter-spacing: 0.14em;
}

.nav-link.active {
  color: #FFFFFF;
  opacity: 1;
}

/* ===== Hero ===== */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero-link {
  display: block;
  width: 100%;
  font-size: 17.5vw;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.9;
  color: #FFB3B3;
  transition: color 0.3s ease, letter-spacing 0.3s ease;
  will-change: color, letter-spacing;
}

.hero-link:hover {
  color: #FFFFFF;
  letter-spacing: 0.01em;
}

/* ===== Entrance Animations ===== */

.hero-link {
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeIn 0.6s ease forwards;
}

.hero-link--1 {
  animation-delay: 0.15s;
}

.hero-link--2 {
  animation-delay: 0.3s;
}

.hero-link--3 {
  animation-delay: 0.45s;
}

@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reset transform origin for hover after animation completes */
.hero-link.is-loaded {
  opacity: 1;
  transform: translateY(0);
  animation: none;
}

.hero-link.is-loaded:hover {
  letter-spacing: 0.01em;
}

/* ===== Page Transitions ===== */

#app {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 100vw;
  overflow-x: hidden;
}

.page {
  animation: pageFadeIn 0.35s ease forwards;
}

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

/* ===== Page Title (shared) ===== */

.page-title {
  width: 100%;
  font-family: "Neue Haas Grotesk Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 12vw;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.9;
  color: #FFFFFF;
  text-align: center;
}

/* ===== Subscribe Bar ===== */

.subscribe-bar {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  padding: 3rem 8vw 2rem;
}

.article-page .article-content {
  margin-bottom: 0;
}

.article-page .subscribe-bar {
  padding: 1.5rem 8vw 4rem;
}

.subscribe-bar input {
  font-family: inherit;
  font-size: 0.875rem;
  padding: 0.75rem 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: transparent;
  color: #FFFFFF;
  outline: none;
  width: clamp(150px, 40vw, 300px);
  min-width: 0;
  transition: border-color 0.3s ease;
}

.subscribe-bar input::placeholder {
  color: #FFB3B3;
}

.subscribe-bar input:focus {
  border-color: #FFFFFF;
}

.subscribe-bar button {
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: transparent;
  color: #FFFFFF;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.subscribe-bar button:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: #FFFFFF;
}

.subscribe-message {
  text-align: center;
  color: #FFFFFF;
  font-size: 0.875rem;
  padding-bottom: 1rem;
}

/* ===== Articles Grid ===== */

.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  padding: 2rem 8vw 4rem;
}

/* ===== Article Card ===== */

.article-card {
  background: #FFFFFF;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.article-card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  padding: 1rem;
  border-radius: 24px;
}

.article-card-body {
  padding: 0 1.25rem 1.5rem;
}

.article-card-meta {
  font-size: 0.75rem;
  font-weight: 500;
  color: #D8304D;
  margin-bottom: 0.5rem;
}

.article-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

/* ===== Video Card Play Button ===== */

.video-thumb {
  position: relative;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  transition: background 0.3s ease, transform 0.3s ease;
}

.play-button svg {
  width: 28px;
  height: 28px;
  margin-left: 3px;
}

.video-card:hover .play-button {
  background: rgba(216, 48, 77, 0.9);
  transform: translate(-50%, -50%) scale(1.1);
}

.article-card-desc {
  font-size: 0.875rem;
  font-weight: 400;
  color: #555;
  line-height: 1.5;
}

/* ===== Article Reading Page ===== */

.article-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.article-header {
  text-align: center;
  padding: 0 8vw 2rem;
}

.article-meta {
  font-size: 0.8rem;
  font-weight: 500;
  color: #FFB3B3;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-title {
  font-family: "Neue Haas Grotesk Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  font-style: italic;
  color: #FFFFFF;
  line-height: 1.1;
}

.article-content {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 2.5rem;
  margin: 0 8vw 2.5rem;
  max-width: calc(100vw - 16vw);
  box-sizing: border-box;
  color: #1a1a1a;
  font-family: "Neue Haas Grotesk Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.8;
  overflow-wrap: break-word;
  word-break: break-word;
  overflow: hidden;
}

.article-content img {
  max-width: 100%;
  height: auto;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: #1a1a1a;
}

.article-content > :first-child {
  margin-top: 0;
}

.article-content > :last-child {
  margin-bottom: 0;
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  color: #1a1a1a;
}

.article-content p {
  margin-bottom: 1.25rem;
}

.article-content blockquote {
  border-left: 4px solid #D8304D;
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  background: #faf5f5;
  border-radius: 0 8px 8px 0;
  color: #333;
  font-style: italic;
}

.article-content blockquote p {
  margin-bottom: 0.5rem;
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

.article-content ul,
.article-content ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content hr {
  border: none;
  border-top: 2px solid #eee;
  margin: 2rem 0;
}

.article-content strong {
  font-weight: 700;
}

.article-content code {
  font-family: "SF Mono", Monaco, Menlo, monospace;
  font-size: 0.875em;
  background: #f5f5f5;
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.article-content pre {
  background: #0d1117;
  color: #e0e0e0;
  padding: 1.25rem;
  border-radius: 10px;
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #FFB3B3;
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0 8vw 2rem;
  align-self: flex-start;
  transition: color 0.3s ease;
}

.article-back:hover {
  color: #FFFFFF;
}

/* ===== CV Button ===== */

.cv-button {
  display: inline-block;
  font-family: "Neue Haas Grotesk Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 1rem 2.5rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  color: #FFFFFF;
  background: transparent;
  letter-spacing: 0.04em;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.cv-button:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: #FFFFFF;
}

/* ===== About Page ===== */

.about-sections {
  margin: 0 8vw 4rem;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  background: #FFFFFF;
  border-radius: 16px;
}

.about-section {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.about-section--img-right {
  flex-direction: row-reverse;
}

.about-section-image {
  flex-shrink: 0;
  width: 280px;
  height: 280px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
}

.about-section-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.about-section-text {
  flex: 1;
  color: #1a1a1a;
  font-size: 1rem;
  line-height: 1.75;
}

.about-section-text p {
  margin-bottom: 0.5rem;
}

.about-section-text p:last-child {
  margin-bottom: 0;
}

/* ===== Responsive: Mobile ===== */

@media (max-width: 768px) {
  .site-header {
    padding: 1.25rem 4vw 2rem;
  }

  .nav-icons {
    gap: 1.25rem;
  }

  .nav-links {
    gap: 1.25rem;
  }

  .hero-link {
    font-size: 18vw;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    padding: 1.5rem 4vw 3rem;
  }

  .subscribe-bar {
    flex-wrap: wrap;
    padding: 2rem 4vw 1.5rem;
  }

  .article-content {
    margin: 0 4vw 3rem;
    padding: 1.25rem;
    max-width: calc(100vw - 8vw);
  }

  .article-content pre {
    font-size: 0.75rem;
    padding: 1rem;
  }

  .article-content h2 {
    font-size: 1.3rem;
  }

  .article-content h3 {
    font-size: 1.15rem;
  }

  .article-header {
    padding: 0 4vw 1.5rem;
  }

  .article-back {
    margin: 0 4vw 1.5rem;
  }

  .about-sections {
    margin: 0 4vw 3rem;
    padding: 1.5rem;
    gap: 2rem;
  }

  .about-section,
  .about-section--img-right {
    flex-direction: column;
  }

  .about-section-image {
    width: 100%;
    height: 250px;
  }
}
