

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+Pro:wght@200;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Kanit&family=Source+Serif+Pro:wght@100;700;900&display=swap');
html{
	background-color: #000;
}
body {
  font-family: sans-serif;
   margin: 0;
   z-index: -10;
   background: #f2f2f2;

}

h1 {
  text-align: center;
  margin-top: 50px;
  font-size: 10vw;
  line-height: 1em;
  
  margin-bottom:0px;
}

p {
  text-align: left;
  font-weight: 100;
  font-size: 1.1em;
  color:#666;
  font-family: 'Source Serif Pro', serif;
  margin-top:5px;
}

h4{
  line-height:1.1em;
  font-weight:300;
  font-size: 1.8em;
  margin:10px auto 0px auto;
  font-family: 'Kanit', sans-serif;

}
.small02{
	font-size: .7em;
}
a{
    text-decoration: underline;
    color: #336699;
    text-align: center;
    font-weight: 400;
    padding: 2px 5px 2px 5px;
    font-size: 1.1em;
    font-weight: 300;
    font-family: 'Kanit', sans-serif;
}
a:hover {
	color: #2887c7;
}






/* ----------------- #nav ----------------- */
#nav_wrapper {
    width: 100%;  
    background-color: #000;
}
#nav{
    width: 100%;
    margin: 0px auto;
    padding: 0px;
    height:80px;
}
#logo_text{
    color: #fff;
    font-size: 40px;
    font-weight: 900;
    text-align: center;
    padding-top:20px;
    padding-bottom: 10px;
}

/*------------------------------------------------*/


.grid {
  margin: 0 auto;
  
}

/* clear fix */
.grid:after {
  content: '';
  display: block;
  clear: both;
}

/* ----------------- .grid-item ----------------- */

.grid-item,
.grid-sizer {
  width: 350px;
}

.gutter-sizer {
  width: 50px;
}
.large{
  width: 740px;
}

.grid-item {
  float: left;
  padding:15px;
  background: #fff;
  margin-bottom: 30px;
  box-shadow: 2px 2px 4px 0 #ccc;
}
.grid-item:hover{
	cursor: pointer;
}

.note{
	width: 45%;
	margin: 16px auto 28px auto;  /* 28px bottom gap before the grid */
}
.note p{
	text-align: center;
}
.comment{
	font-size: 1em;
	font-weight: 100;
	margin-bottom: 0px;
}
.small{
	line-height: 1em;
	font-size: .9em;
}
.triangle-down {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid black;
  margin: 0px auto 0px auto;
}
/*------------------------------------------------*/

.wrapper{
	width: 100%    !important;
	display: block;
	box-sizing: border-box;
	object-fit: contain;
	overflow: hidden;
	position: relative;
}
.wrapper img{
	width: 100% !important;
	display: block;
}
.preloader {
  width: 0;
  height: 100%;
  background-color: #2196F3;
  position: absolute;
  top: 0;
  left: 0;
  transition: width 0.3s ease;
}
.info{
    padding:0 5px;
    text-align: left;
    
}
.lt{
    color:#fff;
    color: rgba(255,255,255, 0.7);
}
.lt a{
    background-color: rgba(255,255,255, 0.8);
}
.dk{
    color:#000;
    color: rgba(0,0,0, 0.7); 
}

.bottom{
    position: absolute;
    top:90%;
    left:50%;
    transform: translate(-50%,-50%);
    
}
.top{
    position: absolute;
    top:15%;
    left:50%;
    transform: translate(-50%,-50%);
}
.hero{
	width: 100%;
	position: relative;
	z-index: 1;
	height: 75vh;
  overflow: hidden;
}

.hero_text{
	text-align: center;
	position: absolute;
	width: 50%;
	bottom: 15%;        /* lower anchor — text+dots group sits near hero bottom */
	left: 50%;
	transform: translateX(-50%);  /* horizontal centre only */
  color:rgba(255,255,255,.6)
}
.hero_text p{
	margin:0 auto;
	color:#fff;
	font-size:1.7rem;
	font-weight: 700;
	text-align: center;
}
video{
	display: block;
	width: 100%    !important;
	box-sizing: border-box;
	z-index: 0;
	
}
/*---------------------------------------------------------*/
.video {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0; /* Start with videos hidden */
  transition: opacity 1s ease; /* Add transition for opacity */
  display: none; /* Initially hide all videos */
}

.video.active {
  display: block; /* Ensure the active video is displayed */
  opacity: 1; /* Ensure the active video is fully visible */
}

.dots {
  /* now lives inside .hero_text — in normal flow, no absolute needed */
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 14px;
}

.dot {
  position: relative;
  width: 20px;
  height: 20px;
  margin: 0.5em;
  border-radius: 50%;
  background-color: white;
  border: 0.05em solid var(--color); 
  display: inline-block;
  --color: black;
  cursor: pointer;
  overflow: hidden;
  --animation-play-state: running; /* Default animation state */
}


.dot::before,
.dot::after {
  content: "";
  width: 50%;
  height: 100%;
  position: absolute;
  left: 0;
  border-radius: 0.5em 0 0 0.5em;
  transform-origin: center right;
  animation-iteration-count: infinite;
  animation-duration: 10.5s;
  animation-play-state: var(--animation-play-state); /* Use variable for animation state */
}

.dot::before {
  z-index: 1;
  background-color: white;
  animation-name: mask;
  animation-timing-function: steps(1);
}

.dot::after {
  background-color: var(--color);
  animation-name: rotate;
  animation-timing-function: linear;
}

@keyframes rotate {
  to { transform: rotate(1turn); }
}

@keyframes mask {
  50%, 100% {
      background-color: var(--color);
      transform: rotate(0.5turn);
  }
}



.dot:not(.active)::before,
.dot:not(.active)::after {
  animation-name: none; /* Remove animation when not active */
}

/*-----------------------------footer--------------------*/
#footer_container{
    width:100%;
    background-color: #000 !important;
    position: relative;
}

#footer{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 90%;
    margin: 20px auto 0px auto;
    padding-top:60px;
    padding-bottom: 60px;
}
#footer a{
	background-color: #666;
	color:#33ffff;
	background-color: rgba(255,255,255, 0.2);
	border-radius: 16px;
}
.footer-col{
	padding: 10px;
	flex:1;
	min-width: 350px;
}
.wrapper_about{
	display: flex;
	flex-direction: row;
}

.footer-col h2{
    font-size: 3em;
    line-height: 1em;
    width: 100%;
    color:#fff;
    margin-bottom: 0px;
    display: inline;
}
.footer-col p{
	color:#ccc;
}
.avatar {
	width: 100px;
	margin-right: 20px;
	height: auto;


    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;

    -webkit-box-shadow: 0 0 0 3px #fff, 0 0 0 4px #999, 0 2px 5px 4px rgba(0,0,0,.2);
    -moz-box-shadow: 0 0 0 3px #fff, 0 0 0 4px #999, 0 2px 5px 4px rgba(0,0,0,.2);
    box-shadow: 0 0 0 3px #fff, 0 0 0 4px #999, 0 2px 5px 4px rgba(0,0,0,.2);
}
/* ── Deeplink highlight animation ─────────────────────────────────────── */
@keyframes cardHighlight {
  0%   { box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.75), 2px 2px 4px 0 #ccc; }
  60%  { box-shadow: 0 0 0 8px rgba(74, 144, 226, 0.15), 2px 2px 4px 0 #ccc; }
  100% { box-shadow: 2px 2px 4px 0 #ccc; }
}
.grid-item.deeplink-highlight {
  animation: cardHighlight 2s ease-out forwards;
}

@media (max-width: 740px) {
  /* ── Nav / logo ──────────────────────────────────────────── */
  #nav {
    height: auto;
    padding: 12px 0;
  }
  #logo_text {
    font-size: 22px;      /* was 40px globally */
    padding-top: 10px;
    padding-bottom: 8px;
  }

  /* ── Hero typography ─────────────────────────────────────── */
  h1 {
    font-size: 7vw;       /* was 10vw globally */
  }
  .hero_text {
    width: 80%;
    z-index: 102;         /* above dots (z-index:101) so text is never obscured */
  }
  .hero_text p {
    font-size: 0.95rem;   /* was 1.7rem globally → bring down for phones */
    font-weight: 600;
  }
  /* video fills full hero height — removed the 2/3 override that caused a blank strip */

  /* ── Note / tagline text ─────────────────────────────────── */
  .comment {
    font-size: 1em;       /* was 1.4em globally */
  }

  /* ── Footer: 2-column layout at 360 px ──────────────────────
     Remove the 350px min-width that forces single-column wrapping.
     Each column ≈ (360px × 90% / 2) − padding ≈ 142px.
  ─────────────────────────────────────────────────────────── */
  #footer {
    width: 96%;
    padding-top: 30px;
    padding-bottom: 30px;
  }
  .footer-col {
    min-width: 0;         /* was 350px — drop so 2 cols fit */
    flex: 1 1 130px;
    padding: 6px;
  }
  /* Shrink avatar so it fits a narrow column */
  .avatar {
    width: 50px;
    height: auto;
    margin-right: 8px;
  }
  /* Shrink the "About the author" / "Work worth doing" headings */
  .footer-col h2 {
    font-size: 1.2em;
    line-height: 1.15em;
    display: block;       /* override inline so it stacks */
  }
  /* Smaller body text in footer */
  .footer-col p {
    font-size: 0.72em;
    line-height: 1.4em;
    margin-top: 4px;
  }

  /* ── Mobile grid: 2-column layout ─────────────────────────
     Small cards take half the width (2 per row).
     Large cards span the full row (~340 px on iPhone X).
  ─────────────────────────────────────────────────────────── */
  /* Fixed px avoids the circular dependency with isFitWidth:true.
     160 × 2 + 12 gutter = 332 px grid — fits any 360 px+ phone.   */
  .grid-item,
  .grid-sizer {
    width: 160px;
  }
  .gutter-sizer {
    width: 12px;
  }
  .large {
    width: 332px; /* spans both columns + gutter */
  }
  .note {
    width: 90%;
  }

  /* ── Small card: compact padding + typography ────────────
     box-sizing:border-box makes width:160px the OUTER width
     (including padding), so masonry column=160px fits exactly.
     Without it, 160px content + 7px×2 padding = 174px outer
     which overflows the 160px column.
  ─────────────────────────────────────────────────────────── */
  .grid-item {
    box-sizing: border-box;
    padding: 7px;
    margin-bottom: 10px;
  }
  .grid-item .info {
    padding: 0 2px;
  }
  .grid-item h4 {
    font-size: 0.88em;
    line-height: 1.15em;
    margin: 5px auto 0;
  }
  .grid-item p {
    font-size: 0.68em;
    margin-top: 3px;
  }

  /* ── Large card: restore comfortable sizes ───────────────
     Full-row card has plenty of width — bump back up a bit.
  ─────────────────────────────────────────────────────────── */
  /* 332 px large card gets comfortable desktop-like sizing */
  .grid-item.large {
    padding: 12px;
    margin-bottom: 10px;
  }
  .grid-item.large .info {
    padding: 0 4px;
  }
  .grid-item.large h4 {
    font-size: 1.25em;
    line-height: 1.2em;
    margin: 8px auto 0;
  }
  .grid-item.large p {
    font-size: 0.85em;
    margin-top: 5px;
  }
}


