@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@200;400&display=swap');

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Fira Code', monospace;
    font-weight: 200;
}

body {
      background: #0f0f0f;
      font-family: 'Fira Code', monospace;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: start;
      min-height: 100vh;
      padding: 24px;
      line-height: 1.4;
}

/* Main Container */
.container {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      max-width: 760px;
      width: 100%;
      margin: 0 auto;
}

/* Header Image */
.header_img {
      width: 64px;
      height: 64px;
      object-fit: cover;
      margin-bottom: 12px;
      display: block;
}

/* Header */
.header {
      grid-column: span 2;
      padding: 16px;
      border: 1px solid #242424;
      position: relative;
}

.header_top-right {
      position: absolute;
      top: 16px;
      right: 16px;
      text-align: right;
      color: #aaaaaa;
      font-size: 0.75rem;
}

.header_top-right .location {
      margin-bottom: 4px;
}

.header_top-right .time {
      font-weight: bold;
      color: #ffffff;
}

.header_title {
      color: #ffffff;
      font-size: 1rem;
}

.header_subtitle {
      color: #aaaaaa;
      font-size: 1rem;
      margin-top: 4px;
}

/* Contacts */
.contacts {
      margin-top: 24px;
      display: grid;
      gap: 0px;
}

.contact-item_label {
      font-size: 0.75rem;
      color: #aaaaaa;
      margin-right: 16px;
}

.contact-item_link:hover {
      color: #aaaaaa;
}

.contact-item_link::before {
  content: "[";
  margin-right: 2px;
  color: #aaaaaa;
}

.contact-item_link {
      font-size: 0.75rem;
      color: #ffffff;
      text-decoration: none;
}

.contact-item_link::after {
  content: "]";
  margin-left: 2px;
  color: #aaaaaa;
}

/* Skills */
.skills {
    margin-top: 24px;
}

.skills_title {
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 12px;
}

.skills_list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill {
    font-size: 0.7rem;
    color: #f0f0f0;
    padding: 6px 10px;
    border: 1px solid #242424;
    background: #1a1a1a;
    transition: background 0.2s ease, transform 0.2s ease;
    cursor: default;
}

.skill:hover {
    background: #242424;
    transform: translateY(-2px);
}

/* Resume Section */
.resume {
    margin-top: 24px;
}

.resume_title {
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 12px;
}

.resume_btn {
    display: inline-flex; /* aligns text + icon */
    align-items: center;
    gap: 6px; /* spacing between text and icon */
    font-size: 0.75rem;
    color: #f0f0f0;
    text-decoration: none;
    padding: 8px 14px;
    border: 1px solid #242424;
    background: #1a1a1a;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.resume_btn:hover {
    background: #242424;
    color: #ffffff;
    transform: translateY(-2px);
}

.resume_icon {
    width: 16px;
    height: 16px;
}

/* Projects grid (2 columns) */
.projects {
      grid-column: span 2;
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      counter-reset: project-counter; /* initialize counter */
}

.project_item1, .project_item3 {
      border-right: 1px solid #242424;
      border-left: 1px solid #242424;
      border-bottom: 1px solid #242424;
      display: flex;
      flex-direction: column;
      padding: 16px;
      position: relative; /* for overlay link */
}

.project_item2, .project_item4 {
      border-right: 1px solid #242424;
      border-bottom: 1px solid #242424;
      display: flex;
      flex-direction: column;
      padding: 16px;
      position: relative; /* for overlay link */
}

/* Transparent overlay link to make entire project clickable */
.project_card-link {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 2; /* above images, below info/button */
      text-decoration: none;
      cursor: pointer;
}

/* Project Image */
.project_img-wrapper {
      position: relative;
      width: 100%;
      height: 300px;
      overflow: hidden;
      border-bottom: 1px solid #242424;
      z-index: 1; /* below overlay link */
}

.project_img-default,
.project_img-hover {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: opacity 0.4s ease, transform 0.4s ease;
}

.project_img-default {
      opacity: 1;
      z-index: 1;
}

.project_img-hover {
      opacity: 0;
      z-index: 2;
      transform: scale(1.05);
}

.project_item1:hover .project_img-default,
.project_item2:hover .project_img-default,
.project_item3:hover .project_img-default,
.project_item4:hover .project_img-default {
    opacity: 0;
    transform: scale(1.05);
}

.project_item1:hover .project_img-hover,
.project_item2:hover .project_img-hover,
.project_item3:hover .project_img-hover,
.project_item4:hover .project_img-hover {
    opacity: 1;
    transform: scale(1);
}

/* Project Info */
.project_info {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-top: 12px;
      position: relative; /* above overlay link */
      z-index: 3;
}

/* Project counter */ 
.project_title::before {
      counter-increment: project-counter;
      content: counter(project-counter, decimal-leading-zero) "/ ";
      color: #aaaaaa;
      margin-right: 4px;
}

.project_title {
      font-size: 0.75rem;
      color: #f0f0f0;
      text-align: start;
}

/* Project links */
.project_links {
    display: flex;
    gap: 4px; /* spacing between [link] and [code] */
}

.project_link::before {
      content: "[";
      margin-right: 2px;
      color: #aaaaaa;
}

.project_link {
      font-size: 0.7rem;
      color: #aaaaaa;
      text-decoration: none;
      transition: color 0.2s ease;
      position: relative; /* above overlay link */
      z-index: 4;
}

.project_link::after {
      content: "]";
      margin-right: 2px;
      color: #aaaaaa;
}

.project_link:hover {
      color: #ffffff;
}

/* Blogs Header */
.blogs_header {
    grid-column: span 2;
    margin: 0; /* remove spacing to touch neighbors */
    padding: 16px; /* match .header padding */
    border-right: 1px solid #242424;
    border-left: 1px solid #242424;
    border-bottom: 1px solid #242424; /* match .header border */
}

.blogs_title {
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 4px;
}

.blogs_subtitle {
    font-size: 0.75rem;
    color: #aaaaaa;
}

/* Blogs grid */
.blogs {
    grid-column: span 2;
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* 1 column for now */
    gap: 0;
}

/* Individual Blog Card */
.blog_item1,
.blog_item2,
.blog_item3,
.blog_item4,
.blog_item5 {
    border-right: 1px solid #242424;
    border-left: 1px solid #242424;
    border-bottom: 1px solid #242424;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background 0.2s ease;
}

.blog_item1:hover,
.blog_item2:hover,
.blog_item3:hover,
.blog_item4:hover,
.blog_item5:hover {
    background: #1a1a1a;
}

/* Blog content: title + icon on same line */
.blog_content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.blog_title {
    font-size: 0.75rem;
    color: #f0f0f0;
}

.blog_icon {
    font-size: 1rem;
    color: #aaaaaa;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    /* Container becomes single column */
    .container {
        display: grid;
        grid-template-columns: 1fr;
        max-width: 100%;
        padding: 12px;
    }

    /* Header adjustments */
    .header {
        padding: 12px;
    }

    .header_img {
        width: 48px;
        height: 48px;
        margin-bottom: 8px;
    }

    .header_title {
        font-size: 0.9rem;
    }

    .header_subtitle {
        font-size: 0.8rem;
    }

    .header_top-right {
        font-size: 0.65rem;
        top: 8px;
        right: 8px;
    }

    /* Contacts stacked vertically */
    .contacts {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    /* Skills adjustments */
    .skills_list {
        gap: 6px;
    }

    .skill {
        font-size: 0.65rem;
        padding: 4px 8px;
    }

    /* Resume button smaller */
    .resume_btn {
        font-size: 0.7rem;
        padding: 6px 10px;
    }

    /* Projects grid single column */
    .projects {
        grid-template-columns: 1fr;
    }

    .project_item1,
    .project_item2,
    .project_item3,
    .project_item4 {
        border-left: none;
        border-right: none;
    }

    .project_img-wrapper {
        height: 200px;
    }

    /* Blogs adjustments */
    .blogs_header {
        padding: 12px;
    }

    .blog_item1,
    .blog_item2,
    .blog_item3,
    .blog_item4,
    .blog_item5 {
        padding: 12px;
    }

    .blog_title {
        font-size: 0.7rem;
    }

    .blog_icon {
        font-size: 0.85rem;
    }
}