:root{
  --bg: #070b1a;           /* midnight-ish */
  --panel: #0b1230;
  --panel-2: #0a1028;
  --text: #e9eefc;
  --muted: rgba(233, 238, 252, 0.72);
  --line: rgba(233, 238, 252, 0.12);

  --gold: #d6b35a;
  --gold-2: #f1d88a;

  --shadow: 0 18px 45px rgba(0,0,0,0.45);
  --radius: 18px;

  --container: 1100px;
}

*{ box-sizing: border-box; }
html,body{ height: 100%; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 10% -10%, rgba(214,179,90,0.12), transparent 55%),
    radial-gradient(900px 600px at 100% 0%, rgba(86,127,255,0.12), transparent 55%),
    linear-gradient(180deg, var(--bg), #050713 60%, #04050f);
  line-height: 1.5;
}

a{ color: inherit; text-decoration: none; }
a:hover{ color: var(--gold-2); }

.container{
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

/* Header */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 11, 26, 0.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}
.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: 0.2px;
}
.brand-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 6px rgba(214,179,90,0.15);
}
.nav{
  display: flex;
  gap: 16px;
  align-items: center;
}
.nav a{
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 999px;
}
.nav a:hover{
  color: var(--text);
  background: rgba(233, 238, 252, 0.06);
}

/* Buttons */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(233, 238, 252, 0.04);
  color: var(--text);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
  cursor: pointer;
}
.btn:hover{
  transform: translateY(-1px);
  background: rgba(233, 238, 252, 0.07);
  border-color: rgba(233, 238, 252, 0.2);
}
.btn:active{ transform: translateY(0px); }

.btn-primary{
  background: linear-gradient(180deg, rgba(214,179,90,0.95), rgba(214,179,90,0.75));
  color: #0b1025;
  border-color: rgba(214,179,90,0.4);
}
.btn-primary:hover{
  background: linear-gradient(180deg, rgba(241,216,138,0.98), rgba(214,179,90,0.8));
}
.btn-ghost{ background: transparent; }
.btn-small{ padding: 8px 12px; font-size: 0.95rem; }

/* Hero */
.hero{ padding: 64px 0 24px; }
.hero-inner{
  padding: 34px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(11,18,48,0.78), rgba(10,16,40,0.45));
  box-shadow: var(--shadow);
}
.eyebrow{
  margin: 0 0 10px;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.8rem;
}
.headline{
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
}
.subhead{
  margin: 14px 0 0;
  max-width: 70ch;
  color: var(--muted);
}

/* Sections */
.section{ padding: 58px 0; }
.section-head{ display: grid; gap: 8px; margin-bottom: 18px; }
.section-head h2{ margin: 0; font-size: 1.6rem; }
.muted{ color: var(--muted); }
.fineprint{ font-size: 0.92rem; }

/* Cards */
.card{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(11,18,48,0.55);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

/* About Me: buttons + panel */
.about-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.info-btn{
  text-align: left;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(233, 238, 252, 0.03);
  padding: 14px;
  color: var(--text);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.info-btn:hover{
  transform: translateY(-2px);
  border-color: rgba(214,179,90,0.28);
  background: rgba(233, 238, 252, 0.05);
}
.info-btn.is-active{
  border-color: rgba(214,179,90,0.5);
  box-shadow: 0 0 0 4px rgba(214,179,90,0.12);
}
.info-emoji{ font-size: 1.1rem; display: inline-block; }
.info-title{
  display: block;
  margin-top: 8px;
  font-weight: 650;
}
.info-sub{
  display: block;
  margin-top: 6px;
  font-size: 0.95rem;
}

/* panel spans full row */
.about-panel{
  grid-column: 1 / -1;
  padding: 16px;
}
.about-panel h3{ margin: 0 0 8px; }

/* Projects grid */
.grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.project-card{
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(11,18,48,0.62), rgba(10,16,40,0.38));
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
  will-change: transform;
}
/* Special Feature: grow on hover */
.project-card:hover{
  transform: scale(1.03);
  border-color: rgba(214,179,90,0.35);
  background: linear-gradient(180deg, rgba(11,18,48,0.72), rgba(10,16,40,0.46));
}
.project-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.project-top h3{ margin: 0; font-size: 1.15rem; }
.tag{
  font-size: 0.8rem;
  color: rgba(11,16,37,0.95);
  background: rgba(214,179,90,0.92);
  border: 1px solid rgba(214,179,90,0.35);
  padding: 4px 10px;
  border-radius: 999px;
}
.project-actions{ margin-top: 14px; display: flex; gap: 10px; }

/* Contact */
.contact-card{
  padding: 18px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: start;
}
.contact-form{ display: grid; gap: 12px; }
label span{
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
  font-size: 0.95rem;
}
input, textarea{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(7, 11, 26, 0.55);
  color: var(--text);
  outline: none;
}
input:focus, textarea:focus{
  border-color: rgba(214,179,90,0.45);
  box-shadow: 0 0 0 4px rgba(214,179,90,0.12);
}
.contact-aside h3{ margin: 6px 0 10px; }
.aside-list{ display: grid; gap: 10px; margin-top: 14px; }
.aside-item{
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(233, 238, 252, 0.03);
}
.aside-k{ color: var(--muted); font-size: 0.9rem; }
.aside-v{ margin-top: 6px; }

/* Footer */
.site-footer{
  border-top: 1px solid var(--line);
  padding: 22px 0;
  background: rgba(7, 11, 26, 0.6);
}
.footer-inner{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.social{ display: flex; gap: 14px; flex-wrap: wrap; }
.social a{
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.social a:hover{
  color: var(--text);
  border-color: rgba(214,179,90,0.25);
  background: rgba(233, 238, 252, 0.04);
}

/* Responsive */
@media (max-width: 900px){
  .nav{ display: none; }
  .grid{ grid-template-columns: 1fr; }
  .about-grid{ grid-template-columns: 1fr 1fr; }
  .contact-card{ grid-template-columns: 1fr; }
}
@media (max-width: 520px){
  .about-grid{ grid-template-columns: 1fr; }
}
/* Gallery grid (thumbnails) */
.gallery-grid{
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.gallery-item{
  grid-column: span 4; /* 3 per row on desktop */
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(233, 238, 252, 0.03);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  transition: transform 180ms ease, border-color 180ms ease;
  padding: 0;
  cursor: pointer;
}

.gallery-item:hover{
  transform: translateY(-2px);
  border-color: rgba(214,179,90,0.35);
}

.gallery-item img{
  width: 100%;
  height: 190px; /* small on page */
  object-fit: cover;
  display: block;
}

@media (max-width: 900px){
  .gallery-item{ grid-column: span 6; } /* 2 per row */
}

@media (max-width: 520px){
  .gallery-item{ grid-column: span 12; } /* 1 per row */
  .gallery-item img{ height: 200px; }
}

/* Lightbox */
.lightbox{
  position: fixed;
  inset: 0;
  z-index: 1000;

  /* hidden state */
  opacity: 0;
  pointer-events: none;
}

.lightbox.is-open{
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
}

.lightbox-dialog{
  position: relative;
  width: min(100% - 28px, 980px);
  margin: 60px auto;
  border-radius: var(--radius);
  border: 1px solid rgba(233, 238, 252, 0.18);
  background: rgba(11,18,48,0.88);
  box-shadow: var(--shadow);
  padding: 14px;
}

.lightbox-close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(233,238,252,0.18);
  background: rgba(233,238,252,0.06);
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-img{
  width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
  display: block;
  border-radius: calc(var(--radius) - 8px);
}

.lightbox-hint{
  margin: 10px 2px 0;
  font-size: 0.95rem;
}
/* YouTube thumbnails grid */
.yt-grid{
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.yt-card{
  grid-column: span 6; /* 2 per row (perfect for 4 videos) */
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(233, 238, 252, 0.03);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
  display: block;
}

.yt-card:hover{
  transform: translateY(-2px);
  border-color: rgba(214,179,90,0.35);
  background: rgba(233, 238, 252, 0.05);
}

.yt-thumb{
  position: relative;
}

.yt-thumb img{
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

/* Play icon overlay */
.yt-play{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.yt-play::before{
  content: "";
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(233,238,252,0.18);
  backdrop-filter: blur(4px);
}

.yt-play::after{
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-left: 16px solid var(--gold-2);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  transform: translateX(2px);
}

@media (max-width: 900px){
  .yt-card{ grid-column: span 12; } /* stack on mobile */
  .yt-thumb img{ height: 210px; }
}
/* Global polish */
.section{
  padding: 70px 0;
}

.section-head-row{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

h1, h2, h3{
  letter-spacing: -0.02em;
}

.hero-inner{
  padding: 42px 32px;
}

/* Make all card-like things consistent */
.project-card,
.gallery-item,
.yt-card,
.info-btn,
.aside-item{
  border-color: rgba(233,238,252,0.14);
}

.project-card:hover,
.gallery-item:hover,
.yt-card:hover,
.info-btn:hover{
  border-color: rgba(214,179,90,0.38);
}

/* Gallery: nicer ratio + tighter look */
.gallery-item img{
  height: 210px;
}

/* YouTube: show meta under thumbnails */
.yt-meta{
  padding: 12px 14px 14px;
}

.yt-title{
  margin: 0;
  font-size: 1.05rem;
}

.yt-desc{
  margin: 8px 0 0;
  font-size: 0.95rem;
}

/* Two columns for youtube on desktop, one on mobile (already, but keep consistent) */
@media (max-width: 900px){
  .section-head-row{
    align-items: flex-start;
    flex-direction: column;
  }
}
/* Final polish (put at very bottom) */
body{
  letter-spacing: 0.1px;
}

.section-head{
  max-width: 78ch;
}

.section-head h2{
  font-size: 1.85rem;
}

.hero-inner{
  position: relative;
  overflow: hidden;
}

.hero-inner::after{
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(600px 240px at 20% 10%, rgba(214,179,90,0.16), transparent 60%);
  pointer-events: none;
}

.card, .info-btn, .gallery-item, .yt-card{
  background: rgba(11,18,48,0.50);
}

.btn{
  font-weight: 600;
}

.nav a{
  font-weight: 600;
}
