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

:root {
  --bg:        #0d1117;
  --bg-card:   #161b22;
  --bg-card2:  #1c2128;
  --border:    #30363d;
  --text:      #e6edf3;
  --text-muted:#8b949e;
  --accent:    #58a6ff;
  --accent2:   #3fb950;
  --accent3:   #d2a8ff;
  --red:       #f85149;
  --amber:     #e3b341;
  --tag-sec:   rgba(248,81,73,0.15);
  --tag-web:   rgba(88,166,255,0.15);
  --tag-ai:    rgba(210,168,255,0.15);
  --radius:    10px;
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ========== NAV ========== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 32px;
  background: rgba(13,17,23,0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.nav-logo:hover { text-decoration: none; }
.nav-avatar-wrap {
  position: relative; width: 36px; height: 36px; flex-shrink: 0;
}
.nav-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid var(--accent);
}
.nav-avatar-ring {
  position: absolute; inset: -3px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent3)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  animation: ring-spin 6s linear infinite;
}
@keyframes ring-spin {
  to { transform: rotate(360deg); }
}
.nav-name {
  font-weight: 700; font-size: 1.05rem;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}
.nav-links { list-style: none; display: flex; gap: 24px; }
.nav-links a { color: var(--text-muted); font-size: 0.85rem; transition: color var(--transition); }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-thm img { display: block; height: 20px; }
.nav-thm:hover { opacity: 0.8; }

/* ========== HERO ========== */
header#home {
  min-height: 100vh;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center;
  padding: 100px 24px 60px;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(88,166,255,0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(210,168,255,0.06) 0%, transparent 50%);
  border-bottom: 1px solid var(--border);
}

/* Hero profile avatar */
.hero-avatar-wrap {
  position: relative;
  width: 120px; height: 120px;
  margin-bottom: 28px;
}
.hero-avatar {
  width: 120px; height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-card);
  position: relative; z-index: 1;
}
.hero-avatar-glow {
  position: absolute; inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent3), var(--accent2), var(--accent));
  animation: glow-spin 4s linear infinite;
  z-index: 0;
  filter: blur(1px);
}
.hero-avatar-wrap::after {
  content: '';
  position: absolute; inset: -2px;
  border-radius: 50%;
  background: var(--bg);
  z-index: 0;
}
.hero-avatar { z-index: 2; }
.hero-avatar-glow { z-index: 1; }
@keyframes glow-spin {
  to { transform: rotate(360deg); }
}

.hero-name {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -2px;
  background: linear-gradient(135deg, var(--accent) 30%, var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}
.hero-title {
  font-size: clamp(0.9rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero-tagline {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 40px;
  max-width: 440px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ========== BUTTONS ========== */
.btn {
  display: inline-block;
  padding: 11px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-primary { background: var(--accent); color: #0d1117; }
.btn-primary:hover { background: #79c0ff; text-decoration: none; color: #0d1117; }
.btn-outline { border: 1px solid var(--border); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn-thm {
  background: rgba(248,81,73,0.15);
  border: 1px solid rgba(248,81,73,0.4);
  color: #ff7b72;
}
.btn-thm:hover { background: rgba(248,81,73,0.25); text-decoration: none; color: #ff7b72; }

/* ========== SECTIONS ========== */
section {
  padding: 90px 0;
  border-bottom: 1px solid var(--border);
}
.section-title { font-size: 2rem; font-weight: 700; margin-bottom: 12px; }
.section-title::after {
  content: '';
  display: block;
  width: 40px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent3));
  margin-top: 8px;
  border-radius: 2px;
}
.section-sub { color: var(--text-muted); margin-bottom: 48px; font-size: 1rem; }
.section-sub a { color: var(--accent); }

/* ========== ABOUT ========== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
  margin-top: 40px;
}
.about-text p { color: var(--text-muted); margin-bottom: 16px; }
.about-text strong { color: var(--text); }
.thm-badge-link { display: inline-block; margin-top: 8px; }
.thm-badge { display: block; max-width: 100%; border-radius: 8px; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  transition: border-color var(--transition);
}
.stat:hover { border-color: var(--accent); }
.stat-num { display: block; font-size: 1.2rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); }

/* ========== CREDENTIALS ========== */
.creds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 40px;
}
.cred-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: border-color var(--transition), transform var(--transition);
  text-decoration: none;
}
.cred-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.cred-highlight { border-color: rgba(88,166,255,0.4); background: rgba(88,166,255,0.04); }
.cred-rank { border-color: rgba(248,81,73,0.35); background: rgba(248,81,73,0.04); }
.cred-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.5px;
}
.cred-thm   { background: rgba(248,81,73,0.2);  color: #ff7b72; border: 1px solid rgba(248,81,73,0.3); }
.cred-comptia { background: rgba(88,166,255,0.15); color: var(--accent); border: 1px solid rgba(88,166,255,0.3); }
.cred-isc2  { background: rgba(63,185,80,0.15);  color: var(--accent2); border: 1px solid rgba(63,185,80,0.3); }
.cred-cisco { background: rgba(210,168,255,0.15); color: var(--accent3); border: 1px solid rgba(210,168,255,0.3); }
.cred-info { display: flex; flex-direction: column; gap: 3px; }
.cred-name { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.cred-issuer { font-size: 0.8rem; color: var(--text-muted); }
.cred-badge-tag {
  font-size: 0.7rem;
  color: var(--accent);
  background: rgba(88,166,255,0.1);
  border-radius: 4px;
  padding: 1px 6px;
  align-self: flex-start;
  margin-top: 2px;
}

/* ========== SERVICES ========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color var(--transition), transform var(--transition);
}
.service-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.service-icon { font-size: 2rem; margin-bottom: 16px; }
.service-card h3 { font-size: 1.2rem; margin-bottom: 16px; }
.service-card ul { list-style: none; }
.service-card li { color: var(--text-muted); font-size: 0.9rem; padding: 6px 0; border-bottom: 1px solid var(--border); }
.service-card li:last-child { border-bottom: none; }
.service-card li::before { content: '→ '; color: var(--accent); }

/* ========== PROJECTS ========== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color var(--transition), transform var(--transition);
}
.project-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.project-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.project-header h3 { font-size: 1.05rem; }
.project-tag {
  font-size: 0.7rem; font-weight: 600; padding: 3px 10px;
  border-radius: 20px; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap;
}
.project-tag.security { background: var(--tag-sec); color: var(--red); }
.project-tag.webdev   { background: var(--tag-web); color: var(--accent); }
.project-tag.ai       { background: var(--tag-ai);  color: var(--accent3); }
.project-card p { color: var(--text-muted); font-size: 0.9rem; flex: 1; }
.project-tech { display: flex; flex-wrap: wrap; gap: 8px; }
.project-tech span {
  font-size: 0.75rem; background: var(--bg-card2);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 2px 8px; color: var(--text-muted);
}
.project-link { font-size: 0.88rem; color: var(--accent); margin-top: 4px; }
.project-link:hover { text-decoration: underline; }

/* ========== SHOWCASE ========== */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  margin-top: 40px;
}
.showcase-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}
.showcase-item:hover { border-color: var(--accent); transform: translateY(-2px); }

/* Browser chrome */
.browser-mockup {
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.browser-bar {
  display: flex; align-items: center; gap: 6px;
  background: #1c2128;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.browser-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.browser-dot.red   { background: #f85149; }
.browser-dot.amber { background: #e3b341; }
.browser-dot.green { background: #3fb950; }
.browser-url {
  flex: 1; background: #0d1117; border: 1px solid var(--border);
  border-radius: 4px; padding: 2px 10px;
  font-size: 0.7rem; color: var(--text-muted); margin-left: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser-body { height: 190px; overflow: hidden; }

/* Mockup 1: Login */
.login-mockup {
  background: #0d1117;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px; padding: 16px;
}
.mock-logo { font-size: 1rem; font-weight: 700; color: var(--accent); letter-spacing: 1px; }
.mock-form { display: flex; flex-direction: column; gap: 8px; width: 160px; }
.mock-field { display: flex; flex-direction: column; gap: 3px; }
.mock-label { font-size: 0.65rem; color: var(--text-muted); }
.mock-input {
  height: 26px; background: var(--bg-card2);
  border: 1px solid var(--border); border-radius: 5px;
}
.mock-pw { display: flex; align-items: center; gap: 5px; padding: 0 8px; }
.mock-pw span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); }
.mock-btn {
  height: 28px; background: var(--accent); border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; color: #0d1117; margin-top: 2px;
}
.mock-hint { font-size: 0.58rem; color: var(--accent2); text-align: center; }

/* Mockup 2: Dashboard */
.dash-mockup {
  background: #0d1117;
  padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.dash-header { display: flex; align-items: center; justify-content: space-between; }
.dash-title { font-size: 0.75rem; font-weight: 700; color: var(--text); }
.dash-status { font-size: 0.65rem; }
.dash-status.ok { color: var(--accent2); }
.dash-stats { display: flex; gap: 6px; }
.dash-stat {
  flex: 1; background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 4px; text-align: center;
}
.dash-stat span { display: block; font-size: 1rem; font-weight: 700; }
.dash-stat small { font-size: 0.58rem; color: var(--text-muted); }
.dash-stat.red   span { color: var(--red); }
.dash-stat.amber span { color: var(--amber); }
.dash-stat.yellow span { color: #e3b341; }
.dash-stat.green span { color: var(--accent2); }
.dash-rows { display: flex; flex-direction: column; gap: 5px; }
.dash-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: 5px; padding: 5px 8px; font-size: 0.65rem; color: var(--text-muted);
}
.dash-sev {
  font-size: 0.58rem; font-weight: 700; padding: 1px 5px;
  border-radius: 3px; flex-shrink: 0;
}
.dash-sev.crit { background: rgba(248,81,73,0.2); color: var(--red); }
.dash-sev.high { background: rgba(227,179,65,0.2); color: var(--amber); }
.dash-sev.med  { background: rgba(88,166,255,0.2); color: var(--accent); }

/* Mockup 3: Chat widget */
.chat-mockup {
  background: #0d1117;
  position: relative;
  padding: 10px;
  display: flex; align-items: flex-end; justify-content: flex-end;
}
.chat-site-bg {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 50%, rgba(88,166,255,0.05) 0%, transparent 70%);
}
.chat-site-text { font-size: 1.2rem; font-weight: 700; color: rgba(88,166,255,0.15); letter-spacing: 2px; }
.chat-widget {
  position: relative; z-index: 1;
  width: 170px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.68rem;
}
.chat-header {
  background: #0d1117; padding: 7px 10px;
  font-weight: 700; color: var(--text);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.chat-online { color: var(--accent2); font-weight: 400; }
.chat-messages { padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.chat-msg {
  padding: 5px 8px; border-radius: 8px;
  max-width: 85%; line-height: 1.4;
}
.chat-msg.bot { background: #1c2128; color: var(--text); border: 1px solid var(--border); align-self: flex-start; }
.chat-msg.user { background: var(--accent); color: #0d1117; align-self: flex-end; }
.chat-input-row {
  display: flex; gap: 5px; padding: 6px 8px;
  border-top: 1px solid var(--border); background: #0d1117;
}
.chat-input-fake {
  flex: 1; background: var(--bg-card2);
  border: 1px solid var(--border); border-radius: 5px;
  padding: 3px 7px; color: var(--text-muted); font-size: 0.6rem;
}
.chat-send {
  background: var(--accent); color: #0d1117;
  border-radius: 5px; padding: 3px 7px;
  font-weight: 700; font-size: 0.7rem;
  display: flex; align-items: center;
}

.showcase-info { padding: 18px 20px; }
.showcase-info h4 { margin-bottom: 6px; font-size: 1rem; }
.showcase-info p { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 10px; }

/* ========== SKILLS ========== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.skill-group h3 { font-size: 1rem; margin-bottom: 16px; color: var(--accent); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tags span {
  font-size: 0.8rem; background: var(--bg-card2);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 4px 10px; color: var(--text-muted);
  transition: border-color var(--transition), color var(--transition);
}
.skill-tags span:hover { border-color: var(--accent); color: var(--text); }

/* ========== CONTACT ========== */
.contact-links {
  display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px;
}
.contact-card {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 32px; gap: 8px;
  flex: 1; min-width: 160px;
  transition: border-color var(--transition), transform var(--transition);
  text-align: center;
}
.contact-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.contact-icon { font-size: 1.8rem; }
.contact-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.contact-value { font-size: 0.88rem; color: var(--text); }

/* ========== FOOTER ========== */
footer {
  padding: 32px 24px; text-align: center;
  color: var(--text-muted); font-size: 0.85rem;
}
footer a { color: var(--text-muted); }
footer a:hover { color: var(--accent); }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-thm { display: none; }
}
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: repeat(4, 1fr); }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-avatar-wrap { width: 90px; height: 90px; }
  .hero-avatar { width: 90px; height: 90px; }
}
