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

:root {
  --bg:        #0a0a0a;
  --bg-alt:    #111111;
  --bg-card:   #161616;
  --border:    #262626;
  --text:      #e0e0e0;
  --text-dim:  #8a8a8a;
  --text-muted:#555555;
  --accent:    #00d4aa;
  --accent-dim:#00a080;
  --keyword:   #c792ea;
  --string:    #c3e88d;
  --comment:   #546e7a;
  --func:      #82aaff;
  --type:      #ffcb6b;
  --line-num:  #3a3a3a;
  --font: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  opacity: 0.8;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.bracket {
  color: var(--text-muted);
}

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(0, 212, 170, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-greeting {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 400;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-desc {
  max-width: 600px;
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-stats {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ========== CODE WINDOW ========== */
.code-window {
  margin-top: 60px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-size: 13px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #1a1a1a;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }

.code-filename {
  margin-left: 12px;
  color: var(--text-dim);
  font-size: 12px;
}

.code-status {
  margin-left: auto;
  color: var(--accent-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.code-body {
  padding: 20px 16px;
  overflow-x: auto;
  line-height: 1.7;
  color: var(--text);
}

.code-body .line-num {
  display: inline-block;
  width: 32px;
  color: var(--line-num);
  user-select: none;
  text-align: right;
  margin-right: 16px;
}

.code-body .keyword  { color: var(--keyword); }
.code-body .string   { color: var(--string); }
.code-body .comment  { color: var(--comment); font-style: italic; }
.code-body .func     { color: var(--func); }
.code-body .type     { color: var(--type); }

.code-footer {
  display: flex;
  justify-content: space-between;
  padding: 8px 16px;
  background: #1a1a1a;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}

/* ========== SECTIONS ========== */
.section {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.section-header {
  margin-bottom: 16px;
}

.section-comment {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.section-title {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.section-text {
  max-width: 680px;
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 16px;
  line-height: 1.85;
}

/* ========== PRINCIPLES ========== */
.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.principle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  transition: border-color 0.3s, transform 0.3s;
}

.principle:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.principle-icon {
  color: var(--accent);
  font-size: 18px;
  display: block;
  margin-bottom: 12px;
}

.principle h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.principle p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ========== TIMELINE ========== */
.timeline {
  margin-top: 48px;
  position: relative;
  padding-left: 28px;
}

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

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  padding-left: 20px;
}

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

.timeline-date {
  font-size: 12px;
  color: var(--accent-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.timeline-item h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.timeline-item p {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 560px;
  line-height: 1.7;
}

/* ========== SKILLS ========== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 48px;
}

.skill-group-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.skill {
  display: grid;
  grid-template-columns: 150px 1fr 44px;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.skill-name {
  font-size: 13px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skill-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  border-radius: 3px;
  transition: width 1s ease;
}

.skill-percent {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
}

/* ========== PROJECTS ========== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
  margin-top: 48px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  transition: border-color 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-3px);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.project-icon {
  font-size: 22px;
  color: var(--accent);
}

.project-status {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.project-status.live {
  color: var(--accent);
  background: rgba(0, 212, 170, 0.1);
  border: 1px solid rgba(0, 212, 170, 0.25);
}

.project-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.project-type {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.project-desc {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 20px;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.project-tags span {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.project-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

/* ========== FOOTER ========== */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

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

.footer-brand {
  font-size: 16px;
  font-weight: 700;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-dim);
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
  width: 100%;
  text-align: center;
  margin-top: 8px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .hero-stats {
    gap: 28px;
  }

  .stat-num {
    font-size: 22px;
  }

  .code-body {
    font-size: 11px;
  }

  .skill {
    grid-template-columns: 110px 1fr 38px;
  }

  .skill-name {
    font-size: 12px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 60px 0 40px;
  }

  .section {
    padding: 60px 0;
  }

  .principles {
    grid-template-columns: 1fr;
  }

  .skill {
    grid-template-columns: 1fr 38px;
  }

  .skill-bar {
    grid-column: 1 / -1;
    order: 3;
  }

  .skill-name {
    order: 1;
  }

  .skill-percent {
    order: 2;
  }
}