/* ═══════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════ */
:root {
  --cyan:       #00f5ff;
  --cyan-glow:  rgba(0,245,255,0.15);
  --bg:         #050a0f;
  --bg2:        #080e15;
  --bg3:        #0b1520;
  --surface:    #0d1e2e;
  --border:     rgba(0,245,255,0.12);
  --text:       #d4e8f2;
  --text-dim:   #6a8a9a;
  --accent:     #ff6b35;
  --green:      #39ff14;
  --red:        #ff3b5c;
  --mono:       'Share Tech Mono', monospace;
  --display:    'Bebas Neue', sans-serif;
  --body:       'DM Sans', sans-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(--body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ═══════════════════════════════════════
   CUSTOM CURSOR
═══════════════════════════════════════ */
.cur-dot {
  position: fixed; width: 8px; height: 8px;
  background: var(--cyan); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  transition: opacity .2s;
  mix-blend-mode: screen;
}
.cur-ring {
  position: fixed; width: 32px; height: 32px;
  border: 1px solid var(--cyan); border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%,-50%);
  transition: width .2s, height .2s, opacity .2s;
  opacity: .4;
}
.cur-ring.big { width: 56px; height: 56px; opacity: .7; }

/* ═══════════════════════════════════════
   ATMOSPHERIC LAYERS
═══════════════════════════════════════ */
.layer-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,245,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,245,255,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
}
.layer-grid::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 90% 60% at 50% -10%, rgba(0,245,255,0.07) 0%, transparent 65%);
}
.layer-noise {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
.layer-scanlines {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.07) 2px, rgba(0,0,0,0.07) 4px
  );
}

/* ═══════════════════════════════════════
   NAV
═══════════════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 64px;
  background: linear-gradient(to bottom, rgba(5,10,15,.98), rgba(5,10,15,0));
  backdrop-filter: blur(8px);
  transition: padding .1s;
}
nav.scrolled { padding: 12px 64px; }
.nav-logo {
  font-family: var(--display); font-size: 22px;
  letter-spacing: 4px; color: var(--cyan);
}
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  font-family: var(--mono); font-size: 13px;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--text-dim); transition: color .1s;
  position: relative; padding-bottom: 4px;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--cyan);
  transition: width .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--cyan); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 2px; text-transform: uppercase;
  padding: 10px 24px; border: 1px solid var(--cyan);
  color: var(--cyan); transition: background .1s, color .1s;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.nav-cta:hover { background: var(--cyan); color: var(--bg); }

/* ═══════════════════════════════════════
   SECTIONS
═══════════════════════════════════════ */
section { position: relative; z-index: 2; }
.section-inner { padding: 100px 64px; max-width: 1280px; margin: 0 auto; }
.section-tag {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 4px; color: var(--cyan);
  text-transform: uppercase; margin-bottom: 14px;
  display: flex; align-items: center; gap: 12px;
}
.section-tag .idx { color: var(--text-dim); }
h2 {
  font-family: var(--display);
  font-size: clamp(42px, 6vw, 68px);
  color: #fff; letter-spacing: 1px; line-height: 1;
  margin-bottom: 56px;
}
h2 em { color: var(--cyan); font-style: normal; }

/* ═══════════════════════════════════════
   HERO
═══════════════════════════════════════ */
#hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: 120px 64px 80px; position: relative; overflow: hidden;
}
.hero-left { max-width: 700px; position: relative; z-index: 3; }

.hero-status {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 14px;
  letter-spacing: 3px; color: var(--green);
  text-transform: uppercase; margin-bottom: 28px;
  padding: 8px 16px; border: 1px solid rgba(57,255,20,.25);
  background: rgba(57,255,20,.04);
}
.status-dot {
  width: 6px; height: 6px; background: var(--green);
  border-radius: 50%; animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
  0%,100% { box-shadow: 0 0 0 0 rgba(57,255,20,.5); }
  50%      { box-shadow: 0 0 0 6px rgba(57,255,20,0); }
}

h1 {
  font-family: var(--display);
  font-size: clamp(72px, 11vw, 130px);
  line-height: .88; letter-spacing: 1px;
  color: #fff; margin-bottom: 10px;
}
h1 .cyan { color: var(--cyan); }
.hero-sub {
  font-family: var(--display);
  font-size: clamp(22px, 3.2vw, 38px);
  color: var(--text-dim); letter-spacing: 7px;
  margin-bottom: 36px;
}
.hero-desc {
  font-size: 16px; line-height: 1.9; color: var(--text);
  max-width: 520px; margin-bottom: 52px; font-weight: 400;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 3px; text-transform: uppercase;
  padding: 15px 34px; display: inline-flex; align-items: center; gap: 10px;
  transition: transform .15s, background .2s, color .2s;
  clip-path: polygon(0 0,calc(100% - 10px) 0,100% 10px,100% 100%,10px 100%,0 calc(100% - 10px));
  cursor: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-fill   { background: var(--cyan); color: var(--bg); }
.btn-fill:hover { background: #fff; }
.btn-ghost  { border: 1px solid var(--cyan); color: var(--cyan); }
.btn-ghost:hover { background: var(--cyan-glow); }

/* HERO PHOTO */
.hero-photo-zone {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: clamp(320px, 40vw, 560px);
  display: flex; align-items: flex-end;
  pointer-events: none;
}
.photo-frame {
  position: relative; width: 100%; height: 92%;
}
.photo-frame img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  filter: grayscale(15%) contrast(1.08);
  position: relative; z-index: 1;
}
.photo-frame::before {
  content: ''; position: absolute;
  top: -3px; right: -3px; bottom: 40px; left: 40px;
  border: 1px solid rgba(0,245,255,.25); z-index: 0;
}
.photo-fade {
  position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(to right, var(--bg) 0%, transparent 28%),
    linear-gradient(to top, var(--bg) 0%, transparent 18%),
    linear-gradient(to left, var(--bg) 0%, transparent 12%);
}
.photo-corner {
  position: absolute; width: 18px; height: 18px;
  border-color: var(--cyan); border-style: solid; z-index: 3;
}
.pc-tr { top:-3px; right:-3px; border-width: 2px 2px 0 0; }
.pc-bl { bottom:40px; left:40px; border-width: 0 0 2px 2px; }

/* SCROLL CUE */
.scroll-cue {
  position: absolute; bottom: 40px; left: 64px;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 2px; color: var(--text-dim);
  animation: cue 2.5s ease-in-out infinite;
}
.scroll-cue::before {
  content: ''; display: block; width: 1px; height: 36px;
  background: linear-gradient(to bottom, var(--cyan), transparent);
  animation: cue-bar 2.5s ease-in-out infinite;
}
@keyframes cue     { 0%,100%{transform:translateY(0)} 50%{transform:translateY(8px)} }
@keyframes cue-bar { 0%,100%{height:36px;opacity:1} 50%{height:20px;opacity:.4} }

/* ═══════════════════════════════════════
   STATS BAR
═══════════════════════════════════════ */
.stats-bar {
  position: relative; z-index: 2;
  display: flex; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  max-width: 1280px; margin: 0 auto;
  padding: 0 64px;
}
.stat {
  flex: 1; padding: 28px 32px; border-right: 1px solid var(--border);
  transition: background .3s; position: relative; overflow: hidden;
}
.stat:last-child { border-right: none; }
.stat:hover { background: rgba(0,245,255,.025); }
.stat-n {
  font-family: var(--display); font-size: 52px;
  color: var(--cyan); line-height: 1; display: block;
}
.stat-l {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 2.5px; color: var(--text-dim);
  text-transform: uppercase; margin-top: 6px;
}

/* ═══════════════════════════════════════
   SKILLS
═══════════════════════════════════════ */
#skills { background: var(--bg2); }
.skills-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border); gap: 1px;
  background: var(--border); margin-bottom: 40px;
}
@media(max-width:900px) { .skills-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width:600px) { .skills-grid { grid-template-columns: 1fr; } }

.skill-card {
  background: var(--bg2); padding: 32px 28px;
  transition: background .3s; position: relative; overflow: hidden;
}
.skill-card:hover { background: var(--surface); }
.skill-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 2px; height: 0; background: var(--cyan);
  transition: height .4s;
}
.skill-card:hover::before { height: 100%; }
.sk-icon  { font-size: 28px; margin-bottom: 16px; }
.sk-name  {
  font-family: var(--display); font-size: 21px;
  letter-spacing: 2px; color: #fff; margin-bottom: 10px;
}
.sk-desc  { font-size: 13.5px; color: var(--text-dim); line-height: 1.75; }
.sk-bar-wrap { margin-top: 18px; }
.sk-pct   { font-family: var(--mono); font-size: 11px; color: var(--cyan); float: right; margin-bottom: 6px; }
.sk-track { height: 1px; background: rgba(0,245,255,.1); }
.sk-fill  {
  height: 100%; background: var(--cyan); width: 0;
  transition: width 1.3s cubic-bezier(.4,0,.2,1); position: relative;
}
.sk-fill::after {
  content: ''; position: absolute; right: 0; top: -3px;
  width: 7px; height: 7px; background: var(--cyan); border-radius: 50%;
}

.tech-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tc {
  font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px;
  padding: 6px 14px; border: 1px solid var(--border);
  color: var(--text-dim); text-transform: uppercase;
  transition: border-color .2s, color .2s, background .2s;
}
.tc:hover { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-glow); }

/* ═══════════════════════════════════════
   EXPERIENCE
═══════════════════════════════════════ */
#experience { background: var(--bg); }
.timeline { position: relative; padding-left: 2px; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 1px; background: linear-gradient(to bottom, var(--cyan), transparent);
}
.tl-item {
  padding-left: 44px; margin-bottom: 56px;
  opacity: 0; transform: translateX(-16px);
  transition: opacity .7s, transform .7s;
}
.tl-item.vis { opacity: 1; transform: translateX(0); }
.tl-dot {
  position: absolute; left: -5px; top: 4px;
  width: 11px; height: 11px;
  background: var(--bg); border: 2px solid var(--cyan); border-radius: 50%;
}
.tl-dot::after {
  content: ''; position: absolute;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 4px; height: 4px; background: var(--cyan); border-radius: 50%;
}
.tl-date {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 2.5px; color: var(--cyan);
  text-transform: uppercase; margin-bottom: 10px;
}
.tl-co {
  font-family: var(--display); font-size: 28px;
  letter-spacing: 2px; color: #fff; margin-bottom: 4px;
}
.tl-role {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 1px; color: var(--cyan); margin-bottom: 4px;
}
.tl-client {
  font-family: var(--mono); font-size: 11px;
  color: var(--text-dim); margin-bottom: 18px;
}
.tl-list { list-style: none; }
.tl-list li {
  font-size: 14.5px; color: var(--text); line-height: 1.75;
  padding: 7px 0 7px 20px; border-bottom: 1px solid rgba(0,245,255,.04);
  position: relative;
}
.tl-list li::before {
  content: '▸'; position: absolute; left: 0;
  color: var(--cyan); font-size: 10px; top: 9px;
}

/* ═══════════════════════════════════════
   CERTIFICATIONS
═══════════════════════════════════════ */
#certifications { background: var(--bg3); }
.certs-row {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 16px;
  margin-bottom: 48px;
}
@media(max-width:900px) { .certs-row { grid-template-columns: 1fr 1fr; } }
@media(max-width:500px) { .certs-row { grid-template-columns: 1fr; } }

.cert-card {
  border: 1px solid var(--border); padding: 28px 22px;
  background: var(--surface); position: relative; overflow: hidden;
  transition: border-color .3s, transform .3s;
  clip-path: polygon(0 0,calc(100% - 14px) 0,100% 14px,100% 100%,14px 100%,0 calc(100% - 14px));
}
.cert-card:hover { border-color: var(--cyan); transform: translateY(-4px); }
.cert-card::before {
  content: ''; position: absolute; top: 0; right: 0;
  border-top: 14px solid var(--border);
  border-left: 14px solid transparent;
  transition: border-top-color .3s;
}
.cert-card:hover::before { border-top-color: var(--cyan); }
.cert-ghost {
  position: absolute; bottom: 6px; right: 12px;
  font-family: var(--display); font-size: 48px;
  color: rgba(0,245,255,.05); line-height: 1; pointer-events: none;
}
.cert-badge {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 2px; color: var(--cyan);
  background: rgba(0,245,255,.07); padding: 4px 10px;
  display: inline-block; margin-bottom: 14px;
}
.cert-name { font-size: 14px; font-weight: 500; color: #fff; line-height: 1.45; }

.edu-block {
  border: 1px solid var(--border); padding: 30px 32px;
  background: var(--surface); display: flex;
  justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
}
.edu-degree { font-family: var(--display); font-size: 26px; letter-spacing: 2px; color: #fff; }
.edu-field  { font-family: var(--mono); font-size: 12px; color: var(--cyan); margin-top: 5px; }
.edu-inst   { font-family: var(--mono); font-size: 11px; color: var(--text-dim); margin-top: 8px; }
.edu-year   { font-family: var(--display); font-size: 40px; color: rgba(0,245,255,.12); }

/* ═══════════════════════════════════════
   ACHIEVEMENTS
═══════════════════════════════════════ */
#achievements { background: var(--bg2); }
.ach-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 1px; background: var(--border); border: 1px solid var(--border);
}
@media(max-width:768px) { .ach-grid { grid-template-columns: 1fr; } }
.ach-card {
  background: var(--bg2); padding: 44px 36px;
  position: relative; overflow: hidden; transition: background .3s;
}
.ach-card:hover { background: var(--surface); }
.ach-card::after {
  content: attr(data-n); font-family: var(--display);
  font-size: 110px; color: rgba(0,245,255,.04);
  position: absolute; bottom: -18px; right: -8px; line-height: 1;
  pointer-events: none;
}
.ach-ico { font-size: 34px; margin-bottom: 22px; }
.ach-pct {
  font-family: var(--display); font-size: 56px;
  color: var(--cyan); line-height: 1; margin-bottom: 12px;
}
.ach-txt { font-size: 14.5px; color: var(--text); line-height: 1.8; }

/* ═══════════════════════════════════════
   CONTACT
═══════════════════════════════════════ */
#contact { background: var(--bg); border-top: 1px solid var(--border); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
@media(max-width:900px) { .contact-grid { grid-template-columns: 1fr; gap: 48px; } }

.contact-heading {
  font-family: var(--display); font-size: 40px;
  letter-spacing: 2px; color: #fff; margin-bottom: 18px;
}
.contact-copy {
  font-size: 15px; color: var(--text-dim); line-height: 1.9; margin-bottom: 36px;
}
.contact-links { display: flex; flex-direction: column; gap: 12px; }
.c-link {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--body); font-size: 13px;
  color: var(--text); padding: 14px 18px;
  border: 1px solid var(--border);
  transition: border-color .2s, color .2s, background .2s;
}
.c-link:hover { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-glow); }
.c-link-ico { color: var(--cyan); font-size: 16px; }

/* CONTACT FORM */
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media(max-width:600px) { .form-row { grid-template-columns: 1fr; } }

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 2.5px; color: var(--cyan); text-transform: uppercase;
}
.form-input, .form-textarea {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-family: var(--body); font-size: 14px;
  padding: 13px 16px; outline: none;
  transition: border-color .2s, background .2s;
  resize: none;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--cyan); background: var(--bg3);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-dim); font-size: 13px; }
.form-textarea { min-height: 140px; }

.form-submit {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 3px; text-transform: uppercase;
  padding: 15px 32px; background: var(--cyan); color: var(--bg);
  border: none; cursor: none; align-self: flex-start;
  clip-path: polygon(0 0,calc(100% - 10px) 0,100% 10px,100% 100%,10px 100%,0 calc(100% - 10px));
  transition: background .2s, transform .15s;
  display: flex; align-items: center; gap: 10px;
}
.form-submit:hover { background: #fff; transform: translateY(-2px); }
.form-submit:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.form-msg {
  font-family: var(--mono); font-size: 12px; padding: 12px 16px;
  border: 1px solid; letter-spacing: 1px; display: none;
}
.form-msg.success { border-color: var(--green); color: var(--green); background: rgba(57,255,20,.05); display: block; }
.form-msg.error   { border-color: var(--red);   color: var(--red);   background: rgba(255,59,92,.05);  display: block; }

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
footer {
  position: relative; z-index: 2;
  padding: 28px 64px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  font-family: var(--mono); font-size: 13px; color: var(--text-dim); letter-spacing: 1.5px;
}
.footer-pulse { display: flex; align-items: center; gap: 8px; }
.fpd { width: 6px; height: 6px; background: var(--green); border-radius: 50%; animation: pulse-green 2s infinite; }

/* ═══════════════════════════════════════
   ANIMATIONS / REVEAL
═══════════════════════════════════════ */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .4s, transform .4s;
}
.reveal.vis { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: .1s; }
.d2 { transition-delay: .2s; }
.d3 { transition-delay: .1s; }
.d4 { transition-delay: .2s; }

/* ── Glitch (reduced interval: fires every ~8s instead of ~5s) */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-g); position: absolute; top: 0; left: 0;
  font-family: inherit; font-size: inherit; color: inherit;
}
.glitch::before {
  color: var(--cyan); clip-path: polygon(0 0,100% 0,100% 38%,0 38%);
  animation: g1 8s infinite 3s;
}
.glitch::after {
  color: var(--accent); clip-path: polygon(0 62%,100% 62%,100% 100%,0 100%);
  animation: g2 8s infinite 3.4s;
}
@keyframes g1 {
  0%,88%,100% { transform:none; opacity:0; }
  89%         { transform:translateX(-4px); opacity:.9; }
  91%         { transform:translateX(4px); }
  93%         { transform:none; opacity:0; }
}
@keyframes g2 {
  0%,88%,100% { transform:none; opacity:0; }
  89%         { transform:translateX(4px); opacity:.9; }
  91%         { transform:translateX(-4px); }
  93%         { transform:none; opacity:0; }
}

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media(max-width:900px) {
  nav { padding: 14px 24px; }
  .nav-links { display: none; }
  #hero { padding: 120px 24px 80px; }
  .hero-photo-zone { display: none; }
  .stats-bar, .section-inner { padding-left: 24px; padding-right: 24px; }
  .stats-bar { flex-wrap: wrap; }
  .stat { min-width: 50%; }
  footer { padding: 20px 24px; flex-direction: column; text-align: center; }
}
