@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Crimson+Pro:ital,wght@0,300;0,400;0,500;1,300;1,400&family=DM+Mono:wght@300;400&display=swap');

:root {
  --cream: #ffffff;
  --cream-dark: #d8dee4;
  --brown-deep: #24292f;
  --brown-mid: #57606a;
  --brown-light: #8c959f;
  --olive: #0969da;
  --olive-light: #218bff;
  --olive-pale: #ddf4ff;
  --sage: #dafbe1;
  --ink: #1f2328;
  --muted: #6e7781;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--cream);
  color: var(--brown-deep);
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 19px;
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
}

/* Subtle page texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
}

/* ── NAVIGATION ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--cream-dark);
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brown-deep);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-logo span {
  color: var(--olive);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brown-mid);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--olive);
  transition: width 0.25s ease;
}

.nav-links a:hover { color: var(--olive); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--olive); }
.nav-links a.active::after { width: 100%; }

/* ── HERO ── */
.hero {
  padding: 7rem 2.5rem 5rem;
  max-width: 820px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.8s ease both;
}

.hero-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-label::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--olive);
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--olive);
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--muted);
  font-weight: 300;
  max-width: 520px;
  line-height: 1.8;
}

/* ── DECORATIVE DIVIDER ── */
.divider {
  max-width: 820px;
  margin: 0 auto 4rem;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 1;
  position: relative;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--cream-dark));
}

.divider::before { background: linear-gradient(to right, transparent, var(--cream-dark)); }
.divider::after { background: linear-gradient(to left, transparent, var(--cream-dark)); }

.divider-icon {
  font-size: 1rem;
  color: var(--olive-light);
}

/* ── POSTS SECTION ── */
.posts-section {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 2.5rem 6rem;
  position: relative;
  z-index: 1;
}

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.post-card {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--cream-dark);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  animation: fadeUp 0.6s ease both;
}

.post-card:hover .post-title { color: var(--olive); }
.post-card:hover .post-arrow { transform: translateX(4px); opacity: 1; }

.post-date {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  padding-top: 0.35rem;
  line-height: 1.5;
}

.post-content {}

.post-tag {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--olive);
  background: var(--olive-pale);
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  margin-bottom: 0.6rem;
}

.post-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.post-excerpt {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.65;
}

.post-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--brown-light);
}

.post-arrow {
  transition: transform 0.2s, opacity 0.2s;
  opacity: 0.4;
}

/* ── PAGE CONTENT (About / Contact) ── */
.page-hero {
  padding: 6rem 2.5rem 3rem;
  max-width: 820px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.8s ease both;
}

.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.page-hero .subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  font-style: italic;
}

.page-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 1rem 2.5rem 6rem;
  position: relative;
  z-index: 1;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  align-items: start;
  animation: fadeUp 0.7s 0.1s ease both;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--brown-mid);
  margin-bottom: 1.4rem;
}

.about-text p:first-child::first-letter {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 700;
  float: left;
  line-height: 0.8;
  margin: 0.1em 0.08em 0 0;
  color: var(--olive);
}

.about-sidebar {}

.sidebar-card {
  background: #f6f8fa;
  border-radius: 4px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-card h3 {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--brown-mid);
  background: var(--cream);
  border: 1px solid var(--brown-light);
  border-radius: 100px;
  padding: 0.25rem 0.75rem;
  margin: 0.25rem 0.2rem;
  font-family: 'Crimson Pro', serif;
}

/* Projects */
.project-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.github-profile {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--brown-mid);
  text-decoration: none;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.2rem;
  transition: color 0.2s, border-color 0.2s;
}

.github-profile:hover {
  color: var(--olive);
  border-color: var(--olive);
}

.github-profile img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--cream-dark);
}

.projects-intro {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 3rem;
  align-items: start;
  margin-bottom: 3rem;
  animation: fadeUp 0.7s 0.1s ease both;
}

.projects-intro p {
  font-size: 1.1rem;
  color: var(--brown-mid);
  line-height: 1.85;
}

.project-stats {
  background: #f6f8fa;
  border-left: 3px solid var(--olive);
  padding: 1.25rem;
  display: grid;
  gap: 0.75rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-stats strong {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: 0;
  color: var(--ink);
}

.projects-list {
  display: grid;
  gap: 1rem;
  animation: fadeUp 0.7s 0.2s ease both;
}

.project-card {
  border: 1px solid var(--cream-dark);
  border-radius: 4px;
  padding: 1.4rem;
  background: #ffffff;
  transition: border-color 0.2s, transform 0.2s;
}

.project-card:hover {
  border-color: var(--brown-light);
  transform: translateY(-2px);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-lang {
  color: var(--ink);
  border-left: 3px solid var(--olive);
  padding-left: 0.5rem;
}

.project-lang.typescript { border-color: #3178c6; }
.project-lang.javascript { border-color: #c99a06; }
.project-lang.html { border-color: #e34c26; }
.project-lang.css { border-color: #663399; }

.project-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.project-card p {
  color: var(--brown-mid);
  font-size: 1rem;
  line-height: 1.65;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.project-actions a {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.project-actions a:hover {
  color: var(--brown-mid);
}

/* Contact */
.contact-intro {
  font-size: 1.1rem;
  color: var(--brown-mid);
  line-height: 1.85;
  margin-bottom: 3rem;
  max-width: 540px;
  animation: fadeUp 0.7s 0.1s ease both;
}

.contact-form {
  max-width: 560px;
  animation: fadeUp 0.7s 0.2s ease both;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--cream-dark);
  padding: 0.6rem 0;
  font-family: 'Crimson Pro', serif;
  font-size: 1rem;
  color: var(--brown-deep);
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-bottom-color: var(--olive);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--brown-light);
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--olive);
  color: var(--cream);
  border: none;
  padding: 0.85rem 2rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.2s, transform 0.15s;
  margin-top: 0.5rem;
}

.btn-submit:hover {
  background: var(--olive-light);
  transform: translateY(-1px);
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--cream-dark);
  padding: 2rem 2.5rem;
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}

footer p {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.footer-socials {
  display: flex;
  gap: 1.25rem;
}

.footer-socials a {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}

.footer-socials a:hover { color: var(--olive); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 680px) {
  nav {
    height: auto;
    padding: 0.85rem 1.25rem;
    flex-direction: column;
    gap: 0.7rem;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.15rem;
  }
  .hero, .posts-section, .page-hero, .page-body { padding-left: 1.25rem; padding-right: 1.25rem; }
  .post-card { grid-template-columns: 1fr; gap: 0.5rem; }
  .post-date { padding-top: 0; }
  .about-grid { grid-template-columns: 1fr; }
  .project-hero { align-items: flex-start; flex-direction: column; }
  .projects-intro { grid-template-columns: 1fr; gap: 1.5rem; }
  footer { flex-direction: column; gap: 1rem; text-align: center; }
}
