/*=============== ARCHIVE PAGE STYLES ===============*/

/*=============== ARCHIVE HEADER ===============*/
.archive__header {
	text-align: center;
	margin-bottom: 4rem;
	opacity: 0;
	animation: fadeInDown 0.8s ease forwards;
}

@keyframes fadeInDown {
	from {
		opacity: 0;
		transform: translateY(-30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.archive__title {
	font-size: var(--h1-font-size);
	color: var(--first-color);
	font-weight: var(--font-semibold);
	margin-bottom: 1rem;
	position: relative;
}

@keyframes expandLine {
	to {
		width: 60px;
	}
}

.archive__subtitle {
	font-size: var(--normal-font-size);
	color: var(--text-color-light);
	font-weight: var(--font-medium);
	opacity: 0;
	animation: fadeInUp 0.8s ease forwards 0.3s;
}

/*=============== ARCHIVE CONTENT ===============*/
.archive__content {
	max-width: 1000px;
	margin: 0 auto;
	position: relative;
	opacity: 0;
	animation: fadeInUp 0.8s ease forwards 0.6s;
}

/*=============== ARCHIVE TABLE ===============*/
.archive__table {
	background: transparent;
	border-radius: 0;
	overflow: visible;
	box-shadow: none;
}

/*=============== TABLE HEADER ===============*/
.archive__table-header {
	display: grid;
	grid-template-columns: 80px 2fr 1fr 2fr 100px;
	gap: 1.5rem;
	background: transparent;
	border-bottom: none;
	margin-bottom: 1rem;
	padding: 0 1.5rem;
	opacity: 0;
	animation: slideInLeft 0.8s ease forwards 0.9s;
}

@keyframes slideInLeft {
	from {
		opacity: 0;
		transform: translateX(-50px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.archive__col {
	font-size: var(--small-font-size);
	color: var(--text-color-light);
	font-weight: var(--font-medium);
	letter-spacing: 0.5px;
}

/*=============== TABLE BODY ===============*/
.archive__table-body {
	padding: 0;
}

/*=============== TABLE ROWS ===============*/
.archive__row {
	display: grid;
	grid-template-columns: 80px 2fr 1fr 2fr 100px;
	gap: 1.5rem;
	padding: 1.5rem;
	border-bottom: none;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: default;
	position: relative;
	border-radius: 0.5rem;
	opacity: 0;
	transform: translateY(20px);
	animation: fadeInUp 0.6s ease forwards;
	background: transparent;
	border: 1px solid transparent;
}

.archive__row:last-child {
	border-bottom: none;
}

.archive__row:hover {
	background: rgba(255, 255, 255, 0.05);
	transform: translateX(8px) translateY(-2px);
	border-color: rgba(100, 255, 218, 0.1);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Add title highlight on row hover */
.archive__row:hover .archive__title-link {
	color: var(--first-color);
	transform: translateX(5px);
}

/*=============== COLUMN CONTENT ===============*/
.archive__col {
	display: flex;
	align-items: center;
	font-size: var(--normal-font-size);
	color: var(--text-color);
	transition: all 0.3s ease;
}

/* Year column */
.archive__row .archive__col:first-child {
	color: var(--text-color-light);
	font-weight: var(--font-medium);
	font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
	transition: all 0.3s ease;
}

.archive__row:hover .archive__col:first-child {
	color: var(--first-color);
	transform: scale(1.05);
}

/* Title column */
.archive__title-link {
	color: var(--title-color);
	font-weight: var(--font-semibold);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
	position: relative;
}

.archive__title-link::after {
	content: "";
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 0;
	height: 1px;
	background: var(--first-color);
	transition: width 0.3s ease;
}

.archive__title-link:hover::after {
	width: 100%;
}

.archive__title-link:hover {
	color: var(--first-color);
}

/* Category column */
.archive__row .archive__col:nth-child(3) {
	color: var(--text-color-light);
	font-size: var(--small-font-size);
	transition: all 0.3s ease;
}

.archive__row:hover .archive__col:nth-child(3) {
	color: var(--text-color);
	transform: scale(1.02);
}

/* Built with column */
.archive__row .archive__col:nth-child(4) {
	color: var(--text-color-light);
	font-size: var(--small-font-size);
	line-height: 1.4;
	transition: all 0.3s ease;
}

.archive__row:hover .archive__col:nth-child(4) {
	color: var(--text-color);
}

/* Links column */
.archive__row .archive__col:last-child {
	justify-content: flex-start;
	gap: 0.75rem;
	transition: all 0.3s ease;
}

.archive__row:hover .archive__col:last-child {
	transform: translateX(5px);
}

/*=============== LINK ICONS ===============*/
.archive__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	color: var(--text-color-light);
	background: transparent;
	border-radius: 0;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
	position: relative;
	overflow: hidden;
}

.archive__link::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	background: rgba(100, 255, 218, 0.1);
	border-radius: 50%;
	transform: translate(-50%, -50%);
	transition: all 0.3s ease;
}

.archive__link:hover::before {
	width: 100%;
	height: 100%;
}

.archive__link:hover {
	color: var(--first-color);
	background: transparent;
	transform: translateY(-3px) scale(1.1);
}

.archive__link i {
	font-size: 1rem;
	transition: transform 0.3s ease;
	position: relative;
	z-index: 1;
}

.archive__link:hover i {
	transform: scale(1.1);
}

/*=============== BACK HOME BUTTON ===============*/
.back-home {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--text-color);
	font-size: var(--normal-font-size);
	font-weight: var(--font-medium);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
	position: relative;
	overflow: hidden;
	z-index: 101;
}

.back-home:hover::before {
	left: 100%;
}

.back-home:hover {
	color: var(--first-color);
	transform: translateX(-8px);
}

.back-home i {
	font-size: 1.2rem;
	transition: transform 0.3s ease;
}

.back-home:hover i {
	transform: translateX(-2px);
}

/*=============== LEFT SIDEBAR - SOCIAL MEDIA ===============*/
.archive__social {
	position: fixed;
	left: 2rem;
	bottom: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	z-index: 99;
	opacity: 0;
	animation: fadeInLeft 0.8s ease forwards 1.2s;
}

@keyframes fadeInLeft {
	from {
		opacity: 0;
		transform: translateX(-30px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.archive__social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	color: var(--text-color-light);
	background: transparent;
	border-radius: 0.5rem;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
	position: relative;
	overflow: hidden;
}

.archive__social-link::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	background: rgba(100, 255, 218, 0.1);
	border-radius: 50%;
	transform: translate(-50%, -50%);
	transition: all 0.3s ease;
}

.archive__social-link:hover::before {
	width: 100%;
	height: 100%;
}

.archive__social-link:hover {
	color: var(--first-color);
	transform: translateY(-5px) scale(1.1);
}

.archive__social-link i {
	font-size: 1.2rem;
	position: relative;
	z-index: 1;
	transition: transform 0.3s ease;
}

.archive__social-link:hover i {
	transform: scale(1.1);
}

/* Social media line */
.archive__social::after {
	content: "";
	width: 1px;
	height: 90px;
	background: var(--text-color-light);
	margin: 0 auto;
	margin-top: 1rem;
	animation: expandLine 1s ease forwards 1.5s;
	transform-origin: top;
}

/*=============== RIGHT SIDEBAR - EMAIL ===============*/
.archive__email {
	position: fixed;
	right: 2rem;
	bottom: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	z-index: 99;
	opacity: 0;
	animation: fadeInRight 0.8s ease forwards 1.2s;
}

@keyframes fadeInRight {
	from {
		opacity: 0;
		transform: translateX(30px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.archive__email-link {
	writing-mode: vertical-rl;
	color: var(--text-color-light);
	font-size: var(--small-font-size);
	font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
	letter-spacing: 0.1em;
	position: relative;
}

.archive__email-link::after {
	content: "";
	position: absolute;
	bottom: -5px;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 1px;
	background: var(--first-color);
	transition: width 0.3s ease;
}

.archive__email-link:hover::after {
	width: 100%;
}

.archive__email-link:hover {
	color: var(--first-color);
	transform: translateY(-5px);
}

/* Email line */
.archive__email::after {
	content: "";
	width: 1px;
	height: 90px;
	background: var(--text-color-light);
	margin: 0 auto;
	margin-top: 1rem;
	animation: expandLine 1s ease forwards 1.5s;
	transform-origin: top;
}

/*=============== RESPONSIVE DESIGN ===============*/
@media screen and (max-width: 968px) {
	.archive__table-header,
	.archive__row {
		grid-template-columns: 60px 1.5fr 1fr 1.5fr 80px;
		gap: 1rem;
		padding: 1.25rem;
	}

	.archive__table-header {
		padding: 0 1.25rem;
	}

	.archive__col {
		font-size: var(--small-font-size);
	}

	.archive__title-link {
		font-size: var(--normal-font-size);
	}
}

@media screen and (max-width: 768px) {
	.archive__content {
		margin: 0 1rem;
	}

	.archive__table-header,
	.archive__row {
		grid-template-columns: 1fr;
		gap: 0.75rem;
		padding: 1rem 0;
		text-align: left;
	}

	.archive__table-header {
		display: none; /* Hide header on mobile */
	}

	.archive__row {
		background: transparent;
		border-radius: 0.5rem;
		margin-bottom: 2rem;
		border: none;
		padding: 1rem;
	}

	.archive__row:hover {
		transform: translateY(-5px);
		background: rgba(255, 255, 255, 0.03);
	}

	.archive__row.featured:hover {
		transform: translateY(-5px);
		background: rgba(100, 255, 218, 0.05);
	}

	.archive__col {
		padding: 0.25rem 0;
	}

	/* Add labels for mobile */
	.archive__col:first-child::before {
		content: "Year: ";
		color: var(--first-color);
		font-weight: var(--font-medium);
		margin-right: 0.5rem;
	}

	.archive__col:nth-child(2)::before {
		content: "Title: ";
		color: var(--first-color);
		font-weight: var(--font-medium);
		margin-right: 0.5rem;
	}

	.archive__col:nth-child(3)::before {
		content: "Category: ";
		color: var(--first-color);
		font-weight: var(--font-medium);
		margin-right: 0.5rem;
	}

	.archive__col:nth-child(4)::before {
		content: "Built with: ";
		color: var(--first-color);
		font-weight: var(--font-medium);
		margin-right: 0.5rem;
	}

	.archive__col:last-child::before {
		content: "Links: ";
		color: var(--first-color);
		font-weight: var(--font-medium);
		margin-right: 0.5rem;
	}

	/* Hide sidebars on mobile */
	.archive__social,
	.archive__email {
		display: none;
	}
}

@media screen and (max-width: 480px) {
	.archive__header {
		margin-bottom: 2rem;
	}

	.archive__title {
		font-size: var(--h2-font-size);
	}

	.archive__subtitle {
		font-size: var(--small-font-size);
	}

	.archive__content {
		margin: 0 0.5rem;
	}

	.archive__row {
		padding: 0.75rem 0;
		margin-bottom: 1.5rem;
	}

	.archive__title-link {
		font-size: var(--small-font-size);
	}

	.archive__link {
		width: 28px;
		height: 28px;
	}

	.archive__link i {
		font-size: 0.9rem;
	}
}

/*=============== ENHANCED ANIMATIONS ===============*/
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Staggered animation for table rows */
.archive__row {
	animation: fadeInUp 0.6s ease forwards;
}

.archive__row:nth-child(1) {
	animation-delay: 1.1s;
}
.archive__row:nth-child(2) {
	animation-delay: 1.2s;
}
.archive__row:nth-child(3) {
	animation-delay: 1.3s;
}
.archive__row:nth-child(4) {
	animation-delay: 1.4s;
}
.archive__row:nth-child(5) {
	animation-delay: 1.5s;
}
.archive__row:nth-child(6) {
	animation-delay: 1.6s;
}
.archive__row:nth-child(7) {
	animation-delay: 1.7s;
}
.archive__row:nth-child(8) {
	animation-delay: 1.8s;
}
.archive__row:nth-child(9) {
	animation-delay: 1.9s;
}
.archive__row:nth-child(10) {
	animation-delay: 2s;
}

/*=============== SCROLLBAR STYLING ===============*/
.archive__content::-webkit-scrollbar {
	width: 6px;
}

.archive__content::-webkit-scrollbar-track {
	background: var(--container-color);
}

.archive__content::-webkit-scrollbar-thumb {
	background: var(--text-color-light);
	border-radius: 3px;
}

.archive__content::-webkit-scrollbar-thumb:hover {
	background: var(--text-color);
}
