@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&display=swap");

:root {
  --bg: #111111;
  --bg-darker: #0a0a0a;
  --border: #282828;
  --border-light: #1a1a1a;
  --border-strong: #3d3d3d;
  --text-primary: #e0e0e0;
  --text-secondary: #d0d0d0;
  --text-dim: #b0b0b0;
  --text-darker: #909090;
  --text-darkest: #505050;
  --accent: #e85d04;
  --accent-hover: #d95503;
  --max-width: 1100px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-darker);
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

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

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-darker); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: #333; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.cursor-blink { color: var(--accent); animation: blink 1s step-end infinite; }

/* PROGRESS BAR */
.progress-track {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--border-light);
  z-index: 100;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
}

/* NAV */
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 28px 0 20px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}

.nav-brand:hover { color: var(--accent); }

.nav-links { display: flex; flex-wrap: wrap; gap: 24px; font-size: 0.9rem; }

.nav-links a {
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.15s ease;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-primary);
  border-radius: 2px;
}

/* HERO */
.hero {
  padding: 40px 0 72px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 56px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-darker);
  text-transform: lowercase;
  margin-bottom: 18px;
}

.hero-meta .tag-label {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.dot { color: var(--border); }

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 18px;
}

.hero-tagline {
  max-width: 620px;
  font-size: 1rem;
  color: var(--text-darker);
  line-height: 1.75;
  margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }

.hero-links { display: flex; gap: 20px; font-size: 0.88rem; color: var(--text-darker); }
.hero-links a:hover { color: var(--accent); }

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 2px;
  font-weight: 500;
  font-size: 0.88rem;
  font-family: inherit;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

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

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

.btn-ghost { border-color: var(--border); color: var(--text-dim); }

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

/* SECTIONS */
.section { padding-bottom: 72px; margin-bottom: 72px; border-bottom: 2px solid var(--border-strong); }

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

.section-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  margin-bottom: 36px;
}

.section-title::before { content: "// "; color: var(--text-darkest); }

.section-lead {
  color: var(--text-darker);
  margin-top: -20px;
  margin-bottom: 32px;
  max-width: 560px;
  font-size: 0.92rem;
}

/* ABOUT */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; }

.about-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--text-darker);
  font-size: 0.95rem;
  line-height: 1.8;
}

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

.about-facts { list-style: none; display: flex; flex-direction: column; gap: 20px; }

.about-facts li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.about-facts span {
  color: var(--text-darkest);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.about-facts a:hover { color: var(--accent); }

/* SKILLS */
.skills-card {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.skill-group { display: flex; flex-direction: column; gap: 10px; }

/* EXPERIENCE & EDUCATION */
.experience, .education { display: flex; flex-direction: column; gap: 40px; }

.exp-item:hover .exp-head h3, .edu-item:hover .exp-head h3 { color: var(--accent); }

.exp-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.exp-head h3 { flex: 1; min-width: 0; font-size: 1rem; font-weight: 600; color: var(--text-primary); transition: color 0.15s ease; }

.exp-dates { flex-shrink: 0; color: var(--text-darkest); font-size: 0.8rem; white-space: nowrap; }

.exp-org { color: var(--accent); font-size: 0.85rem; }

.exp-details-inner > p:not(.project-badge):not(.edu-label):not(.project-meta) { color: var(--text-darker); font-size: 0.9rem; line-height: 1.75; }

.exp-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 6px 0;
  background: none;
  border: none;
  color: var(--text-darker);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: color 0.15s ease;
}

.exp-toggle:hover { color: var(--accent); }

.exp-toggle-icon {
  color: var(--accent);
  font-weight: 600;
  width: 10px;
  display: inline-block;
  transition: transform 0.2s ease;
}

.exp-toggle[aria-expanded="true"] .exp-toggle-icon { transform: rotate(45deg); }

.exp-details {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}

.exp-details.open { grid-template-rows: 1fr; }

.exp-details-inner {
  overflow: hidden;
  padding-top: 16px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exp-bullets { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.exp-bullets li {
  color: var(--text-darker);
  font-size: 0.9rem;
  line-height: 1.75;
  padding-left: 18px;
  position: relative;
}

.exp-bullets li::before {
  content: "▸";
  color: var(--accent);
  position: absolute;
  left: 0;
}

.edu-label {
  color: var(--text-darkest);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* PROJECTS */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px 32px; }

.project-head { display: flex; flex-wrap: nowrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }

.project-head h3 { flex: 1; min-width: 0; font-size: 1rem; font-weight: 600; color: var(--text-primary); transition: color 0.15s ease; }

.project:hover .project-head h3 { color: var(--accent); }

.project-year { flex-shrink: 0; color: var(--text-darkest); font-size: 0.8rem; white-space: nowrap; }

.project-tagline { color: var(--text-dim); font-size: 0.88rem; }

.project-badge {
  font-size: 0.8rem;
  color: var(--accent);
  font-family: inherit;
}

.project p:not(.project-badge):not(.project-meta) {
  color: var(--text-darker);
  font-size: 0.9rem;
  line-height: 1.75;
}

.project-meta { font-size: 0.8rem; color: var(--text-darkest); }

.project-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.project-tags span {
  font-size: 0.75rem;
  color: var(--text-darker);
  background: var(--bg);
  border: 1px solid var(--border-light);
  padding: 3px 8px;
  border-radius: 2px;
}

.project-links { display: flex; gap: 16px; font-size: 0.85rem; }

.project-links a { color: var(--accent); }
.project-links a:hover { text-decoration: underline; }

/* TIMELINE */
.timeline { list-style: none; display: flex; flex-direction: column; gap: 32px; }

.timeline li {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 20px;
}

.timeline-year { color: var(--accent); font-weight: 600; font-size: 0.9rem; }

.timeline h4 { font-size: 0.95rem; color: var(--text-primary); font-weight: 600; margin-bottom: 4px; }

.timeline p { color: var(--text-darker); font-size: 0.88rem; }

/* GITHUB REPOS */
.repos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 20px; }

.repo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.repo h4 { font-size: 0.88rem; color: var(--text-secondary); display: flex; justify-content: space-between; gap: 8px; font-weight: 600; transition: color 0.15s ease; }
.repo h4 span { color: var(--text-darkest); font-weight: 400; }
.repo:hover h4 { color: var(--accent); }

.repo p { color: var(--text-darker); font-size: 0.8rem; flex-grow: 1; line-height: 1.6; }

.repo-lang { font-size: 0.72rem; color: var(--accent); }

.repos-more { display: table; margin: 28px auto 0; }

/* CONTACT */
.contact-links { display: flex; gap: 14px; flex-wrap: wrap; }

/* FOOTER */
.footer {
  text-align: center;
  padding: 28px 0 40px;
  color: var(--text-darkest);
  font-size: 0.82rem;
}

/* RESPONSIVE */
@media (max-width: 760px) {
  .page { padding: 0 18px; }

  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .projects { grid-template-columns: 1fr; }
  .repos { grid-template-columns: 1fr 1fr; }

  .section { padding-bottom: 52px; margin-bottom: 52px; }
  .section-lead { margin-top: -14px; }

  .hero { padding: 8px 0 48px; margin-bottom: 40px; }
  .hero-tagline { margin-bottom: 26px; }

  .experience, .education, .timeline { gap: 26px; }
  .projects { gap: 28px 20px; }

  .btn { padding: 13px 22px; text-align: center; }
  .hero-actions .btn, .contact-links .btn { flex: 1 1 auto; }

  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 18px;
    gap: 18px;
    display: none;
  }

  .nav-links a { padding: 4px 0; }

  .nav {
    position: sticky;
    top: 3px;
    z-index: 50;
    background: var(--bg);
    padding: 20px 0 16px;
  }

  .nav-links.open { display: flex; }
}

@media (max-width: 560px) {
  .repos { grid-template-columns: 1fr; }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .exp-head h3 { font-size: 0.95rem; }
}

@media (max-width: 400px) {
  .page { padding: 0 14px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}
