/* =========================================
   HOMEPAGE SPECIFIC STYLES
   ========================================= */

/* Top Hero */
#tophero {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 45rem;
  background-size: cover;
  background-position: center;
  justify-content: center;
  align-items: center;
  border-top: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
  border-image: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.5), rgba(86, 195, 234, 0.5) 30%, rgba(0, 0, 0, 0.5) 50%) 1;
}

section#tophero > h1 {
  background-image: linear-gradient(180deg, var(--gradient-color1) 36%, var(--gradient-color2) 100%), url(../img/tobiassolem.gif);
  background-size: cover;
  color: transparent;
  -moz-background-clip: text;
  background-clip: inherit;
  -webkit-background-clip: text;
  font-weight: 600;
  font-size: 10rem;
  line-height: 1;
  text-shadow: 0 13.36px 8.896px var(--coolstuff-hover-bg), 0 -2px 1px var(--gradient-color2);
}

.sub-hero {
  font-size: 1.3rem;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  font-weight: 300;
  margin-top: -1rem;
  margin-bottom: 1rem;
  color: var(--white);
  text-shadow: 2px 2px var(--shadow-color);
}

span.lighter {
  font-weight: 100;
  font-size: 10rem;
}

section#tophero > a.cta {
  margin-top: 6rem;
  padding: 1.5rem;
  border: 0;
  background-color: var(--whoami-bg);
  color: rgba(0,0,0,0.9);
  text-transform: uppercase;
}

section#tophero > a.cta:hover {
  transition: .5s;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 1), 2px 2px 32px rgba(0, 0, 0, 1);
  color: var(--white);
  background-color: var(--gradient-color1);
  cursor: pointer;
}

/* Icons & Coolstuff */
#icons {
  display: flex;
  width: 100%;
  background: linear-gradient(to bottom, var(--icon-bg) 0%, rgba(20, 20, 20, 0.9) 50%, rgba(20,20,20,0.1) 100%);
  border-radius: 2rem 2rem 0 0;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  min-height: 25rem;
}

.coolstuff {
  display: flex;
  gap: 4rem;
  transition: var(--transition);
  padding: 4rem;
}

div.coolstuff p {
  background-color: rgba(0,0,0,0.4) !important;
  border-radius: 0.2rem;
  border: 1px solid rgba(255,255,255,0.1);
}
div.coolstuff p:hover { background-color: var(--coolstuff-hover-bg); }
div.coolstuff a.black:hover { color: var(--white); }

/* Link boxes */
div#links, div#whoami, div#mytech {
  background-position: center;
  background-size: cover;
  border-radius: 0.2rem;
  padding: 2rem 4rem;
  min-height: 256px;
  text-align: center;
  position: relative;
  border: 1px solid rgba(138, 81, 245, 0.3);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
  transition: all 0.3s ease-in-out;
  overflow: hidden;
}

div#links { background-image: linear-gradient(180deg, var(--whoami-bg) 7%, rgba(138,81,245,0.1) 100%), url(../img/links.jpg); }
div#whoami { background-image: linear-gradient(180deg, var(--whoami-bg) 47%, var(--link-bg) 100%), url(../img/whoami.jpg); }
div#mytech { background-image: linear-gradient(180deg, var(--link-bg) 17%, rgba(138,81,245,0.4) 80%), url(../img/mytech.jpg); }

div#links:hover, div#whoami:hover, div#mytech:hover {
  transform: translateY(-5px);
  border-color: var(--gradient-color4);
  box-shadow: 0 5px 25px rgba(86, 195, 234, 0.2);
}

div#links::before, div#whoami::before, div#mytech::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 20px; height: 20px;
  border-top: 2px solid var(--gradient-color4);
  border-left: 2px solid var(--gradient-color4);
  opacity: 0.7;
}

div#links > a > p, div#whoami > a > p, div#mytech > a > p { padding: 1rem; }

/* Quote */
#quote p {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  width: 30rem;
}
#quote img { width: 8rem; }

/* Teaser Gallery */
figure { padding: 1rem; }

figure.gallerymain { position: relative; }
figure.gallerymain img {
  width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1 / 1;
  filter: grayscale(100%); display: block; max-width: 420px;
}
figure.gallerymain:after {
  position: absolute; content: ""; height: 100%; width: 100%; top: 0; left: 0;
  background: linear-gradient(to bottom, var(--gradient-color1) 0%, var(--black) 100%);
  border-radius: 2rem;
  pointer-events: none;
}
figure img:hover { transform: scale(1.05); transition: 1s ease; }

div.artgallery {
    display: flex; align-items: center; justify-content: center; flex-flow: row-reverse wrap; gap: 2rem;
}
div.artgallery > a.trigger2 { filter: drop-shadow(0 0 0.75rem var(--shadow-grey)); }
div.artgallery > a.trigger2 figure.gallerymain img { border-radius: 2rem !important; }

figcaption {
  flex: 1; z-index: 3; color: #444; font-size: 1rem; text-align: center;
  transition: .3s ease-in; opacity: 0.1; margin-top: 1rem;
}
figure img:hover+figcaption { opacity: 1; }

/* Contact Section & Socials */
#contact { width: 100%; margin-bottom: 3rem; }
.socials { display: grid; grid-template-columns: 1fr 1fr; padding: 3rem; justify-content: center; }
.socials a { padding-top: 2rem; display: flex; flex-flow: column; }
.socials i { text-align: right; color: var(--black); font-size: 2rem; }
.socials i:hover { color: purple; }
div.socials > div#fonticons { margin-left: 1rem; }

/* Cyberpunk Contact Form (Comm Interface) */
.comm-interface {
  background: rgba(10, 10, 12, 0.95) !important;
  border: 1px solid var(--gradient-color1);
  box-shadow: 0 0 20px rgba(0,0,0,0.8);
  overflow: hidden;
  padding: 0 !important;
}
.terminal-header {
  background: rgba(138, 81, 245, 0.2);
  padding: 0.8rem 2rem;
  color: var(--gradient-color4);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--gradient-color1);
  letter-spacing: 0.1rem;
}
.cyber-form {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.cyber-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-size: 1.1rem;
  padding: 0.8rem 0.5rem;
  transition: all 0.3s ease;
  border-radius: 0;
}
.cyber-input:focus {
  border-bottom-color: var(--gradient-color4);
  box-shadow: 0 10px 20px -10px rgba(86, 195, 234, 0.4);
  color: var(--brightwhite);
  background: linear-gradient(to bottom, transparent 90%, rgba(86, 195, 234, 0.1) 100%);
}
.cyber-input::placeholder { color: rgba(255,255,255,0.3); font-family: "Saira Condensed", sans-serif; }
.tech-label {
  display: block; font-size: 0.8rem; color: var(--gradient-color1); margin-bottom: 0.2rem; opacity: 0.8;
}
.cyber-button {
  width: 100%; margin-top: 1rem; font-weight: bold; letter-spacing: 0.2rem; border: 1px solid var(--gradient-color4);
}
.glitch-error { color: #ff3333; font-size: 0.8rem; margin-top: 0.5rem; text-shadow: 0 0 5px red; }
.system-success {
  background: rgba(86, 195, 234, 0.2);
  border: 1px solid var(--gradient-color4);
  color: var(--brightwhite);
  padding: 1rem; margin-top: 1rem; text-align: center;
  animation: fadeIn 0.5s ease-in-out;
}
#testar {
  background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  padding: 2rem; border-radius: 1rem; max-width: 640px; margin: 2rem auto;
}
#testar.transparent-bg {
  background: transparent !important; box-shadow: none !important; padding: 0 !important;
}

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding: 1rem; }
.sync-part { display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--gradient-color2); padding: 2rem; }
.terminal-footer { margin-top: 2rem; font-size: 0.8rem; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1rem; }

/* Vita Grid */
.vita-grid { display: grid; grid-template-columns: 160px 1fr; gap: 0.5rem 1rem; color: var(--white); }
.vita-label { color: var(--gradient-color2); font-weight: bold; text-transform: uppercase; font-size: 0.4rem; }
.vita-value { font-size: 0.7rem; letter-spacing: 0.05rem; }

/* HOMEPAGE MEDIA QUERIES */
@media screen and (max-width: 930px) {
  section#tophero { min-height: 22rem; padding: 2rem 1rem 3rem; text-align: center; }
  section#tophero > h1 { padding-top: 2rem; font-size: 7rem !important; }
  span.lighter { font-size: 7rem !important; }
  section#tophero > p.white { padding: 0 2rem; text-align: center; }
  section#tophero > a.cta { margin-top: 2rem; margin-bottom: 3rem; }
  .coolstuff { flex-flow: column; align-items: center; gap: 1.5rem; padding: 2rem; }
  div#links, div#whoami, div#mytech { width: 100%; max-width: 400px; }
  #quote p { width: 90% !important; }
  figure.gallerymain { width: 100%; max-width: 140px; aspect-ratio: 1 / 1; overflow: hidden; margin: 0 auto; flex-shrink: 0; }
  div.artgallery { gap: 1rem; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media screen and (max-width: 429px) {
  section#tophero { min-height: 20rem; padding: 2rem 1rem; }
  section#tophero > h1, span.lighter { font-size: 3.2rem !important; line-height: 1.1; }
  
  /* FIX: SENIOR COMMUNITY text overlap */
  .sub-hero { margin-top: 0.5rem; font-size: 1.1rem; line-height: 1.2; padding: 0 1rem; }
  
  section#tophero > p.white { font-size: 0.85rem; padding: 0 1rem; text-align: center; margin-bottom: 0.5rem; }
  section#tophero > a.cta { margin-top: 2rem; margin-bottom: 2rem; padding: 1rem; font-size: 0.85rem; }
  
  .coolstuff { gap: 1.5rem; padding: 1.5rem; }
  div#links, div#whoami, div#mytech { padding: 1.5rem 2rem; min-height: 160px; width: 100%; }
  #quote p { width: 90% !important; font-size: 0.95rem; padding: 1rem; }
  #quote img { width: 5rem; }
  
  /* FIX: Section titles too wide */
  img.p4 { max-width: 100%; height: auto; padding: 0 1rem 2rem 1rem !important; }
  
  /* FIX: Gallery thumbnails too tiny & excessive padding */
  div.artgallery { 
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem; 
    padding: 0 0.5rem; 
  }
  figure { padding: 0.25rem; }
  figure.gallerymain { max-width: 100%; }
  figure.gallerymain:after { border-radius: 1rem; }
}

@media only screen and (min-width: 1450px) {
  html, body {
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.9) 75%, rgba(0,0,0,1) 100%), url("../img/clearbg.jpg");
    background-attachment: scroll;
  }
  section#tophero { min-height: 45rem; }
  section#tophero > h1 { padding-top: 5rem; font-size: 10rem !important; margin-bottom: -1.5rem; }
  span.lighter { font-size: 10rem !important; }
  section#tophero > a.cta { margin-top: 1rem; margin-bottom: 2rem; }
}
