main{
  justify-content: center;
}

#about-title{
  font-weight: 500;
}

p{
  line-height: 170%;
  font-size: var(--text-font-size);
}

form{
  display: flex;
  flex-direction: column;
  gap: var(--item-gap);
  margin: var(--heading-spacing);
}

form > div{
  display: flex;
  gap: 2rem;
}

form > div > input{
  background: none;
  width: 50%;
  border: none;
  border-bottom: 2px solid #ccc;
  color: var(--fg);
  padding: .5rem 0;
  font-family: inherit;
  font-size: var(--input-font-size);
}

form > textarea{
  font-family: inherit;
  background: none;
  color: var(--fg);
  border: none;
  padding: .5rem 0;
  border-bottom: 2px solid #ccc;
  font-size: var(--input-font-size);
}

form > button{
  background-color: var(--red); 
  border: none;
  color: var(--fg);
  padding: .75rem;
  font-family: "Garamond Bold";
  font-size: var(--button-font-size);
  border-radius: 2px;
}

form > button:hover{
  cursor: pointer;
  transition: .2s linear;
  opacity: 90%;
}

::placeholder{
  color: var(--fg);
}

.section-spacer{
  margin: var(--spacing);
}

#stats-strip {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

#stats-strip > h1 {
  margin: 0;
}

#stats-numbers {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.stat {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--red);
  padding-left: 1rem;
  gap: .2rem;
}

.stat-value {
  font-family: "Garamond-Bold";
  font-size: 1.8em;
  line-height: 1;
}

.stat-label {
  font-size: var(--selector-size);
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.codeberg-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  text-decoration: none;
  color: var(--fg);
  border: 1px solid #333;
  padding: .35rem .8rem;
  font-size: var(--selector-size);
  transition: border-color .2s, color .2s;
  margin-left: auto;
}

.codeberg-link i {
  font-size: inherit;
  color: inherit;
}

.codeberg-link:hover {
  border-color: var(--red);
  color: var(--red);
}

#codeberg-graph svg {
  width: 100%;
  height: auto;
  display: block;
}

.repo-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.repo-card {
  border: 1px solid #222;
  padding: 1rem 1.2rem;
  text-decoration: none;
  color: var(--fg);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #0a0a0a;
}

.repo-card:hover {
  border-color: var(--red);
  box-shadow: 0 0 12px rgba(255,0,0,0.12);
}

.repo-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.repo-card-name {
  font-family: monospace;
  font-size: var(--selector-size);
  color: var(--red);
  font-weight: bold;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repo-card-lang {
  font-size: 0.75em;
  opacity: 0.5;
  border: 1px solid #333;
  padding: 0.1rem 0.4rem;
  font-family: monospace;
  white-space: nowrap;
  flex-shrink: 0;
}

.repo-card-desc {
  font-size: var(--selector-size);
  opacity: 0.65;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  flex: 1;
}

.repo-card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85em;
  opacity: 0.45;
  font-family: monospace;
  margin-top: auto;
}




.activity-subsection {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.subsection-title {
  font-size: var(--selector-size);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.5;
  margin: 0;
}

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

.commit-entry {
  display: grid;
  grid-template-columns: 10rem 4.5rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid #1a1a1a;
  background: #0a0a0a;
  font-family: monospace;
  font-size: 0.82em;
  transition: border-color 0.2s;
}

.commit-entry:hover {
  border-color: #333;
}

.commit-repo {
  color: var(--red);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commit-repo:hover {
  text-decoration: underline;
}

.commit-sha {
  color: #666;
  text-decoration: none;
  font-size: 0.9em;
}

.commit-sha:hover {
  color: var(--fg);
}

.commit-msg {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.7;
}

.commit-time {
  opacity: 0.4;
  white-space: nowrap;
  text-align: right;
}

.socials{
  margin: var(--heading-spacing);
  display: flex;
  justify-content: center;

}

.socials > a{
  text-decoration: none;
  color: var(--fg);
  font-size: var(--icon-size);
  width: 100%;
  height: var(--icon-size);
}


#project-container{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  width: 100%;
}

@media (min-width: 2560px) {
  #project-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 3840px) {
  #project-container {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.75rem;
  }
}

.project-item img{
  object-fit: cover;
  width: 100%;
  flex: 1;
  min-height: 0;
  display: block;
  transition: transform 0.4s ease;
}
@keyframes rotate {
  to {
    --angle: 360deg;
  }
}



@property --angle {
  syntax: '<angle>';
  initial-value: 12deg;
  inherits: false;
}


/* Update your 1st item (and every 4th after) */
.project-item{
  background: black;
  position: relative;
  overflow: hidden;
  --angle: 12deg;
  border: 1px solid transparent;
  animation: 10s rotate linear infinite;
  aspect-ratio: 1 / 1;
  border-image: linear-gradient(var(--angle), #ff0000, black) 1;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.159);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.project-item:hover {
  transform: scale(1.02);
  box-shadow: 0 0 35px rgba(255, 0, 0, 0.35);
}

.project-item:hover img {
  transform: scale(1.06);
}



.project-item > p{
  overflow-y: scroll;
  width:100%;
  height: auto;
}

.project-description {
  padding: 14pt 8pt;
  display: flex;
  justify-content: space-between;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  transition: background 0.3s ease;
}

.project-item:hover .project-description {
  background: rgba(8,0,0,0.92);
}

.project-description > a{
  text-decoration: none;
  color: #700c0c;
}

.project-description > a:hover{
  color: #ccc;
}

.project-description > span{
  font-size: var(--text-font-size);
  font-weight: bold;
}

/* ---- Gallery masonry grid ---- */
.gallery-grid {
  columns: 3 260px;
  column-gap: 1rem;
  padding: 1rem var(--spacing, 1rem);
}

.gallery-card {
  break-inside: avoid;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
  --angle: 12deg;
  border: 1px solid transparent;
  animation: 10s rotate linear infinite;
  border-image: linear-gradient(var(--angle), #ff0000, black) 1;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.159);
}

.gallery-card img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.25s ease;
}

.gallery-card:hover img {
  transform: scale(1.04);
}

@media (min-width: 2560px) {
  .gallery-grid {
    columns: 5 260px;
  }
}

@media (min-width: 3840px) {
  .gallery-grid {
    columns: 8 260px;
  }
}