/* ========================================
   THEME
======================================== */

:root {
  --bg: #141414;
  --bg-alt: #e7ad3c;
  --card: #202020;
  --surface-soft: #252525;
  --surface-muted: #2b2924;
  --surface-input: #171717;

  --text: #f5f3ed;
  --text-muted: #aaa69c;
  --text-subtle: #5f5e5e;
  --text-black: #141414;

  --accent: #e7ad3c;
  --accent-dark: #c78b1e;
  --accent-soft: #352a15;

  --border: #343434;
  --border-hover: #4a4741;

  --header-bg: rgba(20, 20, 20, 0.92);
  --hint-bg: rgba(231, 173, 60, 0.94);

  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.22);
  --shadow-card: 0 18px 45px rgba(0, 0, 0, 0.32);
}

/* ========================================
   RESET
======================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  background: var(--bg);
  color: var(--text);

  line-height: 1.6;
}

img {
  max-width: 100%;
}

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

h1,
h2,
h3,
.logo {
  font-family:
    "Space Grotesk",
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}


/* ========================================
   LAYOUT
======================================== */

.container {
  width: min(1140px, 90%);
  margin: 0 auto;
}

.narrow {
  max-width: 780px;
}

.section {
  padding: 110px 0;
  scroll-margin-top: 80px;
}

.section-alt {
  background: var(--bg-alt);
}


/* ========================================
   HEADER
======================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: var(--header-bg);

  border-bottom: 1px solid var(--border);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav {
  min-height: 72px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
}

nav {
  display: flex;
  align-items: center;

  gap: 30px;
}

nav a {
  color: var(--text-muted);

  font-size: 0.95rem;
  font-weight: 500;

  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--accent);
}


/* ========================================
   HERO
======================================== */

.hero {
  min-height: 82vh;

  display: flex;
  align-items: center;

  padding: 100px 0;
}

.hero-content {
  max-width: 920px;
}

.eyebrow,
.section-label,
.project-type {
  text-transform: uppercase;

  letter-spacing: 0.14em;

  font-size: 0.76rem;
  font-weight: 750;

  color: var(--accent);
}

.hero h1 {
  margin-top: 12px;

  font-size: clamp(3.5rem, 9vw, 7.5rem);

  line-height: 0.95;

  letter-spacing: -0.06em;
}

.hero h2 {
  max-width: 850px;

  margin-top: 30px;

  font-size: clamp(1.35rem, 3vw, 2.25rem);

  line-height: 1.25;

  font-weight: 500;

  color: var(--text-muted);
}

.hero-description {
  max-width: 680px;

  margin-top: 26px;

  color: var(--text-muted);

  font-size: 1.08rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;

  gap: 14px;

  margin-top: 36px;
}


/* ========================================
   BUTTONS
======================================== */

.button {
  display: inline-block;

  padding: 13px 22px;

  border-radius: 7px;

  font-weight: 650;

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--accent);
  color: #141414;
}

.button.primary:hover {
  background: var(--accent-dark);
}

.button.secondary {
  border: 1px solid var(--border-hover);

  background: transparent;
  color: var(--text);
}

.button.secondary:hover {
  background: var(--surface-soft);
  border-color: var(--accent);
}

.button.secondary-connect {
  border: 1px solid var(--border-hover);

  background: transparent;
  color: var(--text);
}

.button.secondary-connect:hover {
  background: var(--surface-soft);
  border-color: var(--accent);
  color: var(--accent);
}


/* ========================================
   SECTION TEXT
======================================== */

.section h2 {
  margin-top: 10px;

  font-size: clamp(2.2rem, 5vw, 3.7rem);

  line-height: 1.08;

  letter-spacing: -0.045em;
}

.section-intro {
  max-width: 760px;

  margin-top: 22px;
  margin-bottom: 50px;

  color: var(--text-black);

  font-size: 1.05rem;
}

.section-intro-tools {
  max-width: 760px;

  margin-top: 22px;
  margin-bottom: 50px;

  color: var(--text);

  font-size: 1.05rem;
}

.narrow > p:not(.section-label) {
  margin-top: 22px;

  color: var(--text);

  font-size: 1.05rem;
}


/* ========================================
   FEATURED PROJECT GRID
======================================== */

.live-site-note {
  max-width: 760px;
  margin-top: -28px;
  margin-bottom: 42px;
  padding-left: 14px;
  border-left: 3px solid var(--accent-soft);
  color: var(--text-subtle);
  font-size: 0.9rem;
}

.project-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 26px;
}

.project-card {
  display: flex;
  flex-direction: column;

  overflow: hidden;

  background: var(--card);

  border: 1px solid var(--border);
  border-radius: 14px;

  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.project-card:hover {
  transform: translateY(-5px);

  border-color: var(--border-hover);

  box-shadow: var(--shadow-card);
}


/* ========================================
   FAKE BROWSER
======================================== */

.project-image-link {
  display: block;
}

.project-browser {
  background: var(--card);
}

.browser-bar {
  height: 38px;

  display: flex;
  align-items: center;

  gap: 6px;

  padding: 0 12px;

  background: var(--surface-soft);

  border-bottom: 1px solid var(--border);
}

.browser-bar > span {
  width: 9px;
  height: 9px;

  flex-shrink: 0;

  border-radius: 50%;

  background: var(--text-subtle);
}

.browser-address {
  flex: 1;

  max-width: 270px;

  margin-left: 8px;

  padding: 4px 11px;

  overflow: hidden;

  background: var(--surface-input);

  border: 1px solid var(--border);
  border-radius: 5px;

  color: var(--text-subtle);

  font-size: 0.7rem;

  white-space: nowrap;
  text-overflow: ellipsis;
}


/* ========================================
   SCROLLING PROJECT PREVIEW
======================================== */

.project-preview {
  position: relative;

  height: 275px;

  overflow: hidden;

  background: var(--surface-input);
}

.project-preview-image {
  width: 100%;
  display: block;
  transform: translateY(0);
  transition:
    transform 7s cubic-bezier(0.25, 0.1, 0.25, 1);
  background-color: #e3e1e1;
}

.project-card:hover .project-preview-image {
  transform: translateY(calc(-100% + 275px));
}


/* ========================================
   HOVER LABEL
======================================== */

.preview-hint {
  position: absolute;

  right: 14px;
  bottom: 14px;

  padding: 6px 10px;

  background: var(--hint-bg);

  border-radius: 100px;

  color: #141414;

  font-size: 0.72rem;
  font-weight: 600;

  pointer-events: none;

  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.project-card:hover .preview-hint,
.contribution-card:hover .preview-hint {
  opacity: 0;
  transform: translateY(5px);
}


/* ========================================
   PROJECT CONTENT
======================================== */

.project-content {
  display: flex;
  flex-direction: column;

  flex: 1;

  padding: 30px;
}

.project-content h3 {
  margin-top: 8px;

  font-size: 1.85rem;

  letter-spacing: -0.025em;
}

.project-content > p:not(.project-type) {
  margin-top: 15px;

  color: var(--text-muted);
}

.contribution {
  margin-top: 18px !important;

  font-size: 0.94rem;

  color: var(--text-muted) !important;
}

.contribution strong {
  color: var(--text);
}


/* ========================================
   TAGS
======================================== */

.tags {
  display: flex;
  flex-wrap: wrap;

  gap: 8px;

  margin-top: 24px;
}

.tags span {
  padding: 6px 11px;

  background: var(--surface-muted);

  border-radius: 100px;

  color: var(--text-muted);

  font-size: 0.79rem;
}


/* ========================================
   PROJECT LINK
======================================== */

.project-link {
  display: inline-block;

  align-self: flex-start;

  margin-top: auto;
  padding-top: 28px;

  font-weight: 650;
}

.project-link {
  color: var(--accent);
}

.project-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}


/* ========================================
   OTHER WORK
======================================== */

.other-work {
  margin-top: 95px;
}

.other-work h3 {
  margin-top: 8px;

  font-size: clamp(1.8rem, 4vw, 2.4rem);

  letter-spacing: -0.035em;
}

.small-description {
  max-width: 700px;

  margin-top: 12px;

  color: var(--text-black);
}


/* ========================================
   MINI PROJECTS
======================================== */

.mini-project-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 18px;

  margin-top: 30px;
}

.mini-project-card {
  overflow: hidden;

  background: var(--card);

  border: 1px solid var(--border);
  border-radius: 12px;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.mini-project-card:hover {
  transform: translateY(-4px);

  box-shadow: var(--shadow-soft);
}

.mini-project-image {
  width: 100%;
  height: 170px;

  display: block;

  object-fit: cover;
  object-position: top;

  border-bottom: 1px solid var(--border);

  transition: transform 0.3s ease;
}

.mini-project-card:hover .mini-project-image {
  transform: scale(1.025);
}

.mini-project-content {
  display: flex;
  flex-direction: column;

  padding: 20px;
}

.mini-project-content strong {
  font-size: 1.2rem;
}

.mini-project-content span {
  margin-top: 5px;

  color: var(--text-muted);

  font-size: 0.9rem;
}


/* ========================================
   CONTRIBUTED CLIENT WORK
======================================== */

.contribution-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 20px;

  margin-top: 30px;
}

.contribution-card {
  display: block;

  overflow: hidden;

  background: var(--card);

  border: 1px solid var(--border);
  border-radius: 13px;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.contribution-card:hover {
  transform: translateY(-4px);

  box-shadow: var(--shadow-soft);
}


/* ========================================
   CONTRIBUTION SCROLLING PREVIEW
======================================== */

.contribution-preview {
  position: relative;

  height: 220px;

  overflow: hidden;

  background: var(--surface-input);
}

.contribution-preview-image {
  width: 100%;
  display: block;
  transform: translateY(0);
  transition:
    transform 7s cubic-bezier(0.25, 0.1, 0.25, 1);
  background-color: #e3e1e1;
}

.contribution-card:hover .contribution-preview-image {
  transform: translateY(calc(-100% + 220px));
}


/* ========================================
   CONTRIBUTION CONTENT
======================================== */

.contribution-content {
  display: flex;
  flex-direction: column;

  padding: 25px;
}

.contribution-content strong {
  margin-top: 7px;

  font-size: 1.6rem;
}

.contribution-content > span:not(.contribution-link) {
  margin-top: 8px;

  color: var(--text-muted);

  font-size: 0.94rem;
}

.contribution-link {
  margin-top: 20px;

  color: var(--accent);
  font-weight: 650;

  font-size: 0.92rem;
}


/* ========================================
   INTERNAL PROJECTS
======================================== */

.internal-grid .project-card {
  min-height: 355px;
}

.text-project .project-content {
  justify-content: flex-start;
}


.tool-preview .project-preview-image {
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.5s ease;
}

.project-card:hover .tool-preview .project-preview-image {
  transform: scale(1.04);
}

/* ========================================
   CONTACT
======================================== */

.contact {
  text-align: center;
}

.contact .hero-links {
  justify-content: center;
}


/* ========================================
   FOOTER
======================================== */

footer {
  padding: 35px 0;

  border-top: 1px solid var(--border);

  color: var(--text-subtle);

  font-size: 0.9rem;
}


/* ========================================
   TABLET
======================================== */

@media (max-width: 900px) {

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-preview {
    height: 340px;
  }

  .project-card:hover .project-preview-image {
    transform: translateY(calc(-100% + 340px));
  }

  .mini-project-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 700px) {

  .container {
    width: min(92%, 1140px);
  }

  .section {
    padding: 78px 0;
  }

  .nav {
    min-height: 64px;
  }

  nav {
    gap: 13px;
  }

  nav a {
    font-size: 0.82rem;
  }

  nav a:nth-child(3) {
    display: none;
  }

  .hero {
    min-height: auto;

    padding: 110px 0 85px;
  }

  .hero h1 {
    font-size: clamp(3rem, 15vw, 5rem);
  }

  .hero h2 {
    font-size: 1.35rem;
  }


  /* Featured work */

  .project-preview {
    height: 235px;
  }

  .project-preview-image {
    transform: none !important;
  }


  /* Additional implementations */

  .mini-project-grid {
    grid-template-columns: 1fr;
  }

  .mini-project-image {
    height: 220px;
  }


  /* Contributed client work */

  .contribution-grid {
    grid-template-columns: 1fr;
  }

  .contribution-preview {
    height: 230px;
  }

  .contribution-preview-image {
    transform: none !important;
  }


  /* No hover hint on touch devices */

  .preview-hint {
    display: none;
  }

}


/* ========================================
   VERY SMALL SCREENS
======================================== */

@media (max-width: 460px) {

  nav {
    gap: 10px;
  }

  nav a {
    font-size: 0.76rem;
  }

  .project-content {
    padding: 24px;
  }

  .project-preview {
    height: 205px;
  }

  .contribution-preview {
    height: 205px;
  }

}

/* ========================================
   SKILLS SECTION
======================================== */

.skills-section {
  padding: 85px 0;
  border-top: 1px solid var(--border);
}

.skills-section h2 {
  margin-top: 10px;

  font-size: clamp(2.2rem, 5vw, 3.7rem);

  line-height: 1.08;

  letter-spacing: -0.045em;
}

.skills-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 22px;

  margin-top: 40px;
}

.skill-group {
  padding: 26px;

  background: var(--card);

  border: 1px solid var(--border);
  border-radius: 12px;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.skill-group:hover {
  transform: translateY(-3px);

  box-shadow: var(--shadow-soft);
}

.skill-group h3 {
  margin-bottom: 18px;

  font-size: 1.1rem;

  letter-spacing: -0.015em;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;

  gap: 8px;
}

.skill-tags span {
  padding: 7px 11px;

  background: var(--surface-muted);

  border-radius: 100px;

  color: var(--text-muted);

  font-size: 0.82rem;
}


/* ========================================
   EMAIL LINK
======================================== */

.email-link {
  color: var(--text);

  text-decoration: underline;

  text-decoration-thickness: 1px;
  text-underline-offset: 4px;

  transition: color 0.2s ease;
}

.email-link:hover {
  color: var(--accent-soft);
}


/* ========================================
   CONTACT POLISH
======================================== */

.contact > p:not(.section-label) {
  margin-top: 18px;
}

.contact .email-row {
  margin-top: 24px;

  font-size: 0.98rem;

  color: var(--text-muted);
}


/* ========================================
   MOBILE SKILLS
======================================== */

@media (max-width: 700px) {

  .skills-section {
    padding: 72px 0;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

}
