:root {
  --cream: #f5f0e8;
  --warm0: #faf7f2;
  --warm1: #f0e9db;
  --brown: #6b4e35;
  --darkbr: #3d2b1a;
  --ink: #1e140a;
  --accent: #c97d3a;
  --text: #2c1f12;
  --muted: #7a6652;
  --border: rgba(107, 78, 53, 0.15);
}

/* RESET & CORE */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body { background: var(--warm0); color: var(--text); font-family: 'DM Sans', sans-serif; line-height: 1.6; }

/* TYPOGRAPHY */
h1, h2, h3 { font-family: 'Fraunces', serif; color: var(--ink); line-height: 1.1; }
.sec-title { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 900; margin-bottom: 2rem; letter-spacing: -1px; }
.sec-title em { font-style: italic; font-weight: 300; color: var(--accent); }
.sec-label { font-family: 'Space Mono', monospace; font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.sec-label::before { content: ''; width: 24px; height: 1px; background: var(--accent); }

/* LAYOUT */
section { padding: 6rem 5%; max-width: 1400px; margin: 0 auto; }
.about-content { max-width: 800px; font-size: 1.1rem; color: var(--muted); }
.about-content p { margin-bottom: 1.5rem; }

/* NAVIGATION */
header { position: fixed; top: 0; width: 100%; z-index: 1000; background: rgba(250, 247, 242, 0.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
nav { display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 5%; max-width: 1400px; margin: 0 auto; }
.nav-logo a { font-family: 'Fraunces', serif; font-size: 1.5rem; font-weight: 700; color: var(--brown); text-decoration: none; }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { font-family: 'Space Mono', monospace; font-size: 0.8rem; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color 0.3s; }
.nav-links a:hover { color: var(--accent); }

/* HERO */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; min-height: 100vh; padding-top: 8rem; }
.hero-tag { display: inline-flex; align-items: center; gap: 8px; font-family: 'Space Mono', monospace; font-size: 0.75rem; color: var(--accent); border: 1px solid var(--accent); padding: 0.4rem 1rem; border-radius: 50px; margin-bottom: 1.5rem; }
.hero-name { font-size: clamp(4rem, 8vw, 7rem); margin-bottom: 1.5rem; }
.hero-role { font-size: 1.2rem; color: var(--muted); margin-bottom: 2rem; max-width: 500px; }
.profile-img { width: 100%; border-radius: 20px; box-shadow: 0 20px 40px rgba(61, 43, 26, 0.1); }

/* BUTTONS */
.btn-warm { font-family: 'DM Sans', sans-serif; font-weight: 600; padding: 1rem 2rem; border-radius: 8px; text-decoration: none; display: inline-block; transition: all 0.3s; cursor: pointer; }
.btn-fill { background: var(--brown); color: var(--cream); }
.btn-fill:hover { background: var(--darkbr); transform: translateY(-2px); }
.btn-stroke { border: 1px solid var(--brown); color: var(--brown); }
.btn-stroke:hover { background: var(--brown); color: var(--cream); }
.btn-sm { padding: 0.6rem 1.2rem; font-size: 0.9rem; margin-top: 1rem; }

/* PROJECT CARDS */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; }
.proj-card { background: var(--warm1); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; transition: transform 0.3s; }
.proj-card:hover { transform: translateY(-5px); border-color: var(--accent); }
.proj-category { font-family: 'Space Mono', monospace; font-size: 0.7rem; color: var(--accent); display: block; margin-bottom: 0.5rem; }
.proj-name { font-size: 1.5rem; margin-bottom: 1rem; }
.proj-desc { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.5rem; }
.proj-tech { font-family: 'Space Mono', monospace; font-size: 0.8rem; color: var(--brown); border-top: 1px solid var(--border); padding-top: 1rem; }

/* SKILLS GRID */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.skill-category { background: var(--warm0); border: 1px solid var(--border); padding: 2rem; border-radius: 12px; }
.skill-category h3 { font-size: 1.2rem; margin-bottom: 1rem; }
.skill-category p { color: var(--muted); font-size: 0.95rem; }

/* REVEAL ANIMATIONS (Performance optimized) */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); will-change: opacity, transform; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* MOBILE */
.nav-ham { display: none; background: transparent; border: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-ham span { width: 25px; height: 2px; background: var(--brown); transition: 0.3s; }
.mob-menu { display: none; }

@media(max-width: 768px) {
  .hero { grid-template-columns: 1fr; padding-top: 6rem; text-align: center; }
  .hero-role { margin: 0 auto 2rem auto; }
  .nav-links { display: none; }
  .nav-ham { display: flex; }
  .mob-menu.open { display: flex; flex-direction: column; position: fixed; top: 70px; left: 0; width: 100%; background: var(--warm0); padding: 2rem; border-bottom: 1px solid var(--border); }
  .mob-menu a { padding: 1rem 0; color: var(--ink); text-decoration: none; font-family: 'Space Mono', monospace; text-transform: uppercase; border-bottom: 1px solid var(--border); }
}
/* ==================================================
   BLOG POSTS LISTING
================================================== */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  max-width: 900px;
}

.blog-card {
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.blog-meta {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 0.8rem;
}

.blog-title {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.blog-title a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-title a:hover {
  color: var(--brown);
}

.blog-excerpt {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.blog-tags {
  display: flex;
  gap: 10px;
}

/* ==================================================
   PROJECT DETAIL PAGE
================================================== */
.project-article {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 5%;
}

.project-hero {
  margin-bottom: 4rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 3rem;
}

.project-lead {
  font-size: 1.25rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 700px;
}

.project-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.content-section {
  margin-bottom: 4rem;
}

.content-section h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--darkbr);
}

.content-section p {
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.tech-list {
  list-style: none;
  background: var(--warm1);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin: 2rem 0;
}

.tech-list li {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  color: var(--text);
  display: flex;
  align-items: center;
}

.tech-list li::before {
  content: '✦';
  color: var(--accent);
  margin-right: 12px;
  font-size: 0.8rem;
}

/* CODE BLOCKS */
pre {
  background: var(--ink);
  color: var(--cream);
  padding: 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  margin: 2rem 0;
  font-family: 'Space Mono', monospace;
  font-size: 0.95rem;
  line-height: 1.5;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

code {
  font-family: 'Space Mono', monospace;
}
/* ==================================================
   ENHANCED CONTACT SECTION
================================================== */
#contact {
  background: var(--warm1);
  border-top: 1px solid var(--border);
  padding: 8rem 5%;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-sub {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 3rem;
  max-width: 450px;
  line-height: 1.7;
}

/* Direct Info Details */
.direct-contact {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.contact-item-label {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
}

.contact-link, .contact-text {
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.contact-link:hover {
  color: var(--accent);
}

/* Social Pills */
.social-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.soc-pill {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--brown);
  border: 1px solid var(--border);
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  background: transparent;
}

.soc-pill:hover {
  background: var(--brown);
  color: var(--cream);
  border-color: var(--brown);
  transform: translateY(-2px);
}

/* Form Styling */
.contact-form-wrapper {
  background: var(--warm0);
  padding: 3rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(61, 43, 26, 0.05);
}

.form-group {
  margin-bottom: 2rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  font-size: 1.1rem;
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
  box-shadow: 0 1px 0 0 var(--accent);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  padding: 1.2rem 2rem;
  border: none;
}

.submit-arrow {
  transition: transform 0.3s ease;
}

.submit-btn:hover .submit-arrow {
  transform: translateX(5px);
}

.form-success-msg {
  display: none;
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(90, 154, 90, 0.1);
  color: #3d6a3d;
  border: 1px solid rgba(90, 154, 90, 0.3);
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
}

/* Mobile Responsiveness for Contact */
@media (max-width: 900px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
  .contact-form-wrapper {
    padding: 2rem 1.5rem;
  }
}