*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --bg: #09090f;
  --bg2: #0f0f18;
  --bg3: #161620;
  --border: #1e1e2e;
  --border2: #2e2e42;
  --text: #ededf5;
  --muted: #9090b0;
  --muted2: #52526e;
  --purple: #a78bfa;
  --purple2: #7c5fd4;
  --purple-dim: #1a1630;
  --purple-glow: rgba(167, 139, 250, 0.06);
  --mono: 'Fira Code', monospace;
  --sans: 'Space Grotesk', sans-serif;
  --body: 'Inter', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(13, 13, 18, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: 60px;
  display: flex;
  align-items: center;
}

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

.nav-logo {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}

.nav-logo span { color: var(--purple); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-links a {
  font-family: var(--body);
  font-size: 13px;
  color: #ededf5;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.15s;
  letter-spacing: 0.01em;
}

.nav-links a:hover {
  color: var(--purple);
  background: var(--purple-dim);
}

.nav-badge {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--purple-dim);
  color: var(--purple);
  border: 1px solid rgba(167, 139, 250, 0.25);
  padding: 5px 14px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}

/* PAGE */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

/* HERO */
.hero {
  padding: 130px 0 100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.hero-greeting {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--purple);
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.hero-name {
  font-family: var(--sans);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 12px;
}

.hero-name span { color: var(--purple); }

.hero-title {
  font-family: var(--sans);
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 28px;
  letter-spacing: 0em;
}

.hero-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  padding: 11px 24px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--purple2);
  color: #fff;
  border: 1px solid var(--purple2);
}

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

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border2);
}

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

/* Hero right — terminal block */
.hero-terminal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.terminal-bar {
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.terminal-title {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted2);
  margin-left: 8px;
}

.terminal-body {
  padding: 24px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 2;
}

.t-comment { color: var(--muted2); }
.t-key { color: var(--purple); }
.t-val { color: #7ec8a4; }
.t-str { color: #e8c57c; }
.t-num { color: #e88c7c; }
.t-blank { height: 16px; }

/* SECTION STRUCTURE */
.section {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.section-title {
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* SKILLS */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.skill-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
}

.skill-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 2px;
  background: var(--purple);
  opacity: 0;
  transition: opacity 0.2s;
}

.skill-card:hover { border-color: rgba(167,139,250,0.3); background: rgba(167,139,250,0.03); }
.skill-card:hover::after { opacity: 1; }

.skill-card-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--purple);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.skill-list {
  font-size: 14px;
  color: var(--text);
  line-height: 1.9;
}

/* EXPERIENCE */
.exp-list { display: flex; flex-direction: column; gap: 0; }

.exp-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  padding: 32px 20px;
  border-bottom: 1px solid var(--border);
  margin: 0 -20px;
  border-radius: 8px;
  transition: background 0.2s;
}

.exp-card:not(:last-child) { border-bottom: 1px solid var(--border); border-radius: 0; }
.exp-card:hover { background: rgba(167,139,250,0.03); }
.exp-card:last-child { border-bottom: none; }

.exp-period {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted2);
  padding-top: 4px;
  line-height: 1.7;
}

.exp-period strong {
  color: var(--text);
  font-weight: 500;
}

.exp-role {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.exp-company {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--purple);
  margin-bottom: 12px;
}

.exp-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
}

.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.exp-tag {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--purple-dim);
  color: var(--purple);
  border: 1px solid rgba(155,127,232,0.2);
  padding: 3px 10px;
  border-radius: 4px;
}

/* PROJECTS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

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

.project-card:hover {
  border-color: rgba(167,139,250,0.35);
  background: rgba(167,139,250,0.04);
  transform: translateY(-2px);
}

.project-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.project-icon {
  width: 36px;
  height: 36px;
  background: var(--purple-dim);
  border: 1px solid rgba(155,127,232,0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-icon svg { width: 18px; height: 18px; stroke: var(--purple); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.project-link-btn {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted2);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}

.project-link-btn:hover { color: var(--purple); border-color: rgba(155,127,232,0.4); }

.project-btn-group { display: flex; align-items: center; gap: 6px; }
 
.project-link-btn.live { color: var(--purple); border-color: rgba(167,139,250,0.3); }
.project-link-btn.live:hover { background: rgba(167,139,250,0.08); }

.project-name {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.project-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
}

.stack-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted2);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
}

/* CONTACT */
.contact-box {
  background: var(--bg2);
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: 16px;
  padding: 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167,139,250,0.5), transparent);
}

.contact-heading {
  font-family: var(--sans);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.contact-sub {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 32px;
}

.contact-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* FOOTER */
footer {
  padding: 32px 0;
  text-align: center;
}

footer p {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted2);
}

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero > * { animation: fadeUp 0.5s ease both; }
.hero-left { animation-delay: 0.05s; }
.hero-terminal { animation-delay: 0.2s; }

@media (max-width: 768px) {
  .page, .nav-inner { padding-left: 20px; padding-right: 20px; }
  .hero { grid-template-columns: 1fr; padding: 100px 0 60px; }
  .hero-terminal { display: block; }
  .exp-card { grid-template-columns: 1fr; gap: 8px; }
  .contact-box { padding: 40px 24px; }
  .nav-links { display: none; }
}
