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

:root {
  --bg:         #0d0d0d;
  --bg-alt:     #141414;
  --surface:    #1a1a1a;
  --border:     #252525;
  --orange:     #c8623a;
  --orange-dim: #c8623a18;
  --orange-mid: #b5562f;
  --cyan:       #4ec9b0;
  --text:       #d4d4d4;
  --muted:      #6e7681;
  --amber:      #e5c07b;
  --nav-h:      56px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ============================================================
   Utility
   ============================================================ */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }

.section-title {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::before { content: '##'; color: var(--orange); margin-right: 4px; }
.section-title::after  { content: ''; flex: 1; height: 1px; background: var(--border); }

.section-comment {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: -20px;
  margin-bottom: 28px;
  opacity: 0.6;
}

/* Fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Navbar
   ============================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  transition: border-color 0.2s;
}

.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  color: var(--orange);
  font-weight: 700;
  font-size: 0.9rem;
}
.nav-logo::before { content: '> '; color: var(--muted); }

.nav-links {
  display: flex;
  gap: 24px;
}
.nav-links a {
  font-size: 0.78rem;
  color: var(--muted);
  transition: color 0.2s;
  position: relative;
}
.nav-links a::before { content: './'; color: var(--border); transition: color 0.2s; }
.nav-links a:hover,
.nav-links a.active { color: var(--orange); }
.nav-links a.active::before { color: var(--muted); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--muted);
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Hero
   ============================================================ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: relative;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.4;
}

.hero-inner {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

.hero-prompt {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 14px;
}
.hero-prompt span { color: var(--orange); }

.hero-name {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 10px;
}

.hero-name-orig {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.hero-role {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--orange);
  font-weight: 500;
  margin-bottom: 10px;
}
.hero-role::before { content: '// '; color: var(--muted); }

.hero-tagline {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 40px;
}
.hero-tagline::before { content: '# '; color: var(--border); }

.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* Cursor blink */
.cursor {
  display: inline-block;
  width: 10px; height: 1.1em;
  background: var(--orange);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Buttons */
.btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  padding: 10px 20px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  display: inline-block;
}
.btn-primary {
  background: var(--orange);
  color: #0d0d0d;
  border: 1px solid var(--orange);
}
.btn-primary:hover { background: var(--orange-mid); border-color: var(--orange-mid); }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--orange);
  color: var(--orange);
}
.btn-secondary:hover { background: var(--orange-dim); }

/* ============================================================
   About
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 14px;
  font-size: 0.85rem;
  line-height: 1.8;
}

.currently-card {
  margin-top: 20px;
  border: 1px solid var(--orange-mid);
  border-radius: 4px;
  padding: 16px;
  background: var(--orange-dim);
}
.currently-label {
  display: block;
  font-size: 0.72rem;
  color: var(--orange);
  margin-bottom: 6px;
}
.currently-card p {
  color: var(--text);
  font-size: 0.82rem;
  margin: 0;
}
.currently-card p::before { content: '> '; color: var(--orange); }
.currently-card strong { color: var(--orange); }

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.highlight-card {
  background: var(--bg-alt);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 0.2s;
}
.highlight-card:hover { background: var(--surface); }
.hl-key {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.hl-key::before { content: '$ '; color: var(--border); }
.hl-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--orange);
}

/* ============================================================
   Timeline (Experience)
   ============================================================ */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.tcard:hover { border-color: var(--orange-mid); }

.tcard-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 9px 16px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.tcard-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tcard-dot.red   { background: #f87171; }
.tcard-dot.amber { background: #e5c07b; }
.tcard-dot.green { background: #4ade80; }
.tcard-company-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-left: 4px;
  flex: 1;
}
.tcard-period {
  font-size: 0.72rem;
  color: var(--muted);
  flex-shrink: 0;
}

.tcard-body { padding: 20px 22px; }

.tcard-role {
  color: var(--cyan);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.tcard-company {
  color: var(--amber);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 14px;
}

.tcard-bullets {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tcard-bullets li {
  color: var(--muted);
  font-size: 0.8rem;
  padding-left: 18px;
  position: relative;
  line-height: 1.65;
}
.tcard-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--orange);
}

/* Sub-roles (multiple positions at same company) */
.tsubrole + .tsubrole {
  border-top: 1px dashed var(--border);
  padding-top: 16px;
  margin-top: 16px;
}
.tsubrole-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.tsubrole-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cyan);
}
.tsubrole-period {
  font-size: 0.7rem;
  color: var(--muted);
}

/* ============================================================
   Skills
   ============================================================ */
.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.skill-label {
  color: var(--amber);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.skill-label::before { content: 'const '; color: var(--cyan); }
.skill-label::after  { content: ' = ['; color: var(--muted); }

.badge-list { display: flex; flex-wrap: wrap; gap: 8px; }

.badge {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--cyan);
  padding: 4px 12px;
  font-size: 0.78rem;
  border-radius: 2px;
  transition: border-color 0.2s, background 0.2s;
  cursor: default;
}
.badge:hover { border-color: var(--cyan); background: #4ec9b018; }

/* ============================================================
   Education
   ============================================================ */
/* Reuses .tcard styles — nothing extra needed */

/* ============================================================
   Personal
   ============================================================ */
.personal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.personal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 22px 18px;
  transition: border-color 0.2s;
}
.personal-card:hover { border-color: var(--orange-mid); }

.personal-card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--orange);
  margin-bottom: 12px;
}
.personal-card-body {
  font-size: 0.78rem;
  color: var(--muted);
}
.coming-soon { font-style: italic; opacity: 0.6; }

/* ============================================================
   Contact
   ============================================================ */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 600px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 13px 18px;
  font-size: 0.82rem;
  transition: border-color 0.2s, background 0.2s;
}
.contact-item:hover {
  border-color: var(--orange);
  background: var(--orange-dim);
}
.contact-cmd {
  color: var(--muted);
  font-size: 0.72rem;
  flex-shrink: 0;
}
.contact-label {
  color: var(--amber);
  font-size: 0.72rem;
  min-width: 60px;
  flex-shrink: 0;
}
.contact-val { color: var(--text); }

/* ============================================================
   Footer
   ============================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}
footer span { color: var(--orange); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(13, 13, 13, 0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: center;
    padding: 24px 0;
    gap: 18px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s, opacity 0.2s;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .personal-grid { grid-template-columns: 1fr; }

  .tsubrole-header { flex-direction: column; gap: 2px; }
}

@media (max-width: 480px) {
  .section { padding: 64px 0; }
  .hero-btns { flex-direction: column; align-items: flex-start; }
  .about-highlights { grid-template-columns: 1fr 1fr; }
}
