/* --- Custom Properties --- */
:root {
  --color-bg: #f8fafc;
  --color-bg-alt: #ffffff;
  --color-bg-dark: #0f172a;
  --color-text: #334155;
  --color-text-heading: #0f172a;
  --color-text-muted: #64748b;
  --color-accent: #0891b2;
  --color-accent-hover: #06b6d4;
  --color-accent-subtle: #ecfeff;
  --color-border: #e2e8f0;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Source Sans 3", "Inter", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text);
  background: var(--color-bg);
}
a { color: var(--color-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-accent-hover); text-decoration: underline; }
h1, h2, h3 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  color: var(--color-text-heading);
  margin-top: 0;
}
h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 2rem;
  text-align: center;
}
h3 { font-size: 1.15rem; font-weight: 500; }
p { margin-top: 0; }
.container { max-width: 900px; margin: 0 auto; padding: 0 2rem; }

::selection { background: #0891b2; color: #fff; }

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  padding: 0.75rem 1.5rem;
  background: var(--color-accent);
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  z-index: 2000;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* --- Navigation --- */
nav {
  position: sticky;
  top: 0;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
}
.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text-heading);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-brand:hover { color: var(--color-accent); text-decoration: none; }
nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0.75rem 0;
  gap: 1.5rem;
  flex-wrap: wrap;
}
nav a {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.88rem;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
nav a:hover { color: var(--color-accent); text-decoration: none; }
nav a.nav-active { color: var(--color-accent); }

/* --- Hero --- */
.hero {
  padding: 6rem 2rem 4rem;
  text-align: center;
  background: linear-gradient(180deg, var(--color-accent-subtle) 0%, var(--color-bg) 100%);
}
.hero p { color: var(--color-text-muted); font-size: 1.1rem; max-width: 600px; margin: 1rem auto; }
.hero-links { margin-top: 1.5rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.88rem;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.hero-links a:hover { border-color: var(--color-accent); color: var(--color-accent); box-shadow: 0 2px 8px rgba(8, 145, 178, 0.12); text-decoration: none; }
.hero-links svg { width: 18px; height: 18px; }
.tagline {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  color: var(--color-accent);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0.25rem 0;
}
.hero-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.5rem;
  border: 4px solid var(--color-bg-alt);
  box-shadow: 0 0 0 2px var(--color-accent), 0 8px 24px rgba(15, 23, 42, 0.08);
}

/* --- Sections --- */
section { padding: 4.5rem 0; }
section:nth-child(odd) { background: var(--color-bg); }
section:nth-child(even) { background: var(--color-bg-alt); }

/* --- About --- */
.about-content {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  max-width: 900px;
  margin: 0 auto;
}
.about-text { flex: 1; min-width: 0; }
#about p {
  text-align: left;
  color: var(--color-text);
  font-size: 1.08rem;
  line-height: 1.85;
}
#about p + p { margin-top: 1rem; }
.about-image {
  flex-shrink: 0;
  width: 320px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

/* --- Experience --- */
.job {
  margin-bottom: 2.5rem;
  padding-left: 1.5rem;
  border-left: 3px solid var(--color-accent);
}
.job:last-child { margin-bottom: 0; }
.job-header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; }
.job-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: var(--color-text-heading);
  font-size: 1.1rem;
}
.job-company { color: var(--color-accent); font-weight: 600; text-decoration: none; }
a.job-company:hover { color: var(--color-accent-hover); text-decoration: underline; }
.job-meta { font-size: 0.85rem; color: var(--color-text-muted); font-weight: 500; }
.job ul { padding-left: 1.25rem; margin: 0.75rem 0 0; }
.job li { color: var(--color-text); margin-bottom: 0.5rem; font-size: 0.95rem; }
.job details { margin-top: 0.5rem; }
.job details summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-accent);
  list-style: none;
}
.job details summary::before { content: "▸ "; }
.job details[open] summary::before { content: "▾ "; }
.job details summary::-webkit-details-marker { display: none; }
.job details ul { margin-top: 0.5rem; }

/* --- Project Card Header with Icon --- */
.project-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.project-card-header h3 { margin-bottom: 0; }
.project-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}

/* --- Project Card --- */
.project-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  border-top: 4px solid var(--color-accent);
  padding: 2.25rem;
  max-width: 700px;
  margin: 0 auto;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.3s;
}
.project-card:hover { box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08); }
.project-card + .project-card { margin-top: 1.5rem; }
section:nth-child(even) .project-card { background: var(--color-bg); }
.project-card h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--color-text-heading);
}
.project-card p { color: var(--color-text); line-height: 1.8; }
.project-link {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.6rem 1.4rem;
  background: var(--color-accent);
  color: #fff;
  border-radius: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.project-link:hover { background: var(--color-accent-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(8, 145, 178, 0.25); text-decoration: none; color: #fff; }
.tech-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.tech-badges span {
  padding: 0.3rem 0.75rem;
  background: var(--color-accent-subtle);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
}
.project-more {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* --- Skills --- */
.skills-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.skill-category h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  text-align: left;
}
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.skills-grid span {
  padding: 0.45rem 0.9rem;
  background: var(--color-bg-alt);
  border: 1.5px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text);
  transition: border-color 0.2s, color 0.2s;
}
.skills-grid span:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* --- Education --- */
.education-item {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}
.education-item .job-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: var(--color-text-heading);
  font-size: 1.1rem;
}
.education-item .job-company { color: var(--color-accent); font-weight: 600; text-decoration: none; }
.education-item a.job-company:hover { color: var(--color-accent-hover); text-decoration: underline; }
.education-item .job-meta { font-size: 0.85rem; color: var(--color-text-muted); font-weight: 500; display: block; margin-top: 0.25rem; }
.education-honors {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: var(--color-text);
}

/* --- Contact --- */
#contact {
  text-align: center;
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-accent-subtle) 100%) !important;
  padding: 5rem 0;
  border-top: 1px solid var(--color-border);
}
#contact h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.contact-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }
.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.9rem;
  transition: border-color 0.2s, color 0.2s;
}
.contact-links a:hover { border-color: var(--color-accent); color: var(--color-accent); text-decoration: none; }
.location { color: var(--color-text-muted); font-size: 0.88rem; margin-top: 1.25rem; }

/* --- Footer --- */
footer {
  background: var(--color-bg-dark);
  padding: 2rem 2rem;
  text-align: center;
  font-size: 0.85rem;
}
footer a { color: #94a3b8; margin: 0 0.5rem; transition: color 0.2s; }
footer a:hover { color: var(--color-accent-hover); text-decoration: none; }
footer .copyright { color: #64748b; margin-top: 0.75rem; }

/* ==========================================================================
   Blog Styles
   ========================================================================== */

/* --- Blog Index --- */
.blog-header {
  text-align: center;
  margin-bottom: 3rem;
}

.blog-header p {
  color: var(--color-text-muted);
  max-width: 500px;
  margin: 0 auto;
}

.tag-filters {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.tag-filter {
  padding: 0.4rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: 20px;
  background: transparent;
  color: var(--color-text-muted);
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.tag-filter:hover,
.tag-filter.active {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-subtle);
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 700px;
  margin: 0 auto;
}

.post-preview {
  padding: 1.75rem;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  transition: box-shadow 0.3s;
}

.post-preview:hover {
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.post-preview-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-heading);
  text-decoration: none;
  line-height: 1.3;
  display: block;
}

.post-preview-title:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.post-preview-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0.5rem 0;
}

.post-preview-excerpt {
  color: var(--color-text);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0.75rem 0 0;
}

.post-preview-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.post-tag {
  padding: 0.2rem 0.6rem;
  background: var(--color-accent-subtle);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
}

.blog-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: 3rem 0;
}

/* --- Blog Post Article --- */
.post-article {
  max-width: 700px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.back-link:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.post-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--color-text-heading);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.post-meta {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.post-meta-divider {
  color: var(--color-border);
}

.post-header-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

/* --- Blog Post Content Typography --- */
.post-content {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--color-text);
}

.post-content h2 {
  font-size: 1.5rem;
  text-align: left;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.post-content h3 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content a:hover {
  color: var(--color-accent-hover);
}

.post-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--color-accent);
  background: var(--color-accent-subtle);
  border-radius: 0 8px 8px 0;
  color: var(--color-text);
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

.post-content code {
  font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.88em;
  padding: 0.15rem 0.4rem;
  background: var(--color-accent-subtle);
  border-radius: 4px;
  color: var(--color-accent);
}

.post-content pre {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--color-bg-dark);
  border-radius: 8px;
  overflow-x: auto;
  line-height: 1.6;
}

.post-content pre code {
  background: none;
  padding: 0;
  color: #e2e8f0;
  font-size: 0.85rem;
}

.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

/* --- Author Byline --- */
.author-byline {
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--color-accent-subtle);
  border-radius: 10px;
  border-left: 3px solid var(--color-accent);
}

.author-byline p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text);
  margin: 0;
}

.author-byline strong {
  color: var(--color-text-heading);
}

/* --- Share Button --- */
.post-share {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  background: transparent;
  color: var(--color-text);
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.share-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.share-btn svg {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   Syntax Highlighting (Prism, via Eleventy plugin)
   ========================================================================== */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata { color: #64748b; }
.token.punctuation { color: #94a3b8; }
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted { color: #f472b6; }
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted { color: #34d399; }
.token.operator,
.token.entity,
.token.url { color: #67e8f9; }
.token.atrule,
.token.attr-value,
.token.keyword { color: #818cf8; }
.token.function,
.token.class-name { color: #fbbf24; }
.token.regex,
.token.important,
.token.variable { color: #fb923c; }

/* ==========================================================================
   Responsive
   ========================================================================== */

/* --- Tablet (768px) --- */
@media (max-width: 768px) {
  .skills-categories { grid-template-columns: 1fr 1fr; }
  .nav-inner { padding: 0 1.5rem; }
  nav ul { gap: 1rem; }
  .hero { padding: 5rem 1.5rem 3.5rem; }
  section { padding: 3.5rem 0; }
  #contact { padding: 4rem 0; }
  .about-image { width: 260px; }
}

/* --- Mobile (600px) --- */
@media (max-width: 600px) {
  .hero { padding: 3.5rem 1.25rem 2.5rem; }
  .job-header { flex-direction: column; }
  nav ul { gap: 0.75rem; padding: 0.6rem 0; }
  .nav-inner { flex-direction: column; padding: 0.5rem 1.25rem; gap: 0.25rem; }
  .nav-brand { display: none; }
  nav ul { justify-content: center; }
  .container { padding: 0 1.25rem; }
  .skills-categories { grid-template-columns: 1fr; gap: 1.5rem; }
  .project-card { padding: 1.5rem; }
  section { padding: 3rem 0; }
  .hero-links { flex-direction: column; align-items: center; }
  .hero-links a { width: 100%; max-width: 220px; justify-content: center; }
  .contact-links { flex-direction: column; align-items: center; }
  .contact-links a { width: 100%; max-width: 260px; justify-content: center; }
  .about-content { flex-direction: column; align-items: center; }
  .about-image { width: 100%; max-width: 320px; }

  /* Blog responsive */
  .post-article { padding: 2rem 1.25rem 3rem; }
  .post-content pre {
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    border-radius: 0;
  }
  .post-preview { padding: 1.25rem; }
}

/* --- Small Mobile (400px) --- */
@media (max-width: 400px) {
  h1 { font-size: 1.8rem; }
  .hero-img { width: 110px; height: 110px; }
  .container { padding: 0 1rem; }
}
