
:root{
  --bg:#080a0f;
  --bg2:#0e1220;
  --fg:#e7f0ff;
  --muted:#a7b4cc;
  --accent:#7cf7d4;
  --accent2:#9aa7ff;
  --card:#0c1220cc;
  --border:#1b2640;
  --shadow: 0 20px 60px rgba(0,0,0,.5);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--fg);
  background: radial-gradient(1200px 800px at 70% -20%, #1b2450 0%, transparent 60%), var(--bg);
  background-attachment:fixed;
  overflow-x:hidden;
}

#bg{position:fixed; inset:0; z-index:-1}

.site-header{
  position:sticky; top:0; z-index:10;
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 24px; background:linear-gradient(180deg, rgba(8,10,15,.9), rgba(8,10,15,.2), transparent);
  backdrop-filter:saturate(150%) blur(6px);
  border-bottom:1px solid rgba(255,255,255,.05);
}
.brand{display:flex; gap:10px; align-items:center; text-decoration:none; color:var(--fg); font-weight:700; letter-spacing:.5px}
.logo-cube{width:18px; height:18px; border:2px solid var(--accent); transform:rotate(45deg) perspective(80px) rotateX(25deg); border-radius:4px; box-shadow:0 0 20px var(--accent)}
nav a{margin-left:18px; color:var(--muted); text-decoration:none}
nav a:hover{color:var(--fg)}

.hero{min-height:78vh; display:grid; place-items:center; padding:96px 24px 48px}
.hero-content{max-width:1000px; text-align:center}
.hero-avatar{width:160px; height:160px; border-radius:0; object-fit:contain; box-shadow:0 8px 32px rgba(0,0,0,0.3); margin:0 auto 16px; display:block; border:none}
h1{font-family:"Space Grotesk",Inter,sans-serif; font-size:clamp(38px,6vw,74px); line-height:1.05; margin:0 0 16px}
h1 small{font-weight:400; color:#B2A3FF}
.tagline{color:var(--muted); font-size:clamp(16px,2.2vw,20px); max-width:820px; margin:0 auto 24px}
.fade{background:linear-gradient(90deg, var(--fg), var(--accent)); background-clip:text; -webkit-text-fill-color:transparent}

.section{padding:72px 24px}
.section.narrow{max-width:900px; margin:0 auto}
.section.center{text-align:center}
h2{font-family:"Space Grotesk"; font-size:clamp(22px,2.8vw,32px); margin:0 0 24px; color:var(--accent2)}
.grid{display:grid; gap:18px}
.skills-grid{grid-template-columns:repeat(3,1fr); grid-template-rows:repeat(2,1fr)}
.project-grid{grid-template-columns:repeat(3,1fr); grid-template-rows:repeat(2,1fr)}

.card{
  background:rgba(255,255,255,0.05);
  backdrop-filter:blur(10px);
  border:1px solid rgba(255,255,255,0.1);
  border-radius:18px; padding:20px;
  box-shadow:0 8px 32px rgba(0,0,0,0.3);
  transition:all 0.3s ease;
}
.skill-icon{font-size:2.5rem; margin-bottom:12px; display:block}
.card h3{margin:0 0 8px}
.project-card-image + h3{
  color:var(--fg);
  font-size:2em;
  text-decoration:none;
}
.card p{margin:0; color:var(--muted)}
.card.link{transition:all 0.3s ease}
.card.link:hover{transform:translateY(-3px); border-color:var(--accent); background:rgba(255,255,255,0.08); box-shadow:0 12px 40px rgba(0,0,0,0.4)}

.arrow{display:inline-block; margin-top:8px; font-weight:800; color:var(--accent)}

.btn{
  display:inline-block; padding:12px 18px; border-radius:12px;
  text-decoration:none; border:1px solid var(--border); color:var(--fg);
  transition:transform .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover{transform:translateY(-2px)}
.btn.primary{background:linear-gradient(135deg, var(--accent2), var(--accent)); color:#081018; font-weight:700; border-color:transparent}
.btn.ghost{background:transparent}

.contact-form{max-width:720px; margin:16px auto 0; display:grid; gap:12px}
#contact{text-align:center}
#contact h2{margin:0 auto 24px}
#contact p{margin:0 auto 24px; max-width:600px}
.form-row{display:grid; gap:6px}
input, textarea{
  width:100%; padding:12px 14px; border-radius:12px; border:1px solid var(--border);
  background:rgba(10,14,24,.6); color:var(--fg)
}
input::placeholder, textarea::placeholder{color:#8fa2bd}

.back{color:var(--muted); text-decoration:none}
.project-title{font-size:clamp(32px,4.5vw,56px); margin:8px 0 8px}
.project-intro{color:white}
.project-points{line-height:1.7}
.section.narrow p{font-size:1.1rem; line-height:1.6; padding:12px 0}
.image-placeholder{
  background:rgba(255,255,255,0.03);
  border:2px dashed rgba(255,255,255,0.1);
  border-radius:12px;
  padding:40px 20px;
  margin:24px 0;
  text-align:center;
  color:var(--muted);
  font-style:italic;
}
.image-placeholder p{margin:0}

.videos-grid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:24px;
  margin:24px 0;
}

.images-grid-2x1{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:24px;
  margin:24px 0;
}

.images-grid-3x1{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:24px;
  margin:24px 0;
}

.images-grid-2x2{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  grid-template-rows:repeat(2, 1fr);
  gap:24px;
  margin:24px 0;
}

.image-container{
  text-align:center;
}

.image-container img{
  max-width:100%;
  height:auto;
  border-radius:12px;
  box-shadow:0 8px 32px rgba(0,0,0,0.3);
}

.video-container{
  text-align:center;
  position:relative;
  padding-bottom:56.25%; /* 16:9 aspect ratio */
  height:0;
  overflow:hidden;
}

.video-with-bottom-margin{
  margin-bottom:48px;
}
.video-container iframe{
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  border-radius:12px;
  box-shadow:0 8px 32px rgba(0,0,0,0.3);
}

.steam-widget{
  text-align:center;
  margin:24px 0;
}

.steam-widget iframe{
  max-width:100%;
  height:auto;
  border-radius:12px;
  box-shadow:0 8px 32px rgba(0,0,0,0.3);
}

table{
  width:100%;
  border-collapse:collapse;
  margin:24px 0;
  background:rgba(255,255,255,0.05);
  backdrop-filter:blur(10px);
  border:1px solid rgba(255,255,255,0.1);
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 8px 32px rgba(0,0,0,0.3);
}

th, td{
  padding:16px;
  text-align:left;
  border-bottom:1px solid rgba(255,255,255,0.1);
}

th{
  background:rgba(255,255,255,0.08);
  font-weight:600;
  color:var(--accent);
}

tr:last-child td{
  border-bottom:none;
}

.site-footer{
  padding:36px 24px; border-top:1px solid rgba(255,255,255,.06);
  display:flex; align-items:center; justify-content:space-between; gap:18px; flex-wrap:wrap;
  background:linear-gradient(180deg, transparent, rgba(0,0,0,.25));
}
.site-footer a{color:var(--muted); text-decoration:none}
.site-footer a:hover{color:var(--fg)}

/* Subtle 3D tilt */
.tilt{transform-style:preserve-3d; perspective:800px}
.tilt:hover{transform:translateY(-2px) rotateX(1deg) rotateY(-1deg); background:rgba(255,255,255,0.08); box-shadow:0 12px 40px rgba(0,0,0,0.4)}

/* Project card specific styles */
.project-card-image{
  width:100%;
  height:240px;
  object-fit:cover;
  border-radius:12px;
  margin-bottom:16px;
}
.project-tags{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:12px;
}
.project-tag{
  background:linear-gradient(135deg, var(--accent2), var(--accent));
  color:#081018;
  font-size:0.75rem;
  font-weight:600;
  padding:4px 8px;
  border-radius:6px;
  text-transform:uppercase;
  letter-spacing:0.5px;
}

/* Responsive tweaks */
@media (max-width:720px){
  .site-header nav a{margin-left:12px}
  .skills-grid{grid-template-columns:repeat(2,1fr); grid-template-rows:repeat(3,1fr)}
  .project-grid{grid-template-columns:repeat(2,1fr); grid-template-rows:repeat(3,1fr)}
  .videos-grid{grid-template-columns:1fr; gap:18px}
  .images-grid-2x1{grid-template-columns:1fr; gap:18px}
  .images-grid-3x1{grid-template-columns:1fr; gap:18px}
  .images-grid-2x2{grid-template-columns:1fr; gap:18px}
}
@media (max-width:480px){
  .skills-grid{grid-template-columns:1fr; grid-template-rows:repeat(6,1fr)}
  .project-grid{grid-template-columns:1fr; grid-template-rows:repeat(6,1fr)}
}
