/* =========================
   ROOT VARIABLES
========================= */
:root{
  --bg:#000;
  --fg:#fff;
  --muted: rgba(255,255,255,0.6);
  --soft: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.15);
  --border-strong: rgba(255,255,255,0.22);

  --radius-lg: 22px;
  --radius-md: 16px;
}

/* =========================
   RESET
========================= */
*,
*::before,
*::after{ box-sizing:border-box; }

html,body{ margin:0; padding:0; }

body{
  background:var(--bg);
  color:var(--fg);
  font-family:"Poppins",sans-serif;
  text-align:center;
  animation:fadein .8s ease-out both;
}

.container{
  max-width:1150px;
  margin:0 auto;
  padding:0 24px;
}

/* =========================
   ANIMATION + REDUCED MOTION
========================= */
@keyframes fadein{ from{opacity:0} to{opacity:1} }

@media (prefers-reduced-motion: reduce){
  *{ animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}

.slashslash{
  font-family: consolas, monospace;
  color: #6A9955;
  font-size:18px;
  opacity:.75;
  letter-spacing:-2px;
}

/* =========================
   ACCESSIBILITY
========================= */
.skip-link{
  position:absolute;
  left:-999px;
  top:10px;
  background:#fff;
  color:#000;
  padding:10px 14px;
  border-radius:12px;
  z-index:999;
  text-decoration:none;
  font-size:14px;
}
.skip-link:focus{ left:10px; }

/* =========================
   NAVIGATION
========================= */
nav{ margin-top:40px; }

.nav-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-weight:600;
  font-size:18px;
  letter-spacing:.5px;
  opacity:.9;
}

.nav-links{
  display:flex;
  gap:30px;
  align-items:center;
}

.nav-links a{
  position:relative;
  text-decoration:none;
  color:inherit;
  font-size:15px;
  opacity:.6;
  transition:opacity .3s ease;
}

.nav-links a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-4px;
  width:0%;
  height:1px;
  background:#fff;
  transition:width .3s ease;
}

.nav-links a:hover{ opacity:1; }
.nav-links a:hover::after,
.nav-links a.active::after{ width:100%; }
.nav-links a.active{ opacity:1; }

/* =========================
   TYPO / HEADINGS
========================= */
.title{
  font-size:42px;
  font-weight:600;
  margin:0;
}

.section-title{
  font-size:18px;
  font-weight:600;
  margin:0 0 18px;
  opacity:.9;
}

.kicker{
  font-size:12px;
  letter-spacing:1.5px;
  text-transform:uppercase;
  opacity:.5;
  margin:0 0 10px;
}

.section{
  margin-top:110px;
}

.section-head{
  max-width:700px;
  margin:0 auto 26px;
}

.section-sub,
.page-sub{
  margin:10px auto 0;
  max-width:700px;
  font-size:16px;
  opacity:.7;
  line-height:1.7;
}

/* =========================
   PAGE HEAD
========================= */
.page-head{
  margin-top:120px;
  max-width:900px;
  margin-left:auto;
  margin-right:auto;
}

/* =========================
   HERO (index)
========================= */
.hero{
  margin-top:120px;
  max-width:750px;
  margin-left:auto;
  margin-right:auto;
}

.hero h1{
  font-size:52px;
  font-weight:600;
  margin:0 0 16px;
}

.hero-sub{
  font-size:18px;
  line-height:1.8;
  opacity:.75;
  max-width:600px;
  margin:0 auto;
}

.cta{
  margin-top:26px;
  display:flex;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
}

/* =========================
   BUTTONS
========================= */
.btn{
  display:inline-block;
  padding:10px 24px;
  border-radius:999px;
  font-size:14px;
  font-weight:500;
  text-decoration:none;
  background:#fff;
  color:#000;
  transition:transform .25s ease, opacity .25s ease, border-color .25s ease;
  border:none;
  cursor:pointer;
}

.btn:hover{
  transform:translateY(-2px);
  opacity:.85;
}

.btn-ghost{
  background:transparent;
  color:#fff;
  border:1px solid rgba(255,255,255,.3);
}

.btn-ghost:hover{ border-color:#fff; }

/* =========================
   TAGS / PILLS
========================= */
.tags{
  margin-top:20px;
  display:flex;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
}

.tag, .chip{
  font-size:12px;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid var(--soft);
  opacity:.85;
  display:inline-flex;
  align-items:center;
  gap:8px;
}

.tag-btn{
  background:transparent;
  color:inherit;
  cursor:pointer;
  transition:opacity .2s ease, border-color .2s ease, transform .2s ease;
}

.tag-btn:hover{
  opacity:1;
  border-color:rgba(255,255,255,.18);
  transform:translateY(-1px);
}

.tag-btn.is-active{
  opacity:1;
  border-color:rgba(255,255,255,.35);
}

/* =========================
   STATS
========================= */
.stats{
  margin-top:35px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
}

.stat{
  padding:14px;
  border-radius:14px;
  border:1px solid var(--soft);
}

.stat-num{ font-size:18px; font-weight:600; }
.stat-label{ font-size:12px; opacity:.6; margin-top:4px; }

/* =========================
   STORY (index)
========================= */
.story-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:16px;
  margin-top:22px;
}

.story-card{
  text-align:left;
  padding:18px 18px;
  border-radius:18px;
  border:1px solid var(--soft);
  transition:transform .25s ease, border-color .25s ease;
}

.story-card:hover{
  transform:translateY(-4px);
  border-color:var(--border);
}

.story-year{
  margin:0 0 10px;
  font-size:12px;
  opacity:.6;
  letter-spacing:.6px;
  text-transform:uppercase;
}

.story-title{
  margin:0 0 8px;
  font-size:16px;
  font-weight:600;
}

.story-text{
  margin:0;
  font-size:14px;
  line-height:1.7;
  opacity:.72;
}

/* =========================
   SKILLS + EXPAND
========================= */
.skills-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
  margin-top:22px;
}

.skill-card{
  text-align:left;
  padding:18px 18px;
  border-radius:18px;
  border:1px solid var(--soft);
  transition:transform .25s ease, border-color .25s ease;
}

.skill-card:hover{
  transform:translateY(-4px);
  border-color:var(--border);
}

.skill-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

.skill-top h3{
  margin:0;
  font-size:16px;
  font-weight:600;
}

.pill{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--soft);
  opacity:.85;
  white-space:nowrap;
}

.meter{
  margin-top:12px;
  height:8px;
  border-radius:999px;
  border:1px solid var(--soft);
  overflow:hidden;
}

.meter span{
  display:block;
  height:100%;
  background:rgba(255,255,255,0.55);
}

.skill-text{
  margin:12px 0 0;
  font-size:14px;
  opacity:.72;
  line-height:1.6;
}

.expand-wrap{
  margin-top:16px;
  display:flex;
  justify-content:center;
}

/* Animated collapsible */
.skills-more{
  margin-top:16px;
  overflow:hidden;
  max-height:0;
  opacity:0;
  transform:translateY(-6px);
  transition:max-height 360ms ease, opacity 260ms ease, transform 260ms ease;
}

.skills-more.is-open{
  max-height:none;
  opacity:1;
  transform:translateY(0);
}

.skills-more.is-opening{ opacity:1; transform:translateY(0); }
.skills-more.is-closing,
.skills-more.is-collapsed{ opacity:0; transform:translateY(-6px); }

/* =========================
   CURRENTLY LEARNING
========================= */
.learning{
  margin-top:18px;
  border:1px solid var(--soft);
  border-radius:18px;
  padding:18px 18px;
  text-align:left;
}

.learning-head{ margin-bottom:12px; }

.learning-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
  margin-top:10px;
}

.learning-item{
  display:flex;
  gap:10px;
  align-items:flex-start;
  border:1px solid var(--soft);
  border-radius:16px;
  padding:14px 14px;
}

.bullet{ opacity:.7; margin-top:2px; }

.learning-title{
  margin:0;
  font-size:14px;
  font-weight:600;
}

.learning-sub{
  margin:6px 0 0;
  font-size:13px;
  opacity:.7;
  line-height:1.6;
}

/* =========================
   SOCIAL
========================= */
.social{ margin-top:100px; }

.social-head{
  max-width:700px;
  margin:0 auto 22px;
}

.social-row{
  display:flex;
  justify-content:center;
  gap:32px;
  flex-wrap:wrap;
}

.social-link{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  text-decoration:none;
  color:inherit;
  opacity:.6;
  transition:opacity .25s ease, transform .25s ease;
}

.social-link:hover{
  opacity:1;
  transform:translateY(-3px);
}

.socialicons{ width:28px; height:28px; }
.social-link span{ font-size:12px; letter-spacing:.4px; }

/* =========================
   SEARCH (projects/blog)
========================= */
.search{
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--soft);
  background:transparent;
  color:#fff;
  outline:none;
  font-size:14px;
}

.search::placeholder{ color:rgba(255,255,255,.45); }
.search:focus{ border-color:var(--border-strong); }

.search-hint{
  margin-top:8px;
  font-size:12px;
  opacity:.55;
}

/* =========================
   PROJECTS
========================= */
.projects-toolbar{
  margin-top:22px;
  display:grid;
  gap:14px;
  justify-items:center;
}

.projects-search{ width:100%; max-width:520px; }

.featured{ margin-top:38px; }

.featured-card{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:14px;
  border:1px solid var(--soft);
  border-radius:18px;
  overflow:hidden;
  text-decoration:none;
  color:inherit;
  background:rgba(255,255,255,0.02);
  transition:transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}

.featured-card:hover{
  transform:translateY(-6px);
  border-color:var(--border);
  box-shadow:0 10px 30px rgba(255,255,255,0.08);
}

.featured-text{ padding:18px; text-align:left; }
.featured-title{ margin:0; font-size:22px; font-weight:600; }
.featured-sub{ margin:10px 0 0; opacity:.75; line-height:1.7; }

.featured-meta{
  margin-top:14px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.featured-cta{ margin-top:14px; }

.featured-media{ background:rgba(255,255,255,0.03); }
.featured-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .35s ease;
}
.featured-card:hover .featured-media img{ transform:scale(1.04); }

.projects-grid{
  margin-top:34px;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:16px;
}

.card{
  border:1px solid var(--soft);
  border-radius:18px;
  overflow:hidden;
  background:rgba(255,255,255,0.02);
  transition:transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}

.card:hover{
  transform:translateY(-6px);
  border-color:var(--border);
  box-shadow:0 10px 30px rgba(255,255,255,0.08);
}

.card-link{ display:block; text-decoration:none; color:inherit; }

.card-image img{
  width:100%;
  height:170px;
  object-fit:cover;
  display:block;
  transition:transform .35s ease;
}
.card:hover .card-image img{ transform:scale(1.04); }

.card-body{ padding:16px; text-align:left; }
.card-top{ display:flex; justify-content:space-between; gap:12px; align-items:center; }
.card-top h3{ margin:0; font-size:16px; font-weight:600; }

.card-desc{ margin:10px 0 0; opacity:.75; line-height:1.6; font-size:14px; }
.card-meta{ margin:12px 0 0; opacity:.55; font-size:12px; }
.card-cta{ margin:12px 0 0; opacity:.7; font-size:13px; }

.empty-state{
  margin:16px auto 0;
  max-width:520px;
  padding:18px;
  border:1px solid var(--soft);
  border-radius:18px;
}

/* =========================
   BLOG (Cards + Modal)
========================= */
.blog-toolbar{
  margin-top:22px;
  max-width:520px;
  margin-left:auto;
  margin-right:auto;
}

.blog-grid{
  margin-top:34px;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(320px, 1fr));
  gap:16px;
}

.blog-card{
  border:1px solid var(--soft);
  border-radius:18px;
  overflow:hidden;
  background:rgba(255,255,255,0.02);
  transition:transform .28s ease, border-color .28s ease, box-shadow .28s ease;
  display:grid;
  grid-template-columns:140px 1fr;
  gap:14px;
  padding:14px;
  text-align:left;
  cursor:pointer;
  outline:none;
}

.blog-card:hover{
  transform:translateY(-6px);
  border-color:var(--border);
  box-shadow:0 10px 30px rgba(255,255,255,0.08);
}

.blog-card:focus-visible{
  border-color:rgba(255,255,255,0.35);
  box-shadow:0 0 0 3px rgba(255,255,255,0.12);
}

.blog-thumb{
  border-radius:14px;
  overflow:hidden;
  border:1px solid var(--soft);
  height:140px;
}

.blog-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .35s ease;
}
.blog-card:hover .blog-thumb img{ transform:scale(1.04); }

.blog-date{
  margin:0 0 8px;
  font-size:12px;
  opacity:.55;
}

.blog-title{
  margin:0 0 8px;
  font-size:16px;
  font-weight:600;
}

.blog-excerpt{
  margin:0;
  font-size:13px;
  opacity:.75;
  line-height:1.6;
}

.blog-tags{
  margin-top:12px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.blog-open{
  grid-column:1 / -1;
  margin-top:10px;
  font-size:13px;
  opacity:.7;
}

/* Modal */
body.modal-open{ overflow:hidden; }

.modal{
  position:fixed;
  inset:0;
  display:none;
  z-index:999;
}

.modal.is-open{ display:block; }

.modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
}

.modal-dialog{
  position:relative;
  max-width:900px;
  width:calc(100% - 32px);
  margin:70px auto;
  border-radius:18px;
  overflow:hidden;
  border:1px solid var(--soft);
  background:#050505;
  box-shadow:0 30px 90px rgba(0,0,0,0.75);
}

.modal-close{
  position:absolute;
  top:12px;
  right:12px;
  width:38px;
  height:38px;
  border-radius:999px;
  border:1px solid var(--soft);
  background:rgba(255,255,255,0.06);
  color:#fff;
  cursor:pointer;
  transition:transform .2s ease, border-color .2s ease;
}
.modal-close:hover{ transform:translateY(-2px); border-color:var(--border); }

.modal-hero{
  height:280px;
  background:rgba(255,255,255,0.03);
}

.modal-hero img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.modal-content{
  padding:18px 18px 22px;
  text-align:left;
}

.modal-title{
  margin:6px 0 8px;
  font-size:22px;
  font-weight:600;
}

.modal-tags{
  margin:0 0 14px;
  opacity:.7;
  font-size:13px;
}

.modal-body p{
  margin:12px 0 0;
  line-height:1.8;
  opacity:.82;
  font-size:14px;
}

.post-note{
  opacity:.65 !important;
  font-size:13px !important;
}

/* =========================
   CONTACT FORM (Radio + Copy)
========================= */
.contact-form-section{
  margin-top:34px;
  display:flex;
  justify-content:center;
}

.contact-form{
  width:100%;
  max-width:820px;
  border:1px solid var(--soft);
  background:rgba(255,255,255,0.02);
  border-radius:18px;
  padding:18px;
  text-align:left;
}

.form-top{
  display:grid;
  gap:10px;
  margin-bottom:14px;
}

.email-box{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:14px;
  border:1px solid var(--soft);
  border-radius:16px;
  background:rgba(255,255,255,0.02);
}

.email-label{
  margin:0 0 4px;
  font-size:12px;
  opacity:.65;
  letter-spacing:.3px;
}

.email-value{
  margin:0;
  font-size:14px;
  font-weight:600;
  letter-spacing:.2px;
  word-break:break-word;
}

.copy-btn{
  padding:9px 14px;
  font-size:13px;
}

.toast{
  height:0;
  overflow:hidden;
  opacity:0;
  transform:translateY(-4px);
  transition:opacity .25s ease, transform .25s ease, height .25s ease;
  font-size:12px;
}

.toast.is-show{
  height:18px;
  opacity:.75;
  transform:translateY(0);
}

.form-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
}

.form-span{ grid-column:1 / -1; }

.field label{
  display:block;
  font-size:12px;
  opacity:.75;
  margin:0 0 8px;
  letter-spacing:.3px;
}

.field input,
.field textarea{
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--soft);
  background:transparent;
  color:#fff;
  outline:none;
  font-size:14px;
}

.field textarea{ resize:vertical; min-height:160px; }

.field input:focus,
.field textarea:focus{ border-color:var(--border-strong); }

.checks{
  margin-top:14px;
  border:1px solid var(--soft);
  border-radius:16px;
  padding:14px;
}

.checks legend{
  padding:0 8px;
  font-size:12px;
  opacity:.7;
}

.check{
  display:flex;
  gap:10px;
  align-items:center;
  padding:10px 8px;
  border-radius:12px;
  cursor:pointer;
}

.check:hover{ background:rgba(255,255,255,0.03); }

.check input[type="radio"]{ width:16px; height:16px; }

.form-actions{
  margin-top:14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-start;
}

.form-hint{
  margin:12px 0 0;
  font-size:12px;
  opacity:.6;
  line-height:1.6;
}

.form-hint code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:12px;
}

/* =========================
   FOOTER
========================= */
.footer{
  margin-top:120px;
  margin-bottom:40px;
}

.credits{
  font-size:12px;
  opacity:.5;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px){
  .story-grid{ grid-template-columns:1fr; }
  .skills-grid{ grid-template-columns:1fr; }
  .learning-grid{ grid-template-columns:1fr; }
  .featured-card{ grid-template-columns:1fr; }
  .featured-media img{ height:240px; }
}

@media (max-width: 768px){
  .hero h1{ font-size:36px; }
  .stats{ grid-template-columns:1fr; }
  .nav-links{ gap:16px; }

  .blog-card{ grid-template-columns:1fr; }
  .blog-thumb{ height:180px; }

  .modal-hero{ height:220px; }

  .form-grid{ grid-template-columns:1fr; }
  .email-box{ flex-direction:column; align-items:flex-start; }
}