/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  color: #e8e0d8;
  background: #0d1117;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===== Typography ===== */
h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
}

a {
  color: #c8a882;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: #e8c8a2; }

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 3.2rem;
  padding: 0 2rem;
  overflow: visible;
  transition: background 0.3s, backdrop-filter 0.3s;
}
.nav--scrolled {
  background: rgba(15, 14, 13, 0.85);
  backdrop-filter: blur(12px);
}
.nav-name {
  display: flex;
  align-items: flex-start;
  padding-top: 5px;
  align-self: flex-start;
}
.nav-sig {
  height: 60px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.nav-sig:hover {
  opacity: 1;
}
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a09888;
}
.nav-links a:hover { color: #e8e0d8; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
}
.hero-title {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
  animation: fadeUp 1s ease both;
  background: linear-gradient(
    90deg,
    #e8e0d8 0%,
    #e8e0d8 40%,
    #f0d0b8 50%,
    #e8e0d8 60%,
    #e8e0d8 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeUp 1s ease both, shimmer 6s 1.5s ease-in-out infinite;
}
.hero-subtitle {
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a09888;
  margin-bottom: 1.5rem;
  animation: fadeUp 1s 0.2s ease both;
}
.hero-tagline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.2rem, 2.8vw, 1.5rem);
  font-style: italic;
  color: #c8b8a8;
  max-width: 36rem;
  margin: 0 auto;
  animation: fadeUp 1s 0.4s ease both;
}

/* scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: fadeUp 1s 0.8s ease both;
}
.scroll-hint span {
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, #a09888, transparent);
  animation: pulse 2s ease-in-out infinite;
}

/* ===== Sections ===== */
.section {
  padding: 6rem 2rem;
}
.section--alt {
  background: rgba(0, 0, 0, 0.15);
}
.container {
  max-width: 56rem;
  margin: 0 auto;
}
.container--narrow {
  max-width: 36rem;
  margin: 0 auto;
}
.section-heading {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}
.section-heading::after {
  content: '';
  position: absolute;
  bottom: -0.4rem;
  left: 0;
  width: 2.5rem;
  height: 2px;
  background: #c8a882;
}

/* ===== Fiction Intro ===== */
.fiction-intro {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: #c8b8a8;
  max-width: 42rem;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ===== Cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: 1.5rem;
}
.card {
  background: rgba(20, 18, 16, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s;
}
.card:hover {
  border-color: #3a3530;
}
.card--featured {
  grid-column: 1 / -1;
}
.card-accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #c8a882, transparent);
  opacity: 0;
  transition: opacity 0.4s;
}
.card:hover .card-accent { opacity: 1; }

.card-title {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}
.card-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c8a882;
  border: 1px solid #3a3530;
  border-radius: 3px;
  padding: 0.15rem 0.5rem;
  margin-bottom: 0.8rem;
}
.card-status {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-style: italic;
  color: #c8a882;
  margin-top: 0.6rem;
  margin-bottom: 0.8rem;
}
.card-series {
  font-size: 0.85rem;
  color: #807868;
  margin-bottom: 0.8rem;
  font-style: italic;
}
.card-body {
  color: #a09888;
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
}
.card-quote {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: #c8b8a8;
  border-left: 2px solid #c8a882;
  padding-left: 1rem;
  margin: 1.2rem 0;
}
.card-link {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ===== DAON Badge ===== */
.daon-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a9a7a;
  border: 1px solid #3a4a3a;
  border-radius: 3px;
  padding: 0.25rem 0.6rem;
  margin-top: 0.8rem;
  transition: color 0.2s, border-color 0.2s;
}
.daon-badge:hover {
  color: #a0c8a0;
  border-color: #5a7a5a;
}
.daon-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ===== About ===== */
.about-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: #c8b8a8;
  max-width: 42rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.about-text p {
  margin-bottom: 1rem;
}
.about-text p:last-child {
  margin-bottom: 0;
}

/* ===== CV ===== */
.cv {
  margin-top: 3rem;
  max-width: 42rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.cv-heading {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}
.cv-heading::after {
  content: '';
  position: absolute;
  bottom: -0.3rem;
  left: 0;
  width: 1.5rem;
  height: 2px;
  background: #c8a882;
}
.cv-entry {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.cv-entry:last-child {
  border-bottom: none;
}
.cv-date {
  font-size: 0.8rem;
  font-weight: 400;
  color: #807868;
  padding-top: 0.15rem;
}
.cv-detail strong {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: 1.05rem;
  display: block;
  margin-bottom: 0.15rem;
}
.cv-org {
  font-size: 0.85rem;
  color: #a09888;
  display: block;
  margin-bottom: 0.4rem;
}
.cv-detail p {
  font-size: 0.85rem;
  color: #807868;
  line-height: 1.5;
}

/* ===== Contact ===== */
.contact-text {
  color: #a09888;
  font-size: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.contact-form {
  max-width: 28rem;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.form-group {
  margin-bottom: 1.2rem;
}
.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #807868;
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(20, 18, 16, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 0.7rem 0.9rem;
  color: #e8e0d8;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 300;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #c8a882;
}
.form-group textarea {
  resize: vertical;
  min-height: 6rem;
}
.form-submit {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: transparent;
  border: 1px solid #c8a882;
  border-radius: 4px;
  color: #c8a882;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.form-submit:hover:not(:disabled) {
  background: #c8a882;
  color: #0f0e0d;
}
.form-submit:disabled {
  cursor: default;
  opacity: 0.7;
}
.form-submit.is-sending {
  border-color: #807868;
  color: #807868;
}
.form-submit.is-done {
  border-color: #7a9a7a;
  color: #7a9a7a;
  background: rgba(122, 154, 122, 0.08);
}
.form-submit.is-error {
  border-color: #9a5a5a;
  color: #c87a7a;
}

/* ===== Footer ===== */
.footer {
  padding: 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: #605848;
}

/* ===== Visibility (observer) ===== */
.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ===== Animations ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 0.8; }
}
@keyframes shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .nav { padding: 1rem 1.2rem; }
  .nav-links { gap: 1.2rem; }
  .nav-links a { font-size: 0.75rem; }
  .section { padding: 4rem 1.2rem; }
  .card { padding: 1.5rem; }
  .card--featured { grid-column: auto; }
  .hero-tagline br { display: none; }
}
