/* ─────────────────────────────────────────────────────────────────────────────
   higgorleimig.com — shared styles for home + article pages
   ───────────────────────────────────────────────────────────────────────────── */

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

/* ── Root variables ── */
:root {
  --bg: #0d0d0d;
  --surface: #131313;
  --border: #1f1f1f;
  --border-mid: #2a2a2a;
  --text: #e8e8e8;
  --muted: #555;
  --muted-up: #888;
  --accent: #c8ff00;
  --accent-dim: rgba(200, 255, 0, 0.07);
  --accent-glow: rgba(200, 255, 0, 0.22);
  --font: 'Open Sans', system-ui, sans-serif;
  --display: 'Syne', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Base ── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 20px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Navigation ── */
body > nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 13, 0.9);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--border);
  animation: fade-up 0.45s var(--ease) both;
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo-img {
  display: block;
  border-radius: 8px;
  transition: opacity 0.2s;
}
.nav-logo-img:hover { opacity: 0.75; }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

/* ── Hero ── */
#hero {
  padding: 112px 0 92px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(200, 255, 0, 0.09) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: -14px -14px;
  -webkit-mask-image: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, transparent 52%);
  mask-image: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, transparent 52%);
  pointer-events: none;
}

#hero > * { position: relative; z-index: 1; }

.hero-tag {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fade-up 0.55s 0.08s var(--ease) both;
}

.hero-tag::before {
  content: '';
  display: block;
  width: 18px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

h1 {
  font-family: var(--display);
  font-size: clamp(50px, 8.75vw, 62px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 24px;
  animation: fade-up 0.6s 0.16s var(--ease) both;
}

h1::after {
  content: '_';
  color: var(--accent);
  animation: blink 1.1s step-end infinite;
  margin-left: 3px;
}

.hero-sub {
  font-size: 21px;
  color: var(--muted-up);
  max-width: 500px;
  margin-bottom: 44px;
  line-height: 1.6;
  animation: fade-up 0.6s 0.24s var(--ease) both;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  animation: fade-up 0.6s 0.32s var(--ease) both;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--mono);
  letter-spacing: 0.03em;
  transition: all 0.22s var(--ease);
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #080808;
}

.btn-primary:hover {
  background: #d6ff1a;
  box-shadow: 0 0 24px var(--accent-glow), 0 0 48px rgba(200,255,0,0.08);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--muted-up);
  border: 1px solid var(--border-mid);
}

.btn-ghost:hover {
  border-color: var(--muted);
  color: var(--text);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ── Sections ── */
section {
  padding: 88px 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type { border-bottom: none; }

.section-label {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::before {
  content: '';
  display: block;
  width: 18px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.section-label::after {
  content: '';
  flex: 1;
  max-width: 100px;
  height: 1px;
  background: linear-gradient(to right, var(--border-mid), transparent);
}

/* ── Experience ── */
.job {
  position: relative;
  padding-left: 28px;
  margin-bottom: 56px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.job.visible {
  opacity: 1;
  transform: none;
}

.job::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: -28px;
  width: 1px;
  background: linear-gradient(to bottom, rgba(200,255,0,0.3) 0%, var(--border) 60%, transparent 100%);
}

.job:last-child::before { display: none; }

.job-dot {
  position: absolute;
  left: -5px;
  top: 8px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--muted);
  transition: border-color 0.2s;
}

.job:first-child .job-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200,255,0,0.1), 0 0 10px rgba(200,255,0,0.3);
}

.job:hover .job-dot:not(:first-child) {
  border-color: var(--muted-up);
}

.job-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 4px;
}

.job-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.job-period {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 3px;
}

.job-company {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--muted-up);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.job ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.job li {
  font-size: 18px;
  color: #a0a0a0;
  padding-left: 18px;
  position: relative;
  line-height: 1.68;
}

.job li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--muted);
}

.highlight {
  color: var(--accent);
  font-weight: 600;
}

/* ── Education ── */
.edu {
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.edu.visible {
  opacity: 1;
  transform: none;
}

.edu-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 4px;
}

.edu-degree {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.edu-period {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  padding-top: 3px;
}

.edu-school {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--muted-up);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.edu-body {
  font-size: 18px;
  color: #a0a0a0;
  line-height: 1.68;
}

/* ── Skills ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 8px;
}

.skill-tag {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 10px 16px;
  font-size: 16px;
  color: #a0a0a0;
  transition: all 0.2s var(--ease);
  cursor: default;
  opacity: 0;
  transform: translateY(10px) scale(0.985);
}

.skill-tag.visible {
  opacity: 1;
  transform: none;
}

.skill-tag:hover {
  border-color: rgba(200,255,0,0.4);
  color: var(--text);
  background: rgba(200,255,0,0.04);
  box-shadow: 0 0 0 1px rgba(200,255,0,0.1), inset 0 0 24px rgba(200,255,0,0.025);
}

/* ── Interests ── */
.interests {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.interest-tag {
  padding: 5px 16px;
  border-radius: 24px;
  background: var(--accent-dim);
  border: 1px solid rgba(200, 255, 0, 0.1);
  font-size: 14px;
  font-family: var(--mono);
  color: rgba(200,255,0,0.6);
  letter-spacing: 0.06em;
  transition: all 0.2s;
}

.interest-tag:hover {
  background: rgba(200,255,0,0.1);
  border-color: rgba(200,255,0,0.22);
  color: var(--accent);
}

/* ── Featured article (home) ── */
.featured-article {
  display: block;
  position: relative;
  padding: 56px 56px 52px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(165deg, var(--surface) 0%, rgba(19,19,19,0.4) 100%);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  overflow: hidden;
  isolation: isolate;
}

.featured-article::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(200,255,0,0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 80% 100% at top right, black, transparent 65%);
  mask-image: radial-gradient(ellipse 80% 100% at top right, black, transparent 65%);
  pointer-events: none;
  z-index: -1;
}

.featured-article:hover {
  border-color: rgba(200,255,0,0.35);
  transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(200,255,0,0.1);
  text-decoration: none;
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.featured-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted);
}

.featured-tag {
  color: var(--accent);
}

.featured-title {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 20px;
}

.featured-excerpt {
  font-size: 17px;
  color: var(--muted-up);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 560px;
}

.featured-cta {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s var(--ease);
}

.featured-article:hover .featured-cta {
  gap: 10px;
}

/* ── Article layout (blog) ── */
.article-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 72px 28px 112px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 52px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--text); text-decoration: none; }

.article-meta {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.article-meta span + span::before {
  content: '·';
  margin-right: 10px;
}

/* ── Article typography (blog) ── */
article h1 {
  font-family: var(--display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 28px;
  color: var(--text);
}

.lead {
  font-size: 20px;
  color: var(--muted-up);
  line-height: 1.65;
  margin-bottom: 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

article h2 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
  margin: 64px 0 20px;
}

article h2:first-of-type { margin-top: 0; }

article h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 48px 0 16px;
}

article h4 {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 40px 0 14px;
}

article p {
  font-size: 17px;
  line-height: 1.75;
  color: #b8b8b8;
  margin-bottom: 22px;
}

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

article strong { color: var(--text); font-weight: 600; }
article em { font-style: italic; color: #c8c8c8; }

article ul {
  list-style: none;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

article li {
  font-size: 17px;
  line-height: 1.72;
  color: #b8b8b8;
  padding-left: 20px;
  position: relative;
}

article li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--muted);
}

/* ── Callouts ── */
aside {
  margin: 36px 0;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-left: 2px solid var(--accent);
  border-radius: 0 6px 6px 0;
}

aside p {
  font-size: 15px;
  line-height: 1.68;
  margin-bottom: 12px;
}

aside p:last-child { margin-bottom: 0; }

aside figure { margin: 20px 0 0; }

/* ── Figures ── */
figure {
  margin: 40px 0;
}

figure img {
  width: 100%;
  display: block;
}

article figure img {
  background: #f5f2e8;
  padding: 18px;
  border: 1px solid var(--border-mid);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

aside figure img {
  padding: 14px;
  border-radius: 8px;
}

figcaption {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted-up);
  text-align: center;
  margin-top: 12px;
  line-height: 1.5;
}

/* ── Table of contents ── */
.toc {
  margin: 40px 0 56px;
  padding: 22px 28px;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-left: 2px solid var(--accent);
  border-radius: 0 6px 6px 0;
}

.toc-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.toc li {
  font-size: 15px;
  line-height: 1.5;
  padding-left: 0;
  color: var(--muted-up);
}

.toc li::before { content: none; }

.toc a {
  color: var(--muted-up);
  transition: color 0.2s;
}

.toc a:hover {
  color: var(--text);
  text-decoration: none;
}

.toc .toc-h3 {
  padding-left: 20px;
  font-size: 14px;
}

.toc .toc-h3 a { color: var(--muted); }
.toc .toc-h3 a:hover { color: var(--muted-up); }

article h2,
article h3,
article h4 { scroll-margin-top: 72px; }

/* ── Footer ── */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 28px;
  right: 28px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(200,255,0,0.25), transparent);
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

footer p {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ── Animations ── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  #hero { padding: 72px 0 64px; }
  section { padding: 60px 0; }
  .nav-links { gap: 20px; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .article-wrap { padding: 48px 24px 80px; }
  .featured-article { padding: 36px 28px 32px; }
}
