/* ===== ROOT VARIABLES ===== */
:root {
  --bg:       #080c10;
  --bg2:      #0d1117;
  --bg3:      #111820;
  --gold:     #c9a84c;
  --gold-dim: #9a7830;
  --gold-glow:#c9a84c44;
  --text:     #e8e0d0;
  --text-dim: #8a8070;
  --text-mute:#4a4540;
  --accent:   #4a9eff;
  --danger:   #ff4a6e;
  --green:    #4affb4;
  --border:   rgba(201,168,76,0.15);
  --radius:   4px;
  --font-mono: 'Share Tech Mono', monospace;
  --font-serif:'Cormorant Garamond', Georgia, serif;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== MATRIX CANVAS ===== */
#matrix-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
}

/* ===== CUSTOM CURSOR ===== */
.cursor {
  width: 8px; height: 8px;
  background: var(--gold);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: background 0.2s;
}
.cursor-follower {
  width: 32px; height: 32px;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.12s ease, width 0.2s, height 0.2s, opacity 0.2s;
}
.cursor-follower.hover {
  width: 48px; height: 48px;
  border-color: var(--gold);
  opacity: 0.6;
}

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4vw;
  height: 64px;
  background: rgba(8, 12, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
#navbar.scrolled {
  background: rgba(8, 12, 16, 0.97);
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.nav-logo .bracket { color: var(--gold); }
.nav-logo .accent  { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 2.5rem;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.25s ease;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }

.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-mute);
  letter-spacing: 0.1em;
}
.status-dot {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* ===== SECTION BASE ===== */
section {
  position: relative;
  z-index: 1;
  padding: 120px 8vw;
}
.section-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 60px;
}
.section-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  opacity: 0.6;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
}
.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--gold-dim), transparent);
  opacity: 0.4;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block;
  padding: 12px 32px;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.btn-primary:hover {
  background: var(--gold);
  color: var(--bg);
  box-shadow: 0 0 20px var(--gold-glow);
}
.btn-ghost {
  display: inline-block;
  padding: 12px 32px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: border-color 0.25s, color 0.25s;
}
.btn-ghost:hover {
  border-color: var(--gold-dim);
  color: var(--gold-dim);
}

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  padding-top: 120px;
}
.hero-content { flex: 1; max-width: 620px; }

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gold-dim);
  letter-spacing: 0.1em;
  margin-bottom: 24px;
  min-height: 1.4em;
}
.hero-tag .typed-cursor {
  display: inline-block;
  width: 2px; height: 1em;
  background: var(--gold);
  animation: blink 0.8s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-title {
  font-family: var(--font-serif);
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  line-height: 0.9;
  margin-bottom: 20px;
}
.hero-title .line1 {
  display: block;
  font-size: clamp(3rem, 7vw, 6rem);
  color: var(--text);
}
.hero-title .line2 {
  display: block;
  font-size: clamp(3rem, 7vw, 6rem);
  color: var(--gold);
  -webkit-text-stroke: 1px var(--gold);
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-bottom: 40px;
}
.sep { color: var(--gold); margin: 0 8px; }

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
}
.stat-num {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 4px;
}
.stat-divider {
  width: 1px; height: 40px;
  background: var(--border);
}

/* Shield */
.hero-visual {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shield-container {
  position: relative;
  width: 260px; height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shield-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--gold);
  animation: spin-ring linear infinite;
}
.ring1 { width: 240px; height: 240px; border-style: dashed; opacity: 0.12; animation-duration: 30s; }
.ring2 { width: 190px; height: 190px; border-style: dotted; opacity: 0.2; animation-duration: 20s; animation-direction: reverse; }
.ring3 { width: 140px; height: 140px; opacity: 0.1; animation-duration: 15s; }
@keyframes spin-ring { to { transform: rotate(360deg); } }

.shield-core {
  position: relative;
  z-index: 2;
  width: 100px;
  filter: drop-shadow(0 0 18px var(--gold-glow));
  animation: float-shield 4s ease-in-out infinite;
}
@keyframes float-shield {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* ===== ABOUT ===== */
#about { background: var(--bg2); }

.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 6vw;
  align-items: start;
}
.about-photo-wrap { display: flex; flex-direction: column; align-items: center; gap: 28px; }

.photo-frame {
  position: relative;
  width: 220px; height: 260px;
  border: 1px solid var(--border);
}
.photo-placeholder {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
  gap: 12px;
}
.photo-placeholder svg { width: 70px; opacity: 0.4; }
.photo-hint {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-mute);
  letter-spacing: 0.1em;
}

/* Corner decorators */
.photo-corner {
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--gold);
  border-style: solid;
}
.tl { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.tr { top: -1px; right: -1px; border-width: 1px 1px 0 0; }
.bl { bottom: -1px; left: -1px; border-width: 0 0 1px 1px; }
.br { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.cert-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.badge {
  padding: 5px 14px;
  border: 1px solid var(--gold-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold-dim);
  letter-spacing: 0.12em;
  cursor: default;
  position: relative;
  transition: border-color 0.2s, color 0.2s;
}
.badge:hover { border-color: var(--gold); color: var(--gold); }
.badge::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.65rem;
  padding: 5px 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  letter-spacing: 0.05em;
}
.badge:hover::after { opacity: 1; }

.about-intro {
  font-size: 1.05rem;
  color: var(--text-dim);
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}
.highlight {
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.1em;
}
.about-body {
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 18px;
  line-height: 1.8;
}
.about-body em { color: var(--text); font-style: normal; }

.about-details {
  margin: 32px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.detail-row {
  display: flex;
  gap: 20px;
  align-items: baseline;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.detail-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-mute);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  min-width: 130px;
}
.detail-value {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text);
}
.detail-value.available { color: var(--green); }

/* ===== SKILLS ===== */
#skills { background: var(--bg); }

.skills-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
.tab-btn {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 28px;
  background: none;
  border: none;
  color: var(--text-mute);
  cursor: none;
  position: relative;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text-dim); }
.tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.skills-panel { display: none; }
.skills-panel.active { display: block; }

/* Skill Bars */
.skill-bars { display: flex; flex-direction: column; gap: 28px; max-width: 700px; }
.skill-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.skill-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text);
  letter-spacing: 0.05em;
}
.skill-pct {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold);
}
.skill-bar {
  height: 2px;
  background: var(--bg3);
  border: 1px solid var(--border);
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(to right, var(--gold-dim), var(--gold));
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 8px var(--gold-glow);
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
}
.tool-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  cursor: default;
  transition: border-color 0.25s, transform 0.2s;
}
.tool-card::before {
  content: attr(data-category);
  position: absolute;
  top: 8px; right: 8px;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-mute);
  letter-spacing: 0.1em;
}
.tool-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-4px);
}
.tool-icon { font-size: 1.6rem; }
.tool-card span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-align: center;
}

/* Soft Skills Grid */
.soft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.soft-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 32px 28px;
  position: relative;
  transition: border-color 0.25s;
}
.soft-card:hover { border-color: var(--gold-dim); }
.soft-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-dim), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.soft-card:hover::after { opacity: 1; }
.soft-icon { width: 40px; margin-bottom: 16px; }
.soft-card h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--text);
  margin-bottom: 10px;
}
.soft-card p {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--text-mute);
  line-height: 1.75;
}

/* ===== FOOTER ===== */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 40px 8vw;
  text-align: center;
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-mute);
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}
.footer-sub {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--text-mute);
  font-style: italic;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  #hero    { flex-direction: column; text-align: center; padding-top: 100px; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { display: none; }
  .about-grid  { grid-template-columns: 1fr; }
  .about-photo-wrap { flex-direction: row; align-items: flex-start; flex-wrap: wrap; }
  .nav-status { display: none; }
}
@media (max-width: 600px) {
  section { padding: 80px 6vw; }
  .skills-tabs { overflow-x: auto; }
}

/* ===== PROJECTS ===== */
#projects { background: var(--bg2); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.25s;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 0;
  background: var(--gold);
  transition: height 0.4s ease;
}
.project-card:hover::before { height: 100%; }
.project-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-5px);
}
.project-card.featured {
  border-color: rgba(201,168,76,0.3);
  background: linear-gradient(135deg, var(--bg) 80%, rgba(201,168,76,0.04));
}

.project-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.project-icon {
  font-size: 1.6rem;
  line-height: 1;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--gold-dim);
  border: 1px solid rgba(201,168,76,0.2);
  padding: 2px 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text);
  line-height: 1.4;
}

.project-desc {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  color: var(--text-mute);
  line-height: 1.75;
  flex: 1;
}

.project-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.project-list li {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  padding-left: 14px;
  position: relative;
}
.project-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--gold);
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.project-type {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-mute);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.project-dots {
  display: flex;
  gap: 5px;
}
.project-dots span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--text-mute);
  opacity: 0.3;
}
.project-dots.active span {
  background: var(--green);
  opacity: 1;
  box-shadow: 0 0 5px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}
.project-dots.active span:nth-child(2) { animation-delay: 0.3s; }
.project-dots.active span:nth-child(3) { animation-delay: 0.6s; }

@media (max-width: 700px) {
  .projects-grid { grid-template-columns: 1fr; }
}
