@import url('https://fonts.googleapis.com/css2?family=Fragment+Mono:ital,wght@0,400;1,400&display=swap');

:root {
  --bg: #020202;
  --panel: #020202;
  --panel-2: #020202;
  --border: #232323;
  --text: #f1f1f1;
  --muted: #a8a8a8;
  --link: #9ad4ff;
  --link-hover: #c8e9ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: 'Fragment Mono', monospace;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid #171717;
  background: rgba(2, 2, 2, 0.94);
  backdrop-filter: blur(8px);
}

.nav-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 10px 16px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  border-color: var(--border);
  background: rgba(123, 199, 255, 0.08);
}

.portfolio-shell {
  padding-top: 72px;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 14px 16px 24px;
}

.compact-container {
  min-height: calc(100vh - 90px);
}

.tab-panel {
  display: none;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 10px 0;
  animation: fadeSlide 0.22s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content {
  text-align: center;
  margin-bottom: 10px;
}

.profile-avatar {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--border);
  margin-bottom: 8px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1.name {
  font-size: 1.48rem;
  letter-spacing: 0.02em;
}

.title {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.85rem;
}

h2 {
  margin: 12px 0 8px;
  font-size: 1rem;
  text-transform: lowercase;
  color: #d1d1d1;
}

h3 {
  font-size: 0.98rem;
  color: #f5f5f5;
}

p {
  color: var(--muted);
  font-size: 0.8rem;
}

.about-container,
.resume-container,
.projects-container,
.contact-container {
  max-width: 700px;
  margin: 0 auto;
}

.resume-container a {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
}

.resume-actions {
  margin-bottom: 10px;
}

.resume-pdf-frame {
  width: 100%;
  min-height: 76vh;
  border: none;
  border-radius: 10px;
  background: #0a0a0a;
}

.projects-container {
  display: grid;
  gap: 10px;
}

.project-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: rgba(8, 14, 25, 0.45);
}

.project-item p {
  margin-top: 5px;
  font-size: 0.76rem;
  line-height: 1.5;
}

.project-links {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.contact-info {
  text-align: center;
}

.social-links {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.home-blog-grid {
  display: grid;
  gap: 10px;
}

.home-blog-item {
  border: none;
  border-radius: 10px;
  padding: 10px;
  background: #0a0a0a;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.home-blog-thumb {
  width: 96px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  flex: 0 0 96px;
}

.home-blog-body {
  min-width: 0;
}

.blog-intro-quote {
  margin: 10px auto 28px;
  max-width: 640px;
  text-align: left;
}

.blog-intro-quote p {
  font-size: 0.72rem;
  line-height: 1.55;
  color: #888;
}

.blog-intro-quote a {
  color: var(--link);
}

.blog-intro-note {
  margin-top: 16px;
}

.quote-bar {
  border-left: 3px solid #333;
  margin: 8px 0;
  padding: 6px 0 6px 14px;
  font-style: italic;
  font-size: 0.72rem;
  line-height: 1.55;
  color: #aaa;
}

.home-blog-item h3 {
  font-size: 0.93rem;
  line-height: 1.35;
}

.home-blog-meta {
  margin-top: 5px;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
}

.home-blog-excerpt {
  margin-top: 5px;
  font-size: 0.75rem;
  line-height: 1.45;
}

.home-blog-read-time {
  font-style: italic;
}

.home-blog-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.74rem;
}

.home-blog-actions {
  margin-top: 10px;
  text-align: center;
}

.home-blog-all-link {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
}

.empty-state {
  text-align: center;
  color: #9ab0d9;
}

/* Section intro line */
.section-intro {
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 10px;
  line-height: 1.5;
}

/* Timeline */
.timeline-section {
  margin-bottom: 18px;
}

.timeline-section + .timeline-section {
  margin-top: 36px;
}

.timeline-section h3 {
  font-size: 0.9rem;
  margin-bottom: 8px;
  text-transform: lowercase;
  color: #d1d1d1;
}

.timeline {
  position: relative;
  padding-left: 18px;
  border-left: 1px solid var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 16px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -22px;
  top: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--link);
}

.timeline-content h4 {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 600;
}

.timeline-place {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.timeline-mode {
  font-style: italic;
  color: #888;
}

.timeline-location {
  font-size: 0.72rem;
  color: #777;
  margin-top: 1px;
}

.timeline-period {
  font-size: 0.7rem;
  color: var(--link);
  font-style: italic;
  margin-top: 2px;
}

.timeline-desc {
  font-size: 0.74rem;
  color: #999;
  margin-top: 4px;
  line-height: 1.5;
}

/* Contact form */
.contact-form-wrapper {
  margin-top: 20px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.contact-form-wrapper h3 {
  font-size: 1rem;
  margin-bottom: 10px;
  text-transform: lowercase;
  color: #d1d1d1;
}

.form-success {
  text-align: center;
  color: #6fcf97;
  font-size: 0.78rem;
  margin-bottom: 8px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-form input,
.contact-form textarea {
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.8rem;
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #666;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--link);
}

.contact-form button {
  align-self: flex-start;
  background: transparent;
  color: var(--link);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 18px;
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.contact-form button:hover {
  background: rgba(123, 199, 255, 0.08);
  border-color: var(--link);
}

@media (max-width: 768px) {
  body {
    font-size: 13px;
  }

  .tab-panel {
    padding: 8px 0;
  }

  .profile-avatar {
    width: 116px;
    height: 116px;
  }

  .resume-pdf-frame {
    min-height: 64vh;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 8px 10px;
  }

  .nav-links {
    gap: 6px;
  }

  .nav-link {
    font-size: 11px;
    padding: 5px 9px;
  }

  .portfolio-shell {
    padding-top: 78px;
  }

  .container {
    padding: 12px 10px 20px;
  }

  .tab-panel {
    padding: 8px 0;
  }

  .home-blog-thumb {
    width: 84px;
    height: 62px;
    flex-basis: 84px;
  }

  .profile-avatar {
    width: 102px;
    height: 102px;
  }

  .resume-pdf-frame {
    min-height: 58vh;
  }
}

/* ── back to top ── */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #232323;
  background: #0a0a0a;
  color: #9ad4ff;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover {
  background: #151515;
}