:root {
  --terminal-green: #00ff66;
}

body.darkmode {
  background-color: black;
  color: var(--terminal-green);
  text-shadow: 0 0 6px var(--terminal-green);
  position: relative;
}

/* Stronger scanlines */
body.darkmode::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 255, 102, 0.1) 0px,
    rgba(0, 255, 102, 0.1) 2px,
    rgba(0, 0, 0, 0.1) 3px,
    rgba(0, 0, 0, 0.1) 4px
  );
  animation: scanFlicker 3s infinite;
}

/* Visible flicker + scan wobble */
@keyframes scanFlicker {
  0%, 100% { opacity: 0.95; transform: translateY(0); }
  10% { opacity: 1; transform: translateY(-1px); }
  20% { opacity: 0.85; transform: translateY(1px); }
  30% { opacity: 1; transform: translateY(0); }
  40% { opacity: 0.9; transform: translateY(1px); }
  50% { opacity: 1; transform: translateY(-1px); }
  60%, 100% { opacity: 0.95; transform: translateY(0); }
}

/* Text pulse for glow variation */
@keyframes pulseGlow {
  0%, 100% {
    text-shadow: 0 0 6px var(--terminal-green), 0 0 20px var(--terminal-green);
  }
  50% {
    text-shadow: 0 0 12px var(--terminal-green), 0 0 30px var(--terminal-green);
  }
}

body.darkmode * {
  animation: pulseGlow 2.5s infinite ease-in-out;
}

body.darkmode::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0) 60%,
    rgba(0, 0, 0, 0.2) 100%
  );
}


li {
    margin-bottom: 1em;
}

body {
    font-family: monospace;
}


.main {
    margin-left: 5%;
    margin-right: 5%;
    margin-top: 3em;
    margin-bottom: 2em;
    display: flex;
    flex-direction: column; /* stack elements vertically */
    align-items: flex-start; /* align everything to the left */
    gap: 0.5em;             /* spacing between logo and spans */

}

.dim {
    opacity: 50%;
    font-size: 1.3em !important;
    font-style: italic;
}

.darkmode .dim {
    opacity: 70%;
    font-size: 1.3em !important;
}

a {
    font-size: 1.3em;
    color: black;
    font-weight: bold;
    text-decoration: none;
}

p {
    font-size: 1.3em;
}
a:hover {
    text-decoration: underline;
}

a:active {
    color: white;
    background-color: black;
}

.darkmode a:active {
    color: black;
    background-color: white;
    text-shadow: none;
}

.darkmode a {
    color: var(--terminal-green);
}



/* Medium screens */
@media (min-width: 768px) {
    .main {
        margin-left: 15%;
        margin-right: 15%;
    }
    .logo {
        height: 3em !important;         /* fixed max height */
    }
}

/* Large screens / desktop */
@media (min-width: 1200px) {
    .main {
        margin-left: 25%;
        margin-right: 25%;
    }

}

.main .logo {
    width: auto;         /* let width scale naturally with height */
    height: 2em;         /* fixed max height */
    display: block;      /* block so margin works */
    margin: 0 0 3.5em 0;   /* bottom spacing only */
    float: left;         /* align to the left */
    z-index: 9999;
}

.main span {
    font-family: monospace;
    display: block;
    font-size: 2.25em;
}

/* Greetings span */
#greetings {
    white-space: nowrap;
    /* important for typing effect cursor */
    border-right: 2px solid black;
    /* cursor effect */
    padding-right: 5px;
    animation: blink 0.7s steps(1) infinite;
}

form .form-field {
    margin-bottom: 3em;   
}

form .form-field .form-field-label {
    display: inline !important;
}

form .form-field .form-field-text {
    border: none;
    outline: none;
    font-family: monospace;
    font-size: 1.3em;
    background-color: transparent;
}

form .form-field .dim {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

form .form-field .form-field-buttons {
    margin-top: 0.75em;
}
form .form-field .form-field-buttons a {
    margin-right: 0.75em;
}

.form-field-message {
    border: none;
    outline: none;
    resize: none;     /* removes the bottom-right grip */
    box-shadow: none; /* ensures no shadow border */
    background: transparent; /* optional, if you want it to blend in */
    height: 15em;
    width: 100%;
    font-size: 1.3em;
}

.darkmode .form-field-message {
    color: var(--terminal-green);
}

.darkmode .form-field-text {
    color: var(--terminal-green);
}

form span {
    font-size: 1.3em !important;
}
.blog span {
    margin-top: 0.5em;
}

.experience span {
    margin-top: 0.5em;
}
.experience p {
    margin-top: 0.5em;
}

.experience strong {
    font-size: 1.3em;
}

h1 {
    font-weight: normal;
    font-size: 3em;
    min-height: 1.25em;
    margin-top: 0;
    margin-bottom: 0.25em;
    display: inline-block;
}

.darkmode .notindarkmode {
    display: none;
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.form-field {
    display: none;
    margin-bottom: 2em;
}

.form-field.visible {
    display: block;
}

.form-field input,
.form-field textarea,
.form-field-buttons {
    opacity: 0;
    transition: opacity 0.4s ease;
}


.form-field.ready input,
.form-field.ready textarea,
.form-field.ready .form-field-buttons {
    opacity: 1;
}

/* Optional: gives the typewriter text a nice effect */
.form-field h2 {
    white-space: pre-wrap;
}

.blog-post-info {
    font-size: 1.5em !important;
    font-style: italic;
    margin-top: 1em;
    opacity: 80%;
}

.blog-main-image {
  width: 100%;
  aspect-ratio: 4 / 1;       /* Default 4:1 for desktop */
  overflow: hidden;
  position: relative;
  margin-top: 1em;
  margin-bottom: 1em;
}

.blog-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Mobile / smaller screens */
@media (max-width: 768px) {
  .blog-main-image {
    aspect-ratio: 3 / 1;     /* Landscape 3:1 on smaller screens */
  }
}

@media (max-width: 480px) {
  .blog-main-image {
    aspect-ratio: 2 / 1;     /* Optional: 2:1 for very small screens */
  }
}