:root{
  --bg:#0f3040;
  --bg-elevated:#153847;
  --surface:#1b4150;
  --surface-hover:#214a5a;
  --border:#2b5162;
  --border-hover:#3f6577;
  --text-primary:#f4ece5;
  --text-secondary:#aec3ca;
  --text-tertiary:#6f8d97;
  --accent:#a56f63;
  --accent-strong:#d99b7f;
  --accent-dim:rgba(165,111,99,0.16);
  --accent-border:rgba(165,111,99,0.45);
  --amber:#d99b7f;

  --font-display:'Space Grotesk', sans-serif;
  --font-body:'Inter', sans-serif;
  --font-mono:'JetBrains Mono', monospace;

  --container:1120px;
  --radius-sm:8px;
  --radius-md:14px;
  --radius-lg:20px;

  --ease:cubic-bezier(.22,.61,.36,1);
}

*{margin:0;padding:0;box-sizing:border-box;}

html{scroll-behavior:smooth;}

body{
  background:var(--bg);
  color:var(--text-primary);
  font-family:var(--font-body),sans-serif;
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

/* subtle static texture — no motion, just depth */
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:
          radial-gradient(ellipse 900px 500px at 15% -10%, rgba(217,155,127,0.10), transparent 60%),
          radial-gradient(ellipse 700px 500px at 100% 10%, rgba(165,111,99,0.08), transparent 55%);
}

img{max-width:100%;display:block;}
a{color:inherit;text-decoration:none;}
ul{list-style:none;}
button{font-family:inherit;cursor:pointer;}

.container{
  max-width:1500px;
  margin:0 auto;
  padding:0 32px;
}

h1,h2,h3,h4{
  font-family:var(--font-display),sans-serif;
  font-weight:600;
  letter-spacing:-0.02em;
  line-height:1.15;
}

.accent{ color:var(--accent-strong); }

.eyebrow{
  font-family:var(--font-mono);
  font-size:0.8125rem;
  color:var(--accent);
  letter-spacing:0.02em;
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:16px;
}
.eyebrow::before{
  content:"//";
  color:var(--text-tertiary);
}

:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:3px;
  border-radius:4px;
}

/* ============ NAV ============ */
header{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:100;
  display:flex;
  justify-content:center;
  padding-top:20px;
  transition:padding-top .3s var(--ease);
}
header.scrolled{padding-top:12px;}

.nav-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:40px;
  padding:12px 14px 12px 22px;
  background:rgba(18,19,25,0.72);
  border:1px solid var(--border);
  border-radius:999px;
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  transition:background .3s var(--ease), box-shadow .3s var(--ease);
}
header.scrolled .nav-inner{
  box-shadow:0 8px 30px rgba(0,0,0,0.35);
}

.nav-logo{
  font-family:var(--font-mono);
  font-size:0.9rem;
  font-weight:500;
  color:var(--text-primary);
  white-space:nowrap;
}
.nav-logo span{color:var(--accent);}

.nav-links{
  display:flex;
  gap:4px;
}
.nav-links a{
  font-size:0.875rem;
  color:var(--text-secondary);
  padding:8px 14px;
  border-radius:999px;
  transition:color .2s var(--ease), background .2s var(--ease);
}
.nav-links a:hover{color:var(--text-primary); background:var(--surface-hover);}

.nav-cta{
  font-size:0.8125rem;
  font-weight:500;
  padding:9px 18px;
  background:var(--text-primary);
  color:var(--bg);
  border-radius:999px;
  white-space:nowrap;
  transition:transform .2s var(--ease), opacity .2s var(--ease);
}
.nav-cta:hover{opacity:0.85;}

.nav-toggle{
  display:none;
  background:none;
  border:none;
  color:var(--text-primary);
  padding:6px;
}

@media (max-width:860px){
  .nav-links{display:none;}
  .nav-toggle{display:block;}
}

/* ============ HERO ============ */
.hero{
  position:relative;
  z-index:1;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding-top:120px;
  padding-bottom:80px;
}

.prompt-line{
  font-family:var(--font-mono);
  font-size:0.875rem;
  color:var(--text-secondary);
  display:flex;
  align-items:center;
  gap:2px;
  margin-bottom:20px;
}

/* blinking terminal-style cursor — HTML must use <span class="cursor"></span> */
.cursor {
  display: inline-block;
  vertical-align: middle;
  width: 8px;
  height: 1.4em;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  from, to { background-color: transparent; }
  50% { background-color: var(--accent-strong); }
}

.hero-grid{
  display:grid;
  grid-template-columns:1.3fr 1fr;
  gap:60px;
  align-items:center;
}

.hero-kicker{
  font-family:var(--font-mono);
  font-size:0.8125rem;
  color:var(--text-secondary);
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:28px;
}
.status-dot{
  width:7px;height:7px;border-radius:50%;
  background:#4ade80;
  box-shadow:0 0 0 3px rgba(74,222,128,0.15);
}

.hero h1{
  font-size:clamp(2.6rem, 5.5vw, 4.4rem);
  margin-bottom:20px;
}

.hero-role{
  font-family:var(--font-mono);
  font-size:1rem;
  color:var(--accent-strong);
  margin-bottom:24px;
}

.hero p.lead{
  font-size:1.0625rem;
  color:var(--text-secondary);
  max-width:52ch;
  margin-bottom:36px;
}

.hero-ctas{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}

.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:13px 24px;
  border-radius:10px;
  font-size:0.9375rem;
  font-weight:500;
  transition:transform .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.btn-primary{
  background:var(--text-primary);
  color:var(--bg);
}
.btn-primary:hover{transform:translateY(-2px);}
.btn-secondary{
  background:transparent;
  color:var(--text-primary);
  border:1px solid var(--border);
}
.btn-secondary:hover{border-color:var(--border-hover); transform:translateY(-2px);}

.hero-photo{
  position:relative;
  aspect-ratio:10/9;
  border-radius:var(--radius-lg);
  border:1px solid var(--border);
  overflow:hidden;
  background:
          linear-gradient(155deg, rgba(165,111,99,0.28), rgba(70,72,88,0.35) 55%, rgba(15,48,64,0.6));
  box-shadow:0 24px 60px rgba(0,0,0,0.4);
  margin-bottom:20px;
}
.hero-photo img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.hero-photo .photo-fallback{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  text-align:center;
  padding:24px;
}
.photo-fallback span{
  font-family:var(--font-mono);
  font-size:0.75rem;
  color:var(--text-tertiary);
  line-height:1.6;
}
.photo-fallback code{
  color:var(--text-secondary);
}

.hero-panel{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:26px;
  font-family:var(--font-mono);
  font-size:0.8125rem;
  box-shadow:0 20px 60px rgba(0,0,0,0.35);
}
.hero-panel .panel-dots{
  display:flex;
  gap:6px;
  margin-bottom:18px;
}
.panel-dots span{width:9px;height:9px;border-radius:50%;background:var(--border-hover);}
.hero-panel .line{
  color:var(--text-tertiary);
  margin-bottom:8px;
  white-space:pre-wrap;
}
.hero-panel .line .k{color:var(--accent-strong);}
.hero-panel .line .v{color:var(--text-primary);}
.hero-panel .line .s{color:var(--amber);}

/* ============ SECTION SHELL ============ */
section{
  position:relative;
  z-index:1;
  padding:120px 0;
  border-top:1px solid var(--border);
}
.section-head{
  max-width:640px;
  margin-bottom:56px;
}
.section-head h2{
  font-size:clamp(1.75rem, 3vw, 2.4rem);
  margin-bottom:14px;
}
.section-head p{
  color:var(--text-secondary);
  font-size:1.0625rem;
}

.reveal{
  opacity:0;
  transform:translateY(14px);
  transition:opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.visible{opacity:1; transform:translateY(0);}

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
  .reveal{opacity:1 !important; transform:none !important; transition:none !important;}
  /*.cursor{animation:none; opacity:1;}*/
  *{transition-duration:0.01ms; animation-duration:0.01ms;}
}

/* ============ ABOUT ============ */
.about-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:64px;
  align-items:start;
}
.about-text p{
  color:var(--text-secondary);
  margin-bottom:18px;
  font-size:1.03rem;
}
.about-text strong{color:var(--text-primary); font-weight:500;}

.stat-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:1px;
  background:var(--border);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  overflow:hidden;
}
.stat-card{
  background:var(--bg-elevated);
  padding:26px 22px;
}
.stat-num{
  font-family:var(--font-display);
  font-size:2.2rem;
  font-weight:600;
  color:var(--text-primary);
}
.stat-num span{color:var(--accent);}
.stat-label{
  font-size:0.8125rem;
  color:var(--text-tertiary);
  margin-top:6px;
  font-family:var(--font-mono);
}

/* ============ SKILLS ============ */
.skills-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:1px;
  background:var(--border);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  overflow:hidden;
}
.skill-card{
  background:var(--bg-elevated);
  padding:28px 24px;
}
.skill-card h3{
  font-size:0.9rem;
  font-family:var(--font-mono);
  font-weight:500;
  color:var(--text-tertiary);
  margin-bottom:18px;
  text-transform:uppercase;
  letter-spacing:0.04em;
}
.skill-card ul{
  display:flex;
  flex-direction:column;
  gap:11px;
}
.skill-card li{
  font-size:0.9375rem;
  color:var(--text-secondary);
  display:flex;
  align-items:center;
  gap:9px;
}
.skill-card li::before{
  content:"";
  width:5px;height:5px;
  border-radius:50%;
  background:var(--border-hover);
  flex-shrink:0;
}

@media (max-width:960px){
  .skills-grid{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:560px){
  .skills-grid{grid-template-columns:1fr;}
}

/* ============ PROJECTS ============ */
.projects-list{
  display:flex;
  flex-direction:column;
  gap:1px;
  background:var(--border);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  overflow:hidden;
}

/* Cards stack the media on top, full width, with the text below —
   instead of squeezing the screenshot into a 280px side column. */
.project-card{
  background:var(--bg-elevated);
  display:flex;
  flex-direction:column;
  transition:background .25s var(--ease);
}
.project-card:hover{background:var(--surface-hover);}

.project-thumb{
  aspect-ratio:16/9;
  border-radius:0;
  border:none;
  border-bottom:1px solid var(--border);
  background:
          linear-gradient(135deg, rgba(165,111,99,0.16), rgba(217,155,127,0.07));
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  overflow:hidden;
}
.project-thumb .thumb-label{
  font-family:var(--font-mono);
  font-size:0.75rem;
  color:var(--text-tertiary);
  z-index:1;
}

/* faint grid pattern shown on empty/placeholder thumbs */
.project-thumb::after{
  content:"";
  position:absolute;
  inset:0;
  background-image:
          linear-gradient(var(--border) 1px, transparent 1px),
          linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size:24px 24px;
  opacity:0.4;
}
/* once real media is present, hide the placeholder grid */
.project-thumb.has-media::after{ display:none; }

/* video thumbs keep the fixed 16:9 box (cropping a demo clip is fine);
   image thumbs (marked with .is-photo in the HTML) size themselves to
   the image's real aspect ratio so there's no cropping AND no gap */
.project-thumb.is-photo{
  aspect-ratio:auto;
}

.project-thumb img,
.project-thumb video{
  z-index:1;
}
/* images: normal flow, full width, natural height — no gaps, no cropping */
.project-thumb img{
  position:static;
  width:100%;
  height:auto;
  display:block;
}
/* video demos: fill the frame edge-to-edge (cropping is fine for motion) */
.project-thumb video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}

.project-thumb .media-fallback{
  position:absolute;
  inset:0;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  text-align:center;
}
.media-fallback span{
  font-family:var(--font-mono);
  font-size:0.75rem;
  color:var(--text-tertiary);
  line-height:1.6;
}
.media-fallback code{ color:var(--text-secondary); }

.thumb-sound{
  position:absolute;
  right:12px;
  bottom:12px;
  z-index:2;
  width:32px;
  height:32px;
  border-radius:50%;
  border:1px solid var(--border);
  background:rgba(15,48,64,0.72);
  backdrop-filter:blur(6px);
  color:var(--text-primary);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:0.875rem;
  transition:border-color .2s var(--ease), background .2s var(--ease);
}
.thumb-sound:hover{ border-color:var(--accent-border); background:rgba(15,48,64,0.9); }

.project-body{
  min-width:0;
  padding:32px 40px 40px;
}

.project-body h3{
  font-size:1.4rem;
  margin-bottom:12px;
}
.project-body p.desc{
  color:var(--text-secondary);
  font-size:0.9875rem;
  margin-bottom:16px;
  max-width:60ch;
}

/* Side-by-side variant: media on the left, text on the right */
.project-card--side {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  height: auto;
}

.project-card--side .project-thumb {
  flex: 0 0 60%;
  aspect-ratio: 4 / 3;
  border-bottom: none;
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.project-card--side .project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card--side .project-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem;
}

@media (max-width: 720px) {
  .project-card--side {
    flex-direction: column;
  }
  .project-card--side .project-thumb {
    flex: none;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

.project-meta{
  display:flex;
  flex-wrap:wrap;
  gap:20px;
  margin-bottom:20px;
}
.project-meta .meta-block h4{
  font-family:var(--font-mono);
  font-size:0.6875rem;
  text-transform:uppercase;
  letter-spacing:0.05em;
  color:var(--text-tertiary);
  font-weight:500;
  margin-bottom:8px;
}
.tag-row{display:flex; flex-wrap:wrap; gap:7px;}
.tag{
  font-size:0.75rem;
  font-family:var(--font-mono);
  color:var(--text-secondary);
  background:var(--surface);
  border:1px solid var(--border);
  padding:4px 10px;
  border-radius:6px;
}
.project-links{display:flex; gap:10px;}
.project-links a{
  font-size:0.8125rem;
  font-weight:500;
  padding:8px 16px;
  border-radius:8px;
  border:1px solid var(--border);
  color:var(--text-secondary);
  transition:border-color .2s var(--ease), color .2s var(--ease);
}
.project-links a:hover{border-color:var(--accent-border); color:var(--text-primary);}
.project-links a.primary{
  background:var(--accent-dim);
  border-color:var(--accent-border);
  color:var(--accent-strong);
}

@media (max-width:760px){
  .project-body{padding:24px;}
}

/* ============ TIMELINE ============ */
.timeline{
  position:relative;
  padding-left:28px;
  border-left:1px solid var(--border);
}
.timeline-item{
  position:relative;
  padding-bottom:44px;
}
.timeline-item:last-child{padding-bottom:0;}
.timeline-item::before{
  content:"";
  position:absolute;
  left:-33px;
  top:4px;
  width:9px;height:9px;
  border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 0 4px var(--bg), 0 0 0 5px var(--border);
}
.timeline-date{
  font-family:var(--font-mono);
  font-size:0.75rem;
  color:var(--text-tertiary);
  margin-bottom:6px;
}
.timeline-item h3{
  font-size:1.1rem;
  margin-bottom:6px;
}
.timeline-item p{
  color:var(--text-secondary);
  font-size:0.9375rem;
  max-width:60ch;
}

/* ============ CONTACT ============ */
.contact-wrap{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:64px;
}
.contact-links{display:flex; flex-direction:column; gap:2px;}
.contact-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 4px;
  border-bottom:1px solid var(--border);
  transition:padding-left .2s var(--ease), color .2s var(--ease);
}
.contact-link:first-child{border-top:1px solid var(--border);}
.contact-link:hover{padding-left:10px; color:var(--accent-strong);}
.contact-link .label{font-family:var(--font-mono); font-size:0.75rem; color:var(--text-tertiary);}
.contact-link .value{font-size:1rem; font-weight:500;}

/* "Follow me" buttons — scoped to a class instead of the bare `button`
   element, so this styling doesn't leak onto every other button on the
   page (nav-toggle, back-to-top, etc). Shared base + two color variants. */
.follow-btn{
  border:1px solid var(--border);
  padding:5px 14px;
  position:relative;
  height:2em;
  display:inline-flex;
  align-items:center;
  gap:8px;
  transition:0.5s;
  font-size:0.9rem;
  border-radius:0.4em;
  background:var(--surface);
  color:var(--accent-strong);
}
.follow-btn svg{ height:1em; width:auto; fill:currentColor; }
.follow-btn--linkedin:hover{ background:#0077b5; border-color:#0077b5; color:#fff; }
.follow-btn--github:hover{ background:#24292e; border-color:#24292e; color:#fff; }

#glow-text {
  font-weight: bold;
  cursor: pointer;
  transition: text-shadow 2s ease, color 2s ease;
}

#glow-text:hover {
  color: #fff;
  text-shadow:
          0 0 4px #00d2ff,
          0 0 10px #00d2ff,
          0 0 20px #00d2ff;
}

form.contact-form{display:flex; flex-direction:column; gap:16px;}
.field{display:flex; flex-direction:column; gap:8px;}
.field label{font-family:var(--font-mono); font-size:0.75rem; color:var(--text-tertiary);}
.field input, .field textarea{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:10px;
  padding:12px 14px;
  color:var(--text-primary);
  font-family:var(--font-body);
  font-size:0.9375rem;
  transition:border-color .2s var(--ease);
}
.field input:focus, .field textarea:focus{border-color:var(--accent-border); outline:none;}
.field textarea{resize:vertical; min-height:110px;}
.contact-form .btn{margin-top:4px; align-self:flex-start;}

@media (max-width:860px){
  .hero-grid, .about-grid, .contact-wrap{grid-template-columns:1fr;}
  .hero-panel{margin-top:20px;}
}

/* ============ FOOTER ============ */
footer{
  padding:40px 0;
  border-top:1px solid var(--border);
}
.footer-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:16px;
}
.footer-inner p{font-size:0.8125rem; color:var(--text-tertiary); font-family:var(--font-mono);}
.footer-links{display:flex; gap:20px;}
.footer-links a{font-size:0.8125rem; color:var(--text-tertiary); transition:color .2s var(--ease);}
.footer-links a:hover{color:var(--text-primary);}

::selection {
  background-color: rgb(217, 119, 87);
  color: #ffffff;
}

.back-to-top{
  position:fixed;
  right:28px;
  bottom:28px;
  z-index:90;
  width:50px;
  height:50px;
  border-radius:50%;
  background-color:var(--surface);
  border:1px solid var(--border);
  font-weight:600;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 4px 20px rgba(0,0,0,0.35), 0 0 0 4px var(--accent-dim);
  cursor:pointer;
  transition-duration:0.3s;
  overflow:hidden;
}
.back-to-top .svgIcon{
  width:12px;
  transition-duration:0.3s;
}
.back-to-top .svgIcon path{
  fill:var(--text-primary);
}
.back-to-top:hover{
  width:140px;
  border-radius:50px;
  transition-duration:0.3s;
  background-color:var(--accent);
  align-items:center;
}
.back-to-top:hover .svgIcon{
  transition-duration:0.3s;
  transform:translateY(-200%);
}
.back-to-top::before{
  position:absolute;
  bottom:-20px;
  content:"Back to Top";
  color:var(--text-primary);
  font-size:0px;
}
.back-to-top:hover::before{
  font-size:13px;
  opacity:1;
  bottom:unset;
  transition-duration:0.3s;
}