/* ============================================
   0xdigi.com — cybersecurity brand
   ============================================ */

:root {
  --bg:         #111318;
  --bg-card:    #181c24;
  --bg-hover:   #1e242e;
  --accent:     #00e87b;
  --accent-dim: rgba(0,232,123,0.08);
  --accent-glow: rgba(0,232,123,0.15);
  --text:       #d0d4d8;
  --text-muted: #6e7680;
  --text-faint: #363e48;
  --border:     #242a34;
  --radius:     10px;
  --mono:       'Share Tech Mono', monospace;
  --sans:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: #4dffab; }

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

/* ---- Layout ---- */
.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 80px 0;
}

/* ---- Navigation ---- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  background: rgba(17,19,24,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.nav-logo .prompt {
  opacity: 0.4;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 0.8rem;
  font-family: var(--mono);
  color: var(--text-muted);
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

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

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 56px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.3;
}

.hero-inner {
  width: 100%;
  position: relative;
}

.hero-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0.8;
}

.hero h1 {
  font-family: var(--mono);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero h1 span {
  color: var(--accent);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 36px;
}

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

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--bg-card);
  transition: all 0.2s;
}

.hero-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.hero-links a.primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 600;
}

.hero-links a.primary:hover {
  background: #4dffab;
  border-color: #4dffab;
}

/* ---- Section headers ---- */
.section-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 48px;
  letter-spacing: -0.01em;
}

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

.achieve-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.achieve-card:hover {
  border-color: #2e3640;
}

.achieve-card.gold {
  border-color: rgba(0,232,123,0.2);
}

.achieve-card.gold .achieve-place {
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
}

.achieve-place {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.achieve-event {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.achieve-detail {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---- Projects ---- */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.project {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.25s;
}

.project:hover {
  border-color: #2e3640;
  background: var(--bg-hover);
}

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

.project h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
}

.project-url {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  opacity: 0.7;
  transition: opacity 0.2s;
}

.project:hover .project-url {
  opacity: 1;
}

.project p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
}

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

.tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}

/* ---- Blog feed ---- */
.blog-list {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.blog-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.15s;
}

.blog-row:last-child { border-bottom: none; }

.blog-row:hover {
  background: var(--bg-hover);
}

.blog-date {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  white-space: nowrap;
  min-width: 85px;
}

.blog-title {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  transition: color 0.15s;
}

.blog-row:hover .blog-title {
  color: var(--accent);
}

.blog-arrow {
  font-size: 0.85rem;
  color: var(--text-faint);
  flex-shrink: 0;
  transition: color 0.15s;
}

.blog-row:hover .blog-arrow {
  color: var(--accent);
}

.blog-more {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.blog-more:hover {
  color: var(--accent);
}

/* ---- Tools section ---- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.tool-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  transition: all 0.25s;
}

.tool-card:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.tool-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: 10px;
  color: var(--accent);
}

.tool-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.tool-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

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

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

.footer-left {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}

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

.footer-links a {
  font-size: 0.78rem;
  color: var(--text-muted);
}

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

/* ---- Reveal animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  section { padding: 56px 0; }

  .hero { min-height: auto; padding-top: 100px; padding-bottom: 60px; }

  .nav-links { gap: 16px; }
  .nav-links a { font-size: 0.72rem; }

  .project { padding: 24px; }
  .project-header { flex-direction: column; gap: 4px; }

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

  .blog-row { flex-wrap: wrap; gap: 4px 16px; }
  .blog-date { min-width: auto; }

  footer .wrap { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 400px) {
  .nav-links { gap: 10px; }
  .achieve-grid { grid-template-columns: 1fr; }
}
