/* ===== ROOT VARS ===== */
:root {
  --bg: #0a0e14;
  --bg-soft: #11161f;
  --bg-card: #151b26;
  --border: #1f2937;
  --border-glow: #00ff9c33;
  --fg: #d4d9e0;
  --fg-dim: #7a8699;
  --accent: #00ff9c;
  --accent-dim: #00ff9c99;
  --warn: #ff5f56;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

/* ===== RESET ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  line-height: 1.6;
  font-size: 14px;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

a { color: var(--accent); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: 0.75; }
::selection { background: var(--accent); color: var(--bg); }
.glow { text-shadow: 0 0 8px var(--accent-dim); }

/* ===== SCROLLBAR TOP ===== */
#scrollbar-top {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  width: 0%;
  z-index: 100;
  box-shadow: 0 0 10px var(--accent);
  transition: width 0.1s;
}

/* ===== NAV ===== */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10,14,20,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
nav .brand {
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
}
nav .brand::before { content: '> '; color: var(--fg-dim); }
nav ul {
  list-style: none;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
nav ul li a {
  color: var(--fg-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
nav ul li a:hover { color: var(--accent); }
@media (max-width: 640px) {
  nav { padding: 10px 12px; flex-direction: column; align-items: flex-start; }
  nav ul { gap: 8px; width: 100%; margin-top: 8px; }
  nav ul li a { font-size: 10px; }
}

/* ===== CONTAINER ===== */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 18px;
  position: relative;
  z-index: 1;
}

/* ===== HERO ===== */
.hero {
  padding: 50px 0 40px;
  text-align: left;
}
.hero .prompt {
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 8px;
}
.hero .prompt::before { content: '$ '; color: var(--fg-dim); }
.hero h1 {
  font-size: clamp(26px, 6vw, 44px);
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  line-height: 1.2;
}
.hero h1 .cursor {
  display: inline-block;
  width: 10px;
  height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
  margin-left: 4px;
}
@keyframes blink { 50% { opacity: 0; } }
.hero .sub {
  color: var(--fg-dim);
  font-size: 14px;
  max-width: 640px;
  margin-bottom: 22px;
}

/* ===== HERO BUTTONS ===== */
.hero-buttons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.btn-primary {
  padding: 10px 20px;
  background: transparent !important;
  color: var(--accent) !important;
  font-weight: bold;
  border-radius: 5px;
  border: 1px solid var(--accent) !important;
  transition: all 0.3s ease;
  box-shadow: none !important;
}

.btn-primary:hover {
  background: var(--accent) !important;
  color: var(--bg) !important;
  box-shadow: 0 0 15px var(--accent), 0 0 30px var(--accent-dim) !important;
  opacity: 1 !important;
  transform: translateY(-2px);
}

.btn-secondary {
  padding: 10px 20px;
  background: transparent !important;
  color: var(--accent) !important;
  font-weight: bold;
  border-radius: 5px;
  border: 1px solid var(--accent) !important;
  transition: all 0.3s ease;
  box-shadow: none !important;
}

.btn-secondary:hover {
  background: var(--accent) !important;
  color: var(--bg) !important;
  box-shadow: 0 0 15px var(--accent), 0 0 30px var(--accent-dim) !important;
  opacity: 1 !important;
  transform: translateY(-2px);
}

/* ===== TAGS ===== */
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.tag {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  color: var(--fg-dim);
  background: var(--bg-soft);
}
.tag.tag-accent { 
  border-color: var(--accent); 
  color: var(--accent); 
  background: rgba(0, 255, 156, 0.05);
}

/* ===== SECTION ===== */
section { padding: 40px 0; border-top: 1px solid var(--border); }
.sec-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}
.sec-head .num {
  color: var(--accent);
  font-size: 12px;
}
.sec-head h2 {
  font-size: clamp(18px, 4vw, 24px);
  color: #fff;
  font-weight: 700;
}
.sec-head h2::before { content: '// '; color: var(--fg-dim); }

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 720px) {
  .about-grid { grid-template-columns: 1.4fr 1fr; }
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  position: relative;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 8px 8px 0 0;
  opacity: 0.6;
}
.card h3 {
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.card p { color: var(--fg); margin-bottom: 10px; font-size: 13px; }
.card p:last-child { margin-bottom: 0; }
.kv {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 12px;
}
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--fg-dim); }
.kv .v { color: var(--accent); }

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 640px) {
  .skills-grid { grid-template-columns: 1fr 1fr; }
}
.skill-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 18px;
}
.skill-block h4 {
  color: #fff;
  font-size: 13px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.skill-block h4::before {
  content: '▸';
  color: var(--accent);
}
.skill-block ul {
  list-style: none;
  font-size: 12px;
  color: var(--fg-dim);
}
.skill-block ul li {
  padding: 3px 0 3px 14px;
  position: relative;
}
.skill-block ul li::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: var(--accent);
  font-weight: 700;
}

/* ===== PROJECT SHOWCASE ===== */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 720px) {
  .projects-grid { grid-template-columns: 1fr 1fr; }
}
.project {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  transition: all .25s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.project::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), var(--border-glow), transparent 60%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.project:hover::after { opacity: 1; }
.project:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.project .p-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.project .p-name {
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.project .p-status {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--fg-dim);
}
.project .p-status.live { color: var(--accent); border-color: var(--border-glow); }
.project .p-desc {
  color: var(--fg-dim);
  font-size: 12px;
  margin-bottom: 12px;
  line-height: 1.5;
}
.project .p-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}
.project .p-stack span {
  font-size: 10px;
  padding: 2px 7px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--fg-dim);
}
.project .p-link {
  font-size: 11px;
  color: var(--accent);
}

/* ===== TERMINAL ===== */
.term {
  background: #06090d;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 12px;
}
.term .term-bar {
  background: #0f141c;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.term .term-bar .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--fg-dim);
}
.term .term-bar .dot.r { background: #ff5f56; }
.term .term-bar .dot.y { background: #ffbd2e; }
.term .term-bar .dot.g { background: #27c93f; }
.term .term-bar .title {
  color: var(--fg-dim);
  font-size: 11px;
  margin-left: 6px;
}
.term .term-body {
  padding: 14px;
  height: 260px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--fg);
  scrollbar-width: thin;
}
.term .term-body::-webkit-scrollbar { width: 6px; }
.term .term-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.term .line { line-height: 1.5; }
.term .prompt-line { color: var(--fg); }
.term .prompt-line .user { color: var(--accent); }
.term .prompt-line .path { color: #8ab4ff; }
.term .err { color: #ff5f56; }
.term .ok { color: var(--accent); }
.term .dim { color: var(--fg-dim); }
.term .term-input-row {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--border);
  background: #0a0e14;
}
.term .term-input-row .ps1 {
  padding: 10px 0 10px 14px;
  color: var(--accent);
  font-size: 12px;
  white-space: nowrap;
}
.term .term-input-row input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 10px 14px 10px 6px;
  caret-color: var(--accent);
}

/* ===== FORM KONTAK ===== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--border-glow);
}
.contact-form textarea {
  resize: vertical;
  min-height: 100px;
}
.contact-form button {
  padding: 12px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.contact-form button:hover { opacity: 0.9; }
.contact-form button:active { transform: scale(0.98); }

/* ===== CONTACT LINKS ===== */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--fg);
  font-size: 12px;
  transition: all .2s;
}
.contact-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-soft);
  opacity: 1;
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
  text-align: center;
  color: var(--fg-dim);
  font-size: 11px;
  position: relative;
  z-index: 1;
}
footer .glyph { color: var(--accent); }

/* ===== REVEAL ON SCROLL ===== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.on {
  opacity: 1;
  transform: translateY(0);
}

/* ===== BADGE ===== */
.v2-badge {
  display: inline-block;
  font-size: 9px;
  padding: 1px 6px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 3px;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.5px;
}

/* ===== THEME TOGGLE BUTTON ===== */
#theme-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--accent);
  font-size: 18px;
  cursor: pointer;
  z-index: 99;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
#theme-toggle:hover {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-dim);
}
