/* === Variables === */
:root {
  --dark: #0B2E33;
  --accent: #4F7C82;
  --accent-soft: rgba(79, 124, 130, 0.1);
  --text: #0B2E33;
  --text-muted: #4F7C82;
  --bg: #f7fafa;
  --border: #d4e4e6;
  --max-width: 680px;
}

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

html {
  font-size: 17px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.75;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* === Layout === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === Navigation === */
nav {
  padding: 2.5rem 0 2rem;
}

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

.nav-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.nav-name:hover {
  color: var(--accent);
  opacity: 1;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--text);
  opacity: 1;
}

.nav-links a.active {
  color: var(--accent);
}

/* === Hero === */
.hero {
  padding: 3rem 0 4rem;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.2;
  margin-bottom: 1.2rem;
}

.hero h1 span {
  color: var(--accent);
}

.hero-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.hero-text strong {
  color: var(--text);
  font-weight: 600;
}

.hero-photo {
  float: right;
  width: 180px;
  height: auto;
  border-radius: 10px;
  margin: 0.2rem 0 1rem 1.5rem;
  shape-outside: margin-box;
}

/* === Section === */
section {
  margin-bottom: 4rem;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

/* === Home: Role Cards === */
.roles {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.role {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.role:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.role-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.role-company {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.role-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* === Home: Skills === */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.skill {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* === Latest Posts === */
.post-list {
  display: flex;
  flex-direction: column;
}

.post-item {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
}

.post-item:first-child {
  padding-top: 0;
}

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

.post-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 5.5rem;
}

.post-title {
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
}

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

/* === Find me on === */
.find-me {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.find-me span {
  font-weight: 500;
}

.social-icons {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.social-icons a {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.social-icons a:hover {
  color: var(--accent);
  opacity: 1;
}

.social-icons a svg {
  width: 20px;
  height: 20px;
}

/* === Timeline (Projects) === */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  letter-spacing: 0.02em;
}

.timeline-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}

.timeline-title a {
  color: var(--text);
  text-decoration: none;
}

.timeline-title a:hover {
  color: var(--accent);
  opacity: 1;
}

.timeline-title a svg {
  width: 14px;
  height: 14px;
  vertical-align: -1px;
  margin-left: 4px;
  opacity: 0.4;
  transition: opacity 0.2s;
}

.timeline-title a:hover svg {
  opacity: 1;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0.6rem;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.timeline-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

/* === About === */
.about-block {
  margin-bottom: 3rem;
}

.about-block h2 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
}

.about-block p {
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.about-block p strong {
  color: var(--text);
  font-weight: 600;
}

.work-with-me {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 1.5rem 1.8rem;
  border-radius: 0 8px 8px 0;
}

.work-with-me h2 {
  color: var(--accent);
}

.work-with-me p {
  color: var(--text);
}

/* === Contact === */
.contact-list {
  display: flex;
  flex-direction: column;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: color 0.2s;
}

.contact-row:last-child {
  border-bottom: none;
}

.contact-row:hover {
  color: var(--accent);
  opacity: 1;
}

.contact-row svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--accent);
}

.contact-row .label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.contact-row .value {
  font-size: 0.95rem;
  font-weight: 500;
}

/* === Blog Post === */
.post-content {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--text-muted);
}

.post-content strong {
  color: var(--text);
  font-weight: 600;
}

.post-content h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 2rem 0 0.8rem;
  letter-spacing: -0.02em;
}

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

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

.post-content code {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
}

.post-content pre {
  background: var(--dark);
  color: #e2e2f0;
  padding: 1.2rem 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.2rem 0;
  font-size: 0.82rem;
  line-height: 1.6;
}

.post-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

.post-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.post-meta a {
  color: var(--accent);
  font-weight: 600;
}

.post-back {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
}

.post-back:hover {
  color: var(--accent);
  opacity: 1;
}

/* === Post weekly sections (multi-update posts) === */
.post-week-label {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.post-week-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4rem 0 2.5rem 0;
  position: relative;
}

.post-week-separator::before,
.post-week-separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}

.post-week-separator span {
  padding: 0 1rem;
  letter-spacing: 0.6em;
  color: var(--text-muted);
  font-size: 1rem;
  opacity: 0.55;
}

/* === Reading === */
.reading-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.reading-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.reading-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 7rem;
}

.reading-value {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
}

/* === Footer === */
footer {
  margin-top: 5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

footer a:hover {
  color: var(--accent);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

/* === Responsive === */
@media (max-width: 600px) {
  html { font-size: 15px; }

  nav .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .nav-links { gap: 1.4rem; }

  .hero h1 { font-size: 1.7rem; }

  .hero { padding: 2rem 0 3rem; }

  .hero-photo {
    float: none;
    display: block;
    width: 140px;
    margin: 0 auto 1.5rem;
  }

  .role {
    flex-direction: column;
    gap: 0.15rem;
  }

  .post-item {
    flex-direction: column;
    gap: 0.2rem;
  }
}
