@import url('https://fonts.googleapis.com/css2?family=Istok+Web:wght@400;700&display=swap');

:root {
  --black: #000000;
  --white: #ffffff;
  --light-gray: #f5f5f5;
  --medium-gray: #e0e0e0;
  --dark-gray: #333333;
  --yellow-highlight: #ffed4e;
  --card-bg: #3a3a3a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: 'Istok Web', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--black);
}

body {
  background-color: var(--white);
  margin: 0;
  padding: 0;
}

/* Navigation */
nav {
  background-color: var(--black);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style-type: none;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

nav a {
  text-decoration: none;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: opacity 0.2s;
}

nav a:hover {
  opacity: 0.7;
}

.arrow {
  font-size: 0.8em;
  margin-left: 0.2em;
}

/* Header */
header {
  background-color: var(--light-gray);
  padding: 4rem 2rem;
  margin: 0;
  position: relative;
  overflow: hidden;
}


.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4rem;
}

.text-container {
  flex: 1;
  max-width: 600px;
}

h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.text-container p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: var(--black);
}

.interest {
  margin-top: 2rem !important;
}

.highlight {
  background-color: var(--yellow-highlight);
  padding: 0.1em 0.3em;
  font-weight: 500;
}

/* Dotted Letter D */
.letter-d {
  width: 250px;
  height: 250px;
  background-image: radial-gradient(circle, var(--dark-gray) 2px, transparent 2px);
  background-size: 12px 12px;
  background-position: 0 0;
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-family="Istok Web, sans-serif" font-size="90" font-weight="700">D</text></svg>');
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-family="Istok Web, sans-serif" font-size="90" font-weight="700">D</text></svg>');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  flex-shrink: 0;
  position: relative;
}

.letter-d.is-canvas {
  background-image: none;
  -webkit-mask-image: none;
  mask-image: none;
}

.letter-d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
}

.hero-container {
  position: relative;
  z-index: 1;
}

/* Projects Section */
section {
  padding: 4rem 2rem;
  background-color: var(--white);
}

#my-work {
  background-color: var(--light-gray);
  margin: 0;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  text-align: left;
  max-width: 1200px;
  margin: 0 auto 2rem auto;
  letter-spacing: -0.01em;
}

.project-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.project-card-link {
  text-decoration: none;
  color: inherit;
}

.project-card {
  background-color: var(--card-bg);
  border-radius: 1rem;
  aspect-ratio: 1.4 / 1;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 1);
}

/* Pixelated Canvas */
.pixelated-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 0.3s ease-in-out, filter 0.3s ease-in-out;
  z-index: 3;
  display: block;
  border-radius: 1rem;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  filter: grayscale(100%) contrast(1.4) brightness(1.1);
}

.project-card:hover .pixelated-canvas {
  filter: grayscale(0%) contrast(1) brightness(1);
}

.hidden-img {
  display: none;
}

.project-card:hover .pixelated-canvas {
  opacity: 0;
  pointer-events: none;
}

/* B&W Agfa Film Filter */
.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  background-size: inherit;
  background-position: inherit;
  filter: grayscale(100%) contrast(1.4) brightness(1.1) blur(4px);
  transition: filter 0.3s ease-in-out, opacity 0.3s ease-in-out;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

.project-card:hover::before {
  filter: grayscale(0%) contrast(1) brightness(1) blur(0px);
  opacity: 1;
  pointer-events: auto;
}

.project-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0) 100%);
  z-index: 4;
  transition: opacity 0.3s ease-in-out;
}

.project-card:hover::after {
  opacity: 0.5;
}

.project-card:hover {
  transform: translate(-16px, -12px);
  box-shadow: 16px 12px 0 0 rgba(0, 0, 0, 1);
}

/* Background Images */
.project-card[data-bg="starter-kit"] {
  background-image: url('images/thumbnail-starter-kit.png');
}

.project-card[data-bg="project-template"] {
  background-image: url('images/thumbnail-project-template.png');
}

.project-card[data-bg="prototyping"] {
  background-image: url('images/thumbnail-prototyping.png');
}

.project-card[data-bg="cat-cafe-maker"] {
  background-image: url('images/thumbnail-cat-cafe-maker.png');
}

.card-content {
  position: relative;
  z-index: 5;
}

.card-content h3 {
  color: var(--white);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.card-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  line-height: 1.4;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Footer */
footer {
  background-color: var(--black);
  padding: 1.5rem 2rem;
  text-align: center;
}

footer ul {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style-type: none;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

footer a {
  text-decoration: none;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: opacity 0.2s;
}

footer a:hover {
  opacity: 0.7;
}

/* Responsive Design */
@media(max-width: 988px){
  .hero-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .letter-d {
    width: 200px;
    height: 200px;
  }

  h2 {
    text-align: center;
  }

}

@media(max-width: 768px) {
  nav ul,
  footer ul {
    gap: 1.5rem;
    font-size: 0.85rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  .text-container p {
    font-size: 1rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-card {
    padding: 2rem;
  }

  .card-content h3 {
    font-size: 1.5rem;
  }

}