/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap');

body {
  font-family: 'Arial Narrow', 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  background: #0d1117;
  color: #e6edf3;
  overflow-x: hidden;
}

/* ===== NAVIGATION ===== */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #30363d;
  z-index: 1000;
  padding: 15px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Arial Narrow', 'Arial', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #9b6b43;
  text-decoration: none;
  padding: 8px 15px;
  border: 2px solid #9b6b43;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.nav-logo:hover {
  background: rgba(155, 107, 67, 0.1);
  box-shadow: 0 0 10px rgba(155, 107, 67, 0.3);
}

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

.nav-link {
  color: #8b949e;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  padding: 5px 0;
  font-family: 'Arial Narrow', 'Arial', sans-serif;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #9b6b43;
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #9b6b43;
}

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

/* ===== HERO BANNER WITH BACKGROUND (FULL IMAGE, NO CROP) ===== */
.hero-banner {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 80px;
  overflow: hidden;
  background: #0d1117;
  perspective: 1200px;
  /* depth for parallax */
}

/* Video behind everything */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  transform: translateZ(-40px) scale(1.08);
  /* base depth */
}

/* Overlay above video for readability */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 17, 23, 0.45);
  z-index: 1;
}

/* Text above overlay */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

/* UPDATED: not bold, tighter letter spacing */
.hero-name {
  font-size: 64px;
  color: #ffffff;
  margin-bottom: 10px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  font-weight: 700;
  letter-spacing: -0.025em;
  font-family: 'Instrument Serif', serif;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #b0b8c1;
  margin-bottom: 50px;
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  letter-spacing: -0.005em;
}

/* Buttons */
.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  transform: translateY(-19px);
}

.hero-btn {
  background: rgba(0, 0, 0, 0.30);
  color: #ffffff;
  border: 2px solid #ffffff;
  padding: 16px 48px;
  font-size: 1.1rem;
  font-family: 'Arial Narrow', 'Arial', sans-serif;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  backdrop-filter: blur(5px);
}

.hero-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #9b6b43;
  color: #9b6b43;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(155, 107, 67, 0.4);
}

/* UPDATED: make Community smaller (add class to that button: hero-btn--community) */
.hero-btn--community {
  padding: 14px 40px;
  font-size: 1rem;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .hero-banner {
    padding: 110px 20px 70px;
  }

  .hero-name {
    font-size: 48px;
    margin-bottom: 40px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 15px;
    transform: translateY(-14px);
  }

  .hero-btn {
    width: 100%;
    max-width: 280px;
  }
}

/* ===== SECTIONS ===== */
section {
  max-width: 900px;
  margin: 60px auto;
  padding: 0 20px;
}

/* Section titles */
h2 {
  font-size: 36px;
  color: #f0f6fc;
  border-left: 4px solid #9b6b43;
  padding-left: 10px;
  margin-bottom: 20px;

  font-family: 'Arial Narrow', 'Arial', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Body text */
p,
li {
  font-size: 1rem;
  line-height: 1.55;
  color: #c9d1d9;

  font-family: 'Arial Narrow', 'Arial', sans-serif;
  font-weight: 400;
  letter-spacing: -0.005em;
}

/* ===== CARDS ===== */
.project-card,
.experience-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(155, 107, 67, 0.05);
  padding: 25px;
  margin-top: 25px;
  transition: all 0.25s ease;
}

.project-card:hover,
.experience-card:hover {
  transform: translateY(-4px);
  border-color: #9b6b43;
  box-shadow: 0 0 12px rgba(155, 107, 67, 0.2);
}

/* ===== TABS ===== */
.tabs-container {
  max-width: 900px;
  margin: 60px auto;
  padding: 0 20px;
}

.tabs-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid #30363d;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.tab-btn {
  background: transparent;
  border: none;
  color: #8b949e;
  padding: 15px 25px;
  font-size: 1rem;
  font-family: 'Arial Narrow', 'Arial', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover {
  color: #e6edf3;
  background: rgba(155, 107, 67, 0.1);
}

.tab-btn.active {
  color: #9b6b43;
  border-bottom-color: #9b6b43;
  font-weight: 600;
}

.tab-btn i {
  font-size: 1rem;
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* ===== PROJECT STATUS ===== */
.project-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 12px;
  color: #8b949e;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(155, 107, 67, 0.35);
  background: rgba(155, 107, 67, 0.10);
  color: #f0f6fc;
  font-size: 0.9rem;
  font-family: 'Arial Narrow', 'Arial', sans-serif;
}

.status-icon {
  width: 18px;
  height: 18px;
  image-rendering: pixelated;
}

.meta-dot {
  opacity: 0.6;
}

.meta-text {
  font-size: 0.95rem;
}

.status-seed {
  border-color: rgba(155, 107, 67, 0.25);
  background: rgba(155, 107, 67, 0.07);
}

.status-seedling {
  border-color: rgba(46, 160, 67, 0.30);
  box-shadow: 0 0 12px rgba(46, 160, 67, 0.08);
}

.status-plant {
  border-color: rgba(88, 166, 255, 0.25);
  box-shadow: 0 0 12px rgba(88, 166, 255, 0.06);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.project-header h3 {
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.project-header h3 i {
  color: #9b6b43;
  margin-right: 8px;
}

.project-tag {
  background: rgba(155, 107, 67, 0.2);
  color: #9b6b43;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(155, 107, 67, 0.3);
  font-family: 'Arial Narrow', 'Arial', sans-serif;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #30363d;
}

.tech-item {
  background: #0d1117;
  color: #c9d1d9;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  border: 1px solid #30363d;
  font-family: 'Arial Narrow', 'Arial', sans-serif;
}

/* ===== EXTRACURRICULAR CARDS ===== */
.extracurricular-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 25px;
  margin-top: 25px;
  transition: all 0.25s ease;
}

.extracurricular-card:hover {
  transform: translateY(-4px);
  border-color: #9b6b43;
  box-shadow: 0 0 12px rgba(155, 107, 67, 0.2);
}

.extracurricular-header {
  margin-bottom: 15px;
}

.extracurricular-header h3 {
  margin: 0 0 8px 0;
  color: #f0f6fc;
  font-family: 'Arial Narrow', 'Arial', sans-serif;
}

.extracurricular-header h3 i {
  color: #9b6b43;
  margin-right: 8px;
}

.org-name {
  color: #8b949e;
  font-size: 0.9rem;
  font-style: italic;
}

.extracurricular-card p {
  margin-top: 10px;
  color: #c9d1d9;
}

/* ===== CERTIFICATION CARDS ===== */
.cert-toggle {
  cursor: pointer;
}

.cert-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease;
  margin-top: 10px;
}

.cert-details.open {
  max-height: 900px;
  opacity: 1;
}

.cert-image {
  width: 100%;
  max-width: 760px;
  display: block;
  margin: 12px auto 0;
  border-radius: 12px;
  border: 1px solid #30363d;
}

.certification-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 25px;
  margin-top: 25px;
  transition: all 0.25s ease;
}

.certification-card:hover {
  transform: translateY(-4px);
  border-color: #9b6b43;
  box-shadow: 0 0 12px rgba(155, 107, 67, 0.2);
}

.cert-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 15px;
}

.verify-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #f0f6fc;
  background: rgba(155, 107, 67, 0.12);
  border: 1px solid rgba(155, 107, 67, 0.35);
  font-family: 'Arial Narrow', 'Arial', sans-serif;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.verify-link i {
  color: #9b6b43;
}

.verify-link:hover {
  transform: translateY(-2px);
  border-color: #9b6b43;
  box-shadow: 0 0 14px rgba(155, 107, 67, 0.25);
}

.cert-icon {
  background: rgba(155, 107, 67, 0.2);
  width: 60px;
  height: 60px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(155, 107, 67, 0.3);
}

.cert-icon i {
  font-size: 1.5rem;
  color: #9b6b43;
}

.cert-info {
  flex: 1;
}

.cert-info h3 {
  margin: 0 0 5px 0;
  color: #f0f6fc;
  font-family: 'Arial Narrow', 'Arial', sans-serif;
}

.cert-issuer {
  color: #8b949e;
  font-size: 0.9rem;
  margin: 5px 0;
}

.cert-date {
  color: #9b6b43;
  font-size: 0.85rem;
  font-weight: 500;
  margin: 5px 0;
}

h3 {
  margin-top: 0;
  color: #f0f6fc;
  font-family: 'Arial Narrow', 'Arial', sans-serif;
  font-weight: 700;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 40px 20px;
  background: #161b22;
  border-top: 1px solid #30363d;
  color: #8b949e;
  font-size: 0.9rem;
  margin-top: 100px;
}

.pixel-logo {
  height: 34px;
  width: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}

/* ===== EXPERIENCE GALLERY ===== */
.exp-gallery {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #30363d;
}

.camera-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(155, 107, 67, 0.12);
  border: 1px solid rgba(155, 107, 67, 0.35);
  color: #f0f6fc;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: 'Arial Narrow', 'Arial', sans-serif;
}

.camera-btn i {
  color: #9b6b43;
}

.camera-btn:hover {
  transform: translateY(-2px);
  border-color: #9b6b43;
  box-shadow: 0 0 14px rgba(155, 107, 67, 0.25);
}

.thumb-row {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.thumb {
  width: 92px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #30363d;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.thumb:hover {
  transform: translateY(-3px);
  border-color: #9b6b43;
}

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 2000;
}

.modal.show {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  width: min(980px, calc(100% - 24px));
  margin: 70px auto;
  background: linear-gradient(180deg, #111722 0%, #0d1117 100%);
  border: 1px solid rgba(155, 107, 67, 0.35);
  border-radius: 16px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid #30363d;
  background: rgba(13, 17, 23, 0.85);
}

.camera-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2ea043;
  box-shadow: 0 0 12px rgba(46, 160, 67, 0.5);
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f0f6fc;
  font-family: 'Arial Narrow', 'Arial', sans-serif;
  flex: 1;
}

.modal-title i {
  color: #9b6b43;
}

.modal-close {
  background: transparent;
  border: 1px solid #30363d;
  color: #e6edf3;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
  border-color: #9b6b43;
  transform: translateY(-1px);
}

.modal-body {
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  gap: 10px;
  align-items: center;
  padding: 16px;
}

.modal-figure {
  margin: 0;
  text-align: center;
}

.modal-figure img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid #30363d;
  background: #0a0e14;
}

.modal-figure figcaption {
  margin-top: 10px;
  color: #8b949e;
  font-size: 0.95rem;
}

.nav-btn {
  background: rgba(155, 107, 67, 0.10);
  border: 1px solid rgba(155, 107, 67, 0.30);
  color: #f0f6fc;
  border-radius: 12px;
  width: 52px;
  height: 52px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.nav-btn:hover {
  transform: translateY(-2px);
  border-color: #9b6b43;
}

.modal-footer {
  display: flex;
  justify-content: center;
  padding: 10px 16px 16px;
  color: #8b949e;
  font-family: 'Arial Narrow', 'Arial', sans-serif;
}

/* ===== PAGE HEADER (for projects page) ===== */
.page-header {
  text-align: center;
  padding: 60px 20px 60px;
  background: linear-gradient(180deg, #161b22 0%, #0d1117 100%);
  border-bottom: 1px solid #30363d;
  margin-top: 0;
}

.page-header h1 {
  font-size: 2.8rem;
  color: #f0f6fc;
  margin-bottom: 15px;
  font-family: 'Arial Narrow', 'Arial', sans-serif;
  font-weight: 700;
}

.page-header h1 i {
  color: #9b6b43;
  margin-right: 15px;
}

.page-header p {
  font-size: 1.1rem;
  color: #8b949e;
  max-width: 600px;
  margin: 0 auto;
}

.status-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 18px 0 26px;
  color: #8b949e;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Arial Narrow', 'Arial', sans-serif;
  font-size: 0.9rem;
}

.page-header .status-legend {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  width: fit-content;
  margin: 22px auto 0;
  padding: 10px 14px;
  border: 1px solid rgba(155, 107, 67, 0.25);
  background: rgba(155, 107, 67, 0.06);
  border-radius: 999px;
}

.page-header .status-legend .status-icon {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
}

.page-header .status-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Arial Narrow', 'Arial', sans-serif;
  font-size: 1rem;
  color: #c9d1d9;
  padding: 6px 10px;
  border-radius: 999px;
}

.page-header .status-legend .legend-item:hover {
  color: #f0f6fc;
}

/* ===== CTA SECTION ===== */
.cta-section {
  max-width: 900px;
  margin: 60px auto;
  padding: 0 20px;
}

.cta-card {
  background: linear-gradient(135deg, #161b22 0%, #1a2332 100%);
  border: 2px solid #9b6b43;
  border-radius: 15px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 0 30px rgba(155, 107, 67, 0.2);
  transition: all 0.3s ease;
}

.cta-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 40px rgba(155, 107, 67, 0.4);
  border-color: #b8865a;
}

.cta-card h2 {
  font-size: 2rem;
  color: #f0f6fc;
  margin-bottom: 15px;
  border: none;
  padding: 0;
  font-family: 'Arial Narrow', 'Arial', sans-serif;
}

.cta-card h2 i {
  color: #9b6b43;
  margin-right: 10px;
}

.cta-card p {
  color: #8b949e;
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, #9b6b43 0%, #b8865a 100%);
  color: #f0f6fc;
  padding: 15px 40px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(155, 107, 67, 0.3);
  font-family: 'Arial Narrow', 'Arial', sans-serif;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(155, 107, 67, 0.5);
  background: linear-gradient(135deg, #b8865a 0%, #9b6b43 100%);
}

.cta-button i {
  margin-left: 10px;
  transition: transform 0.3s ease;
}

.cta-button:hover i {
  transform: translateX(5px);
}

.projects-section {
  max-width: 900px;
  margin: 60px auto;
  padding: 0 20px;
}

/* ===== PAGE TRANSITION OVERLAY ===== */
.page-transition {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top,
      rgba(155, 107, 67, 0.35),
      transparent 55%),
    radial-gradient(circle at bottom,
      rgba(46, 160, 67, 0.18),
      transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1500;
}

.page-transition.active {
  opacity: 1;
}

/* ===== DIGITAL DIARY / BOOK (community page) ===== */
.diary-wrapper {
  max-width: 1280px;
  margin: 80px auto 60px;
  padding: 0 20px 60px;
}

.diary-intro {
  max-width: 640px;
  margin-bottom: 30px;
}

.diary-intro p {
  color: #8b949e;
  font-size: 1.05rem;
}

.diary-book {
  position: relative;
  margin: 0 auto;
  max-width: 1140px;
  background: radial-gradient(circle at top left, #161b22 0%, #02040a 60%);
  border-radius: 18px;
  border: 1px solid rgba(155, 107, 67, 0.4);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.7);
  padding: 34px 30px 38px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 58px;
  gap: 22px;
}

.diary-spine {
  display: flex;
  align-items: center;
  justify-content: center;
}

.diary-spine button {
  background: rgba(22, 27, 34, 0.9);
  border: 1px solid rgba(155, 107, 67, 0.6);
  color: #f0f6fc;
  border-radius: 999px;
  width: 48px;
  height: 48px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.diary-spine button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(155, 107, 67, 0.6);
  border-color: #b8865a;
}

.diary-spine button:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.diary-main {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr);
  gap: 32px;
  perspective: 1800px;
  transform-style: preserve-3d;
}

.diary-main.is-flipping-next {
  animation: diarySpreadFlipNext 0.55s ease;
}

.diary-main.is-flipping-prev {
  animation: diarySpreadFlipPrev 0.55s ease;
}

@keyframes diarySpreadFlipNext {
  0% {
    transform: rotateY(0deg) translateX(0);
  }

  40% {
    transform: rotateY(-10deg) translateX(8px);
  }

  100% {
    transform: rotateY(0deg) translateX(0);
  }
}

@keyframes diarySpreadFlipPrev {
  0% {
    transform: rotateY(0deg) translateX(0);
  }

  40% {
    transform: rotateY(10deg) translateX(-8px);
  }

  100% {
    transform: rotateY(0deg) translateX(0);
  }
}

.diary-page-visual {
  position: relative;
  background: radial-gradient(circle at top, #101624 0%, #050711 60%);
  border-radius: 14px;
  border: 1px solid #30363d;
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 620px;
}

.diary-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(155, 107, 67, 0.5);
  background: rgba(155, 107, 67, 0.12);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f0f6fc;
  font-family: 'Arial Narrow', 'Arial', sans-serif;
}

.diary-tag i {
  color: #9b6b43;
}

.diary-title {
  margin: 4px 0 2px;
  font-size: 1.52rem;
  color: #f0f6fc;
  font-family: 'Arial Narrow', 'Arial', sans-serif;
}

.diary-meta {
  font-size: 1rem;
  color: #8b949e;
  font-family: 'Arial Narrow', 'Arial', sans-serif;
}

.diary-media-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #30363d;
  background: radial-gradient(circle at top, #0b1020, #000 75%);
  cursor: pointer;
}

.diary-media-frame img,
.diary-media-frame video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 480px;
}

.diary-media-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(3, 8, 18, 0.85), transparent 55%);
}

.diary-media-label {
  font-size: 0.9rem;
  color: #e6edf3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Arial Narrow', 'Arial', sans-serif;
}

.diary-media-label i {
  color: #9b6b43;
}

.diary-media-hint {
  font-size: 0.8rem;
  color: #8b949e;
  margin-top: 4px;
  font-family: 'Arial Narrow', 'Arial', sans-serif;
}

.diary-page-entry {
  background: radial-gradient(circle at top, #101624 0%, #050711 60%);
  border-radius: 14px;
  border: 1px solid #30363d;
  padding: 24px 24px 26px;
  position: relative;
  overflow: hidden;
  min-height: 620px;
}

.diary-page-entry::before {
  content: '';
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 0 0, rgba(155, 107, 67, 0.16), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(46, 160, 67, 0.12), transparent 55%);
  opacity: 0.5;
  pointer-events: none;
}

.diary-entry-heading {
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
}

.diary-entry-heading h3 {
  margin: 0;
  font-size: 1.25rem;
}

.diary-entry-heading span {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
  color: #8b949e;
}

.diary-entry-body {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  min-height: 220px;
  font-size: 1.06rem;
  line-height: 1.6;
  color: #c9d1d9;
}

.diary-entry-body .cursor {
  display: inline-block;
  width: 8px;
  margin-left: 2px;
  background: #f0f6fc;
  animation: blinkCursor 0.8s infinite;
}

@keyframes blinkCursor {

  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

.diary-footer {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #8b949e;
  font-family: 'Arial Narrow', 'Arial', sans-serif;
}

.diary-dots {
  display: flex;
  gap: 6px;
}

.diary-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #30363d;
  border: none;
  padding: 0;
  cursor: pointer;
}

.diary-dot.active {
  background: #9b6b43;
  box-shadow: 0 0 10px rgba(155, 107, 67, 0.7);
}

/* ===== RESPONSIVE (rest) ===== */
@media (max-width: 900px) {
  .diary-book {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    padding: 28px 20px 30px;
  }

  .diary-main {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .diary-media-frame img,
  .diary-media-frame video {
    height: 280px;
  }

  .diary-page-visual,
  .diary-page-entry {
    min-height: auto;
  }
}

@media (max-width: 600px) {
  .nav-links {
    gap: 15px;
  }

  .nav-link {
    font-size: 0.9rem;
  }

  .page-header {
    padding: 100px 20px 50px;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .cta-card {
    padding: 30px 20px;
  }

  .cta-card h2 {
    font-size: 1.5rem;
  }

  .tabs-nav {
    gap: 5px;
  }

  .tab-btn {
    padding: 12px 15px;
    font-size: 0.9rem;
  }

  .project-header {
    flex-direction: column;
  }

  .cert-header {
    flex-direction: column;
    gap: 15px;
  }

  .cert-icon {
    width: 50px;
    height: 50px;
  }

  .cert-icon i {
    font-size: 1.2rem;
  }

  .modal-card {
    margin: 60px auto;
  }

  .modal-body {
    grid-template-columns: 44px 1fr 44px;
  }

  .nav-btn {
    width: 40px;
    height: 40px;
  }

  .thumb {
    width: 84px;
    height: 58px;
  }

  .diary-wrapper {
    margin-top: 70px;
    padding-bottom: 40px;
  }

  .diary-book {
    grid-template-columns: 1fr;
    row-gap: 16px;
  }

  .diary-spine {
    display: none;
  }

  .diary-main {
    grid-template-columns: 1fr;
  }

  .diary-page-entry {
    margin-top: 4px;
  }
}
