/* ========== Design tokens ========== */
:root{
  --bg-alt-1: #282d37;
  --bg-alt-2: #0f1115;
  --bg-alt-3: #141a22;
  --bg: #0f1115;

  --surface: #151922;
  --surface-2: #1b2030;
  --surface-3: #40495a;

  --text: #e5e7eb;
  --text-muted:#aeb6c3;

  /* Accents */
  --acc:#0082f0;
  --acc-2:#b1b1b1;

  /* Button solid palette (game vibe) */
  --btn-solid: #0ea5ff;
  --btn-solid-hover:#1390e0;
  --btn-glow: rgba(14,165,255,.45);
  --btn-border: #000000;
  --btn-border-2:#555555;

  --radius:0px;
  --shadow:0 6px 24px rgba(0,0,0,.35);
  --maxw: 1100px;

  /* Header and logo sizing */
  --header-h: 64px;
  --logo-h: 64px;

  /* Tech icon sizing */
  --tech-icon-h: 56px;

  /* Projects spacing */
  --projects-gap: 20px;

  /* Section gap */
  --section-gap: 28px;
}
/* ========== End: Design tokens ========== */

/* ========== Reset ========== */
*{box-sizing:border-box;margin:0;padding:0}
img{display:block;max-width:100%;height:auto}
a{color:inherit;text-decoration:none}
ul{list-style:none}
/* ========== End: Reset ========== */

/* ========== Base ========== */
html,body{height:100%}
body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  scroll-behavior:smooth;
}
.container{max-width:var(--maxw);margin:0 auto;padding:0 20px}
.link{color:var(--acc)}
.link:hover{opacity:.9}
/* ========== End: Base ========== */

/* ========== Header ========== */
.site-header{
  position:sticky;top:0;z-index:1000;
  background:rgba(10,12,16,.55);
  border-bottom:1px solid rgba(255,255,255,.06);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  backdrop-filter: saturate(1.2) blur(8px);
  transition: background .25s ease, border-color .25s ease;
}
.site-header.scrolled{
  background:rgba(10,12,16,.85);
  border-color: rgba(255,255,255,.08);
}
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))){
  .site-header{ background: rgba(10,12,16,.9); }
}
.navbar{
  display:flex;align-items:center;justify-content:space-between;
  min-height: var(--header-h);
  padding-block: 8px;
}
.nav-links{display:flex;gap:18px}
.nav-links a{padding:8px 10px;border-radius:8px}
.nav-links a:hover{background:var(--surface-3)}
.logo{display:flex;align-items:center}
.logo img{
  height: var(--logo-h);
  width: auto;
  max-height: calc(var(--header-h) - 16px);
}
/* ========== End: Header ========== */

/* ========== Hero ========== */
.hero{
  position:relative;
  min-height:72vh;
  display:grid;
  place-items:center;
  overflow:hidden;

  /* background image */
  background-image: url("images/snowwhite01.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  /* mood similar to video */
  filter: contrast(1.05) brightness(.9);

  /* fade transition between backgrounds */
  transition: opacity .8s ease-in-out;
}
.hero-video{
  position:absolute;inset:0;width:100%;height:100%;object-fit:cover;
  filter:contrast(1.05) brightness(.9);
}
.hero-overlay{
  position:absolute;inset:0;
  background: radial-gradient(1200px 600px at 50% 70%, rgba(0,0,0,.2), rgba(0,0,0,.7));
}
/* state used during background change */
.hero.is-fading{
  opacity: .2;
}
.hero-content{position:relative;text-align:center;padding:80px 0}
.typing{font-size: clamp(32px, 6vw, 72px);font-weight:800;letter-spacing:.5px}
.subtitle{
  margin-top:16px;
  color:var(--text);
  font-size: clamp(32px, 6vw, 72px);
  font-weight:800;
  letter-spacing:.5px;
  -webkit-text-stroke: 2px var(--btn-border);
  text-shadow:
    2px  2px 0 var(--btn-border-2),
   -2px  2px 0 var(--btn-border-2),
    2px -2px 0 var(--btn-border-2),
   -2px -2px 0 var(--btn-border-2),
    0   3px 0 var(--btn-border-2),
    3px  0  0 var(--btn-border-2),
    0  -3px 0 var(--btn-border-2),
   -3px  0  0 var(--btn-border-2);
}
/* ========== End: Hero ========== */

/* ========== Sections ========== */
.section{
  padding:72px 0;
  scroll-margin-top:90px;
  position: relative;
  background: var(--bg-alt-1);
}

.section + .section{
  margin-top: var(--section-gap);
}

#geek-knowledge.section + #experiences.section{
  margin-top: 0;
}

#about.section,
#education-languages.section,
#experiences.section{
  background: var(--bg-alt-1);
}
#projects.section,
#knowledge-skills.section,
#contact.section{
  background: var(--bg-alt-2);
}
#geek-knowledge.section{
  background: var(--bg-alt-3);
}
/* ========== End: Sections ========== */

/* ========== Section titles ========== */
.section-header{
  text-align: center;
  margin-top: 24px;
  margin-bottom: 24px;
  position: relative;
}
.section-title{
  font-size: clamp(32px, 3.6vw, 40px);
  font-weight: 900;
  letter-spacing: .5px;
  color: #ffffff;
  -webkit-text-stroke: 2px var(--btn-border);
  text-shadow:
    2px  2px 0 var(--btn-border-2),
   -2px  2px 0 var(--btn-border-2),
    2px -2px 0 var(--btn-border-2),
   -2px -2px 0 var(--btn-border-2),
    0   3px 0 var(--btn-border-2),
    3px  0  0 var(--btn-border-2),
    0  -3px 0 var(--btn-border-2),
   -3px  0  0 var(--btn-border-2);
  position: relative;
  display: inline-block;
  width: fit-content;
  margin: 0 auto 28px;
  padding: 12px 22px;
  text-align: center;
  z-index: 0;
}
@media (max-width: 720px){
  .section-title{ padding: 10px 16px; }
}
/* ========== End: Section titles ========== */

/* ========== About ========== */
.about-stack{ display:flex;flex-direction:column;gap:24px; }
.about-text{ width:100%; }
.about-text p{
  text-align: justify;
  text-justify: inter-word;
  margin-bottom: 12px;
}
.align-center{ display:flex;flex-wrap:wrap;align-items:center;justify-content:center; }
/* ========== End: About ========== */

/* ========== Tech icons ========== */
.technology-icons{
  display:flex;
  flex-wrap:wrap;
  gap: 10px 14px;
  margin-top:24px;
}
.technology-icons .tooltip{
  flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center;
  position:relative; z-index:1;
}
.technology-icons .tooltip img{
  height: var(--tech-icon-h);
  width:auto;
  object-fit:contain;
}
.tooltip .tooltip-text{
  position:absolute;left:50%;transform:translateX(-50%);
  bottom:120%;background:#fff;color:#222;
  padding:6px 10px;border-radius:8px;font-size:.85rem;font-weight:700;
  white-space:nowrap;box-shadow:var(--shadow);opacity:0;visibility:hidden;transition:.2s;z-index:10;
}
.tooltip:hover .tooltip-text{opacity:1;visibility:visible}
/* ========== End: Tech icons ========== */

/* ========== Carousel ========== */
.carousel{
  position:relative;border-radius:var(--radius);overflow:hidden;
  background:var(--surface);box-shadow:var(--shadow);margin-bottom:28px
}
.carousel-track{display:flex;transition: transform .45s ease}
.slide{min-width:100%;position:relative;isolation:isolate}
.slide img{width:100%;height:420px;object-fit:cover;display:block}
.slide-caption{
  position:absolute;left:0;right:0;bottom:0;padding:16px 18px 18px;
  background: linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,0));
}
.slide-caption h3{font-size:1.4rem;margin-bottom:4px}
.slide-caption p{color:#d4d7dd;margin-bottom:8px}
.slide-caption .btn{margin-top:6px}
/* ========== End: Carousel ========== */

/* ========== Carousel Controls ========== */
.carousel-btn{
  position:absolute;top:50%;transform:translateY(-50%);
  background:rgba(0,0,0,.55);
  border:0;color:#fff;
  width:44px;height:44px;border-radius:50%;cursor:pointer;
  z-index:5;
}
.carousel-btn:hover{background:rgba(0,0,0,.7)}
.carousel-btn:active{transform:translateY(-50%) scale(.97)}
.carousel-btn.prev{left:10px}
.carousel-btn.next{right:10px}
.carousel-dots{
  position:absolute;left:0;right:0;bottom:10px;
  display:flex;gap:8px;justify-content:center;z-index:4;
}
.carousel-dots button{
  width:9px;height:9px;border-radius:50%;border:0;background:rgba(255,255,255,.38);cursor:pointer
}
.carousel-dots button[aria-selected="true"]{background:#fff}
/* ========== End: Carousel Controls ========== */

/* ========== Buttons ========== */
.btn,
.project-card a{
  --btn-pad-y: 10px;
  --btn-pad-x: 16px;
  position: relative;
  display: inline-block;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  font-weight: 900;
  letter-spacing: .3px;
  color: #0b0e13;
  background: var(--btn-solid);
  border: 1.5px solid var(--btn-border);
  outline: 0 solid var(--btn-border);
  outline-offset: 0;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform .12s ease,
    filter .15s ease,
    background .15s ease,
    box-shadow .2s ease,
    outline-width .12s ease;
  overflow: hidden;
}
.btn::before,
.project-card a::before{
  content:"";
  position:absolute; inset:-10%;
  background: linear-gradient(120deg, transparent 0 42%, rgba(255,255,255,.18) 50%, transparent 58% 100%);
  transform: translateX(-120%);
  transition: transform .45s ease;
  pointer-events:none;
}
.btn::after,
.project-card a::after{
  content:"";
  position:absolute; left:50%; top:50%;
  width:10px; height:10px; border-radius:50%;
  background: radial-gradient(circle, rgba(255,255,255,.35) 0%, rgba(255,255,255,0) 70%);
  transform: translate(-50%, -50%) scale(0);
  opacity:0; pointer-events:none;
}
.btn:hover,
.project-card a:hover{
  outline-width: 3px;
  outline-color: var(--btn-border);
  outline-offset: -2px;
  background: var(--btn-solid-hover);
  filter: brightness(1.03);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 10px 26px var(--btn-glow), inset 0 0 0 0 rgba(0,0,0,0);
}
.btn:hover::before,
.project-card a:hover::before{ transform: translateX(120%); }
.btn:active,
.project-card a:active{
  transform: translateY(0) scale(.98);
  box-shadow: 0 6px 16px rgba(0,0,0,.45), inset 0 2px 8px rgba(0,0,0,.35);
}
.btn:active::after,
.project-card a:active::after{ animation: btn-ripple .5s ease-out forwards; }
.btn:focus-visible,
.project-card a:focus-visible{
  outline: 3px solid #fff;
  outline-offset: 2px;
}
@keyframes btn-ripple{
  0%{ transform: translate(-50%, -50%) scale(.2); opacity:.45; }
  80%{ transform: translate(-50%, -50%) scale(16); opacity:.12; }
  100%{ transform: translate(-50%, -50%) scale(18); opacity:0; }
}
.project-card a{ margin: 8px auto 14px; display: inline-block; text-align: center; }
/* ========== End: Buttons ========== */

/* ========== Timeline Card ========== */
.timeline-card{
  background:var(--surface-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 22px;
  margin-bottom: var(--projects-gap);
}
.timeline-title{
  font-size: 1.4rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 10px;
  letter-spacing: .03em;
  color: var(--text);
}
.timeline-intro{
  text-align: center;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 40px;
  font-size: .98rem;
}
.timeline-list{
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.timeline-entry{
  display: grid;
  grid-template-columns: 0.2fr 0.8fr;
  gap: 16px;
  align-items: flex-start;
}
.timeline-marker{
  position: relative;
  display: flex;
  justify-content: center;
}

.timeline-marker::before{
  content:"";
  position:absolute;
  left:50%;
  transform: translateX(-50%);
  top:-150%;
  bottom:-150%;
  width:4px;
  border-radius:999px;
  border-start-end-radius: 0;
  background:#ffffff;
  box-shadow: 0 2px 2px 0px var(--btn-border-2);
}

.timeline-entry:first-child .timeline-marker::before {
  top:30%;
}

.timeline-entry:last-child .timeline-marker::before {
  bottom:-200%;
}

.timeline-dot{
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--btn-border-2);
  border: 2px solid #ffffff;
  position: relative;
  z-index: 1;
  margin: 8px 0;
}

/* calendar + date in the same line */
.timeline-date{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 4px;
  color: var(--acc-2);
  font-size: .9rem;
}
.timeline-date img{
  display: block;
}

.timeline-body h4{
  font-size: 1.05rem;
  font-weight: 800;
}
.timeline-body p{
  color: var(--text-muted);
  font-size: .95rem;
}
/* ========== End: Timeline Card ========== */

/* ========== Projects Grid ========== */
.projects-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:var(--projects-gap) var(--projects-gap);
  margin-bottom:var(--projects-gap);
}
.project-card{
  background:var(--surface-3);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.project-card:hover{transform:translateY(-3px)}
.project-card img{width:100%;height:200px;object-fit:cover}
.project-card h3{font-size:1.1rem;font-weight:800;padding:12px 14px}
.project-card p{padding:0 14px 8px;color:var(--text-muted)}
/* ========== End: Projects Grid ========== */

/* ========== Education and Languages ========== */
.education-grid{
  display:grid;grid-template-columns:repeat(2,1fr);gap:20px;margin-bottom:20px
}
.education-card{
  background:var(--surface-2);
  border-radius:var(--radius);
  padding:16px;
  box-shadow:var(--shadow);
}
.education-card h3{font-weight:800;margin-bottom:6px}
.education-location,.education-level{color:var(--text-muted)}
/* ========== End: Education and Languages ========== */

/* ========== Languages bars ========== */
.languages{
  display:grid;grid-template-columns:repeat(2,1fr);gap:14px
}
.language-item span{display:block;margin-bottom:8px;font-weight:700}
.progress-bar{
  width:100%;height:12px;border-radius:999px;background:#242a37;position:relative;overflow:hidden
}
.progress{
  height:100%;width:0;
  background:linear-gradient(90deg, var(--acc), var(--acc-2))
}
.progress-bar::after{
  content: attr(data-tooltip);
  position:absolute;bottom:160%;left:50%;transform:translateX(-50%);
  background:#fff;color:#222;padding:6px 8px;border-radius:8px;font-size:.85rem;font-weight:700;
  white-space:nowrap;box-shadow:var(--shadow);opacity:0;visibility:hidden;transition:opacity .2s
}
.progress-bar:hover::after{opacity:1;visibility:visible}
/* ========== End: Languages bars ========== */

/* ========== Knowledge and Skills ========== */
.knowledge-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.knowledge-card{
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.knowledge-card:hover{ transform: translateY(-3px); }
.knowledge-card img{
  width:56px; height:56px; margin: 0 auto 10px; object-fit:contain;
}
.knowledge-card h4{
  font-size:1.05rem; font-weight:800; margin-bottom:6px;
}
.knowledge-card p{ color: var(--text); font-size:.95rem; }
/* ========== End: Knowledge and Skills ========== */

/* ========== Interests ========== */
.interests{ display:flex; flex-direction:column; gap:28px; }
.geek-row{
  display:flex; gap:20px; align-items:center; justify-content:space-between;
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.geek-row.reverse{ flex-direction: row-reverse; }
.geek-image img{ width:100%; max-width: 175px; border-radius: 8px; }
.geek-text{ max-width: 772px; }
.geek-text h3{ font-size:1.25rem; font-weight:900; margin-bottom:8px; }
.geek-text p{ color: var(--text-muted); }
.interests > .geek-row:nth-child(even){ flex-direction: row-reverse; }
/* ========== End: Interests ========== */

/* ========== Experiences ========== */
.experience-stack{ display:flex; flex-direction:column; gap:18px; }
.experience-container{ display:flex; flex-direction:column; gap:20px; }
.experience-card{
  background:var(--surface-2);
  border-radius:var(--radius);
  padding:16px;
  box-shadow:var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.experience-card:hover{ transform: translateY(-3px); }
.experience-card h3{ font-weight:800; margin-bottom:6px; }
.experience-card .company{ font-weight:700; }
.experience-card .duration{ color:var(--text-muted); margin:4px 0 10px; }
.experience-quote{
  text-align:center;
  color: var(--text-muted);
  font-style: italic;
}
/* ========== End: Experiences ========== */

/* ========== Contact ========== */
#contact.section{ background: var(--bg-alt-2); }

.contact-wrap{
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.contact-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  justify-content: center;
  margin: 6px auto 16px;
}

.contact-chip{
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,.06);
  color: var(--text-muted);
  font-size: .95rem;
}

.contact-text{
  color: var(--text);
  margin-bottom: 24px;
}
.contact-text a{ 
  color: var(--text-muted); 
  text-decoration: underline;
}

.contact-cta{
  margin: 2px auto 18px;
  display: inline-block;
}

#contact .social-links{
  gap: 16px;
  margin-top: 14px;
}

@media (max-width: 720px){
  .contact-wrap{ max-width: 92ch; }
  .contact-chip{ font-size: .9rem; }
}
.social-links{display:flex;gap:14px;justify-content:center;margin-top:10px}
/* ========== End: Contact ========== */

/* ========== Footer ========== */
.footer{border-top:1px solid rgba(255,255,255,.06);padding:24px 0;margin-top:30px;text-align:center;color:var(--text-muted)}
/* ========== End: Footer ========== */

/* ========== Reveal on scroll ========== */
.will-reveal{opacity:0;transform: translateY(16px);transition: opacity .5s ease, transform .5s ease}
.will-reveal.revealed{opacity:1;transform:none}
/* ========== End: Reveal on scroll ========== */

/* ========== Responsive ========== */
@media (max-width: 1024px){
  .projects-grid{grid-template-columns: repeat(2, 1fr)}
  .slide img{height:360px}
  .knowledge-grid{ grid-template-columns: repeat(2, 1fr); }
  :root{ --tech-icon-h: 26px; }
}

@media (max-width: 720px){
  .nav-links{display:none}
  .projects-grid{grid-template-columns: 1fr}
  .languages{grid-template-columns:1fr}
  .education-grid{grid-template-columns:1fr}
  .knowledge-grid{ grid-template-columns: 1fr; }
  .geek-row{ flex-direction: column; text-align:center; }
  .slide img{height:300px}
  :root{
    --header-h: 56px;
    --logo-h: 22px;
    --tech-icon-h: 22px;
  }

  .timeline-entry{
    grid-template-columns: 0.22fr 0.78fr;
  }

  .knowledge-grid.will-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
/* ========== End: Responsive ========== */

/* ========== Motion respect ========== */
@media (prefers-reduced-motion: reduce){
  .carousel-track{transition:none}
  .will-reveal{transition:none}
  .btn::before,
  .project-card a::before{ transition:none }
  .btn,
  .project-card a{ transition:none }
}
/* ========== End: Motion respect ========== */
