/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #ffffff;
  --bg2: #f7f8fa;
  --bg3: #eef0f4;
  --border: #e2e5eb;
  --text: #111111;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent2: #1d4ed8;
  --accent-light: #eff6ff;
  --font-display: 'Syne', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.accent { color: var(--accent); }

/* ===== NAV ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  height: 60px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -1px;
}

nav ul { display: flex; gap: 2rem; list-style: none; }

nav ul a {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

nav ul a:hover, nav ul a.active { color: var(--accent); }

.hamburger {
  display: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: fixed; top: 60px; left: 0; right: 0;
  z-index: 99;
  padding: 1rem 2rem;
  gap: 1rem;
}
.mobile-menu a { color: var(--muted); font-size: 14px; }
.mobile-menu.open { display: flex; }

@media(max-width: 700px) {
  nav ul { display: none; }
  .hamburger { display: block; }
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 0 2rem;
  padding-top: 60px;
  position: relative;
  overflow: hidden;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-content {
  position: relative; z-index: 1;
  flex: 1;
  animation: fadeUp 0.8s ease both;
}

.hero-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid #bfdbfe;
  padding: 4px 12px;
  border-radius: 2px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 1.5rem;
  letter-spacing: -3px;
  color: var(--text);
}

.hero-sub {
  color: var(--muted);
  font-size: 14px;
  max-width: 440px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-image-col {
  flex: 0 0 420px;
  position: relative;
  animation: fadeUp 0.8s 0.2s ease both;
}

.hero-img-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 220px 160px;
  gap: 10px;
}

.hero-img-grid .img-main {
  grid-column: 1 / 3;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.hero-img-grid .img-main img,
.hero-img-grid .img-small img {
  width: 100%; height: 100%; object-fit: cover;
}

.hero-img-grid .img-small {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
   width: 100%; height: 100%;
}

.hero-badge {
  position: absolute;
  bottom: -12px; left: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  padding: 12px 28px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background 0.2s, transform 0.1s;
  border-radius: 3px;
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); }

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 12px 28px;
  border: 1px solid var(--accent);
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background 0.2s;
  border-radius: 3px;
}
.btn-outline:hover { background: var(--accent-light); }

/* ===== CONTAINER ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

/* ===== SECTIONS ===== */
section { padding: 6rem 0; }

.section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.section-sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 2.5rem;
}

/* ===== INTRO ===== */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.intro-text h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.intro-text p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 1rem;
  line-height: 1.9;
}

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 1.5rem 1rem;
  text-align: center;
  border-radius: 8px;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ===== ELECTRONICS STRIP ===== */
.elec-strip {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0;
  overflow: hidden;
}

.elec-strip-label {
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.elec-img-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 0 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.elec-img-item {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  border: 1px solid var(--border);
}

.elec-img-item img { width: 100%; height: 100%; object-fit: cover; }

/* ===== HIGHLIGHTS ===== */
.highlights-section { background: var(--bg2); }

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.highlight-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1.75rem;
  border-radius: 10px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.highlight-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(37,99,235,0.08);
}

.hcard-tag {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--accent);
  background: var(--accent-light);
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.highlight-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.highlight-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.hcard-link { font-size: 12px; color: var(--accent); letter-spacing: 0.05em; }

/* ===== PAGE HEADER ===== */
.page-header {
  padding: 8rem 0 4rem;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.page-header-bg {
  position: absolute; inset: 0;
  opacity: 0.07;
  background-size: cover;
  background-position: center;
  filter: grayscale(100%);
}

.page-header .container { position: relative; z-index: 1; }

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -2px;
  margin: 0.5rem 0 0.75rem;
  color: var(--text);
}

.page-header p { color: var(--muted); font-size: 14px; }

/* ===== GALLERY ===== */
.gallery-section { padding: 4rem 0 6rem; }
.gallery-category { margin-bottom: 4rem; }

.gallery-cat-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.gallery-cat-desc { color: var(--muted); font-size: 13px; margin-bottom: 1.5rem; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--border);
  cursor: pointer;
  border-radius: 8px;
  transition: border-color 0.2s, transform 0.2s;
  height: 220px; 
  width:  320px;
}

.gallery-item:hover { border-color: var(--accent); transform: translateY(-2px); }

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.gallery-item:hover img { transform: scale(1.05); }

.upload-hint {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 1rem;
  color: var(--muted);
}

.upload-icon { font-size: 2rem; color: var(--border); margin-bottom: 0.5rem; }
.upload-hint p { font-size: 11px; margin-bottom: 4px; }
.upload-hint code { font-size: 10px; color: var(--accent); opacity: 0.7; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 200;
  align-items: center; justify-content: center;
  flex-direction: column;
  cursor: pointer;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 80vh; object-fit: contain; border-radius: 8px; }
.lightbox-close {
  position: absolute; top: 2rem; right: 2rem;
  font-size: 2rem; color: #fff; cursor: pointer;
}
#lightbox-caption { margin-top: 1rem; font-size: 13px; color: #aaa; }

/* ===== PROJECTS ===== */
.projects-section { padding: 4rem 0 6rem; }

.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 6rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}
.project-card:last-child { border-bottom: none; }
.project-card.reverse { direction: rtl; }
.project-card.reverse > * { direction: ltr; }

.project-video-wrap {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg2);
  border: 1px solid var(--border);
  overflow: hidden;
  border-radius: 10px;
}
.projects-section .container {
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

.project-video-wrap iframe { width: 100%; height: 100%; border: none; }
.project-video-wrap video,
.project-video-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* no cropping */
  background: black;
}

.video-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg2);
}

.video-ph-inner { text-align: center; color: var(--muted); padding: 2rem; }

.play-btn {
  width: 60px; height: 60px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin: 0 auto 1rem;
  color: var(--muted);
  background: var(--bg);
}

.video-ph-inner p { font-size: 14px; font-weight: 700; margin-bottom: 0.5rem; color: var(--text); }
.video-ph-inner span { font-size: 11px; color: var(--muted); }

.project-tag {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--accent);
  background: var(--accent-light);
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.project-info h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.project-info p { color: var(--muted); font-size: 14px; line-height: 1.9; margin-bottom: 1.5rem; }

.project-details { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.project-details li {
  font-size: 12px;
  color: var(--muted);
  border-left: 2px solid var(--accent);
  padding-left: 10px;
  border-radius: 0;
}

.project-details span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 2px;
}

/* ===== ABOUT ===== */
.about-section { padding: 4rem 0 6rem; }

.about-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 4rem;
  align-items: start;
}

.about-photo-frame {
  aspect-ratio: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 1rem;
  border-radius: 10px;
}

.photo-placeholder {
  width: 100%; height: 100%;
  min-height: 260px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--muted);
  gap: 0.5rem;
}

.photo-placeholder span {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--border);
}

.photo-placeholder p { font-size: 11px; }
.about-photo-frame img { width: 100%; height: 100%; object-fit: cover; }

.about-link {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 6px;
  transition: border-color 0.2s, color 0.2s;
  word-break: break-all;
}

.about-link:hover { border-color: var(--accent); color: var(--accent); }

.about-text-col h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.about-text-col p { color: var(--muted); font-size: 14px; line-height: 1.9; margin-bottom: 1rem; }

.skills-list { margin-top: 2rem; }

.skills-list h3 {
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.skill-tags span {
  font-size: 11px;
  border: 1px solid var(--border);
  background: var(--bg2);
  padding: 5px 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
  border-radius: 4px;
}

/* ===== CONTACT FORM ===== */
.contact-section { background: var(--bg2); padding: 5rem 0; border-top: 1px solid var(--border); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.contact-form input,
.contact-form textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
  width: 100%;
  border-radius: 6px;
}

.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.08); }

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #adb5bd; }

/* ===== FOOTER ===== */
footer {
  padding: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
}

footer a { color: var(--accent); }
footer a:hover { text-decoration: underline; }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .hero { flex-direction: column; justify-content: center; padding-top: 100px; min-height: auto; padding-bottom: 4rem; }
  .hero-image-col { flex: 0 0 auto; width: 100%; }
  .intro-grid { grid-template-columns: 1fr; }
  .highlights-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card, .project-card.reverse { grid-template-columns: 1fr; direction: ltr; }
  .about-grid { grid-template-columns: 1fr; }
  .elec-img-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .highlights-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .project-details { grid-template-columns: 1fr; }
  .elec-img-row { grid-template-columns: repeat(2, 1fr); }
  .hero-img-grid { grid-template-rows: 160px 120px; }
}

/* ===== FADED BG SECTIONS ===== */
.bg-faded {
  position: relative;
  overflow: hidden;
}
.bg-faded::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0.25;
  filter: grayscale(0%) saturate(1.9) brightness(1.5) contrast(1.5);
  z-index: 0;
}
.bg-faded > * { position: relative; z-index: 1; }

.bg-circuit::before   { background-image: url('https://images.unsplash.com/photo-1518770660439-4636190af475?w=1400&q=60'); }
.bg-pcb::before       { background-image: url('https://images.unsplash.com/photo-1591799264318-7e6ef8ddb7ea?w=1400&q=60'); }
.bg-chips::before     { background-image: url('https://images.unsplash.com/photo-1517077304055-6e89abbf09b0?w=1400&q=60'); }
.bg-drone::before     { background-image: url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=1400&q=60'); }
.bg-solder::before    { background-image: url('https://images.unsplash.com/photo-1562408590-e32931084e23?w=1400&q=60'); }
.bg-wires::before     { background-image: url('https://images.unsplash.com/photo-1601132359864-c974e79890ac?w=1400&q=60'); }
.bg-board::before     { background-image: url('images/ju.jpg'); }
