/* src/styles.css */

/* Design System */
:root {
  --brand-blue: #0b5fbf;
  --glow-cyan: #00e0ff;
  --glow-gold: #ffd54a;
  --dark-bg: #0b0f1a;
  --light-text: #f5f6fb;
  --muted-text: #b2b7c6;
  --sans-font: "Sora", "Trebuchet MS", Helvetica, Arial, sans-serif;
  --serif-font: "Playfair Display", "Times New Roman", serif;
  --max-width: 1400px;
  --sky-top: #0a1634;
  --sky-mid: #2f2b67;
  --sky-warm: #f28143;
  --sky-gold: #f7c45f;
  --frosted-bg: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.4);
  --nav-overlay-bg: rgba(10, 10, 20, 0.96);
  --nav-item-bg: rgba(255, 255, 255, 0.08);
  --nav-item-bg-hover: rgba(255, 255, 255, 0.14);
  --nav-item-border: rgba(255, 255, 255, 0.14);
}

/* Base & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--dark-bg);
}

body {
  font-family: var(--sans-font);
  font-size: 18px;
  line-height: 1.7;
  color: var(--light-text);
  background-color: var(--dark-bg);
  -webkit-font-smoothing: antialiased;
  padding-top: 80px;
}

body.nav-open {
  overflow: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--serif-font);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(3rem, 6vw, 5.5rem); }
h2 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h3 { font-size: 1.5rem; }

a {
  color: var(--glow-gold);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  filter: brightness(1.2);
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

.container {
  width: 90%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 2;
}

/* Main Sections */
.section {
  padding: 8rem 0;
  position: relative;
  overflow: hidden;
  --section-fade: transparent;
}

.section::before,
.section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 180px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.9;
}

.section::before {
  top: 0;
  background: linear-gradient(to bottom, var(--section-fade), transparent);
}

.section::after {
  bottom: 0;
  background: linear-gradient(to top, var(--section-fade), transparent);
}

@keyframes fade-in-out {
  0% { opacity: 0; transform: translateY(50px); }
  30%, 70% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-50px); }
}

@supports (animation-timeline: view()) {
  .section {
    animation: fade-in-out linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }
}

/* Backgrounds & Overlays */
.bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  transition: opacity 1.2s ease;
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light-text);
  overflow: hidden;
  text-align: left;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 180px;
  background: linear-gradient(to top, rgba(11, 15, 26, 0.75), transparent);
  z-index: 1;
  pointer-events: none;
}

.hero .bg-overlay {
  opacity: 1; /* Make background fully visible */
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  z-index: 1;
}

.hero-text {
  flex: 1;
  max-width: 54%;
  background: rgba(10, 16, 34, 0.3);
  border-radius: 24px;
  padding: 1.6rem 1.8rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 50px rgba(5, 10, 22, 0.35);
}

.hero-text h1 {
  font-family: var(--serif-font);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin-bottom: 1rem;
  line-height: 1.1;
  color: var(--light-text);
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.hero-text .intro-bio {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: rgba(245, 246, 251, 0.85);
}

.hero-image {
  flex: 0 0 auto;
  width: 35%;
  max-width: 400px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(5, 10, 22, 0.6);
  filter: brightness(95%) saturate(110%);
  transition: all 0.3s ease;
  object-fit: cover;
  object-position: center 20%;
  height: 520px;
  width: 100%;
}

.hero-image img:hover {
  filter: grayscale(0%) brightness(100%);
  transform: translateY(-5px);
}

.hero-links .cta-button {
  display: inline-block;
  background-color: var(--glow-gold);
  color: var(--dark-bg);
  padding: 0.85rem 2.2rem;
  border-radius: 50px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 15px 30px rgba(255, 213, 74, 0.35);
}

.hero-links .cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(255, 213, 74, 0.45);
}

/* Sparkle Effect */
.sparkle-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMTAwIiBjeT0iMTAwIiByPSIyIiBmaWxsPSIjRkZGIi8+PC9zdmc+'); /* Tiny white dot */
  background-size: 20px 20px;
  opacity: 0.12;
  animation: sparkle-move 70s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes sparkle-move {
  from { background-position: 0 0; }
  to { background-position: 1000px 1000px; }
}

@media (max-width: 800px) {
  .hero {
    height: auto;
    padding: 8rem 0 4rem;
    text-align: center;
  }

  .hero-content {
    flex-direction: column;
    gap: 2rem;
  }

  .hero-text {
    max-width: 100%;
    padding: 1.5rem;
  }

  .hero-image {
    width: 80%;
    max-width: 300px;
  }
  .hero-image img {
    height: auto;
  }
  .hero-text h1 {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }
  .hero-text .intro-bio {
    font-size: 1rem;
  }
}
/* Navigation Bar */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(8, 12, 22, 0.35);
  backdrop-filter: blur(12px);
  padding: 0.9rem 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--serif-font);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--light-text);
}

.nav-links {
  display: flex;
  gap: 3rem;
}

.nav-links a {
  font-family: var(--sans-font);
  font-weight: 500;
  font-size: 1rem;
  color: var(--light-text);
  padding-bottom: 0.5rem;
  border-bottom: 4px solid transparent;
  transition: all 0.3s ease;
}

.nav-links a:hover {
  color: var(--glow-gold);
  border-bottom-color: var(--glow-gold);
}

.nav-links a.active {
  color: var(--light-text);
  border-bottom-color: var(--light-text);
  font-weight: 700;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 0.6rem;
  border-radius: 12px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle:focus-visible {
  outline: 2px solid rgba(255, 213, 74, 0.75);
  outline-offset: 4px;
}

.hamburger {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--light-text);
  position: relative;
  transition: background 0.2s 0.2s;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 3px;
  background: var(--light-text);
  left: 0;
  transition: transform 0.2s, top 0.2s 0.2s;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  top: 0;
  transform: rotate(45deg);
  transition: top 0.2s, transform 0.2s 0.2s;
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
  transition: top 0.2s, transform 0.2s 0.2s;
}

@media (max-width: 800px) {
  .nav-toggle {
    display: block;
    z-index: 1101;
  }

  .nav-links {
    position: fixed;
    z-index: 1100;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: var(--nav-overlay-bg);
    backdrop-filter: blur(12px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: calc(80px + 1.25rem + env(safe-area-inset-top)) 1.25rem 1.25rem;
    gap: 0.75rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }

  .nav-links.active {
    transform: translateY(0px);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-links a {
    width: 100%;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.15rem;
    font-weight: 600;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    text-align: center;
    background: var(--nav-item-bg);
    border: 1px solid var(--nav-item-border);
    border-bottom: none;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
  }

  .nav-links a:hover {
    color: var(--light-text);
    background: var(--nav-item-bg-hover);
    border-color: rgba(255, 255, 255, 0.22);
  }

  .nav-links a.active {
    color: var(--light-text);
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
    font-weight: 700;
  }

  .nav-links a:focus-visible {
    outline: 2px solid rgba(255, 213, 74, 0.75);
    outline-offset: 4px;
  }
}

/* Focus Areas Section */
#focus {
  background-color: #f3f5fb;
  text-align: center;
  --section-fade: rgba(255, 255, 255, 0.9);
}

#focus .bg-overlay {
  background-size: cover;
  background-position: center;
  filter: brightness(1.05);
  opacity: 1;
}

#focus .section-title {
  background: rgba(255, 255, 255, 0.75);
  padding: 0.6rem 1.8rem;
  border-radius: 999px;
  text-shadow: none;
}

#focus .section-subtitle {
  display: none;
}

.data-mesh-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iNSIgY3k9IjUiIHJ9IjEuNSIgZmlsbD0iIzAwRjJGRiIvPjwvc3ZnPg=='); /* Small cyan dot */
  background-size: 40px 40px;
  opacity: 0.25;
  animation: data-mesh-animate 120s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes data-mesh-animate {
  from { background-position: 0 0; }
  to { background-position: 1000px 1000px; }
}

.section-title {
  font-family: var(--serif-font);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 3rem;
  color: #0c1224;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--glow-cyan);
  border-radius: 2px;
}

.section-subtitle {
  font-family: var(--sans-font);
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(12, 18, 36, 0.65);
  margin-top: 4rem;
  margin-bottom: 2rem;
}

.focus-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.focus-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 15px;
  padding: 2.5rem;
  width: 100%;
  height: 100%;
  min-height: 280px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
  min-width: 0;
  overflow-wrap: break-word;
}

.focus-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.focus-card h3 {
  color: var(--brand-blue);
  font-family: var(--serif-font);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.focus-card p {
  color: rgba(12, 18, 36, 0.8);
  font-size: 1rem;
  line-height: 1.6;
}

.focus-card strong {
  color: #0c1224;
}

/* Current Work */
.current-work {
  margin-top: 6rem;
  padding: 3rem;
  background: rgba(10, 10, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.current-work ul {
  list-style: none;
  padding: 0;
  margin-top: 2rem;
}

.current-work li {
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  padding-left: 25px;
  color: var(--muted-text);
}

.current-work li:last-child {
  border-bottom: none;
}

.current-work li::before {
  content: "»";
  position: absolute;
  left: 0;
  color: var(--glow-gold);
  font-size: 1.2rem;
  line-height: 1;
}
/* Current Work Section */
.current-work-section {
  position: relative;
  overflow: hidden;
  padding-top: 10rem; /* Space for the background to show */
  padding-bottom: 5rem;
  --section-fade: rgba(11, 15, 26, 0.7);
}

.current-work-section .bg-overlay {
  background-attachment: fixed; /* Parallax-like effect */
  opacity: 0.85;
  filter: none;
  z-index: 0;
}

.current-work-section .section-subtitle {
  font-family: var(--serif-font);
  color: rgba(245, 246, 251, 0.95);
  font-size: clamp(2rem, 3vw, 2.6rem);
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.current-work-section .section-intro,
.current-work-section small {
  font-family: var(--sans-font);
  color: rgba(245, 246, 251, 0.85);
  font-size: 1.15rem;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.workspace-overlay {
  display: none;
}

.current-work-cards-container {
  background: rgba(13, 20, 36, 0.7);
  border-radius: 15px;
  padding: 3rem;
  margin-top: 3rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  position: relative;
  z-index: 2;
  text-align: left;
  max-width: 100%;
}

.current-work-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.current-work-columns ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.current-work-cards-container ul {
  list-style: none;
  padding: 0;
}

.current-work-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted-text);
}

.current-work-item:last-child {
  border-bottom: none;
}

.current-work-item span {
  font-family: var(--sans-font);
  flex-grow: 1;
}

.current-work-item a {
  font-family: var(--sans-font);
}

.progress-bar-container {
  width: 150px;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  margin-left: 1rem;
}

.progress-bar {
  height: 100%;
  width: 70%;
  background: linear-gradient(to right, var(--glow-cyan), var(--brand-blue));
  border-radius: 6px;
  transition: width 0.5s ease-in-out;
}

@media (max-width: 800px) {
  .current-work-section {
    padding-top: 8rem;
  }
  .workspace-overlay {
    height: 200px;
  }
  .current-work-cards-container {
    padding: 1.5rem;
  }
  .current-work-columns {
    grid-template-columns: 1fr;
  }
  .current-work-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .progress-bar-container {
    width: 100%;
    margin-left: 0;
  }
}

/* Identity Section */
#identity {
  background-color: #0b0f18;
  color: var(--light-text);
  padding: 6rem 0;
  --section-fade: rgba(11, 15, 26, 0.75);
}

#identity .bg-overlay {
  opacity: 0.9;
  filter: brightness(0.75) contrast(1.1);
  background-position: center 25%;
}

.glow-mesh-overlay {
  position: absolute;
  inset: 0;
  background-image: url("floating-network.webp");
  background-repeat: no-repeat;
  background-size: 560px auto;
  background-position: right 4% center;
  mix-blend-mode: screen;
  filter: none;
  opacity: 0.95;
  z-index: 1;
  pointer-events: none;
}

#identity .section-title {
  color: var(--light-text);
}

.identity-box {
  background: rgba(9, 14, 28, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 3rem;
  max-width: 780px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.rich-text {
  font-size: 1.05rem;
  color: rgba(245, 246, 251, 0.9);
  line-height: 1.9;
}

/* Foundation Section */
#foundation {
  background-color: #0d1428;
  color: var(--light-text);
  --section-fade: rgba(11, 15, 26, 0.75);
}

#foundation .bg-overlay {
  opacity: 0.28;
  filter: brightness(0.6) saturate(1.05);
}

#foundation .section-title,
#foundation .section-intro,
#foundation p {
  color: var(--light-text);
}

#foundation .foundation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

#foundation .foundation-block {
  background: rgba(9, 14, 28, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 1.8rem;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.3);
}

#foundation .foundation-block .section-subtitle {
  margin-bottom: 0.75rem;
  color: var(--light-text);
}

#foundation .rich-text {
  margin-bottom: 1.5rem;
}

/* Blog Section */
#blog,
#writing {
  background: linear-gradient(rgba(6, 10, 20, 0.72), rgba(6, 10, 20, 0.72)),
              url("blog.webp") center top/cover no-repeat;
  color: var(--light-text);
  --section-fade: rgba(11, 15, 26, 0.75);
}

#blog .container,
#writing .container {
  position: relative;
  z-index: 1;
}

#blog .section-title,
#writing .section-title {
  color: var(--light-text);
}

#blog .section-intro,
#writing .section-intro {
  color: rgba(245, 246, 251, 0.82);
}

.section-intro {
  font-size: 1.1rem;
  color: rgba(12, 18, 36, 0.7);
  margin-bottom: 2.5rem;
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.blog-item {
  background: rgba(9, 14, 28, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 0 2rem 2rem;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.blog-item::before {
  content: "";
  display: block;
  height: 160px;
  margin: 0 -2rem 1.5rem;
  background: linear-gradient(120deg, rgba(11, 95, 191, 0.38), rgba(0, 224, 255, 0.2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.blog-item h3 a {
  color: var(--light-text);
}

.blog-item .date {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.75rem;
  color: rgba(245, 246, 251, 0.62);
  margin-bottom: 0.5rem;
}

#blog .blog-item p,
#writing .blog-item p {
  color: rgba(245, 246, 251, 0.82);
}

#writing .blog-item::before {
  display: none;
}

#writing .blog-item {
  padding: 1.5rem 2rem 2rem;
}

.blog-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.42);
}

/* Links/Presence Section */
#links {
  background: #070b16;
  color: var(--light-text);
}

#links {
  background: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
              url("links-presence.webp") center top/100% auto no-repeat;
  background-color: #070b16;
  --section-fade: transparent;
  padding: 10rem 0;
  min-height: 70vh;
}

#links .container {
  position: relative;
  z-index: 2;
}

#links .section-title {
  color: var(--light-text);
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.link-card {
  background: rgba(255, 255, 255, 0.14);
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 22px;
  padding: 2rem;
  text-align: center;
  box-shadow: inset 0 0 14px rgba(255, 255, 255, 0.25), 0 0 14px rgba(255, 255, 255, 0.15);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.link-card a {
  color: var(--light-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.link-card svg {
  width: 42px;
  height: 42px;
  fill: var(--glow-gold);
}

.link-card span {
  font-size: 1.1rem;
  font-weight: 600;
}

.link-card p {
  margin-top: 1rem;
  color: rgba(245, 246, 251, 0.7);
}

.link-card:hover {
  transform: scale(1.06) translateY(-10px);
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.35), 0 0 24px rgba(255, 255, 255, 0.25);
}

/* Contact Section */
#contact {
  background: url("contact-section.webp") center/cover no-repeat;
  color: var(--light-text);
  --section-fade: rgba(11, 15, 26, 0.75);
  padding: 10rem 0;
  min-height: 70vh;
}

#contact .section-title {
  color: var(--light-text);
}

.contact-card {
  background: rgba(10, 14, 24, 0.65);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  max-width: 520px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* Footer */
.footer {
  background: #05070f;
  color: rgba(245, 246, 251, 0.6);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

/* Blog Pages */
.blog-hero {
  padding: 9rem 0 2.5rem;
  background: #ffffff;
  border-bottom: 1px solid #e8ecf1;
}

.blog-container {
  max-width: 760px;
}

.blog-page .section-title::after {
  display: none;
}

.blog-page .section-title {
  display: block;
  margin: 0 0 0.85rem;
  font-family: var(--sans-font);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #111827;
}

.blog-page .section-intro {
  margin: 0;
  color: #4b5563;
  font-size: 1.05rem;
}

.blog-page-index .section {
  background: #ffffff;
  padding: 2.25rem 0 5rem;
}

.blog-page-index .blog-list {
  display: grid;
  gap: 0;
}

.blog-page-index .blog-item {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e8ecf1;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  padding: 1.5rem 0;
}

.blog-page-index .blog-item::before {
  display: none;
}

.blog-page-index .blog-item:hover {
  transform: none;
  box-shadow: none;
}

.blog-page-index .blog-item h3 {
  margin-bottom: 0.35rem;
}

.blog-page-index .blog-item h3 a {
  color: #101828;
}

.blog-page-index .blog-item .date {
  margin-bottom: 0.5rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.92rem;
  color: #6b7280;
}

.blog-page-index .blog-item p {
  margin: 0;
  color: #374151;
}

.writing-index-page .blog-hero,
.writing-index-page .section {
  background: linear-gradient(rgba(6, 10, 20, 0.72), rgba(6, 10, 20, 0.72)),
              url("blog.webp") center top/cover no-repeat;
  color: var(--light-text);
}

.writing-index-page .blog-hero {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.writing-index-page .blog-container {
  position: relative;
  z-index: 1;
}

.writing-index-page .section-title,
.writing-index-page .section-intro,
.writing-index-page .writing-block-title,
.writing-index-page .writing-group h2 {
  color: var(--light-text);
}

.writing-index-page .writing-main-block {
  background: rgba(9, 14, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 1.25rem;
}

.writing-index-page .blog-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.writing-index-page .blog-item h3 a {
  color: var(--light-text);
}

.writing-index-page .blog-item .date {
  color: rgba(245, 246, 251, 0.68);
}

.writing-index-page .blog-item p {
  color: rgba(245, 246, 251, 0.84);
}

.writing-index-page .writing-chip {
  border-color: rgba(255, 255, 255, 0.35);
  color: rgba(245, 246, 251, 0.9);
  background: rgba(255, 255, 255, 0.06);
}

.writing-index-page .writing-chip.is-active {
  border-color: rgba(255, 255, 255, 0.45);
  color: #0d2f58;
  background: #eef5ff;
}

.writing-index-page .fiction-book-card {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.writing-index-page .fiction-book-card h3 a,
.writing-index-page .fiction-book-card p,
.writing-index-page .fiction-book-card .date {
  color: rgba(245, 246, 251, 0.9);
}

.writing-chips {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.writing-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #d7dde6;
  color: #4b5563;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
}

.writing-chip.is-active {
  border-color: #b7c7dc;
  background: #eff4fa;
  color: #0f3f73;
}

.writing-layout {
  display: grid;
  gap: 2.25rem;
}

.writing-main-block {
  display: grid;
  gap: 1rem;
}

.writing-block-title {
  margin: 0;
  color: #111827;
  font-family: var(--sans-font);
  font-size: 1.35rem;
}

.writing-group h2 {
  margin: 0 0 0.75rem;
  color: #111827;
  font-family: var(--sans-font);
  font-size: 1.2rem;
}

.fiction-book-grid {
  display: grid;
  gap: 1rem;
}

.fiction-book-card {
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  background: #fbfcfe;
}

.fiction-book-card h3 {
  margin: 0 0 0.35rem;
}

.fiction-book-card h3 a {
  color: #101828;
}

.fiction-book-card p {
  margin: 0 0 0.5rem;
  color: #374151;
}

.fiction-book-card .date {
  margin: 0;
}

.fiction-chapter-list {
  margin: 0;
  padding-left: 1.2rem;
}

.fiction-chapter-list li {
  margin-bottom: 0.7rem;
  color: #4b5563;
}

.fiction-chapter-list li a {
  color: #0f5fb8;
}

.fiction-chapter-list li span {
  margin-left: 0.45rem;
  font-size: 0.9rem;
  color: #6b7280;
}

.blog-back-link {
  display: inline-block;
  margin-bottom: 1.1rem;
  font-size: 0.95rem;
  color: #6b7280;
}

.blog-post-title {
  margin: 0 0 0.65rem;
  font-family: var(--sans-font);
  font-size: clamp(2rem, 4.6vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: #111827;
}

.blog-hero .meta {
  margin-bottom: 0.95rem;
  font-size: 0.95rem;
  color: #6b7280;
}

.blog-post {
  background: #ffffff;
  color: #111827;
  padding: 2.25rem 0 5rem;
}

.blog-article {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.12rem, 2vw, 1.24rem);
  line-height: 1.9;
  letter-spacing: 0.003em;
  color: #1f2937;
}

.blog-article > :first-child {
  margin-top: 0;
}

.blog-article p {
  margin: 0 0 1.2em;
}

.blog-article p:last-child {
  margin-bottom: 0;
}

.blog-article h2,
.blog-article h3,
.blog-article h4 {
  margin: 2em 0 0.75em;
  font-family: var(--sans-font);
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: #111827;
}

.blog-article h2 { font-size: clamp(1.55rem, 3vw, 1.95rem); }
.blog-article h3 { font-size: clamp(1.3rem, 2.6vw, 1.5rem); }

.blog-article a {
  color: #0f5fb8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-article blockquote {
  margin: 1.6em 0;
  padding: 0.1rem 0 0.1rem 1.1rem;
  border-left: 3px solid #c9d4e5;
  color: #4b5563;
  font-style: italic;
}

.blog-article ul,
.blog-article ol {
  margin: 0 0 1.2em 1.35em;
}

.blog-article li + li {
  margin-top: 0.45em;
}

.blog-article img {
  margin: 1.65rem auto;
  border-radius: 12px;
}

.blog-article hr {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 2.1rem 0;
}

.blog-article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  background: #f3f4f6;
  border-radius: 6px;
  padding: 0.12rem 0.36rem;
}

.blog-article pre {
  margin: 1.4em 0;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 10px;
  background: #111827;
  color: #f9fafb;
}

.blog-article pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.related-posts {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e8ecf1;
}

.related-posts h2 {
  margin: 0 0 0.9rem;
  color: #111827;
  font-family: var(--sans-font);
  font-size: 1.15rem;
}

.related-posts ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-posts li + li {
  margin-top: 0.5rem;
}

.related-posts a {
  color: #0f5fb8;
}

/* Unified Writing Background */
.blog-page .blog-hero,
.blog-page .section,
.blog-page .blog-post {
  background: linear-gradient(rgba(6, 10, 20, 0.72), rgba(6, 10, 20, 0.72)),
              url("blog.webp") center top/cover no-repeat;
  color: var(--light-text);
}

.blog-page .blog-hero {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.blog-page .section-title,
.blog-page .section-intro,
.blog-page .writing-block-title,
.blog-page .writing-group h2,
.blog-page .blog-post-title,
.blog-page .blog-back-link,
.blog-page .blog-hero .meta {
  color: var(--light-text);
}

.blog-page .writing-main-block,
.blog-page .fiction-book-card,
.blog-page .blog-article,
.blog-page .related-posts {
  background: rgba(9, 14, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
}

.blog-page .writing-main-block,
.blog-page .fiction-book-card,
.blog-page .related-posts {
  padding: 1.25rem;
}

.blog-page .blog-page-index .blog-item,
.blog-page-index .blog-item,
.blog-page .blog-item {
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

.blog-page .blog-item h3 a,
.blog-page .blog-item .date,
.blog-page .blog-item p,
.blog-page .fiction-book-card h3 a,
.blog-page .fiction-book-card p,
.blog-page .fiction-book-card .date,
.blog-page .fiction-chapter-list li,
.blog-page .fiction-chapter-list li span {
  color: rgba(245, 246, 251, 0.88);
}

.blog-page .blog-article,
.blog-page .blog-article p,
.blog-page .blog-article li,
.blog-page .blog-article blockquote,
.blog-page .blog-article h2,
.blog-page .blog-article h3,
.blog-page .blog-article h4 {
  color: rgba(245, 246, 251, 0.92);
}

.blog-page .blog-article a,
.blog-page .related-posts a,
.blog-page .fiction-chapter-list li a {
  color: var(--glow-gold);
}

.blog-page .blog-article code {
  background: rgba(255, 255, 255, 0.12);
}

.blog-page .blog-article pre {
  background: rgba(5, 8, 16, 0.92);
}

.blog-page .writing-chip {
  border-color: rgba(255, 255, 255, 0.35);
  color: rgba(245, 246, 251, 0.9);
  background: rgba(255, 255, 255, 0.06);
}

.blog-page .writing-chip.is-active {
  border-color: rgba(255, 255, 255, 0.45);
  color: #0d2f58;
  background: #eef5ff;
}

.blog-post.has-image-bg {
  position: relative;
  background-position: top center;
  background-size: 100% auto;
  background-repeat: repeat-y;
  overflow: hidden;
}

.blog-post.has-image-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 20, 0.62);
  pointer-events: none;
}

.blog-post.has-image-bg .blog-container {
  position: relative;
  z-index: 1;
}

.blog-post.has-image-bg .blog-article.image-bg-article,
.blog-post.has-image-bg .related-posts {
  background: transparent;
  border: none;
  box-shadow: none;
}

.blog-post.has-image-bg .blog-article.image-bg-article,
.blog-post.has-image-bg .blog-article.image-bg-article p,
.blog-post.has-image-bg .blog-article.image-bg-article li,
.blog-post.has-image-bg .blog-article.image-bg-article h2,
.blog-post.has-image-bg .blog-article.image-bg-article h3,
.blog-post.has-image-bg .blog-article.image-bg-article h4 {
  color: rgba(245, 246, 251, 0.97);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

/* Animations */
.hero-text,
.hero-image,
.focus-card,
.current-work-cards-container,
.identity-box,
.blog-item,
.link-card,
.contact-card {
  animation: float-up 0.9s ease both;
}

.focus-card:nth-child(2) { animation-delay: 0.12s; }
.focus-card:nth-child(3) { animation-delay: 0.24s; }
.blog-item:nth-child(2) { animation-delay: 0.1s; }
.blog-item:nth-child(3) { animation-delay: 0.2s; }
.link-card:nth-child(2) { animation-delay: 0.1s; }
.link-card:nth-child(3) { animation-delay: 0.2s; }
.link-card:nth-child(4) { animation-delay: 0.3s; }

@keyframes float-up {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
}

@media (max-width: 800px) {
  .hero {
    padding-top: 8rem;
  }

  .hero h1 {
    font-size: 2.8rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .blog-hero {
    padding-top: 7.4rem;
  }

  .blog-post {
    padding-top: 1.75rem;
  }

  .blog-page .section-intro {
    font-size: 1rem;
  }

  .blog-article {
    font-size: 1.05rem;
    line-height: 1.82;
  }
}

/* Utility to hide old decor */
.page-decor, .hero-frame {
  display: none !important;
}

/* Enhanced Focus Grid Layout - Mobile/Tablet Fixes */
@media (max-width: 900px) {
  .focus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .focus-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
