/* ============================================================
   GLOBALS
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  padding: 0;
  margin: 0;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  scroll-behavior: smooth;
}

body {
  max-width: 1920px;
  margin: 0 auto;
}

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

.hidden { display: none !important; }


/* ============================================================
   PAGE LOADER
   ============================================================ */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
}

.loader-panel {
  width: 50%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.77, 0, 0.175, 1);
}

.loader-left  { background: #D7D7D7; }
.loader-right { background: #000; }

#page-loader.loader-hide .loader-left  { transform: translateX(-100%); }
#page-loader.loader-hide .loader-right { transform: translateX(100%); }

.loader-brand {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#page-loader.loader-hide .loader-brand { opacity: 0; }

.loader-initials {
  font-family: 'Montserrat', sans-serif;
  font-size: 5rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  color: #fff;
  mix-blend-mode: difference;
  animation: loaderPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
}

.loader-line {
  width: 0;
  height: 3px;
  background: #008CBA;
  border-radius: 2px;
  mix-blend-mode: difference;
  animation: loaderLine 0.5s ease 0.35s forwards;
}

@keyframes loaderPop {
  0%   { opacity: 0; transform: scale(0.6); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes loaderLine {
  to { width: 80px; }
}


/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  background-color: #D7D7D7;
  height: 100vh;
  min-height: 600px;
  max-height: 700px;
}

/* Desktop nav */
.nav {
  position: absolute;
  margin-top: 2em;
  width: 100%;
  text-align: right;
  z-index: 20;
}

.nav > a {
  padding: 0.4em 1.5em;
  margin: 0 0.2em;
  color: #fff;
  font-size: 0.9rem;
  background-color: #000;
  border-radius: 1em;
}

.nav > a:hover {
  background-color: #fff;
  color: #000;
}

.nav-contact {
  background-color: #fff !important;
  color: #000 !important;
  text-transform: uppercase;
  font-size: 0.7rem !important;
  font-weight: 700;
  margin-right: 12% !important;
  cursor: pointer;
}

.nav-contact:hover {
  background-color: #666464 !important;
  color: #fff !important;
}

/* Burger nav (hidden on desktop) */
.nav-burger {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #000;
  padding: 1em 0 0 0;
  z-index: 20;
}

.nav-burger img {
  display: block;
  margin-left: 85%;
  cursor: pointer;
}

.nav-burger-menu {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.5s ease;
}

.nav-burger-menu.open {
  max-height: 14em;
}

.nav-burger-menu > div {
  text-align: center;
  background-color: #000;
}

.nav-burger-menu > div > a {
  display: block;
  padding: 1em 0;
  color: #fff;
  width: 100%;
}

.nav-burger-menu > div > a:hover { transform: scale(1.1); }

.nav-burger-contact {
  background-color: #fff !important;
}

.nav-burger-contact > a {
  color: #000 !important;
}

/* Hero split layout */
.hero-split {
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: -webkit-linear-gradient(-10deg, #D7D7D7 50%, #000 50%);
  background-image: linear-gradient(100deg, #D7D7D7 50%, #000 50%);
  max-height: 700px;
  height: 100vh;
  overflow: hidden;
}

.hero-left {
  width: 50vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  margin-left: 12%;
  max-width: 600px;
}

.hero-left > img {
  width: 5em;
  margin-top: -11rem;
  margin-bottom: 5em;
}

.hero-left > h3 {
  margin: 2em 0;
  padding: 0;
}

.hero-left > h1 {
  margin: 0 0 0.2em 0;
  padding: 0;
  font-size: 2.5rem;
}

.hero-left > h5 {
  margin: 0 0 4em 0;
  padding: 0;
  color: #666464;
  font-size: 1.1rem;
}

.hero-links {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-links > a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 2.5em;
  height: 2.5em;
  margin: 0 0.5em;
  background-color: #C4C4C4;
  box-shadow: 0px 4px 4px rgba(0,0,0,0.25);
  cursor: pointer;
}

.hero-links > a > img {
  width: 1.5em;
  height: 1.5em;
}

.hero-right {
  width: 50vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}


/* ============================================================
   SPHERE
   ============================================================ */
#sphere-container {
  width: 440px;
  height: 440px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#sphere-circle {
  width: 40px;
  height: 40px;
  position: relative;
  transform-style: preserve-3d;
  animation: rotateround 10s linear infinite;
}

.sphere-face {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  position: absolute;
  opacity: 0.6;
  overflow: hidden;
}

.sphere-face img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

@keyframes rotateround {
  0%   { transform: rotateX(0deg)   rotateY(20deg); }
  100% { transform: rotateX(360deg) rotateY(380deg); }
}


/* ============================================================
   PHILOSOPHY / DESCRIPTION
   ============================================================ */
.description {
  min-height: 313px;
  background: linear-gradient(90.18deg, #1D1D1D 31.74%, #1D1D1D 90.49%);
  display: flex;
  justify-content: flex-start;
  overflow: hidden;
}

.description > div {
  position: relative;
  z-index: 1;
  margin: 0 12%;
  width: 100%;
  font-size: 0.75rem;
  color: #fff;
  padding: 5em 0;
  line-height: 1.5em;
  text-align: justify;
}

.description > div > h2 {
  margin: 0;
  text-transform: uppercase;
}

.description > div > ol > li { line-height: 1.7; }
.description > div > ol > li > span { font-weight: 700; }

.description-img {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.description-img > img {
  position: absolute;
  margin-top: -18em;
  transform: rotate(30deg) scale(1.5);
  z-index: -1;
  opacity: 0.8;
}


/* ============================================================
   ABOUT ME
   ============================================================ */
.about {
  background: radial-gradient(50% 50% at 50% 50%, rgba(26,21,21,0) 0%, rgba(1,1,1,0.16) 100%), #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 4em;
}

.about > button {
  text-transform: uppercase;
  padding: 1em 3.5em;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 0.1em;
  border: 0.4em solid #000;
  cursor: pointer;
  margin: 3em 0;
  background-color: transparent;
  font-family: inherit;
}

.about > p {
  margin-bottom: 3em;
  padding: 0 1em;
  text-align: center;
}

.about-explore {
  padding: 0 1.5em;
  border-left: 0.15em solid #000;
  border-right: 0.15em solid #000;
  margin-bottom: 3em;
  text-transform: uppercase;
  font-size: 0.9rem;
  font-weight: 700;
}

.about > img { margin: 2.5em 0; }

.about-topics {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 1em 0;
}

.about-topics > div {
  width: 30%;
  margin: 1em 3em;
  text-align: justify;
}

.about-topics > div > h3 { text-transform: uppercase; }

/* Icon before topic headings (mirrors original ::before content) */
.topic-design::before {
  content: url("../images/Design.svg");
  position: absolute;
  margin-left: -2em;
  margin-top: -1em;
}

.topic-development::before {
  content: url("../images/Development.svg");
  position: absolute;
  margin-left: -2em;
  margin-top: -1em;
}

.topic-upgrade::before {
  content: url("../images/Maintenance.svg");
  position: absolute;
  margin-left: -2.5em;
  margin-top: -1.5em;
}


/* ============================================================
   SKILLS
   ============================================================ */
.about > h2 {
  text-transform: uppercase;
  width: 50%;
}

.skills {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: 60%;
}

.skills > div {
  margin: 1.5em 3em;
  width: 6em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.skills > div > p { text-align: center; }


/* ============================================================
   PORTFOLIO
   ============================================================ */
.portfolio {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.portfolio-header {
  background: url("../images/Portfolioheader.png") center/cover no-repeat;
  width: 100%;
  height: 14em;
  display: flex;
  justify-content: center;
  align-items: center;
}

.portfolio-header > button {
  text-transform: uppercase;
  padding: 1em 3.5em;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 0.1em;
  border: 0.4em solid #000;
  cursor: pointer;
  background-color: transparent;
  font-family: inherit;
}

.project-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5em;
  flex-wrap: wrap;
  padding: 1.5em;
  background-color: #1f1f1f;
  width: 100%;
}

.project-card {
  position: relative;
  border-radius: 20px;
  width: 400px;
  cursor: pointer;
}

.project-card > img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 6px 6px 2px 1px rgba(44,44,44,0.3);
  display: block;
}

.project-overlay {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
  background-color: #008CBA;
  display: flex;
  justify-content: center;
  align-items: center;
}

.project-card:hover .project-overlay {
  opacity: 1;
  box-shadow: 6px 6px 2px 1px rgba(77,77,77,0.3);
}

.project-overlay-text {
  color: #fff;
  font-size: 1.4rem;
  letter-spacing: 0.1em;
  line-height: 1.4;
  font-weight: 600;
  text-align: center;
}

.project-overlay-text > p { margin: 0 0 0.75em; }

.project-overlay-text > button {
  cursor: pointer;
  letter-spacing: 0.1em;
  font-weight: 600;
  padding: 1em 2em;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  background: linear-gradient(135deg, #97ad16 50%, rgb(207,207,207) 50%);
  background-size: 300% 100%;
  background-position: right;
  transition: background-position 0.5s ease, color 0.5s ease;
}

.project-overlay-text > button:hover {
  color: #fff;
  background-position: left;
}


/* ============================================================
   MODAL
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease;
}

.modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  background-color: #fff;
  border-radius: 20px;
  padding: 2em;
  cursor: default;
  transform: scale(0.9);
  transition: transform 0.5s ease;
}

.modal.open .modal-card { transform: scale(1); }

.modal-img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #035b79;
}

.modal-btn-close {
  float: right;
  padding: 1em 1.5em;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 600;
  font-family: inherit;
  color: #008CBA;
  margin: 1em 0;
  background: linear-gradient(135deg, #008CBA 50%, #fff 50%);
  background-position: right;
  background-size: 300% 100%;
  transition: background-position 0.5s ease, color 0.5s ease;
}

.modal-btn-close:hover {
  color: #fff;
  background-position: left;
}

.modal-title {
  text-transform: uppercase;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  color: #008CBA;
}

.modal-text {
  line-height: 2;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  text-align: justify;
}

.modal-span { font-weight: 700; }

.modal-preview {
  display: inline-block;
  padding: 1em 2em;
  border-radius: 20px;
  color: #fff;
  margin: 0.5em 0;
  text-transform: uppercase;
  background: linear-gradient(135deg, #686767 50%, #008CBA 50%);
  background-size: 300% 100%;
  background-position: right;
  transition: background-position 0.5s ease;
}

.modal-preview:hover { background-position: left; }


/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(50% 50% at 50% 50%, rgba(26,21,21,0) 0%, rgba(0,0,0,0.16) 100%), #fff;
}

.contact > button {
  text-transform: uppercase;
  padding: 1em 3.5em;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 0.1em;
  border: 0.4em solid #000;
  cursor: pointer;
  margin: 3em 0;
  background-color: transparent;
  font-family: inherit;
}

.contact > p {
  width: 50%;
  text-align: center;
}

.contact > img { margin: 2.5em 0 4.5em 0; }

.form-wrapper {
  width: 40%;
  min-height: 31em;
}

.form-wrapper > form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.form-input {
  width: 100%;
  height: 2em;
  background-color: transparent;
  border: none;
  border-left: 0.2em solid #000;
  border-bottom: 0.2em solid #000;
  margin-bottom: 3em;
  font-size: 0.8rem;
  font-family: inherit;
  outline: none;
}

.form-textarea {
  width: 100%;
  height: 12em;
  background-color: transparent;
  border: none;
  border-left: 0.2em solid #000;
  border-bottom: 0.2em solid #000;
  margin-bottom: 3em;
  font-size: 0.8rem;
  font-family: inherit;
  resize: none;
  outline: none;
}

.form-submit {
  padding: 0.5em 1.5em;
  border: none;
  border-left: 0.15em solid #000;
  border-right: 0.15em solid #000;
  background-color: transparent;
  margin-bottom: 3em;
  text-transform: uppercase;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.form-submit:hover {
  animation: scaleSubmit 0.5s linear forwards;
}

@keyframes scaleSubmit {
  100% { transform: scale(1.1); }
}

.form-thanks {
  min-height: 31em;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.form-thanks > p { padding: 0 2em; }

.form-thanks > button {
  margin: 2em 0;
  padding: 1em;
  border: 0.2em solid #000;
  cursor: pointer;
  text-transform: uppercase;
  background-color: transparent;
  font-weight: 600;
  font-family: inherit;
}


/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #1A1A1A;
  color: #fff;
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-top > a > img {
  margin: 2em 1em 0 1em;
  width: 1.2em;
}

.footer-top > a {
  text-transform: uppercase;
  margin-bottom: 1em;
}

.footer > div {
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-icons > a > img,
.footer > div > a > img {
  margin: 1em;
  width: 31px;
  cursor: pointer;
}

.footer > p { margin-bottom: 2em; }

.lang-switcher { display: flex; justify-content: center; gap: 0.5em; }
.lang-switcher a { opacity: 0.45; transition: opacity 0.2s; }
.lang-switcher a:hover,
.lang-switcher a.lang-active { opacity: 1; }


/* ============================================================
   RESPONSIVE — 1250px
   ============================================================ */
@media (max-width: 1250px) {
  .hero-split {
    background-image: linear-gradient(80deg, #D7D7D7 50%, #000 50%);
  }
}


/* ============================================================
   RESPONSIVE — 1000px
   ============================================================ */
@media (max-width: 1000px) {
  .nav { display: none; }

  .nav-burger { display: block; }

  .hero-split {
    background-image: url("../images/Background3.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
  }

  .hero-left {
    width: 90%;
    align-items: center;
    margin-left: 0;
  }

  .hero-left > h5 { text-align: center; }
  .hero-left > img { visibility: hidden; }
  .hero-right { display: none; }

  .description {
    background-color: #1D1D1D;
    background-image: url('../images/Itb.svg');
    background-repeat: no-repeat;
    background-position: center;
  }

  .description > div { font-size: 0.9rem; }
  .description-img { display: none; }

  .about > h2 { text-align: center; }
}


/* ============================================================
   RESPONSIVE — 700px
   ============================================================ */
@media (max-width: 700px) {
  .about-topics > div {
    width: 70%;
    margin: 0 3em;
  }

  .project-card { width: 100%; }

  .form-input    { font-size: 0.9rem; }
  .form-textarea { font-size: 0.9rem; }
  .form-wrapper  { width: 80%; }

  .footer > p { padding: 0 2em; }
}


/* ============================================================
   RESPONSIVE — 500px (modal)
   ============================================================ */
@media (max-width: 500px) {
  .modal-card { width: 90vw; }
  .modal-title { font-size: 1.2rem; padding-top: 2em; }
  .project-overlay-text > p { font-size: 0.95rem; }
}

@media (max-width: 380px) {
  .modal-title { font-size: 1.1rem; }
  .project-overlay-text > button { padding: 0.75em 1em; }
}
