/* ---------------------------------------
   Tokens
--------------------------------------- */
:root{
  --bg-dark: #0a0f14;
  --bg-dark-2: #0d1620;
  --bg-light: #f4f6f7;
  --surface: #ffffff;
  --text-dark-bg: #f2f4f5;
  --text-dark-bg-muted: #9aa5ab;
  --text-light-bg: #10161a;
  --text-light-bg-muted: #5b6870;
  --accent: #34d399;
  --accent-strong: #22c58e;
  --border-dark: #1e2830;
  --border-light: #e4e8ea;
  --radius-s: 6px;
  --radius-m: 10px;
  --max-width: 1160px;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg-light);
  color: var(--text-light-bg);
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3{ margin: 0; line-height: 1.15; }
p{ margin: 0; }
a{ color: inherit; text-decoration: none; }
ul{ list-style: none; margin: 0; padding: 0; }
button{ font: inherit; cursor: pointer; }

.section-inner{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

.back-to-top {
    position: fixed;
    right: 32px;
    bottom: 32px;

    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #0b1418;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;

    color: #35d39b;
    cursor: pointer;

    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease,
        transform 0.3s ease,
        background 0.2s ease,
        border-color 0.2s ease;
    
    z-index: 1000;
}

.back-to-top svg {
    width: 20px;
    height: 20px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;

    transition: transform 0.25s ease;
}

/* Visible state */
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Hover */
.back-to-top:hover {
    background: #10231f;
    border-color: #35d39b;
}

.back-to-top:hover svg {
    transform: translateY(-3px);
}

/* Click feedback */
.back-to-top:active {
    transform: translateY(1px);
}

/* Keyboard accessibility */
.back-to-top:focus-visible {
    outline: 2px solid #35d39b;
    outline-offset: 3px;
}


/* ---------------------------------------
   Header
--------------------------------------- */
.site-header{
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border-dark);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text-dark-bg);
}

.logo-mark{
  color: var(--accent);
  font-weight: 700;
  font-size: 1.05rem;
}

.logo-name{
  font-size: 1.02rem;
}

.main-nav{
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-link{
  font-size: 0.92rem;
  color: var(--text-dark-bg-muted);
  padding-bottom: 6px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease;
}

.nav-link:hover{ color: var(--text-dark-bg); }

.nav-link.is-active{
  color: var(--text-dark-bg);
  border-bottom-color: var(--accent);
}

.header-actions{
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-toggle{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
}

.nav-toggle span{
  width: 22px;
  height: 2px;
  background: var(--text-dark-bg);
  border-radius: 2px;
}

/* ---------------------------------------
   Hero
--------------------------------------- */
.hero{
  background: radial-gradient(ellipse at 78% 45%, #123328 0%, var(--bg-dark) 55%);
  color: var(--text-dark-bg);
}

.hero-inner{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 96px 32px 100px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow{
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.hero-title{
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

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

.hero-subtitle{
  margin-top: 22px;
  max-width: 46ch;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-dark-bg-muted);
}

.hero-actions{
  display: flex;
  gap: 14px;
  margin-top: 34px;
}

.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-s);
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover{ transform: translateY(-1px); }

.btn-primary{
  background: var(--accent);
  color: #07231a;
}

.btn-primary:hover{ background: var(--accent-strong); }

.btn-outline{
  background: transparent;
  border-color: var(--border-dark);
  color: var(--text-dark-bg);
}

.btn-outline:hover{ border-color: var(--text-dark-bg-muted); }

.hero-social{
  display: flex;
  gap: 12px;
  margin-top: 34px;
}

.social-link{
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-s);
  background: var(--bg-dark-2);
  color: var(--text-dark-bg);
  border: 1px solid var(--border-dark);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.social-link:hover{
  background: var(--accent);
  color: #07231a;
  border-color: var(--accent);
}

.hero-image-frame{
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--border-dark);
  background: linear-gradient(160deg, #0f2a22, #081015 70%);
  aspect-ratio: 4 / 3.1;
}

.hero-image-placeholder{
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text-dark-bg-muted);
  font-size: 0.85rem;
}

.hero-image{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------------------------------------
   Projects
--------------------------------------- */
.projects{
  padding: 88px 0;
}
 
.section-heading{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 24px;
}
 
.section-heading h2{
  font-size: 1.7rem;
  font-weight: 700;
}
 
.link-arrow{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-strong);
  white-space: nowrap;
}
 
.project-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
 
.project-card{
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-m);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
 
.project-thumb{
  aspect-ratio: 16 / 11;
  background: linear-gradient(150deg, #17222b, #0a1015);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5c6b74;
  font-size: 0.82rem;
  overflow: hidden;
  width: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  position: relative;
}
 
.project-thumb img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
 
.project-thumb:hover img{
  transform: scale(1.04);
}
 
.status-badge{
  --status-color: #f5a524;
  --status-color-text: #2b1400;
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--status-color-text);
  background: var(--status-color);
  padding: 5px 12px;
  border-radius: 999px;
  line-height: 1;
}
 
.status-badge::before{
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
 
.project-thumb .status-badge{
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
}
 
.project-card[data-status="wip"] .status-badge{
  display: inline-flex;
}
 
.status-badge.is-visible{
  display: inline-flex;
}
 
.project-card[data-status="wip"] .project-thumb img{
  filter: saturate(0.7) brightness(0.8);
}
 
.modal-heading{
  display: flex;
  align-items: center;
  gap: 12px;
}
 
.project-body{
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
 
.project-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
}
 
.project-category{
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 600;
}
 
.project-link{
  color: var(--text-light-bg);
  display: flex;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s ease;
}
 
.project-link:hover{
  color: var(--accent-strong);
}
 
.project-title{
  font-size: 1.15rem;
  font-weight: 700;
}
 
.project-desc{
  color: var(--text-light-bg-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}
 
.project-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 6px;
}
 
.project-tags li{
  font-size: 0.8rem;
  color: var(--text-light-bg-muted);
  position: relative;
  padding-left: 16px;
}
 
.project-tags li::before{
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
 
/* ---------------------------------------
   Project modal
--------------------------------------- */
.modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 14, 0.75);
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
  display: none;
}
 
.modal-overlay.is-open{
  display: flex;
}
 
.modal{
  background: var(--surface);
  color: var(--text-light-bg);
  width: 100%;
  max-width: 640px;
  max-height: min(88vh, 720px);
  border-radius: var(--radius-m);
  overflow-y: auto;
  position: relative;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5);
}
 
.modal-close{
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  color: var(--text-light-bg);
  cursor: pointer;
  z-index: 1;
  transition: background 0.15s ease, color 0.15s ease;
}
 
.modal-close:hover{
  background: var(--bg-light);
}
 
.modal-media{
  aspect-ratio: 16 / 9;
  background: linear-gradient(150deg, #17222b, #0a1015);
  overflow: hidden;
}
 
.modal-media img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
 
.modal-body{
  padding: 28px 30px 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
 
.modal-category{
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 600;
}
 
.modal-title{
  font-size: 1.4rem;
  font-weight: 700;
}
 
.modal-desc{
  color: var(--text-light-bg-muted);
  font-size: 0.96rem;
  line-height: 1.65;
  margin-top: 2px;
}
 
.modal-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 4px 0 10px;
}
 
.modal-tags li{
  font-size: 0.8rem;
  color: var(--text-light-bg-muted);
  position: relative;
  padding-left: 16px;
}
 
.modal-tags li::before{
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
 
.modal-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
 
.is-hidden{
  display: none !important;
}


/* ---------------------------------------
   About 
--------------------------------------- */
.about{
  background: var(--bg-dark);
  color: var(--text-dark-bg);
  padding: 96px 0;
  border-top: none;
}
 
.about-inner{
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: center;
}

.about-copy{
  flex: 1 1 420px;
  min-width: 0;
}
 
.about-copy h2{
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  font-weight: 800;
  position: relative;
  padding-bottom: 18px;
  margin-bottom: 28px;
}
 
.about-copy h2::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
 
.about-quote{
  margin: 0 0 28px;
  padding-left: 20px;
  border-left: 2px solid var(--border-dark);
  position: relative;
}
 
.quote-mark{
  position: absolute;
  left: -14px;
  top: -18px;
  font-size: 2.6rem;
  color: var(--accent);
  font-weight: 700;
  line-height: 1;
}
 
.about-quote p{
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.55;
  color: var(--text-dark-bg);
}
 
.about-quote cite{
  display: block;
  margin-top: 14px;
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--accent);
}
 
.about-text{
  color: var(--text-dark-bg-muted);
  line-height: 1.7;
  font-size: 0.98rem;
  margin-bottom: 20px;
  max-width: 54ch;
}
 
.about-highlights{
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 28px;
  margin: 32px 0 36px;
}
 
.about-highlights li{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  color: var(--accent);
}
 
.about-highlights span{
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-dark-bg-muted);
  max-width: 9ch;
}
 
.cv-download{
  margin-top: 4px;
}
 
.about-media{
  flex: 1 1 320px;
  max-width: 420px;
  display: flex;

}
 
.about-image-frame{
  width: 100%;
  aspect-ratio: 3.4 / 4;
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.55);
}

.about-photo{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------------------------------------
   Skills
--------------------------------------- */
 
.skills{
  padding: 84px 0;
  border-top: 1px solid var(--border-light);
}
 
.skills h2{
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 36px;
}
 
.skills-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
 
.skill-card{
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-m);
  padding: 26px 26px 28px;
}
 
.skill-card h3{
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}
 
.skill-card h3::before{
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 34px;
  height: 2px;
  background: var(--accent);
}
 
.skill-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
 
.skill-tags li{
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-light-bg);
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 6px 14px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
 
.skill-tags li:hover{
  border-color: var(--accent);
  color: var(--accent-strong);
}
 
.contact{
  background: var(--bg-dark);
  color: var(--text-dark-bg);
  padding: 80px 0;
}

 
.contact-inner{
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
 
.contact p{
  color: var(--text-dark-bg-muted);
  max-width: 46ch;
  line-height: 1.6;
  margin-bottom: 8px;
}


/* ---------------------------------------
   Footer
--------------------------------------- */
.site-footer{
  background: var(--bg-dark);
  border-top: 1px solid var(--border-dark);
}
 
.footer-inner{
  padding: 22px 32px;
  color: var(--text-dark-bg-muted);
  font-size: 0.82rem;
}


/* ---------------------------------------
   Responsive
--------------------------------------- */
@media (max-width: 900px){
  .hero-inner{
    grid-template-columns: 1fr;
    padding-top: 56px;
  }
  .hero-media{ order: -1; }
  .project-grid{ grid-template-columns: 1fr; }
  .about-media{ order: -1; flex-basis: 100%; max-width: 360px; margin: 0 auto; }
  .about-copy{ flex-basis: 100%; }
}

@media (max-width: 520px){
  .about-highlights{ grid-template-columns: repeat(2, auto); row-gap: 24px; }
}

@media (max-width: 760px){
  .main-nav{
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-dark);
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 32px 24px;
    gap: 16px;
    display: none;
  }
  .main-nav.is-open{ display: flex; }
  .nav-toggle{ display: flex; }
  .hero-actions{ flex-direction: column; align-items: flex-start; }
  .btn{ width: 100%; justify-content: center; }
  .section-heading{ flex-direction: column; align-items: flex-start; gap: 10px; }

  .back-to-top {
        right: 20px;
        bottom: 20px;

        width: 44px;
        height: 44px;
    }
}

body.modal-open{
  overflow: hidden;
}

.modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 14, 0.75);
  z-index: 1000;
  display: none;      /* hidden by default */
}
.modal-overlay.is-open{
  display: flex;       /* shown when open */
}

/* ---------------------------------------
   Reduced motion
--------------------------------------- */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .btn{ transition: none; }
}

/* Focus visibility */
a:focus-visible, button:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
