/* ============================================================
   DRACOZONA // Cyber Security Portfolio
   Theme: black · cyan · purple
   ============================================================ */

:root {
  --bg:        #05060a;
  --bg-2:      #0a0c14;
  --bg-3:      #0e1220;
  --panel:     rgba(14, 18, 32, 0.72);
  --border:    rgba(130, 90, 230, 0.22);
  --border-cyan: rgba(34, 211, 238, 0.28);

  --cyan:      #22d3ee;
  --cyan-bright:#5ef0ff;
  --purple:    #a855f7;
  --purple-bright:#c77dff;

  --text:      #e7ecf5;
  --muted:     #8b93a7;
  --heading:   #ffffff;

  --glow-cyan:   0 0 18px rgba(34, 211, 238, 0.45);
  --glow-purple: 0 0 18px rgba(168, 85, 247, 0.45);

  --radius: 12px;
  --maxw: 1240px;

  --font-mono: 'JetBrains Mono', ui-monospace, 'Fira Code', monospace;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

/* ---------- Background layers ---------- */
#matrix {
  position: fixed;
  inset: 0;
  z-index: -3;
  opacity: 0.35;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 85, 247, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 80%);
  pointer-events: none;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.18) 3px
  );
  pointer-events: none;
  opacity: 0.4;
}

/* radial glow behind content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(60% 50% at 20% 0%, rgba(168, 85, 247, 0.16), transparent 60%),
    radial-gradient(55% 45% at 85% 10%, rgba(34, 211, 238, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(5, 6, 10, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand-logo {
  width: 42px; height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.35));
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 1.05rem;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-sub { font-size: 0.62rem; color: var(--muted); letter-spacing: 1px; font-family: var(--font-mono); }

.site-nav { display: flex; align-items: center; gap: 0.3rem; }
.nav-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: color .2s, border-color .2s, background .2s;
  white-space: nowrap;
}
.nav-link .nav-prompt { color: var(--cyan); margin-right: 2px; }
.nav-link:hover { color: var(--text); background: rgba(34, 211, 238, 0.06); }
.nav-link.active {
  color: var(--cyan-bright);
  border-color: var(--border-cyan);
  background: rgba(34, 211, 238, 0.08);
  box-shadow: inset 0 0 12px rgba(34, 211, 238, 0.08);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--cyan);
  border-radius: 2px;
  transition: .25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2rem) 4rem;
  min-height: 70vh;
  width: 100%;
  flex: 1 0 auto;          /* fill space so the footer sits at the bottom */
}

.tab-panel { display: none; animation: fade .45s ease both; }
.tab-panel.active { display: block; }

@keyframes fade {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.4rem;
}
.section-head h2 {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--heading);
  letter-spacing: 1px;
}
.section-sub { font-family: var(--font-mono); font-size: 0.78rem; margin-bottom: 2rem; }

.accent-cyan   { color: var(--cyan); }
.accent-purple { color: var(--purple-bright); }
.muted { color: var(--muted); }
.error-text { font-family: var(--font-mono); font-size: 0.86rem; color: #ff5f57; }
.mt { margin-top: 1rem; }
.mt-lg { margin-top: 2.4rem; }

/* ============================================================
   TERMINAL
   ============================================================ */
.terminal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(168, 85, 247, 0.04);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 0.9rem;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-red { background: #ff5f57; }
.dot-amber { background: #febc2e; }
.dot-green { background: #28c840; }
.terminal-title {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.terminal-body { padding: clamp(1.2rem, 4vw, 2rem); }

.line { font-family: var(--font-mono); font-size: 0.86rem; color: var(--text); }
.prompt { color: var(--cyan); margin-right: 8px; }

.typed {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 7vw, 3.4rem);
  font-weight: 700;
  margin: 0.3rem 0 0.2rem;
  background: linear-gradient(90deg, var(--cyan), var(--purple-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}
.typed::after {
  content: "_";
  color: var(--cyan);
  animation: blink 1s steps(1) infinite;
  -webkit-text-fill-color: var(--cyan);
}
@keyframes blink { 50% { opacity: 0; } }

.role { font-family: var(--font-mono); font-size: clamp(0.85rem, 2.5vw, 1.05rem); margin-bottom: 0.6rem; }
.role .sep { color: var(--muted); margin: 0 6px; }
.bio { color: var(--text); max-width: 60ch; margin-top: 0.3rem; }

.stat-row { display: flex; flex-wrap: wrap; gap: 1.6rem; margin: 1.6rem 0; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: var(--font-mono); font-size: 1.8rem; font-weight: 700; }
.stat-label { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.5px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border-cyan);
  color: var(--cyan-bright);
  background: rgba(34, 211, 238, 0.05);
}

.cta-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 0.65rem 1.3rem;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s, box-shadow .2s, background .2s, color .2s;
  display: inline-block;
}
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.74rem; }
.btn-primary {
  background: linear-gradient(90deg, rgba(34,211,238,0.18), rgba(168,85,247,0.22));
  border-color: var(--cyan);
  color: var(--cyan-bright);
  box-shadow: var(--glow-cyan);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 26px rgba(34,211,238,0.6); }
.btn-ghost {
  border-color: var(--purple);
  color: var(--purple-bright);
  background: rgba(168, 85, 247, 0.06);
}
.btn-ghost:hover { transform: translateY(-2px); box-shadow: var(--glow-purple); }

/* ---------- Whoami layout ---------- */
.whoami-wrap {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.whoami-logo { position: relative; display: grid; place-items: center; align-self: center; }
.whoami-logo img {
  width: 100%;
  max-width: 280px;
  filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.4));
  animation: float 6s ease-in-out infinite;
}
.logo-glow {
  position: absolute;
  inset: 10% 15%;
  background: radial-gradient(circle, rgba(34,211,238,0.25), transparent 70%);
  filter: blur(40px);
  z-index: -1;
}
@keyframes float { 50% { transform: translateY(-14px); } }

/* ============================================================
   CV
   ============================================================ */
.block-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--cyan-bright);
  letter-spacing: 1px;
  margin-bottom: 1.1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.cv-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); }

.timeline { list-style: none; position: relative; padding-left: 1.4rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 4px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--cyan), var(--purple));
  opacity: 0.4;
}
.timeline-item { position: relative; padding-bottom: 1.8rem; }
.timeline-dot {
  position: absolute;
  left: -1.4rem; top: 5px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: var(--glow-cyan);
}
.timeline-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.4rem; align-items: baseline; }
.t-role { font-weight: 600; color: var(--heading); }
.t-date { font-family: var(--font-mono); font-size: 0.74rem; color: var(--cyan); }
.t-company { color: var(--purple-bright); font-size: 0.86rem; margin: 0.1rem 0 0.3rem; }
.timeline-content p { color: var(--muted); font-size: 0.9rem; }

.skill { margin-bottom: 0.9rem; }
.skill-head { display: flex; justify-content: space-between; font-size: 0.82rem; margin-bottom: 0.3rem; }
.bar { height: 7px; background: rgba(255,255,255,0.06); border-radius: 999px; overflow: hidden; }
.bar i {
  display: block;
  height: 100%;
  width: var(--w);
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(34,211,238,0.5);
}

/* ============================================================
   CERTIFICATIONS
   ============================================================ */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.1rem;
}
.cert-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform .2s, border-color .2s, box-shadow .2s;
  overflow: hidden;
}
.cert-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(34,211,238,0.07), transparent 50%);
  opacity: 0;
  transition: opacity .2s;
}
.cert-card:hover { transform: translateY(-5px); border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.cert-card:hover::before { opacity: 1; }
.cert-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 1px;
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  color: var(--purple-bright);
  border: 1px solid var(--purple);
  background: rgba(168,85,247,0.08);
  margin-bottom: 0.9rem;
}
.cert-card h3 { font-size: 0.98rem; color: var(--heading); margin-bottom: 0.3rem; }
.cert-status {
  display: inline-block;
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}
.cert-status.verified { color: var(--cyan); }
.cert-status.pending { color: #febc2e; }

/* ============================================================
   BLOG
   ============================================================ */
.blog-list { display: grid; gap: 1.1rem; }
.post-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.post-card:hover { transform: translateX(6px); border-left-color: var(--purple); box-shadow: var(--glow-purple); }
.post-meta { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 0.5rem; }
.post-date { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); }
.post-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  color: var(--purple-bright);
  border: 1px solid var(--purple);
  background: rgba(168,85,247,0.08);
}
.post-card h3 { color: var(--heading); font-size: 1.1rem; margin-bottom: 0.3rem; }
.read-more { font-family: var(--font-mono); font-size: 0.8rem; color: var(--cyan); display: inline-block; margin-top: 0.6rem; }
.read-more:hover { color: var(--cyan-bright); text-shadow: var(--glow-cyan); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 2.5rem); }
.contact-list { list-style: none; margin-top: 1.2rem; display: grid; gap: 0.7rem; }
.contact-list li { display: flex; gap: 1rem; align-items: baseline; font-family: var(--font-mono); font-size: 0.86rem; }
.c-key { min-width: 72px; }
.contact-list a:hover { color: var(--cyan-bright); text-shadow: var(--glow-cyan); }

.contact-form { display: grid; gap: 1rem; align-content: start; }
.contact-form label { display: grid; gap: 0.4rem; }
.contact-form span { font-family: var(--font-mono); font-size: 0.78rem; color: var(--cyan); }
.contact-form input,
.contact-form textarea {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: border-color .2s, box-shadow .2s;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: var(--glow-cyan);
}
.form-note { font-family: var(--font-mono); font-size: 0.78rem; min-height: 1.2em; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  position: sticky;        /* pinned to the viewport bottom while scrolling */
  bottom: 0;
  z-index: 50;
  width: 100%;
  margin: 0;
  padding: 1.6rem clamp(1rem, 4vw, 2.5rem);
  border-top: 1px solid var(--border);
  background: rgba(5, 6, 10, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
}
.footer-status { display: flex; align-items: center; gap: 0.5rem; }
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: var(--glow-cyan);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.3; transform: scale(0.8); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Desktop: two halves — logo left, card right */
@media (min-width: 861px) {
  .whoami-wrap { grid-template-columns: 300px 1fr; gap: clamp(2rem, 5vw, 4rem); }
  .whoami-logo { justify-items: start; }     /* pull logo to the left of its half */
  .whoami-logo img { width: 300px; max-width: 100%; }  /* native size — stays crisp */
  .terminal { width: 100%; }
}

@media (max-width: 860px) {
  .whoami-wrap { grid-template-columns: 1fr; }
  .whoami-logo { max-width: 220px; margin: 0 auto; }
  .cv-grid, .contact-grid { grid-template-columns: 1fr; }

  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    top: 62px; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    background: rgba(5, 6, 10, 0.97);
    border: 1px solid var(--border);
    border-radius: 0 0 0 12px;
    padding: 1rem;
    width: min(240px, 72vw);
    transform: translateX(110%);
    transition: transform .3s ease;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .site-nav.open { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; }
}
