/* =========================================
   1. VARIABLES (:ROOT)
   ========================================= */
:root {
  /* Colors - Monochrome & Base */
  --brightwhite: rgb(255, 255, 255);
  --white: rgba(220, 230, 240, 0.85);
  --black: rgba(2, 4, 12, 0.95);
  --reading: rgb(200, 200, 235);
  --txtblock: rgba(40, 43, 99, 0.45);
  --darkgrey: rgba(63,63,63,0.9);
  --lightgrey: rgba(155,155,155,0.9);
  --terminal-amber: rgba(255, 176, 0, 1);
  --synth-magenta: rgba(189, 0, 255, 1);
  --cathode-blue: rgba(0, 243, 255, 1);
  --cathode-dim: rgba(0, 243, 255, 0.2);

  /* Colors - Accents & Gradients */
  --gradient-color1: rgba(138, 81, 245, 0.5); /* Purple */
  --gradient-color2: rgba(86, 195, 234, 0.5); /* Blue/Teal */
  --gradient-color3: rgba(138, 81, 245, 0.8); /* Stronger Purple */
  --gradient-color4: rgba(86, 195, 234, 0.8); /* Stronger Teal */
  
  /* Backgrounds */
  --nav-bg: rgba(43, 23, 89, 0.1);
  --hover-bg: rgba(138, 81, 245, 0.1);
  --icon-bg: rgba(20, 20, 20, 0.8);
  --coolstuff-hover-bg: rgba(0, 0, 0, 0.2);
  --link-bg: rgba(86, 195, 234, 0.3);
  --whoami-bg: rgba(138, 81, 245, 0.2);
  --footer-bg: rgba(0, 0, 0, 0.5);
  --contraster: rgba(189, 0, 255, 0.2);

  /* Shadows */
  --shadow-color: black;
  --shadow-grey: grey;
  --shadow-lightgrey: rgba(43, 23, 89, 0.5);
  --shadow-darkgrey: rgba(83, 43, 169, 0.8);

  /* Settings */
  --transition: 0.5s;
  --section-spacer: 12rem;
}

/* =========================================
   2. RESET & BASE STYLES
   ========================================= */
* {
  margin: 0;
  padding: 0;
  letter-spacing: 0.1rem;
  line-height: 1.5em;
  box-sizing: border-box;
}

html {
  font-size: 1.1rem;
}

body {
  cursor: crosshair;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 75%, rgba(0,0,0,1) 100%);
  background-attachment: scroll;
  scroll-behavior: smooth;
  font-family: "Saira Condensed", sans-serif;
  font-weight: 400;
  font-style: normal;
  overflow-x: hidden;
  color: var(--reading);
}

a {
  text-decoration: none;
  color: var(--white);
  transition: var(--transition);
  font-family: 'VT323', monospace;;
}

a:hover {
  color: var(--brightwhite);
}

:focus-visible {
  outline: 2px solid var(--cathode-blue);
  outline-offset: 2px;
}

/* =========================================
   3. UTILITIES & TYPOGRAPHY helpers
   ========================================= */
.white { color: var(--white); }
.brightwhite { color: var(--brightwhite);}
.purple { color: var(--gradient-color3); }
.teal { color: var(--gradient-color4); }
.black { color: var(--black); }
.darkgrey { color: var(--darkgrey); }
.lightgrey { color: var(--lightgrey); }

.shadow {
  filter: drop-shadow(0 0 0.75rem var(--shadow-color));
  text-shadow: 2px 2px var(--shadow-color);
}

/* Spacing & Layout Utilities */
p {
    display: block;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    unicode-bidi: isolate;
}
.p4 { padding: 3rem 2rem !important; }
img.p4 { margin: auto; padding: 0 0 4rem 0 !important; max-width: 100%; object-fit: contain; display: block; }
.p3 { padding-top: 6rem; }
.p2 { padding-bottom: 2rem; }
.p05 { padding-bottom: 0.5rem; }
.m3 { margin: 3rem; }
.m4 { margin-bottom: 4rem; }
.rounded { border-radius: 2rem !important; }

.show { display: revert; }
.hide { display: none; }
.visually-hidden {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Text Styles */
h1.headline,
h2.headline {
  font-size: 1.8rem;
  margin: 0.75rem 0;
  color: var(--white);
  text-shadow: none;
}


h3 {
    display: block;
    font-size: 1.17em;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
    unicode-bidi: isolate;
}

h4 {
display: block;
    margin-block-start: 1.33em;
    margin-block-end: 1.33em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
    unicode-bidi: isolate;
}

.update-ingress {
    font-size: 1rem;
    color: var(--reading);
    font-weight: 300;
    margin-top: 1.33em;
    margin-bottom: 1.5rem;
}

.ingress {
  font-size: 1.05rem;
  color: var(--reading);
  opacity: 0.9;
  margin-bottom: 1rem;
}

.breadtext {
  display: grid;
  gap: 1.5rem;
}

.legible {
  background-color: var(--txtblock);
  padding: 2rem;
  margin-bottom: 2rem;
  line-height: 1.6;
  color: var(--white);
}

.date {
    font-family: 'VT323', monospace;
    color: var(--terminal-amber);
    font-size: 0.9rem;
    border-top: 1px dashed var(--contraster);
    padding-top: 1rem;
}

.text-center {
  text-align: center !important;
}

/* =========================================
   4. COMPONENTS (Buttons, Forms, Tables)
   ========================================= */

/* --- Buttons --- */
.cyber-button-alt {
  background: transparent;
  color: var(--gradient-color2);
  border: 1px solid var(--gradient-color2);
  padding: 1rem 2rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: all 0.3s ease;
  width: 100%;
  border-radius: 0.5rem;
  text-align: center;
}

.cyber-button-alt:hover {
  background: var(--gradient-color2);
  color: var(--black);
  box-shadow: 0 0 15px var(--gradient-color2);
}

.glowonhover {
  border: 1px solid rgba(255, 255, 255, 0.2);
  outline: none;
  padding: 0.8rem 1.5rem;
  padding-left: 2.8rem;
  color: var(--white);
  background: rgba(2, 4, 12, 0.7);
  cursor: pointer;
  position: relative;
  z-index: 0;
  border-radius: 0.5rem;
  font-size: 1rem;
  text-align: left;
  font-family: 'VT323', monospace;
  display: inline-block;
  transition: border-color 0.3s;
  letter-spacing: 2px;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.glowonhover:hover {
  border-color: var(--cathode-blue);
  color: var(--brightwhite);
}

button {
  font-family: 'VT323', monospace;
  color: var(--white);
  transition: var(--transition);
  background: rgba(2, 4, 12, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  padding: 0.8rem 1.5rem;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

button:hover {
  color: var(--brightwhite);
  border-color: var(--cathode-blue);
}

.glowonhover:before {
  content: '';
  background: linear-gradient(45deg, var(--gradient-color1), var(--gradient-color2), var(--gradient-color3), var(--gradient-color4));
  position: absolute;
  top: -2px; left: -2px;
  background-size: 400%;
  z-index: -2;
  filter: blur(8px);
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  animation: glowing 20s linear infinite;
  opacity: 0;
  transition: opacity .3s ease-in-out;
  border-radius: 0.6rem;
}

.glowonhover:hover:before { opacity: 0.8; }
.glowonhover:after {
  z-index: -1;
  content: '';
  position: absolute;
  width: 100%; height: 100%;
  background: rgba(2, 4, 12, 0.6);
  border-radius: 0.4rem;
  left: 0; top: 0;
}

@keyframes glowing {
  0% { background-position: 0 0; }
  50% { background-position: 400% 0; }
  100% { background-position: 0 0; }
}

/* --- Forms --- */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

input, textarea {
  width: 100%;
  display: flex;
  border: 1px solid var(--shadow-grey);
  padding: 0.5rem 1rem;
  box-shadow: 0 0 15px 4px rgba(0,0,0,0.06);
  border-radius: 5px;
  background-color: var(--contraster);
  color: var(--white);
  font-family: inherit;
}

input { height: 2.75rem; }

input:focus, textarea:focus {
  outline: none;
  border: 1px solid var(--gradient-color3);
  box-shadow: 0 0 10px var(--gradient-color1);
  background-color: rgba(255, 255, 255, 0.08);
  transition: var(--transition);
}

/* --- Tables --- */
table {
  max-width: 60%;
  padding: 2rem;
  margin: 25px auto;
  background-color: var(--gradient-color2);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 10px 30px 5px var(--gradient-color1);
}

thead tr { border-bottom: 1px dashed var(--shadow-grey); }
thead tr td { font-size: 16px; letter-spacing: 1px; color: var(--shadow-grey); padding: 2rem; }
tbody tr td { padding: 2rem; }
tr:nth-child(even) { background-color: rgba(0,0,0,0.1); }
tr:nth-child(odd) { background-color: rgba(0,0,0,0.2); }

/* =========================================
   5. LAYOUT (Navbar, Footer, Grid)
   ========================================= */

/* Navbar */
.nav-toggle-check,
.nav-toggle-label {
  display: none;
}

nav#navbar {
  width: 100%;
  min-height: 6rem;
  background-color: var(--nav-bg);
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: center;
  position: relative;
  text-transform: uppercase;
  z-index: 100;
}

#navbar a { color: rgba(255,255,255,0.7); }

#navbar a:hover {
  transition: .5s;
  color: var(--white);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 1), 2px 2px 32px rgba(0, 0, 0, 1);
  padding: 2rem;
  background-color: var(--hover-bg);
}

#navbar ul {
  display: flex;
  justify-content: center;
  list-style-type: none;
}
#navbar li { padding: 0 1rem; }

/* CTA Navbar Button */
.nav-cta {
  background: var(--gradient-color1) !important;
  color: var(--brightwhite) !important;
  padding: 0.6rem 1.2rem !important;
  border-radius: 5px !important;
  font-weight: bold;
  border: 1px solid var(--gradient-color2) !important;
  box-shadow: 0 0 10px var(--gradient-color1);
  margin-left: 1rem;
  vertical-align: middle;
  animation: pulse 2s infinite;
  text-transform: uppercase;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(138, 81, 245, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(138, 81, 245, 0); }
  100% { box-shadow: 0 0 0 0 rgba(138, 81, 245, 0); }
}

#navbar .nav-cta:hover {
  background: var(--gradient-color2) !important;
  box-shadow: 0 0 20px var(--gradient-color2);
  color: var(--black) !important;
  padding: 0.6rem 1.2rem !important;
  text-shadow: none !important;
}

/* Page Content & Grid */
#centerme {
  margin: auto;
  max-width: 80rem;
  backdrop-filter: blur(5px);
}

#pagecontent {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  background: linear-gradient(180deg, rgba(138,81,245,0.1) 5%, rgba(86,195,234,0.1) 15%, rgba(138,81,245,0.1) 25%, rgba(86,195,234,0.1) 50%, rgba(138,81,245,0.1) 100%);
  padding: 0rem;
  border-radius: 2.5rem;
}

.grid {
  display: grid;
  grid-template-columns: 60% 35%;
  padding: 1rem;
  gap: 2rem;
}

#textcol {
  background-color: var(--txtblock);
  border-radius: 2rem;
  padding: 2rem;
  margin: 1rem;
}

/* Footer */
footer {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  width: 100%;
  background-color: var(--footer-bg);
  min-height: 8rem;
  border-radius: 0 0 2rem 2rem;
  padding: 2rem 1.5rem 4rem;
  box-sizing: border-box;
}

footer .hero-sub-tag {
  margin-bottom: 0;
  text-align: center;
  max-width: 100%;
  overflow-wrap: break-word;
}

.footer-links {
  flex: 1 0 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.6rem;
  margin-bottom: .9rem;
}
.footer-links a {
  font-family: 'VT323', monospace;
  font-size: .95rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--v4-muted);
  text-decoration: none;
  transition: color .2s ease, text-shadow .2s ease;
}
.footer-links a:hover,
.footer-links a:focus-visible {
  color: #8fdcff;
  text-shadow: 0 0 12px rgba(53,212,255,.5);
}

/* =========================================
   6. SHARED HARDWARE TERMINAL STYLES
   Used across side-projects, gallery, etc.
   ========================================= */

/* The outer "Industrial Module" container */
.legible.rounded.m4 {
    background: rgba(10, 10, 12, 0.98) !important;
    border: 1px solid rgba(138, 81, 245, 0.3) !important;
    border-radius: 8px !important;
    padding: 0 !important;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), 0 0 20px rgba(138, 81, 245, 0.1);
    overflow: visible !important;
    margin-top: 4rem !important;
}

/* System Header Decal */
.legible.rounded.m4::before {
    content: "OS_CORE: v4.2.0 // NODE: TOBIAS_SOLEM_PRIMARY";
    position: absolute;
    top: -25px; right: 10px;
    font-size: 0.65rem;
    color: var(--gradient-color4);
    opacity: 0.6;
    letter-spacing: 2px;
}

/* The Terminal Header Headline */
h1.headline.black.p4 {
    background: rgba(20, 20, 25, 0.5) !important;
    border-bottom: 1px solid rgba(138, 81, 245, 0.3);
    padding: 3.5rem 2.5rem 2.5rem 2.5rem !important;
    margin: 0 !important;
    color: var(--white) !important;
    position: relative;
    font-size: 2.2rem !important;
    letter-spacing: 4px !important;
    text-transform: uppercase;
}

/* Status bar above headline */
h1.headline.black.p4::before {
    content: ">> ACCESS_LEVEL: PUBLIC // ENCRYPTION: NONE // DATA_STREAM: ACTIVE";
    position: absolute;
    top: 15px; left: 2.5rem;
    font-size: 0.7rem;
    color: var(--gradient-color4);
    letter-spacing: 2px;
    opacity: 0.8;
}

/* Cursor effect */
h1.headline.black.p4::after {
    content: "_";
    animation: terminal-cursor-blink 1s infinite;
    color: var(--gradient-color4);
    margin-left: 10px;
}

@keyframes terminal-cursor-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* =========================================
   9. GLOBAL MEDIA QUERIES
   ========================================= */
@media (max-width: 930px) {
  body { overflow-x: hidden; }

  /* --- NAVBAR --- */
  #navbar ul {
    flex-direction: column;
    margin-left: 0;
    padding: 2rem 2rem 2rem 3rem;
    width: 100%;
  }
  #navbar li { padding: 0.4rem 0; }
  #navbar .nav-cta {
    margin-left: 0;
    margin-top: 1rem;
    text-align: center;
    width: fit-content;
    display: inline-block;
  }
  nav#navbar {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 1rem;
  }

  /* --- NAV TOGGLE (mobile) --- */
  .nav-toggle-check {
    display: block;
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
  }
  .nav-toggle-label {
    display: inline-block;
    margin: 0.5rem 0 0.25rem 3rem;
    padding: 0.6rem 1.2rem;
    font-family: 'VT323', monospace;
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--white);
    background: rgba(2, 4, 12, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    cursor: pointer;
  }
  #navbar ul { display: none; }
  #navbar .nav-toggle-check:checked ~ ul { display: flex; }
  #navbar .nav-toggle-check:focus-visible ~ .nav-toggle-label {
    outline: 2px solid var(--cathode-blue);
    outline-offset: 2px;
  }

  /* --- LAYOUT RESETS --- */
  .grid { grid-template-columns: 100%; }
  .m3 { margin: 3rem 0; }
  p.white { padding: 1rem 2rem; }
  div#textcol { margin: 0; }

  #maincontent { display: none; }

  /* --- TERMINAL HEADER MOBILE --- */
  h1.headline.black.p4 {
      font-size: clamp(1.2rem, 0.5rem + 2.5vw, 1.5rem) !important;
      padding: 3rem 1.5rem 2rem 1.5rem !important;
  }
  h1.headline.black.p4::before {
      left: 1.5rem;
      font-size: clamp(0.5rem, 0.3rem + 0.8vw, 0.6rem);
  }
  .legible.rounded.m4 {
      margin-top: 2rem !important;
  }
  .gallery-container { padding: 2rem 1.5rem !important; }

  /* --- FOOTER MOBILE --- */
  footer { min-height: 6rem; padding: 1.5rem 1rem 2.5rem; }
  footer .hero-sub-tag { letter-spacing: 0.08rem; }
}

@media (max-width: 429px) {
  body { overflow-x: hidden; }
  .m3 { margin: 3rem 0; }
  .legible { padding: 1rem; margin: 0.5rem; }
  div.legible.rounded { margin: 1rem; }
  .p3 { padding-top: 3rem; }

  /* --- FOOTER NARROW --- */
  footer { min-height: 5rem; padding: 1.25rem 0.75rem 2rem; border-radius: 0 0 1rem 1rem; }
  footer .hero-sub-tag { letter-spacing: 0.04rem; font-size: clamp(0.75rem, 0.4rem + 1.5vw, 0.95rem); }
}

/* Animations & Effects */
@keyframes blink { 50% { background-color: transparent; } }
@keyframes blinker { 50% { opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.blink { animation: blinker 1.5s linear infinite; }
.cursor {
  background-color: var(--gradient-color2);
  width: 8px; height: 1em; display: inline-block;
  animation: blink 1s infinite;
}

.crt-overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 9999; pointer-events: none;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%);
  background-size: 100% 4px;
  box-shadow: inset 0 0 150px rgba(0,0,0,0.9);
}

.grecaptcha-badge { right: 10px !important; }
div.legible > a { color: rgba(138,81,245,1); }
p.articlenav { background-color: var(--gradient-color1); padding: 1rem; margin-top: 1rem; }
p.articlenav.rounded:hover, p.articlenav.rounded > a.white:hover { color: var(--gradient-color3); }

/* --- INTER-ARTICLE UPLINKS --- */
.article-uplink-box {
    background: rgba(138, 81, 245, 0.05);
    border-left: 3px solid var(--gradient-color4);
    padding: 1.5rem;
    margin: 2rem 0;
    font-family: inherit;
    border-radius: 4px;
}

.uplink-label {
    display: block;
    font-size: 0.75rem;
    color: var(--gradient-color4);
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: bold;
}

.uplink-link {
    font-size: 1.2rem;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s;
}

.uplink-link:hover {
    color: var(--gradient-color4);
    text-shadow: 0 0 10px var(--gradient-color4);
}

/* --- CV PROJECT CARDS --- */
.cv-project-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s;
}

.cv-project-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.cv-project-title {
    font-size: 1.5rem;
    color: var(--white);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.cv-project-uplink {
    font-size: 0.9rem;
    color: var(--gradient-color4);
    margin-bottom: 1.5rem;
    font-family: monospace;
}

.cv-project-desc {
    color: var(--reading);
    line-height: 1.6;
}
