:root {
  --bg: #ffffff;
  --text: #111111;
  --text-light: #666666;
  --brand-orange: #F97316;
  --border: rgba(0,0,0,0.08);
}

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

html { 
  font-size: 16px; 
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  font-family: "IBM Plex Sans", -apple-system, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  overflow-wrap: break-word;
  letter-spacing: -0.01em;
}

/* --- Navigation --- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  border-top: 5px solid var(--brand-orange);
  padding: 1.2rem 0;
  margin-bottom: 5rem;
}

nav {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
}

.site-title:hover { color: var(--brand-orange); }

nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  margin-left: 2rem;
  font-size: 0.95rem;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--brand-orange);
  transition: width 0.3s ease;
}

nav a:hover::after { width: 100%; }

/* --- Layout & Typography --- */
main {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 40px 4rem 40px;
}

h1 {
  font-size: 3.5rem;
  line-height: 1.05;
  margin-bottom: 3rem;
  font-weight: 600;
  letter-spacing: -0.05em;
  color: var(--text); /* Forces main titles to stay black */
}

/* Specific styling for story titles inside blog posts */
article h1 {
  color: var(--brand-orange);
  margin-top: 1rem;
}

h2 {
  font-size: 1.8rem;
  margin: 4rem 0 2rem 0;
  font-weight: 600;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

p { margin-bottom: 1.8rem; font-size: 1.2rem; font-weight: 400; }

article a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 4px;
  font-weight: 600; 
  transition: all 0.2s ease;
}

article a:hover {
  color: var(--brand-orange);
  text-decoration-color: var(--brand-orange);
}

/* --- Hero Section --- */
.hero-section {
  display: flex;
  align-items: flex-start;
  gap: 50px;
  margin-bottom: 5rem;
  flex-wrap: wrap;
}

.hero-text { flex: 1; min-width: 300px; }

.hero-image img {
  max-width: 280px;
  width: 100%;
  border-radius: 16px;
}

/* --- Recent Posts (Large & Bold) --- */
.recent-posts { 
  list-style: none; 
  margin: 2rem 0; 
  padding: 0; 
}

.recent-posts li { 
  margin-bottom: 1.5rem; 
  display: flex; 
  align-items: center; 
}

.post-arrow { 
  color: var(--brand-orange); 
  margin-right: 12px; 
  font-weight: bold; 
  font-size: 1.2rem;
}

.recent-posts a {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  line-height: 1.2;
  transition: color 0.2s ease;
}

.recent-posts a:hover {
  color: var(--brand-orange);
}

/* --- Portfolio Grid --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 3rem;
}

.portfolio-col ul { list-style: none; margin-bottom: 3rem !important; }
.portfolio-col li { font-size: 1rem; margin-bottom: 0.6rem; line-height: 1.4; }
.portfolio-col li a { font-weight: 400; text-decoration: none; border-bottom: 1px solid var(--border); }
.portfolio-col li a:hover { border-bottom-color: var(--brand-orange); }

/* --- Newsletter Box --- */
.newsletter-box {
  padding: 3rem;
  background: #fdfdfd;
  border: 1px solid var(--border);
  border-radius: 20px;
}

input[type="email"] {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
  max-width: 400px;
  margin-bottom: 1.5rem;
  display: block;
  font-family: inherit;
}

input[type="submit"] {
  padding: 14px 30px;
  background: var(--brand-orange);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s ease, transform 0.1s ease;
}

input[type="submit"]:hover {
  opacity: 0.9;
}

input[type="submit"]:active {
  transform: translateY(1px);
}

/* --- Global Elements --- */
hr { border: none; height: 1px; background: transparent; }

footer {
  border-top: 1px solid var(--border);
  padding: 5rem 2rem;
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* --- Responsiveness --- */
@media (max-width: 768px) {
  h1 { font-size: 2.8rem; }
  .recent-posts a { font-size: 1.25rem; }
  nav { padding: 0 20px; }
  main { padding: 0 24px; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .hero-section { flex-direction: column-reverse; }
}
