/* =====================================================================
   koalatech — Dark Network Theme
   Dark tech aesthetic: deep navy bg, teal/cyan accents, glassy panels
   ===================================================================== */

/* ── Custom properties ── */
:root {
  --bg:          #0a0f1e;
  --bg-alt:      #0d1226;
  --surface:     rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border:      rgba(255, 255, 255, 0.08);
  --border-hover: rgba(0, 212, 200, 0.35);

  --text:        #e2e8f8;
  --text-muted:  #7c8db5;
  --text-subtle: #4a5578;

  --teal:        #00d4c8;
  --teal-dim:    rgba(0, 212, 200, 0.12);
  --teal-glow:   rgba(0, 212, 200, 0.25);
  --cyan:        #06b6d4;
  --accent:      #7c3aed;

  --radius-sm:   8px;
  --radius:      14px;
  --radius-lg:   20px;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 24px rgba(0, 212, 200, 0.12);

  --max-w:       1100px;
  --font:        ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono:   ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80vw 60vh at 60% -10%, rgba(0, 212, 200, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60vw 50vh at -10% 40%, rgba(124, 58, 237, 0.07) 0%, transparent 55%);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0.5rem 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
ul { margin: 0; padding: 0; list-style: none; }

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--teal);
  color: #0a0f1e;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  z-index: 9999;
}
.skip-link:focus { top: 1rem; }

/* ── Container ── */
.container {
  width: min(var(--max-w), calc(100% - 2.5rem));
  margin-inline: auto;
}

/* =====================================================================
   NAVBAR
   ===================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 30, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1rem;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}
.brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(0, 212, 200, 0.2), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(0, 212, 200, 0.3);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--teal);
  font-family: var(--font-mono);
}
.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}
.brand:hover .brand-name { color: var(--teal); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.hamburger-bar {
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: background 0.2s;
}
.nav-toggle:hover .hamburger-bar { background: var(--teal); }

/* Nav links */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.nav-link:hover {
  color: var(--text);
  background: var(--surface-hover);
  border-color: var(--border);
}
.nav-cta {
  color: var(--teal);
  border-color: rgba(0, 212, 200, 0.3);
  background: rgba(0, 212, 200, 0.06);
}
.nav-cta:hover {
  background: rgba(0, 212, 200, 0.12);
  border-color: rgba(0, 212, 200, 0.5);
  color: var(--teal);
}

/* =====================================================================
   HERO
   ===================================================================== */
.hero-section {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Canvas background */
#network-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
}

/* Decorative orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
}
.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 212, 200, 0.12) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  animation: orbFloat 12s ease-in-out infinite alternate;
}
.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.10) 0%, transparent 70%);
  bottom: -80px;
  left: -80px;
  animation: orbFloat 15s ease-in-out infinite alternate-reverse;
}
@keyframes orbFloat {
  from { transform: translateY(0px) scale(1); }
  to   { transform: translateY(30px) scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  .orb-1, .orb-2 { animation: none; }
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 2;
  padding: 6rem 0 4rem;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 1.5rem;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(0, 212, 200, 0.6);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 212, 200, 0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(0, 212, 200, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 212, 200, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .status-dot { animation: none; }
}

.hero-name {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #e2e8f8 30%, var(--teal) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 0.3rem;
  line-height: 1;
}
.hero-full-name {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-muted);
  margin: 0 0 1.2rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.hero-roles {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 0 1.5rem;
}
.role-badge {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: rgba(0, 212, 200, 0.1);
  border: 1px solid rgba(0, 212, 200, 0.25);
  color: var(--teal);
  letter-spacing: 0.02em;
}
.role-sep {
  color: var(--text-subtle);
  font-size: 1rem;
}
.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 0 2.5rem;
  line-height: 1.7;
}
.br-lg { display: none; }
@media (min-width: 640px) { .br-lg { display: inline; } }

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, rgba(0, 212, 200, 0.9), rgba(6, 182, 212, 0.85));
  color: #0a0f1e;
  border-color: rgba(0, 212, 200, 0.6);
  box-shadow: 0 4px 20px rgba(0, 212, 200, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, rgba(0, 220, 208, 1), rgba(6, 195, 218, 1));
  box-shadow: 0 6px 28px rgba(0, 212, 200, 0.45);
  transform: translateY(-1px);
}
.btn-ghost {
  color: var(--text);
  border-color: var(--border);
  background: var(--surface);
}
.btn-ghost:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  color: var(--teal);
  transform: translateY(-1px);
}

/* =====================================================================
   SECTIONS — shared
   ===================================================================== */
.section {
  padding: 5rem 0;
}
.section-alt {
  background: var(--bg-alt);
}
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.section-sub {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 55ch;
  margin-inline: auto;
}

/* ── Glass card base ── */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.glass-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  background: var(--surface-hover);
}

/* =====================================================================
   ABOUT
   ===================================================================== */
.about-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}
.about-bio {
  padding: 2rem;
  line-height: 1.8;
  color: var(--text-muted);
}
.about-bio p { margin: 0 0 1rem; }
.about-bio p:last-child { margin-bottom: 0; }
.about-bio strong { color: var(--text); font-weight: 600; }
.about-facts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.fact-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
}
.fact-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}
.fact-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.3rem;
}
.fact-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* =====================================================================
   EXPERTISE
   ===================================================================== */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}
.expertise-card {
  padding: 1.75rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.expertise-icon {
  width: 52px;
  height: 52px;
  padding: 0.6rem;
  border-radius: var(--radius);
  background: var(--teal-dim);
  border: 1px solid rgba(0, 212, 200, 0.2);
  color: var(--teal);
  display: grid;
  place-items: center;
}
.expertise-icon svg { width: 100%; height: 100%; }
.expertise-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.expertise-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}

/* =====================================================================
   HOMELAB
   ===================================================================== */
.homelab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.homelab-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.5rem;
}
.homelab-logo {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  font-family: var(--font-mono);
}
.proxmox-logo  { background: rgba(229, 68, 0,  0.15); border: 1px solid rgba(229, 68, 0,  0.35); color: #e54400; }
.pihole-logo   { background: rgba(0, 212, 120, 0.15); border: 1px solid rgba(0, 212, 120, 0.35); color: #00d478; font-size: 1.3rem; }
.mikrotik-logo { background: rgba(0, 120, 212, 0.15); border: 1px solid rgba(0, 120, 212, 0.35); color: #0078d4; }
.alpine-logo   { background: rgba(0, 100, 180, 0.15); border: 1px solid rgba(0, 100, 180, 0.35); color: #1d68ad; }
.vmware-logo   { background: rgba(96, 125, 139, 0.15); border: 1px solid rgba(96, 125, 139, 0.35); color: #90a4ae; }

.homelab-info { min-width: 0; }
.homelab-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
}
.homelab-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 0.85rem;
  line-height: 1.55;
}
.homelab-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 212, 200, 0.08);
  border: 1px solid rgba(0, 212, 200, 0.18);
  color: var(--teal);
  letter-spacing: 0.03em;
}

/* =====================================================================
   PROJECTS
   ===================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.project-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.project-icon {
  width: 36px;
  height: 36px;
  color: var(--teal);
}
.project-icon svg { width: 100%; height: 100%; }
.project-status {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 212, 200, 0.1);
  border: 1px solid rgba(0, 212, 200, 0.25);
  color: var(--teal);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.project-status-wip {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.25);
  color: #a78bfa;
}
.project-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.project-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
  flex: 1;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  transition: gap 0.2s;
}
.project-link:hover { gap: 0.65rem; }
.link-arrow {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.project-link-disabled {
  color: var(--text-subtle);
  cursor: default;
  pointer-events: none;
}
.project-placeholder { opacity: 0.75; }

/* =====================================================================
   CONTACT
   ===================================================================== */
.contact-grid {
  display: grid;
  gap: 1rem;
  max-width: 560px;
  margin-inline: auto;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  text-decoration: none;
  color: var(--text);
}
.contact-card:hover { color: var(--teal); }
.contact-icon {
  width: 40px;
  height: 40px;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--teal-dim);
  border: 1px solid rgba(0, 212, 200, 0.2);
  color: var(--teal);
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.contact-icon svg { width: 100%; height: 100%; }
.contact-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.contact-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}
.contact-value {
  font-size: 0.82rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contact-arrow {
  width: 18px;
  height: 18px;
  color: var(--text-subtle);
  flex-shrink: 0;
  transition: transform 0.2s, color 0.2s;
}
.contact-card:hover .contact-arrow {
  transform: translateX(4px);
  color: var(--teal);
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-copy { font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.footer-note { font-size: 0.8rem; color: var(--text-subtle); margin: 0; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }

  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(10, 15, 30, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.25rem 1rem;
    gap: 0.25rem;
  }
  .primary-nav.nav-open { display: flex; }
  .nav-link { text-align: left; padding: 0.65rem 0.75rem; font-size: 1rem; }

  .site-header { position: relative; }

  .hero-content { padding: 4rem 0 3rem; }
  .hero-name    { font-size: clamp(2.5rem, 14vw, 4rem); }

  .homelab-card { flex-direction: column; }
  .homelab-logo { width: 48px; height: 48px; }

  .expertise-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-inner { flex-direction: column; text-align: center; }
}

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

/* =====================================================================
   FOCUS STYLES (accessibility)
   ===================================================================== */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}
