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

:root {
  --bg: #0e0e0e;
  --card: #181818;
  --card2: #1e1e1e;
  --border: #2a2a2a;
  --lemon: #7acb00;
  --text: #f0ede8;
  --muted: #888;
  --green: #22c55e;
}

body.light {
  --bg: #f7f7f5;
  --card: #ffffff;
  --card2: #f1f1ef;
  --border: #e4e4e1;
  --text: #1a1a1a;
  --muted: #6f6f6f;
  --lemon: #5cc400;
  --green: #16a34a;
}

html,
body {
  overflow-x: hidden
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh
}

a {
  color: inherit;
  text-decoration: none
}

a:hover {
  color: inherit
}

/* ── LAYOUT ── */
.site-wrap {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 1.2rem 1rem 3rem
}

.bento {
  display: flex;
  flex-direction: column;
  gap: 0.85rem
}

.page-view {
  display: none;
  flex-direction: column;
  gap: 0.85rem
}

.page-view.active {
  display: flex
}

/* ── CARD ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.2rem;
  color: var(--text)
}

.card:hover {
  border-color: #3a3a3a
}

/* ── NAV ── */
.portfolio-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
  margin-bottom: 0.85rem
}

.nav-icons,
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.4rem
}

.nav-icon,
.nav-theme {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0
}

.nav-icon:hover,
.nav-icon.active,
.nav-theme:hover {
  color: var(--text);
  border-color: var(--lemon)
}

.hire-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  white-space: nowrap
}

.hire-btn:hover {
  color: var(--lemon);
  border-color: var(--lemon)
}

/* ── HERO ── */
.hero-card {
  position: relative;
  overflow: hidden;
  padding: 2rem 1.5rem;
  background: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px), radial-gradient(circle at 75% 40%, rgba(122, 219, 0, 0.12), transparent 35%), var(--card);
  background-size: 48px 48px, 48px 48px, auto, auto
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at left center, transparent 0%, rgba(11, 11, 11, 0.4) 65%);
  pointer-events: none
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem
}

.hero-left {
  flex: 1;
  min-width: 0
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem
}

.hero-dot,
.card-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0
}

.hero-role {
  font-size: 0.8rem;
  color: var(--muted)
}

.avail-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  padding: 0.25rem 0.7rem;
  border-radius: 30px;
  font-size: 0.68rem;
  color: var(--green);
  text-transform: uppercase
}

.avail-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green)
}

.hero-name {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 0.7rem
}

.hero-name span {
  color: var(--lemon)
}

.hero-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.2rem
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem
}

.btn-sm-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.83rem;
  font-family: 'DM Sans', sans-serif;
  transition: 0.2s ease
}

.btn-dark-custom {
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--text)
}

.btn-dark-custom:hover {
  color: var(--lemon);
  border-color: var(--lemon)
}

.btn-green-custom {
  background: var(--lemon);
  border: 1px solid var(--lemon);
  color: #fff
}

.btn-green-custom:hover {
  opacity: 0.9;
  color: #fff
}

.avatar-ring {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--card2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--lemon);
  flex-shrink: 0
}

/* ── CARD HEADER ── */
.card-header-custom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem
}

.card-title-custom {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 500
}

.view-all {
  font-size: 0.78rem;
  color: var(--muted)
}

.view-all:hover {
  color: var(--lemon)
}

/* ── PROJECT ITEMS ── */
.project-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem;
  border-radius: 10px;
  background: var(--card2);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  margin-bottom: 0.6rem
}

.project-item:last-child {
  margin-bottom: 0
}

.project-item:hover {
  border-color: var(--lemon)
}

.proj-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #111;
  border: 1px solid var(--border);
  color: var(--lemon);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.72rem;
  flex-shrink: 0
}

.proj-info {
  flex: 1;
  min-width: 0
}

.proj-name {
  font-size: 0.88rem;
  font-weight: 500
}

.proj-desc {
  font-size: 0.76rem;
  color: var(--muted);
  overflow-wrap: anywhere
}

.proj-arrow {
  color: var(--muted);
  font-size: 1.2rem;
  flex-shrink: 0
}

/* ── SKILLS ── */
.skills-group {
  margin-bottom: 0.85rem
}

.skills-group:last-child {
  margin-bottom: 0
}

.skills-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lemon);
  margin-bottom: 0.4rem
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem
}

.chip {
  background: var(--card2);
  border: 1px solid var(--border);
  padding: 0.27rem 0.65rem;
  border-radius: 6px;
  font-size: 0.74rem;
  color: var(--muted)
}

/* ── STATS ── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem
}

.stat-item {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem
}

.stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--lemon)
}

.stat-lbl {
  font-size: 0.72rem;
  color: var(--muted)
}

/* ── ABOUT ── */
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem
}

.about-text p {
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 0.75rem
}

.about-text strong {
  color: var(--text)
}

.tl-item {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
  position: relative
}

.tl-item::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 18px;
  width: 1px;
  height: calc(100% + 4px);
  background: var(--border)
}

.tl-item:last-child::before {
  display: none
}

.tl-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--lemon);
  background: var(--card);
  flex-shrink: 0;
  margin-top: 3px;
  position: relative;
  z-index: 1
}

.tl-text h5 {
  font-size: 0.87rem;
  margin-bottom: 0.15rem
}

.tl-text p {
  font-size: 0.76rem;
  color: var(--muted)
}

/* ── CONTACT ── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem
}

.fgroup {
  display: flex;
  flex-direction: column;
  gap: 0.3rem
}

.fgroup label {
  font-size: 0.73rem;
  color: var(--muted)
}

.fgroup input,
.fgroup textarea {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  outline: none;
  width: 100%
}

.fgroup input:focus,
.fgroup textarea:focus {
  border-color: var(--lemon)
}

.fgroup textarea {
  min-height: 100px;
  resize: vertical
}

.send-btn {
  background: var(--lemon);
  color: #fff;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  width: 100%
}

.contact-info h4 {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem
}

.contact-info h4 span {
  color: var(--lemon)
}

.contact-info>p {
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.2rem
}

.socials {
  display: flex;
  flex-direction: column;
  gap: 0.5rem
}

.social-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.85rem
}

.social-item:hover {
  color: var(--lemon);
  border-color: var(--lemon)
}

/* ── FOOTER ── */
.footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem
}

.footer-text {
  font-size: 0.78rem;
  color: var(--muted)
}

.footer-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800
}

.footer-logo span {
  color: var(--lemon)
}

/* ── CASE STUDY ── */
.proj-tabs {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.3rem;
  -webkit-overflow-scrolling: touch
}

.proj-tabs::-webkit-scrollbar {
  height: 0
}

.proj-tab {
  padding: 0.42rem 0.9rem;
  border-radius: 8px;
  font-size: 0.78rem;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--card2);
  color: var(--muted);
  white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
  flex-shrink: 0
}

.proj-tab.active {
  background: var(--lemon);
  border-color: var(--lemon);
  color: #fff
}

.proj-tab:hover:not(.active) {
  border-color: #3a3a3a;
  color: var(--text)
}

.meta-table {
  width: 100%;
  border-collapse: collapse
}

.meta-table tr {
  border-bottom: 1px solid var(--border)
}

.meta-table tr:last-child {
  border-bottom: none
}

.meta-table td {
  padding: 0.65rem 0;
  font-size: 0.85rem;
  vertical-align: top
}

.meta-table td:first-child {
  color: var(--muted);
  width: 110px;
  padding-top: 0.75rem
}

.meta-tag {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 0.7rem;
  color: var(--muted);
  margin-right: 0.3rem;
  margin-bottom: 0.25rem
}

.cs-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  font-weight: 800;
  font-size: 0.9rem
}

.cs-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.6rem, 5vw, 2rem);
  font-weight: 800;
  margin-bottom: 0.9rem;
  letter-spacing: -0.02em
}

.cs-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1.5rem
}

.visit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--text);
  color: var(--bg);
  padding: 0.65rem 1.3rem;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif
}

.visit-btn:hover {
  opacity: 0.85;
  color: var(--bg)
}

.preview-box {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1.2rem;
  gap: 1rem
}

.mock-window {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5)
}

.mock-bar {
  height: 24px;
  background: #1a1a1a;
  border-bottom: 1px solid #2a2a2a;
  display: flex;
  align-items: center;
  padding: 0 0.7rem;
  gap: 0.35rem
}

.mock-dot-w {
  width: 7px;
  height: 7px;
  border-radius: 50%
}

.mock-content {
  padding: 0.8rem
}

.mock-line {
  height: 7px;
  border-radius: 3px;
  background: #2a2a2a;
  margin-bottom: 0.45rem
}

.detail-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lemon);
  margin-bottom: 0.75rem
}

.detail-inner {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem
}

.detail-inner p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.8
}

.detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem
}

.detail-list li {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  gap: 0.45rem;
  line-height: 1.6
}

.detail-list li::before {
  content: '→';
  color: var(--lemon);
  flex-shrink: 0;
  font-size: 0.78rem;
  margin-top: 2px
}

.outcome-box {
  background: linear-gradient(135deg, rgba(122, 203, 0, 0.07), rgba(122, 203, 0, 0.02));
  border: 1px solid rgba(122, 203, 0, 0.2);
  border-radius: 8px;
  padding: 1.1rem 1.3rem
}

.outcome-box p {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.8
}

.proj-nav-item {
  display: block;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1.1rem
}

.proj-nav-item:hover {
  border-color: var(--lemon);
  color: inherit
}

.pni-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.25rem
}

.pni-name {
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 700
}

.proj-nav-dead {
  opacity: 0.35;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1.1rem
}

.project-view {
  display: none
}

.project-view.active {
  display: flex;
  flex-direction: column;
  gap: 0.85rem
}

/* ── SKILLS+STATS ROW ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem
}

/* ── CONTACT ROW ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start
}

/* ═══════════════════════
   MOBILE  ≤ 767px
═══════════════════════ */
@media(max-width:767px) {
  .site-wrap {
    padding: 0 0 2rem
  }

  .portfolio-nav {
    border-radius: 0;
    margin-bottom: 0;
    border-left: none;
    border-right: none;
    border-top: none
  }

  .card {
    border-radius: 0;
    border-left: none;
    border-right: none
  }

  .bento,
  .page-view.active {
    gap: 0.6rem
  }

  /* hero */
  .hero-card {
    padding: 1.4rem 1rem
  }

  .hero-inner {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 1rem
  }

  .avatar-ring {
    width: 70px;
    height: 70px;
    font-size: 1.4rem;
    align-self: flex-end;
    position: absolute;
    top: 1.2rem;
    right: 1rem
  }

  .hero-name {
    font-size: 1.9rem
  }

  .hero-desc {
    font-size: 0.85rem
  }

  .hero-actions {
    flex-direction: column;
    width: 100%
  }

  .hero-actions a,
  .hero-actions .btn-sm-custom {
    width: 100%;
    justify-content: center
  }

  /* about */
  .about-inner {
    grid-template-columns: 1fr;
    gap: 1.2rem
  }

  /* skills+stats */
  .two-col {
    grid-template-columns: 1fr
  }

  /* contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1rem
  }

  .contact-order-1 {
    order: 1
  }

  .contact-order-2 {
    order: 2
  }

  /* form */
  .form-row-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem
  }

  /* case study */
  .meta-table td:first-child {
    width: 90px
  }

  .cs-title {
    font-size: 1.5rem
  }

  .detail-grid {
    display: flex;
    flex-direction: column;
    gap: 0.7rem
  }

  .proj-nav-row {
    display: flex;
    flex-direction: column;
    gap: 0.6rem
  }

  /* footer */
  .footer-bar {
    flex-direction: column;
    gap: 0.4rem;
    text-align: center;
    padding: 1rem
  }
}

/* ── TABLET 768–991 ── */
@media(min-width:768px) and (max-width:991px) {
  .site-wrap {
    padding: 1rem 1.2rem 2rem
  }

  .two-col {
    grid-template-columns: 1fr 1fr
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr
  }

  .detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem
  }

  .proj-nav-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem
  }

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

  .hero-inner {
    flex-direction: row
  }
}

/* ── DESKTOP ≥ 992 ── */
@media(min-width:992px) {
  .site-wrap {
    padding: 1.5rem 1rem 3rem
  }

  .two-col {
    grid-template-columns: 1fr 1fr
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr
  }

  .detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem
  }

  .proj-nav-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem
  }

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

  .hero-inner {
    flex-direction: row
  }

  .avatar-ring {
    width: 110px;
    height: 110px;
    font-size: 2rem
  }
}