/* ===== Clean developer portfolio (navy / teal) ===== */
:root {
  --navy: #0a192f;
  --light-navy: #112240;
  --lightest-navy: #233554;
  --slate: #8892b0;
  --light-slate: #a8b2d1;
  --lightest-slate: #ccd6f6;
  --white: #e6f1ff;
  --green: #64ffda;
  --green-tint: rgba(100, 255, 218, 0.1);
  --border: #233554;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --nav-h: 80px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--navy);
  color: var(--slate);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--green);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--green);
}
ul {
  list-style: none;
}
img {
  max-width: 100%;
  display: block;
}

::selection {
  background: var(--green-tint);
}

::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: var(--navy);
}
::-webkit-scrollbar-thumb {
  background: var(--lightest-navy);
  border-radius: 6px;
}

/* ===== Side rails ===== */
.side {
  position: fixed;
  bottom: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  color: var(--light-slate);
}
.side-left {
  left: 40px;
}
.side-right {
  right: 40px;
}
.side ul {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.side a {
  color: var(--light-slate);
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}
.side a:hover {
  color: var(--green);
  transform: translateY(-3px);
}
.side-right a {
  writing-mode: vertical-rl;
  letter-spacing: 2px;
}
.side-line {
  width: 1px;
  height: 90px;
  background: var(--light-slate);
}

/* ===== Header / nav ===== */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 50px;
  background: rgba(10, 25, 47, 0.85);
  backdrop-filter: blur(10px);
  transition:
    box-shadow 0.3s,
    height 0.3s;
}
#header.scrolled {
  height: 66px;
  box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
}
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 2px solid var(--green);
  border-radius: 6px;
  color: var(--green);
  font-weight: 700;
  font-family: var(--font-mono);
  transition: background 0.2s;
}
.logo:hover {
  background: var(--green-tint);
}
#header nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
#header ol {
  display: flex;
  gap: 26px;
  counter-reset: item;
}
#header ol a {
  color: var(--lightest-slate);
  font-size: 13px;
  font-family: var(--font-mono);
}
#header ol a span {
  color: var(--green);
  margin-right: 5px;
}
#header ol a:hover {
  color: var(--green);
}
.btn {
  border: 1px solid var(--green);
  color: var(--green);
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-family: var(--font-mono);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover {
  background: var(--green-tint);
}

#menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
#menu-toggle span {
  width: 26px;
  height: 2px;
  background: var(--green);
  transition: 0.3s;
}
#menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
#menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
#menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* mobile menu */
#mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 75%;
  max-width: 340px;
  height: 100vh;
  background: var(--light-navy);
  box-shadow: -10px 0 30px -15px rgba(2, 12, 27, 0.7);
  z-index: 99;
  transform: translateX(105%);
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
#mobile-menu.open {
  transform: translateX(0);
}
#mobile-menu ol {
  display: flex;
  flex-direction: column;
  gap: 28px;
  text-align: center;
  margin-bottom: 40px;
  counter-reset: item;
}
#mobile-menu a {
  font-size: 16px;
  color: var(--lightest-slate);
}
#mobile-menu span {
  display: block;
  color: var(--green);
  font-size: 13px;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}
#mobile-menu nav {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== Layout ===== */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 100px;
}
.section {
  padding: 100px 0;
}
.section.narrow {
  max-width: 700px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: clamp(20px, 3vw, 26px);
  color: var(--lightest-slate);
  font-weight: 600;
  margin-bottom: 42px;
  white-space: nowrap;
}
.section-title .num {
  color: var(--green);
  font-size: 16px;
  font-family: var(--font-mono);
  font-weight: 400;
}
.section-title .rule {
  height: 1px;
  background: var(--lightest-navy);
  width: 100%;
  max-width: 300px;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero .tag {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 15px;
  margin-bottom: 24px;
}
.big {
  font-weight: 700;
  line-height: 1.08;
}
.hero .name {
  font-size: clamp(32px, 6vw, 56px);
  color: var(--lightest-slate);
}
.hero .sub {
  font-size: clamp(28px, 6vw, 52px);
  color: var(--slate);
  margin-top: 4px;
}
.hero-desc {
  max-width: 540px;
  margin: 24px 0 44px;
  color: var(--slate);
}
.big-btn {
  display: inline-block;
  padding: 16px 26px;
  font-size: 14px;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 50px;
}
.about-grid p {
  margin-bottom: 16px;
}
.hl {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 14px;
}
.tech-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 12px;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.tech-list li {
  position: relative;
  padding-left: 20px;
}
.tech-list li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--green);
}

.about-photo {
  position: relative;
  max-width: 300px;
}
.photo-frame {
  position: relative;
  border-radius: 6px;
  transition: transform 0.25s;
}
.photo-frame img {
  border-radius: 6px;
  filter: grayscale(100%) contrast(1.05);
  transition: filter 0.25s;
  position: relative;
  z-index: 2;
}
.photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--green);
  border-radius: 6px;
  transform: translate(16px, 16px);
  transition: transform 0.25s;
  z-index: 1;
}
.photo-frame:hover img {
  filter: none;
}
.photo-frame:hover {
  transform: translate(-4px, -4px);
}
.photo-frame:hover::after {
  transform: translate(12px, 12px);
}

/* ===== Experience ===== */
.jobs {
  display: flex;
  gap: 24px;
}
.tabs {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--lightest-navy);
  min-width: 150px;
}
.tab {
  background: none;
  border: none;
  color: var(--slate);
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: left;
  padding: 12px 20px;
  cursor: pointer;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: all 0.2s;
  white-space: nowrap;
}
.tab:hover {
  color: var(--green);
  background: var(--green-tint);
}
.tab.active {
  color: var(--green);
  border-left-color: var(--green);
  background: var(--green-tint);
}
.panel {
  display: none;
}
.panel.active {
  display: block;
  animation: fade 0.3s ease;
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.panel h4 {
  font-size: 20px;
  color: var(--lightest-slate);
  font-weight: 500;
}
.panel .at {
  color: var(--green);
}
.panel .range {
  color: var(--slate);
  font-size: 13px;
  font-family: var(--font-mono);
  margin: 4px 0 18px;
}
.bullets li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  font-size: 15px;
}
.bullets li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--green);
}

/* ===== Featured projects ===== */
.feature {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: center;
  margin-bottom: 110px;
}
.feature:last-of-type {
  margin-bottom: 0;
}

.feature-img {
  grid-column: 1 / 8;
  grid-row: 1 / -1;
  position: relative;
  border-radius: 6px;
}
.feature-img-link {
  display: block;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: var(--green);
}
.feature-img-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 25, 47, 0.5);
  mix-blend-mode: screen;
  transition: background 0.3s;
}
.feature-img-link:hover::after {
  background: transparent;
}
.feature-img img {
  border-radius: 6px;
  filter: grayscale(60%) contrast(1);
  transition: filter 0.3s;
  width: 100%;
}
.feature-img-link:hover img {
  filter: none;
}

.feature-text {
  grid-column: 7 / -1;
  grid-row: 1 / -1;
  text-align: right;
  position: relative;
  z-index: 3;
}
.feature-label {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 13px;
  margin-bottom: 10px;
}
.feature-title {
  font-size: clamp(20px, 2.5vw, 24px);
  color: var(--lightest-slate);
  margin-bottom: 22px;
}
.feature-title a {
  color: inherit;
}
.feature-title a:hover {
  color: var(--green);
}
.feature-desc {
  background: var(--light-navy);
  border-radius: 6px;
  padding: 24px;
  color: var(--light-slate);
  font-size: 15px;
  box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
}
.feature-tech {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  margin: 22px 0 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--light-slate);
}
.feature-links {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
}
.feature-links a {
  color: var(--lightest-slate);
  display: inline-flex;
}
.feature-links a:hover {
  color: var(--green);
  transform: translateY(-3px);
}

/* reversed layout */
.feature.reverse .feature-img {
  grid-column: 6 / -1;
}
.feature.reverse .feature-text {
  grid-column: 1 / 7;
  text-align: left;
}
.feature.reverse .feature-tech {
  justify-content: flex-start;
}
.feature.reverse .feature-links {
  justify-content: flex-start;
}

/* ===== Other noteworthy ===== */
.section.other {
  text-align: center;
}
.other-title {
  font-size: clamp(22px, 4vw, 28px);
  color: var(--lightest-slate);
  font-weight: 600;
}
.archive-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  margin: 12px 0 50px;
}
.archive-link:hover {
  text-decoration: underline;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  text-align: left;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--light-navy);
  border-radius: 6px;
  padding: 32px 28px;
  color: var(--light-slate);
  transition:
    transform 0.25s,
    box-shadow 0.25s;
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 30px -15px rgba(2, 12, 27, 0.7);
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
}
.folder {
  color: var(--green);
  display: inline-flex;
}
.card-links {
  display: flex;
  gap: 14px;
}
.card-links a {
  color: var(--light-slate);
  display: inline-flex;
}
.card-links a:hover {
  color: var(--green);
}
.card h4 {
  font-size: 18px;
  margin-bottom: 12px;
}
.card h4 a {
  color: var(--lightest-slate);
}
.card:hover h4 a {
  color: var(--green);
}
.card p {
  font-size: 15px;
  color: var(--slate);
  flex-grow: 1;
}
.card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  margin-top: 26px;
}
.card-tech li {
  font-size: 12px;
  color: var(--slate);
  font-family: var(--font-mono);
}

/* ===== Entrance animations ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.reveal {
  opacity: 0;
}
.reveal.in {
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero .reveal.in {
  animation-duration: 0.8s;
}
[data-delay="1"].in {
  animation-delay: 0.1s;
}
[data-delay="2"].in {
  animation-delay: 0.2s;
}
[data-delay="3"].in {
  animation-delay: 0.3s;
}
[data-delay="4"].in {
  animation-delay: 0.4s;
}
[data-delay="5"].in {
  animation-delay: 0.5s;
}
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.in {
    opacity: 1;
    animation: none;
  }
}

/* ===== Contact ===== */
.contact {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 120px 0;
}
.contact-num {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 14px;
  margin-bottom: 20px;
}
.contact-title {
  font-size: clamp(32px, 5vw, 46px);
  color: var(--lightest-slate);
  margin-bottom: 20px;
}
.contact-desc {
  color: var(--slate);
  margin-bottom: 40px;
}

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 26px;
  color: var(--light-slate);
  font-size: 12px;
  font-family: var(--font-mono);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  main {
    padding: 0 40px;
  }
  #header {
    padding: 0 30px;
  }
  #header ol,
  .resume-btn {
    display: none;
  }
  #menu-toggle {
    display: flex;
    z-index: 101;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-photo {
    justify-self: center;
    margin-top: 20px;
  }
  .side {
    display: none;
  }
  /* stack featured projects */
  .feature {
    display: block;
    margin-bottom: 70px;
    position: relative;
  }
  .feature-img,
  .feature.reverse .feature-img {
    grid-column: 1 / -1;
  }
  .feature-img-link::after {
    background: rgba(10, 25, 47, 0.7);
  }
  .feature-text,
  .feature.reverse .feature-text {
    grid-column: 1 / -1;
    text-align: left;
    padding: 26px 4px 0;
  }
  .feature-desc {
    background: transparent;
    box-shadow: none;
    padding: 0;
  }
  .feature-tech,
  .feature.reverse .feature-tech {
    justify-content: flex-start;
    margin-top: 16px;
  }
  .feature-links,
  .feature.reverse .feature-links {
    justify-content: flex-start;
  }
}
@media (max-width: 600px) {
  main {
    padding: 0 24px;
  }
  #header {
    padding: 0 20px;
  }
  .jobs {
    flex-direction: column;
  }
  .tabs {
    flex-direction: row;
    border-left: none;
    border-bottom: 2px solid var(--lightest-navy);
    overflow-x: auto;
    min-width: 0;
  }
  .tab {
    border-left: none;
    border-bottom: 2px solid transparent;
    margin-left: 0;
    margin-bottom: -2px;
  }
  .tab.active {
    border-left: none;
    border-bottom-color: var(--green);
  }
  .tech-list {
    grid-template-columns: 1fr;
  }
}
